@wix/bookings 1.0.310 → 1.0.311

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 (221) hide show
  1. package/build/cjs/index.d.ts +5 -3
  2. package/build/cjs/index.js +6 -4
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +5 -3
  5. package/build/cjs/index.typings.js +6 -4
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +5 -3
  8. package/build/cjs/meta.js +6 -4
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js +12 -10
  11. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js.map +1 -1
  12. package/build/cjs/src/bookings-availability-v1-slot-availability.types.d.ts +9 -9
  13. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -9
  14. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +5 -0
  15. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  16. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.http.d.ts +223 -0
  17. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.http.js +504 -0
  18. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.http.js.map +1 -0
  19. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.meta.d.ts +14 -0
  20. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.meta.js +66 -0
  21. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.meta.js.map +1 -0
  22. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.public.d.ts +9 -0
  23. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.public.js +20 -0
  24. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.public.js.map +1 -0
  25. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.types.d.ts +805 -0
  26. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.types.js +14 -0
  27. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.types.js.map +1 -0
  28. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.universal.d.ts +1106 -0
  29. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.universal.js +339 -0
  30. package/build/cjs/src/bookings-availability-v2-time-slot-availability-time-slots.universal.js.map +1 -0
  31. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +223 -0
  32. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.js +436 -0
  33. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  34. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +805 -0
  35. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.js +14 -0
  36. package/build/cjs/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  37. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +223 -0
  38. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +504 -0
  39. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +1 -0
  40. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +14 -0
  41. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +66 -0
  42. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +1 -0
  43. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts +9 -0
  44. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +20 -0
  45. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +1 -0
  46. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +805 -0
  47. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +14 -0
  48. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -0
  49. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +1083 -0
  50. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +337 -0
  51. package/build/cjs/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -0
  52. package/build/cjs/src/bookings-calendar-v1-session.http.js +85 -80
  53. package/build/cjs/src/bookings-calendar-v1-session.http.js.map +1 -1
  54. package/build/cjs/src/bookings-calendar-v1-session.types.d.ts +2 -4
  55. package/build/cjs/src/bookings-calendar-v1-session.types.js.map +1 -1
  56. package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +2 -4
  57. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
  58. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.js +30 -98
  59. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.js.map +1 -1
  60. package/build/cjs/src/bookings-calendar-v2-session-view.http.js +10 -13
  61. package/build/cjs/src/bookings-calendar-v2-session-view.http.js.map +1 -1
  62. package/build/cjs/src/bookings-calendar-v2-session-view.types.d.ts +2 -0
  63. package/build/cjs/src/bookings-calendar-v2-session-view.universal.d.ts +2 -0
  64. package/build/cjs/src/bookings-calendar-v2-session-view.universal.js.map +1 -1
  65. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js +20 -64
  66. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -1
  67. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +33 -1
  68. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +6 -7
  69. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
  70. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +8 -8
  71. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js +3 -3
  72. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
  73. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +27 -30
  74. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -1
  75. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +11 -6
  76. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  77. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +11 -6
  78. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  79. package/build/cjs/src/bookings-services-v2-service.http.js +192 -161
  80. package/build/cjs/src/bookings-services-v2-service.http.js.map +1 -1
  81. package/build/cjs/src/bookings-services-v2-service.public.d.ts +2 -2
  82. package/build/cjs/src/bookings-services-v2-service.public.js +10 -1
  83. package/build/cjs/src/bookings-services-v2-service.public.js.map +1 -1
  84. package/build/cjs/src/bookings-services-v2-service.types.d.ts +624 -40
  85. package/build/cjs/src/bookings-services-v2-service.types.js +66 -4
  86. package/build/cjs/src/bookings-services-v2-service.types.js.map +1 -1
  87. package/build/cjs/src/bookings-services-v2-service.universal.d.ts +658 -57
  88. package/build/cjs/src/bookings-services-v2-service.universal.js +67 -5
  89. package/build/cjs/src/bookings-services-v2-service.universal.js.map +1 -1
  90. package/build/cjs/src/bookings-v2-attendance.http.js +8 -37
  91. package/build/cjs/src/bookings-v2-attendance.http.js.map +1 -1
  92. package/build/cjs/src/bookings-v2-attendance.types.d.ts +1 -1
  93. package/build/cjs/src/bookings-v2-attendance.universal.d.ts +1 -3
  94. package/build/cjs/src/bookings-v2-attendance.universal.js +0 -2
  95. package/build/cjs/src/bookings-v2-attendance.universal.js.map +1 -1
  96. package/build/cjs/src/bookings-v2-booking.http.d.ts +3 -5
  97. package/build/cjs/src/bookings-v2-booking.http.js +234 -155
  98. package/build/cjs/src/bookings-v2-booking.http.js.map +1 -1
  99. package/build/cjs/src/bookings-v2-booking.public.d.ts +1 -1
  100. package/build/cjs/src/bookings-v2-booking.types.d.ts +28 -8
  101. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -1
  102. package/build/cjs/src/bookings-v2-booking.universal.d.ts +31 -13
  103. package/build/cjs/src/bookings-v2-booking.universal.js +3 -5
  104. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -1
  105. package/build/cjs/src/bookings-v2-price-info.http.js +48 -40
  106. package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -1
  107. package/build/cjs/src/bookings-v2-price-info.types.d.ts +7 -1
  108. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -1
  109. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +5 -1
  110. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -1
  111. package/build/es/index.d.ts +5 -3
  112. package/build/es/index.js +5 -3
  113. package/build/es/index.js.map +1 -1
  114. package/build/es/index.typings.d.ts +5 -3
  115. package/build/es/index.typings.js +5 -3
  116. package/build/es/index.typings.js.map +1 -1
  117. package/build/es/meta.d.ts +5 -3
  118. package/build/es/meta.js +5 -3
  119. package/build/es/meta.js.map +1 -1
  120. package/build/es/src/bookings-availability-v1-slot-availability.http.js +12 -10
  121. package/build/es/src/bookings-availability-v1-slot-availability.http.js.map +1 -1
  122. package/build/es/src/bookings-availability-v1-slot-availability.types.d.ts +9 -9
  123. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -9
  124. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +5 -0
  125. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  126. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.http.d.ts +223 -0
  127. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.http.js +497 -0
  128. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.http.js.map +1 -0
  129. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.meta.d.ts +14 -0
  130. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.meta.js +38 -0
  131. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.meta.js.map +1 -0
  132. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.public.d.ts +9 -0
  133. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.public.js +14 -0
  134. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.public.js.map +1 -0
  135. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.types.d.ts +805 -0
  136. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.types.js +11 -0
  137. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.types.js.map +1 -0
  138. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.universal.d.ts +1106 -0
  139. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.universal.js +311 -0
  140. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.universal.js.map +1 -0
  141. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +223 -0
  142. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js +429 -0
  143. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  144. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +805 -0
  145. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js +11 -0
  146. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  147. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +223 -0
  148. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +497 -0
  149. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +1 -0
  150. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +14 -0
  151. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +38 -0
  152. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +1 -0
  153. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts +9 -0
  154. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +14 -0
  155. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +1 -0
  156. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +805 -0
  157. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +11 -0
  158. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -0
  159. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +1083 -0
  160. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +309 -0
  161. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -0
  162. package/build/es/src/bookings-calendar-v1-session.http.js +85 -80
  163. package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -1
  164. package/build/es/src/bookings-calendar-v1-session.types.d.ts +2 -4
  165. package/build/es/src/bookings-calendar-v1-session.types.js.map +1 -1
  166. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +2 -4
  167. package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -1
  168. package/build/es/src/bookings-calendar-v2-external-calendar.http.js +30 -98
  169. package/build/es/src/bookings-calendar-v2-external-calendar.http.js.map +1 -1
  170. package/build/es/src/bookings-calendar-v2-session-view.http.js +10 -13
  171. package/build/es/src/bookings-calendar-v2-session-view.http.js.map +1 -1
  172. package/build/es/src/bookings-calendar-v2-session-view.types.d.ts +2 -0
  173. package/build/es/src/bookings-calendar-v2-session-view.universal.d.ts +2 -0
  174. package/build/es/src/bookings-calendar-v2-session-view.universal.js.map +1 -1
  175. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js +20 -64
  176. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -1
  177. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +33 -1
  178. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +6 -7
  179. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
  180. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +8 -8
  181. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js +3 -3
  182. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
  183. package/build/es/src/bookings-reader-v2-extended-booking.http.js +27 -30
  184. package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -1
  185. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +11 -6
  186. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  187. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +11 -6
  188. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  189. package/build/es/src/bookings-services-v2-service.http.js +192 -161
  190. package/build/es/src/bookings-services-v2-service.http.js.map +1 -1
  191. package/build/es/src/bookings-services-v2-service.public.d.ts +2 -2
  192. package/build/es/src/bookings-services-v2-service.public.js +1 -1
  193. package/build/es/src/bookings-services-v2-service.public.js.map +1 -1
  194. package/build/es/src/bookings-services-v2-service.types.d.ts +624 -40
  195. package/build/es/src/bookings-services-v2-service.types.js +65 -3
  196. package/build/es/src/bookings-services-v2-service.types.js.map +1 -1
  197. package/build/es/src/bookings-services-v2-service.universal.d.ts +658 -57
  198. package/build/es/src/bookings-services-v2-service.universal.js +66 -4
  199. package/build/es/src/bookings-services-v2-service.universal.js.map +1 -1
  200. package/build/es/src/bookings-v2-attendance.http.js +8 -37
  201. package/build/es/src/bookings-v2-attendance.http.js.map +1 -1
  202. package/build/es/src/bookings-v2-attendance.types.d.ts +1 -1
  203. package/build/es/src/bookings-v2-attendance.universal.d.ts +1 -3
  204. package/build/es/src/bookings-v2-attendance.universal.js +0 -2
  205. package/build/es/src/bookings-v2-attendance.universal.js.map +1 -1
  206. package/build/es/src/bookings-v2-booking.http.d.ts +3 -5
  207. package/build/es/src/bookings-v2-booking.http.js +234 -155
  208. package/build/es/src/bookings-v2-booking.http.js.map +1 -1
  209. package/build/es/src/bookings-v2-booking.public.d.ts +1 -1
  210. package/build/es/src/bookings-v2-booking.types.d.ts +28 -8
  211. package/build/es/src/bookings-v2-booking.types.js.map +1 -1
  212. package/build/es/src/bookings-v2-booking.universal.d.ts +31 -13
  213. package/build/es/src/bookings-v2-booking.universal.js +3 -5
  214. package/build/es/src/bookings-v2-booking.universal.js.map +1 -1
  215. package/build/es/src/bookings-v2-price-info.http.js +48 -40
  216. package/build/es/src/bookings-v2-price-info.http.js.map +1 -1
  217. package/build/es/src/bookings-v2-price-info.types.d.ts +7 -1
  218. package/build/es/src/bookings-v2-price-info.types.js.map +1 -1
  219. package/build/es/src/bookings-v2-price-info.universal.d.ts +5 -1
  220. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -1
  221. package/package.json +2 -2
@@ -0,0 +1,339 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.getAvailabilityTimeSlot = exports.listAvailabilityTimeSlots = exports.LocationType = exports.__debug = void 0;
36
+ const velo_1 = require("@wix/metro-runtime/velo");
37
+ const ambassadorWixBookingsAvailabilityV2TimeSlot = __importStar(require("./bookings-availability-v2-time-slot-availability-time-slots.http"));
38
+ let __verbose = false;
39
+ function __log(...args) {
40
+ __verbose && console.log(...args);
41
+ }
42
+ function __inspect(obj) {
43
+ return obj;
44
+ }
45
+ exports.__debug = {
46
+ verboseLogging: {
47
+ on: () => (__verbose = true),
48
+ off: () => (__verbose = false),
49
+ },
50
+ };
51
+ const _toVeloEntity = '$';
52
+ const _fromVeloEntity = '$';
53
+ var LocationType;
54
+ (function (LocationType) {
55
+ LocationType["UNKNOWN_LOCATION_TYPE"] = "UNKNOWN_LOCATION_TYPE";
56
+ /** A business location, either the default business address, or locations defined for the business by the Business Info. */
57
+ LocationType["BUSINESS"] = "BUSINESS";
58
+ /** The location is unique to this service and isn't defined as one of the business locations. */
59
+ LocationType["CUSTOM"] = "CUSTOM";
60
+ /** The location can be determined by the customer and is not set up beforehand. */
61
+ LocationType["CUSTOMER"] = "CUSTOMER";
62
+ })(LocationType || (exports.LocationType = LocationType = {}));
63
+ const _getAvailabilityTimeSlotRequest = {};
64
+ const _getAvailabilityTimeSlotResponse = {};
65
+ const _listAvailabilityTimeSlotsRequest = {};
66
+ const _listAvailabilityTimeSlotsResponse = {};
67
+ /**
68
+ * Retrieves a list of `TimeSlot`s that match the provided filters.
69
+ *
70
+ * <blockquote class="important">
71
+ * <p><strong>Important:</strong>
72
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
73
+ * </blockquote>
74
+ *
75
+ * The request body __must__ include either:
76
+ * + All of the following filters: `serviceId`, `fromLocalDate`, `toLocalDate`, and `timeZone`.
77
+ * You may add additional filters as you wish.
78
+ * + A `cursorPaging` with a valid `cursor` from previous response.
79
+ *
80
+ *
81
+ * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
82
+ * represents the availability of the service in a specific location,
83
+ * and has a `localStartDate` within the range of the provided `fromLocalDate` and `toLocalDate` exclusive.
84
+ * The `localEndDate` of a `TimeSlot` is calculated as the sum of the `TimeSlot`'s `localStartDate` and the duration of the service.
85
+ *
86
+ * By default,
87
+ * the response contains at most 1000 results.
88
+ * If there are more than 1000 results, we return a `cursorPagingMetadata` with
89
+ * a cursor for the next page of results, regardless of whether a `cursorPaging`
90
+ * was provided in request.
91
+ *
92
+ * ### AvailableResources in response
93
+ * The `TimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
94
+ * within the time slot. Each `AvailableResources` contains information about available resources of the same type.
95
+ *
96
+ * <blockquote class="important">
97
+ * <p><strong>Important:</strong><br/>
98
+ * By default,
99
+ * if you don't specify <code class="grey-background">includeResourceTypeIds</code>
100
+ * or <code class="grey-background">resourceIds</code> filters in request,
101
+ * we return TimeSlots with an empty <code class="grey-background">AvailableResources</code>.
102
+ * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
103
+ * 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/availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-the-selected-service-is-available-for)
104
+ * is an example for such flow.
105
+ * </p>
106
+ * </blockquote>
107
+ *
108
+ * If you wish to get a list of available resources for each `TimeSlot` you should either:
109
+ * + provide `resourceIds` in request.
110
+ * + provide `includeResourceTypeIds` in request.
111
+ *
112
+ * __Notes:__
113
+ * + In both cases the returned TimeSlots contains __up__ to 10 `AvailableResources` that match the provided filters.
114
+ * Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.
115
+ * + If an `AvailableResources` has more available resources which are not listed within it,
116
+ * we return `AvailableResources`.`hasMoreAvailableResources` as true.
117
+ * > __Note:__
118
+ * > If you wish to get the full available resources list for a specific `TimeSlot`,
119
+ * > you should call [GetAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/get-availability-time-slot).
120
+ *
121
+ *
122
+ * ### Availability VS Bookability
123
+ * An `available` time slot is not necessarily `bookable`.
124
+ * The `bookable` field of a `TimeSlot` indicates whether a customer can book the service within the given time slot,
125
+ * at a specific period of time.
126
+ * Read more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/introduction#all-apis_wix-service-availability_service-availability-time-slots_introduction_availability-vs-bookability).
127
+ *
128
+ * By default,
129
+ * + The response does not contains `unavailable` TimeSlots.
130
+ * For example,
131
+ * if there are no available resources to provide the service from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`,
132
+ * we don't return TimeSlots with `localStartDate` within this range.
133
+ * + The response contains both `bookable` and `un-bookable` TimeSlots.
134
+ * For example,
135
+ * if the service has a booking policy which enforces booking the service up to 10 minutes before the session starts,
136
+ * we return TimeSlots with the violating `localStartDate` with `bookable` as false.
137
+ * If you wish to list only available __bookable__ TimeSlots you should pass `bookable` filter as true.
138
+ *
139
+ * <blockquote class="important">
140
+ * <p><strong>Important:</strong>
141
+ * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
142
+ * Read more about <a href="https://bo.wix.com/wix-docs/rest/all-apis/service-availability/availability-time-slots/introduction?localViewerId=inbari#all-apis_service-availability_availability-time-slots_introduction_daylight-saving-time-dst-handling">DST Handling</a></p>
143
+ * </blockquote>
144
+ *
145
+ *
146
+ * ### ListAvailabilityTimeSlots runs with the following defaults
147
+ * + `localStartDate` is sorted in `ASC` order
148
+ * + `cursorPaging`.`limit` is `1000`
149
+ * @public
150
+ * @documentationMaturity preview
151
+ * @permissionScope Read Bookings - Public Data
152
+ * @permissionScope Manage Bookings Services and Settings
153
+ * @permissionScope Read Bookings - Including Participants
154
+ * @permissionScope Read Bookings - all read permissions
155
+ * @permissionScope Read Bookings Calendar Availability
156
+ * @permissionScope Manage Bookings - all permissions
157
+ * @applicableIdentity APP
158
+ * @applicableIdentity MEMBER
159
+ * @applicableIdentity VISITOR
160
+ */
161
+ function listAvailabilityTimeSlots(options) {
162
+ var _a, _b, _c;
163
+ return __awaiter(this, arguments, void 0, function* () {
164
+ const requestTransformation = {
165
+ serviceId: '$[0].serviceId',
166
+ fromLocalDate: '$[0].fromLocalDate',
167
+ toLocalDate: '$[0].toLocalDate',
168
+ timeZone: '$[0].timeZone',
169
+ locations: '$[0].locations',
170
+ resourceIds: '$[0].resourceIds',
171
+ includeResourceTypeIds: '$[0].includeResourceTypeIds',
172
+ bookable: '$[0].bookable',
173
+ bookingPolicyViolations: '$[0].bookingPolicyViolations',
174
+ timeSlotsPerDay: '$[0].timeSlotsPerDay',
175
+ cursorPaging: '$[0].cursorPaging',
176
+ };
177
+ const responseTransformation = '$';
178
+ // @ts-ignore
179
+ const { httpClient, sideEffects } = arguments[1];
180
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
181
+ rootSchema: _listAvailabilityTimeSlotsRequest,
182
+ depSchemas: {},
183
+ fqdnTransformation: {
184
+ paths: [],
185
+ transformation: _fromVeloEntity,
186
+ },
187
+ customTransformation: requestTransformation,
188
+ });
189
+ const { fromJSON } = (0, velo_1.serializer)({
190
+ rootSchema: _listAvailabilityTimeSlotsResponse,
191
+ depSchemas: {},
192
+ fqdnTransformation: {
193
+ paths: [...['Array#timeSlots']],
194
+ transformation: _toVeloEntity,
195
+ },
196
+ customTransformation: responseTransformation,
197
+ });
198
+ const payload = toAmbassadorRequest([options]);
199
+ const reqOpts = ambassadorWixBookingsAvailabilityV2TimeSlot.listAvailabilityTimeSlots(payload);
200
+ __log(`"ListAvailabilityTimeSlots" sending request with: ${__inspect(reqOpts)}`);
201
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
202
+ try {
203
+ const result = yield httpClient.request(reqOpts);
204
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
205
+ return fromJSON(result.data);
206
+ }
207
+ catch (err) {
208
+ const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
209
+ 'options',
210
+ ]);
211
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
212
+ throw transformedError;
213
+ }
214
+ });
215
+ }
216
+ exports.listAvailabilityTimeSlots = listAvailabilityTimeSlots;
217
+ /**
218
+ * Retrieves an available `TimeSlot` that match the provided filters.
219
+ *
220
+ * Throws `SlotNotFound` if there is no such available time slot.
221
+ *
222
+ * <blockquote class="important">
223
+ * <p><strong>Important:</strong><br/>
224
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
225
+ * </blockquote>
226
+ *
227
+ * By default,
228
+ * if you don't provide `includeResourceTypeIds` or `resourceIds` in request,
229
+ * we return all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
230
+ * the service within the time slot.
231
+ *
232
+ * If you specify `includeResourceTypeIds` or `resourceIds` in request,
233
+ * the returned `TimeSlot` will contain only `AvailableResources` with at least one available resource
234
+ * which match the given resources filters,
235
+ * each contains all available resources out of those requested.
236
+ *
237
+ *
238
+ * <blockquote class="tip">
239
+ * <p><strong>Tip:</strong><br/>
240
+ * 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">ListAvailabilityTimeSlots</code> API.</p>
241
+ * </blockquote>
242
+ * @param serviceId - Service ID of the time slot.
243
+ * Currently supported only for services of type `APPOINTMENT`.
244
+ * @param localStartDate - Local start date of the time slot, in ISO-8601 format.
245
+ * For example, "2024-01-30T13:30:00".
246
+ * @param localEndDate - Local end date of the time slot, in ISO-8601 format.
247
+ * For example, "2024-01-30T14:30:00".
248
+ * @param timeZone - Time zone, in IANA time zone format.
249
+ * @param location - The location of the time slot.
250
+ *
251
+ * You must provide a specific `locationType`.
252
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
253
+ *
254
+ * <blockquote class="warning">
255
+ * <p>Supports filtering by location type, or by location ID.
256
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
257
+ * </blockquote>
258
+ * @public
259
+ * @documentationMaturity preview
260
+ * @requiredField localEndDate
261
+ * @requiredField localStartDate
262
+ * @requiredField location
263
+ * @requiredField serviceId
264
+ * @requiredField timeZone
265
+ * @permissionScope Read Bookings - Public Data
266
+ * @permissionScope Manage Bookings Services and Settings
267
+ * @permissionScope Read Bookings - Including Participants
268
+ * @permissionScope Read Bookings - all read permissions
269
+ * @permissionScope Read Bookings Calendar Availability
270
+ * @permissionScope Manage Bookings - all permissions
271
+ * @applicableIdentity APP
272
+ * @applicableIdentity MEMBER
273
+ * @applicableIdentity VISITOR
274
+ */
275
+ function getAvailabilityTimeSlot(serviceId, localStartDate, localEndDate, timeZone, location, options) {
276
+ var _a, _b, _c;
277
+ return __awaiter(this, arguments, void 0, function* () {
278
+ const requestTransformation = {
279
+ serviceId: '$[0]',
280
+ localStartDate: '$[1]',
281
+ localEndDate: '$[2]',
282
+ timeZone: '$[3]',
283
+ location: '$[4]',
284
+ resourceIds: '$[5].resourceIds',
285
+ includeResourceTypeIds: '$[5].includeResourceTypeIds',
286
+ };
287
+ const responseTransformation = '$';
288
+ // @ts-ignore
289
+ const { httpClient, sideEffects } = arguments[6];
290
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
291
+ rootSchema: _getAvailabilityTimeSlotRequest,
292
+ depSchemas: {},
293
+ fqdnTransformation: {
294
+ paths: [],
295
+ transformation: _fromVeloEntity,
296
+ },
297
+ customTransformation: requestTransformation,
298
+ });
299
+ const { fromJSON } = (0, velo_1.serializer)({
300
+ rootSchema: _getAvailabilityTimeSlotResponse,
301
+ depSchemas: {},
302
+ fqdnTransformation: {
303
+ paths: [...['timeSlot']],
304
+ transformation: _toVeloEntity,
305
+ },
306
+ customTransformation: responseTransformation,
307
+ });
308
+ const payload = toAmbassadorRequest([
309
+ serviceId,
310
+ localStartDate,
311
+ localEndDate,
312
+ timeZone,
313
+ location,
314
+ options,
315
+ ]);
316
+ const reqOpts = ambassadorWixBookingsAvailabilityV2TimeSlot.getAvailabilityTimeSlot(payload);
317
+ __log(`"GetAvailabilityTimeSlot" sending request with: ${__inspect(reqOpts)}`);
318
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
319
+ try {
320
+ const result = yield httpClient.request(reqOpts);
321
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
322
+ return fromJSON(result.data);
323
+ }
324
+ catch (err) {
325
+ const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
326
+ 'serviceId',
327
+ 'localStartDate',
328
+ 'localEndDate',
329
+ 'timeZone',
330
+ 'location',
331
+ 'options',
332
+ ]);
333
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
334
+ throw transformedError;
335
+ }
336
+ });
337
+ }
338
+ exports.getAvailabilityTimeSlot = getAvailabilityTimeSlot;
339
+ //# sourceMappingURL=bookings-availability-v2-time-slot-availability-time-slots.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-availability-v2-time-slot-availability-time-slots.universal.js","sourceRoot":"","sources":["../../../src/bookings-availability-v2-time-slot-availability-time-slots.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,+IAAiI;AAEjI,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA4F5B,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,4HAA4H;IAC5H,qCAAqB,CAAA;IACrB,iGAAiG;IACjG,iCAAiB,CAAA;IACjB,mFAAmF;IACnF,qCAAqB,CAAA;AACvB,CAAC,EARW,YAAY,4BAAZ,YAAY,QAQvB;AA0rBD,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAC7C,MAAM,kCAAkC,GAAG,EAAE,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AArFD,0DAqFC"}
@@ -0,0 +1,223 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { GetAvailabilityTimeSlotRequest, GetAvailabilityTimeSlotResponse, GetMultiServiceAvailabilityTimeSlotRequest, GetMultiServiceAvailabilityTimeSlotResponse, ListAvailabilityTimeSlotsRequest, ListAvailabilityTimeSlotsResponse, ListMultiServiceAvailabilityTimeSlotsRequest, ListMultiServiceAvailabilityTimeSlotsResponse, ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields, GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields, ListAvailabilityTimeSlotsResponseNonNullableFields, GetAvailabilityTimeSlotResponseNonNullableFields } from './bookings-availability-v2-time-slot-event-time-slots.types';
3
+ /**
4
+ * Retrieves a list of multiService `TimeSlot`s that match the provided filters.
5
+ *
6
+ * <blockquote class="important">
7
+ * <p><strong>Important:</strong><br/>
8
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
9
+ * </blockquote>
10
+ *
11
+ * The request body __must__ include either:
12
+ * + All of the following filters: `service`.`serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone`. You may add additional filters as you wish.
13
+ * + A `cursorPaging` with a valid `cursor` from previous response.
14
+ *
15
+ *
16
+ * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
17
+ * represents the availability of the given sequence of services in a specific order, location, and within a given range of time.
18
+ *
19
+ * Each `TimeSlot`.`NestedTimeSlot` represents a single service from the given list. The order of the `NestedTimeSlots` is the same as the order
20
+ * of the given services in request.
21
+ * The first `NestedTimeSlot` has `localStartDate` within the given `fromLocalDate` and `toLocalDate` exclusive,
22
+ * and each following `NestedTimeSlot` has a `localStartDate` that equals to the previous `NestedTimeSlot`'s `localEndDate`.
23
+ *
24
+ * By default,
25
+ * the response contains at most 1000 results.
26
+ * If there are more than 1000 results, we return a `cursorPagingMetadata` with
27
+ * a cursor for the next page of results, regardless of whether a `cursorPaging`
28
+ * was provided in request.
29
+ *
30
+ * > __Notes:__
31
+ * > + All nested time slots share the same location.
32
+ * > + You can pass up to 8 services in request.
33
+ *
34
+ * ### AvailableResources in response:
35
+ * The `TimeSlot`.`NestedTimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
36
+ * within the `NestedTimeSlot` range of time. Each `AvailableResources` contains information about available resources of the same type.
37
+ *
38
+ * <blockquote class="important">
39
+ * <p><strong>Important:</strong><br/>
40
+ * By default,
41
+ * if you don't specify <code class="grey-background">service</code>.<code class="grey-background">includeResourceTypeIds</code>
42
+ * or <code class="grey-background">service</code>.<code class="grey-background">resourceIds</code> filters in request,
43
+ * we return TimeSlots with <code class="grey-background">NestedTimeSlot</code>s with an empty <code class="grey-background">AvailableResources</code>.
44
+ * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
45
+ * 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)
46
+ * is an example for such flow.
47
+ * </p>
48
+ * </blockquote>
49
+ *
50
+ *
51
+ * If you wish to get a list of available resources for a `TimeSlot`.`NestedTimeSlot` you should either:
52
+ * + provide `service`.`resourceIds` in request.
53
+ * + provide `service`.`includeResourceTypeIds` in request.
54
+ *
55
+ * __Notes:__
56
+ * + 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.
57
+ * + If an `AvailableResources` has more available resources which are not listed within it, we return `AvailableResources`.`hasMoreAvailableResources` as true.
58
+ * + 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).
59
+ *
60
+ *
61
+ * ### Availability VS Bookability
62
+ * An `available` time slot is not necessarily `bookable`.
63
+ * The `bookable` field of a `TimeSlot` indicates whether the customer can book all of the of the services within the given time slot,
64
+ * at a specific period of time.
65
+ * 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).
66
+ *
67
+ * By default,
68
+ * + 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.
69
+ * + 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`.
70
+ * + 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.
71
+ *
72
+ * <blockquote class="important">
73
+ * <p><strong>Important:</strong>
74
+ * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
75
+ * 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>
76
+ * </blockquote>
77
+ *
78
+ * ### ListAvailabilityTimeSlots runs with the following defaults:
79
+ * + `localStartDate` is sorted in `ASC` order.
80
+ * + `cursorPaging`.`limit` is `1000`.
81
+ */
82
+ export declare function listMultiServiceAvailabilityTimeSlots(payload: ListMultiServiceAvailabilityTimeSlotsRequest): RequestOptionsFactory<ListMultiServiceAvailabilityTimeSlotsResponse & ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields>;
83
+ /**
84
+ * Retrieves an available multiService `TimeSlot` that match the provided filters.
85
+ *
86
+ * Throws `SlotNotFound` if there is no such available time slot.
87
+ *
88
+ * <blockquote class="important">
89
+ * <p><strong>Important:</strong><br/>
90
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
91
+ * </blockquote>
92
+ *
93
+ * By default,
94
+ * if you don't provide a `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
95
+ * we return for each `TimeSlot`.`NestedTimeSlot` all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
96
+ * the corresponding service within the time slot.
97
+ *
98
+ * If you specify `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
99
+ * the returned `TimeSlot`.`NestedTimeSlot` for this service will contain only `AvailableResources` with at least one available resource
100
+ * which match the given resources filters,
101
+ * each contains all available resources out of those requested.
102
+ *
103
+ * + Notes:
104
+ * + All nested time slots share the same location.
105
+ * + You can pass up to 8 services.
106
+ *
107
+ * <blockquote class="tip">
108
+ * <p><strong>Tip:</strong><br/>
109
+ * 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>
110
+ * </blockquote>
111
+ */
112
+ export declare function getMultiServiceAvailabilityTimeSlot(payload: GetMultiServiceAvailabilityTimeSlotRequest): RequestOptionsFactory<GetMultiServiceAvailabilityTimeSlotResponse & GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields>;
113
+ /**
114
+ * Retrieves a list of `TimeSlot`s that match the provided filters.
115
+ *
116
+ * <blockquote class="important">
117
+ * <p><strong>Important:</strong>
118
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
119
+ * </blockquote>
120
+ *
121
+ * The request body __must__ include either:
122
+ * + All of the following filters: `serviceId`, `fromLocalDate`, `toLocalDate`, and `timeZone`.
123
+ * You may add additional filters as you wish.
124
+ * + A `cursorPaging` with a valid `cursor` from previous response.
125
+ *
126
+ *
127
+ * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
128
+ * represents the availability of the service in a specific location,
129
+ * and has a `localStartDate` within the range of the provided `fromLocalDate` and `toLocalDate` exclusive.
130
+ * The `localEndDate` of a `TimeSlot` is calculated as the sum of the `TimeSlot`'s `localStartDate` and the duration of the service.
131
+ *
132
+ * By default,
133
+ * the response contains at most 1000 results.
134
+ * If there are more than 1000 results, we return a `cursorPagingMetadata` with
135
+ * a cursor for the next page of results, regardless of whether a `cursorPaging`
136
+ * was provided in request.
137
+ *
138
+ * ### AvailableResources in response
139
+ * The `TimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
140
+ * within the time slot. Each `AvailableResources` contains information about available resources of the same type.
141
+ *
142
+ * <blockquote class="important">
143
+ * <p><strong>Important:</strong><br/>
144
+ * By default,
145
+ * if you don't specify <code class="grey-background">includeResourceTypeIds</code>
146
+ * or <code class="grey-background">resourceIds</code> filters in request,
147
+ * we return TimeSlots with an empty <code class="grey-background">AvailableResources</code>.
148
+ * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
149
+ * 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/availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-the-selected-service-is-available-for)
150
+ * is an example for such flow.
151
+ * </p>
152
+ * </blockquote>
153
+ *
154
+ * If you wish to get a list of available resources for each `TimeSlot` you should either:
155
+ * + provide `resourceIds` in request.
156
+ * + provide `includeResourceTypeIds` in request.
157
+ *
158
+ * __Notes:__
159
+ * + In both cases the returned TimeSlots contains __up__ to 10 `AvailableResources` that match the provided filters.
160
+ * Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.
161
+ * + If an `AvailableResources` has more available resources which are not listed within it,
162
+ * we return `AvailableResources`.`hasMoreAvailableResources` as true.
163
+ * > __Note:__
164
+ * > If you wish to get the full available resources list for a specific `TimeSlot`,
165
+ * > you should call [GetAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/get-availability-time-slot).
166
+ *
167
+ *
168
+ * ### Availability VS Bookability
169
+ * An `available` time slot is not necessarily `bookable`.
170
+ * The `bookable` field of a `TimeSlot` indicates whether a customer can book the service within the given time slot,
171
+ * at a specific period of time.
172
+ * Read more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/introduction#all-apis_wix-service-availability_service-availability-time-slots_introduction_availability-vs-bookability).
173
+ *
174
+ * By default,
175
+ * + The response does not contains `unavailable` TimeSlots.
176
+ * For example,
177
+ * if there are no available resources to provide the service from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`,
178
+ * we don't return TimeSlots with `localStartDate` within this range.
179
+ * + The response contains both `bookable` and `un-bookable` TimeSlots.
180
+ * For example,
181
+ * if the service has a booking policy which enforces booking the service up to 10 minutes before the session starts,
182
+ * we return TimeSlots with the violating `localStartDate` with `bookable` as false.
183
+ * If you wish to list only available __bookable__ TimeSlots you should pass `bookable` filter as true.
184
+ *
185
+ * <blockquote class="important">
186
+ * <p><strong>Important:</strong>
187
+ * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
188
+ * Read more about <a href="https://bo.wix.com/wix-docs/rest/all-apis/service-availability/availability-time-slots/introduction?localViewerId=inbari#all-apis_service-availability_availability-time-slots_introduction_daylight-saving-time-dst-handling">DST Handling</a></p>
189
+ * </blockquote>
190
+ *
191
+ *
192
+ * ### ListAvailabilityTimeSlots runs with the following defaults
193
+ * + `localStartDate` is sorted in `ASC` order
194
+ * + `cursorPaging`.`limit` is `1000`
195
+ */
196
+ export declare function listAvailabilityTimeSlots(payload: ListAvailabilityTimeSlotsRequest): RequestOptionsFactory<ListAvailabilityTimeSlotsResponse & ListAvailabilityTimeSlotsResponseNonNullableFields>;
197
+ /**
198
+ * Retrieves an available `TimeSlot` that match the provided filters.
199
+ *
200
+ * Throws `SlotNotFound` if there is no such available time slot.
201
+ *
202
+ * <blockquote class="important">
203
+ * <p><strong>Important:</strong><br/>
204
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
205
+ * </blockquote>
206
+ *
207
+ * By default,
208
+ * if you don't provide `includeResourceTypeIds` or `resourceIds` in request,
209
+ * we return all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
210
+ * the service within the time slot.
211
+ *
212
+ * If you specify `includeResourceTypeIds` or `resourceIds` in request,
213
+ * the returned `TimeSlot` will contain only `AvailableResources` with at least one available resource
214
+ * which match the given resources filters,
215
+ * each contains all available resources out of those requested.
216
+ *
217
+ *
218
+ * <blockquote class="tip">
219
+ * <p><strong>Tip:</strong><br/>
220
+ * 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">ListAvailabilityTimeSlots</code> API.</p>
221
+ * </blockquote>
222
+ */
223
+ export declare function getAvailabilityTimeSlot(payload: GetAvailabilityTimeSlotRequest): RequestOptionsFactory<GetAvailabilityTimeSlotResponse & GetAvailabilityTimeSlotResponseNonNullableFields>;