@wix/bookings 1.0.310 → 1.0.312

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 (233) 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 +15 -4
  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 +366 -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 +354 -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 +11 -8
  58. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
  59. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.js +30 -98
  60. package/build/cjs/src/bookings-calendar-v2-external-calendar.http.js.map +1 -1
  61. package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js +67 -31
  62. package/build/cjs/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -1
  63. package/build/cjs/src/bookings-calendar-v2-session-view.http.js +10 -13
  64. package/build/cjs/src/bookings-calendar-v2-session-view.http.js.map +1 -1
  65. package/build/cjs/src/bookings-calendar-v2-session-view.types.d.ts +2 -0
  66. package/build/cjs/src/bookings-calendar-v2-session-view.universal.d.ts +2 -0
  67. package/build/cjs/src/bookings-calendar-v2-session-view.universal.js +6 -1
  68. package/build/cjs/src/bookings-calendar-v2-session-view.universal.js.map +1 -1
  69. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js +20 -64
  70. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -1
  71. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +33 -1
  72. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +6 -7
  73. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
  74. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +8 -8
  75. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js +40 -24
  76. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
  77. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +27 -30
  78. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -1
  79. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +11 -6
  80. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  81. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +11 -6
  82. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +10 -4
  83. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  84. package/build/cjs/src/bookings-services-v2-service.http.js +192 -161
  85. package/build/cjs/src/bookings-services-v2-service.http.js.map +1 -1
  86. package/build/cjs/src/bookings-services-v2-service.public.d.ts +2 -2
  87. package/build/cjs/src/bookings-services-v2-service.public.js +10 -1
  88. package/build/cjs/src/bookings-services-v2-service.public.js.map +1 -1
  89. package/build/cjs/src/bookings-services-v2-service.types.d.ts +624 -40
  90. package/build/cjs/src/bookings-services-v2-service.types.js +66 -4
  91. package/build/cjs/src/bookings-services-v2-service.types.js.map +1 -1
  92. package/build/cjs/src/bookings-services-v2-service.universal.d.ts +658 -57
  93. package/build/cjs/src/bookings-services-v2-service.universal.js +92 -19
  94. package/build/cjs/src/bookings-services-v2-service.universal.js.map +1 -1
  95. package/build/cjs/src/bookings-v2-attendance.http.js +8 -37
  96. package/build/cjs/src/bookings-v2-attendance.http.js.map +1 -1
  97. package/build/cjs/src/bookings-v2-attendance.types.d.ts +1 -1
  98. package/build/cjs/src/bookings-v2-attendance.universal.d.ts +1 -3
  99. package/build/cjs/src/bookings-v2-attendance.universal.js +19 -12
  100. package/build/cjs/src/bookings-v2-attendance.universal.js.map +1 -1
  101. package/build/cjs/src/bookings-v2-booking.http.d.ts +3 -5
  102. package/build/cjs/src/bookings-v2-booking.http.js +234 -155
  103. package/build/cjs/src/bookings-v2-booking.http.js.map +1 -1
  104. package/build/cjs/src/bookings-v2-booking.public.d.ts +1 -1
  105. package/build/cjs/src/bookings-v2-booking.types.d.ts +28 -8
  106. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -1
  107. package/build/cjs/src/bookings-v2-booking.universal.d.ts +31 -13
  108. package/build/cjs/src/bookings-v2-booking.universal.js +104 -49
  109. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -1
  110. package/build/cjs/src/bookings-v2-price-info.http.js +48 -40
  111. package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -1
  112. package/build/cjs/src/bookings-v2-price-info.types.d.ts +7 -1
  113. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -1
  114. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +5 -1
  115. package/build/cjs/src/bookings-v2-price-info.universal.js +11 -6
  116. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -1
  117. package/build/es/index.d.ts +5 -3
  118. package/build/es/index.js +5 -3
  119. package/build/es/index.js.map +1 -1
  120. package/build/es/index.typings.d.ts +5 -3
  121. package/build/es/index.typings.js +5 -3
  122. package/build/es/index.typings.js.map +1 -1
  123. package/build/es/meta.d.ts +5 -3
  124. package/build/es/meta.js +5 -3
  125. package/build/es/meta.js.map +1 -1
  126. package/build/es/src/bookings-availability-v1-slot-availability.http.js +12 -10
  127. package/build/es/src/bookings-availability-v1-slot-availability.http.js.map +1 -1
  128. package/build/es/src/bookings-availability-v1-slot-availability.types.d.ts +9 -9
  129. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -9
  130. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +16 -5
  131. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  132. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.http.d.ts +223 -0
  133. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.http.js +497 -0
  134. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.http.js.map +1 -0
  135. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.meta.d.ts +14 -0
  136. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.meta.js +38 -0
  137. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.meta.js.map +1 -0
  138. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.public.d.ts +9 -0
  139. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.public.js +14 -0
  140. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.public.js.map +1 -0
  141. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.types.d.ts +805 -0
  142. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.types.js +11 -0
  143. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.types.js.map +1 -0
  144. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.universal.d.ts +1106 -0
  145. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.universal.js +338 -0
  146. package/build/es/src/bookings-availability-v2-time-slot-availability-time-slots.universal.js.map +1 -0
  147. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.d.ts +223 -0
  148. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js +429 -0
  149. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.http.js.map +1 -0
  150. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.d.ts +805 -0
  151. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js +11 -0
  152. package/build/es/src/bookings-availability-v2-time-slot-event-time-slots.types.js.map +1 -0
  153. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.d.ts +223 -0
  154. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js +497 -0
  155. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.http.js.map +1 -0
  156. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.d.ts +14 -0
  157. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js +38 -0
  158. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.meta.js.map +1 -0
  159. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.d.ts +9 -0
  160. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js +14 -0
  161. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.public.js.map +1 -0
  162. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.d.ts +805 -0
  163. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js +11 -0
  164. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.types.js.map +1 -0
  165. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.d.ts +1083 -0
  166. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js +326 -0
  167. package/build/es/src/bookings-availability-v2-time-slot-multi-service-availability-time-slots.universal.js.map +1 -0
  168. package/build/es/src/bookings-calendar-v1-session.http.js +85 -80
  169. package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -1
  170. package/build/es/src/bookings-calendar-v1-session.types.d.ts +2 -4
  171. package/build/es/src/bookings-calendar-v1-session.types.js.map +1 -1
  172. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +2 -4
  173. package/build/es/src/bookings-calendar-v1-session.universal.js +11 -8
  174. package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -1
  175. package/build/es/src/bookings-calendar-v2-external-calendar.http.js +30 -98
  176. package/build/es/src/bookings-calendar-v2-external-calendar.http.js.map +1 -1
  177. package/build/es/src/bookings-calendar-v2-external-calendar.universal.js +68 -32
  178. package/build/es/src/bookings-calendar-v2-external-calendar.universal.js.map +1 -1
  179. package/build/es/src/bookings-calendar-v2-session-view.http.js +10 -13
  180. package/build/es/src/bookings-calendar-v2-session-view.http.js.map +1 -1
  181. package/build/es/src/bookings-calendar-v2-session-view.types.d.ts +2 -0
  182. package/build/es/src/bookings-calendar-v2-session-view.universal.d.ts +2 -0
  183. package/build/es/src/bookings-calendar-v2-session-view.universal.js +7 -2
  184. package/build/es/src/bookings-calendar-v2-session-view.universal.js.map +1 -1
  185. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js +20 -64
  186. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -1
  187. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +33 -1
  188. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +6 -7
  189. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -1
  190. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +8 -8
  191. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js +40 -24
  192. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -1
  193. package/build/es/src/bookings-reader-v2-extended-booking.http.js +27 -30
  194. package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -1
  195. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +11 -6
  196. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -1
  197. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +11 -6
  198. package/build/es/src/bookings-reader-v2-extended-booking.universal.js +11 -5
  199. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -1
  200. package/build/es/src/bookings-services-v2-service.http.js +192 -161
  201. package/build/es/src/bookings-services-v2-service.http.js.map +1 -1
  202. package/build/es/src/bookings-services-v2-service.public.d.ts +2 -2
  203. package/build/es/src/bookings-services-v2-service.public.js +1 -1
  204. package/build/es/src/bookings-services-v2-service.public.js.map +1 -1
  205. package/build/es/src/bookings-services-v2-service.types.d.ts +624 -40
  206. package/build/es/src/bookings-services-v2-service.types.js +65 -3
  207. package/build/es/src/bookings-services-v2-service.types.js.map +1 -1
  208. package/build/es/src/bookings-services-v2-service.universal.d.ts +658 -57
  209. package/build/es/src/bookings-services-v2-service.universal.js +91 -18
  210. package/build/es/src/bookings-services-v2-service.universal.js.map +1 -1
  211. package/build/es/src/bookings-v2-attendance.http.js +8 -37
  212. package/build/es/src/bookings-v2-attendance.http.js.map +1 -1
  213. package/build/es/src/bookings-v2-attendance.types.d.ts +1 -1
  214. package/build/es/src/bookings-v2-attendance.universal.d.ts +1 -3
  215. package/build/es/src/bookings-v2-attendance.universal.js +19 -12
  216. package/build/es/src/bookings-v2-attendance.universal.js.map +1 -1
  217. package/build/es/src/bookings-v2-booking.http.d.ts +3 -5
  218. package/build/es/src/bookings-v2-booking.http.js +234 -155
  219. package/build/es/src/bookings-v2-booking.http.js.map +1 -1
  220. package/build/es/src/bookings-v2-booking.public.d.ts +1 -1
  221. package/build/es/src/bookings-v2-booking.types.d.ts +28 -8
  222. package/build/es/src/bookings-v2-booking.types.js.map +1 -1
  223. package/build/es/src/bookings-v2-booking.universal.d.ts +31 -13
  224. package/build/es/src/bookings-v2-booking.universal.js +105 -50
  225. package/build/es/src/bookings-v2-booking.universal.js.map +1 -1
  226. package/build/es/src/bookings-v2-price-info.http.js +48 -40
  227. package/build/es/src/bookings-v2-price-info.http.js.map +1 -1
  228. package/build/es/src/bookings-v2-price-info.types.d.ts +7 -1
  229. package/build/es/src/bookings-v2-price-info.types.js.map +1 -1
  230. package/build/es/src/bookings-v2-price-info.universal.d.ts +5 -1
  231. package/build/es/src/bookings-v2-price-info.universal.js +12 -7
  232. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -1
  233. package/package.json +3 -3
@@ -0,0 +1,366 @@
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 transform_error_1 = require("@wix/sdk-runtime/transform-error");
38
+ const ambassadorWixBookingsAvailabilityV2TimeSlot = __importStar(require("./bookings-availability-v2-time-slot-availability-time-slots.http"));
39
+ let __verbose = false;
40
+ function __log(...args) {
41
+ __verbose && console.log(...args);
42
+ }
43
+ function __inspect(obj) {
44
+ return obj;
45
+ }
46
+ exports.__debug = {
47
+ verboseLogging: {
48
+ on: () => (__verbose = true),
49
+ off: () => (__verbose = false),
50
+ },
51
+ };
52
+ const _toVeloEntity = '$';
53
+ const _fromVeloEntity = '$';
54
+ var LocationType;
55
+ (function (LocationType) {
56
+ LocationType["UNKNOWN_LOCATION_TYPE"] = "UNKNOWN_LOCATION_TYPE";
57
+ /** A business location, either the default business address, or locations defined for the business by the Business Info. */
58
+ LocationType["BUSINESS"] = "BUSINESS";
59
+ /** The location is unique to this service and isn't defined as one of the business locations. */
60
+ LocationType["CUSTOM"] = "CUSTOM";
61
+ /** The location can be determined by the customer and is not set up beforehand. */
62
+ LocationType["CUSTOMER"] = "CUSTOMER";
63
+ })(LocationType || (exports.LocationType = LocationType = {}));
64
+ const _getAvailabilityTimeSlotRequest = {};
65
+ const _getAvailabilityTimeSlotResponse = {};
66
+ const _listAvailabilityTimeSlotsRequest = {};
67
+ const _listAvailabilityTimeSlotsResponse = {};
68
+ /**
69
+ * Retrieves a list of `TimeSlot`s that match the provided filters.
70
+ *
71
+ * <blockquote class="important">
72
+ * <p><strong>Important:</strong>
73
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
74
+ * </blockquote>
75
+ *
76
+ * The request body __must__ include either:
77
+ * + All of the following filters: `serviceId`, `fromLocalDate`, `toLocalDate`, and `timeZone`.
78
+ * You may add additional filters as you wish.
79
+ * + A `cursorPaging` with a valid `cursor` from previous response.
80
+ *
81
+ *
82
+ * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
83
+ * represents the availability of the service in a specific location,
84
+ * and has a `localStartDate` within the range of the provided `fromLocalDate` and `toLocalDate` exclusive.
85
+ * The `localEndDate` of a `TimeSlot` is calculated as the sum of the `TimeSlot`'s `localStartDate` and the duration of the service.
86
+ *
87
+ * By default,
88
+ * the response contains at most 1000 results.
89
+ * If there are more than 1000 results, we return a `cursorPagingMetadata` with
90
+ * a cursor for the next page of results, regardless of whether a `cursorPaging`
91
+ * was provided in request.
92
+ *
93
+ * ### AvailableResources in response
94
+ * The `TimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
95
+ * within the time slot. Each `AvailableResources` contains information about available resources of the same type.
96
+ *
97
+ * <blockquote class="important">
98
+ * <p><strong>Important:</strong><br/>
99
+ * By default,
100
+ * if you don't specify <code class="grey-background">includeResourceTypeIds</code>
101
+ * or <code class="grey-background">resourceIds</code> filters in request,
102
+ * we return TimeSlots with an empty <code class="grey-background">AvailableResources</code>.
103
+ * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
104
+ * 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)
105
+ * is an example for such flow.
106
+ * </p>
107
+ * </blockquote>
108
+ *
109
+ * If you wish to get a list of available resources for each `TimeSlot` you should either:
110
+ * + provide `resourceIds` in request.
111
+ * + provide `includeResourceTypeIds` in request.
112
+ *
113
+ * __Notes:__
114
+ * + In both cases the returned TimeSlots contains __up__ to 10 `AvailableResources` that match the provided filters.
115
+ * Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.
116
+ * + If an `AvailableResources` has more available resources which are not listed within it,
117
+ * we return `AvailableResources`.`hasMoreAvailableResources` as true.
118
+ * > __Note:__
119
+ * > If you wish to get the full available resources list for a specific `TimeSlot`,
120
+ * > you should call [GetAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/get-availability-time-slot).
121
+ *
122
+ *
123
+ * ### Availability VS Bookability
124
+ * An `available` time slot is not necessarily `bookable`.
125
+ * The `bookable` field of a `TimeSlot` indicates whether a customer can book the service within the given time slot,
126
+ * at a specific period of time.
127
+ * 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).
128
+ *
129
+ * By default,
130
+ * + The response does not contains `unavailable` TimeSlots.
131
+ * For example,
132
+ * if there are no available resources to provide the service from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`,
133
+ * we don't return TimeSlots with `localStartDate` within this range.
134
+ * + The response contains both `bookable` and `un-bookable` TimeSlots.
135
+ * For example,
136
+ * if the service has a booking policy which enforces booking the service up to 10 minutes before the session starts,
137
+ * we return TimeSlots with the violating `localStartDate` with `bookable` as false.
138
+ * If you wish to list only available __bookable__ TimeSlots you should pass `bookable` filter as true.
139
+ *
140
+ * <blockquote class="important">
141
+ * <p><strong>Important:</strong>
142
+ * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
143
+ * 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>
144
+ * </blockquote>
145
+ *
146
+ *
147
+ * ### ListAvailabilityTimeSlots runs with the following defaults
148
+ * + `localStartDate` is sorted in `ASC` order
149
+ * + `cursorPaging`.`limit` is `1000`
150
+ * @public
151
+ * @documentationMaturity preview
152
+ * @permissionScope Read Bookings - Public Data
153
+ * @permissionScope Manage Bookings Services and Settings
154
+ * @permissionScope Read Bookings - Including Participants
155
+ * @permissionScope Read Bookings - all read permissions
156
+ * @permissionScope Read Bookings Calendar Availability
157
+ * @permissionScope Manage Bookings - all permissions
158
+ * @applicableIdentity APP
159
+ * @applicableIdentity MEMBER
160
+ * @applicableIdentity VISITOR
161
+ */
162
+ function listAvailabilityTimeSlots(options) {
163
+ var _a, _b, _c;
164
+ return __awaiter(this, arguments, void 0, function* () {
165
+ const requestTransformation = {
166
+ serviceId: '$[0].serviceId',
167
+ fromLocalDate: '$[0].fromLocalDate',
168
+ toLocalDate: '$[0].toLocalDate',
169
+ timeZone: '$[0].timeZone',
170
+ locations: '$[0].locations',
171
+ resourceIds: '$[0].resourceIds',
172
+ includeResourceTypeIds: '$[0].includeResourceTypeIds',
173
+ bookable: '$[0].bookable',
174
+ bookingPolicyViolations: '$[0].bookingPolicyViolations',
175
+ timeSlotsPerDay: '$[0].timeSlotsPerDay',
176
+ cursorPaging: '$[0].cursorPaging',
177
+ };
178
+ const responseTransformation = '$';
179
+ // @ts-ignore
180
+ const { httpClient, sideEffects } = arguments[1];
181
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
182
+ rootSchema: _listAvailabilityTimeSlotsRequest,
183
+ depSchemas: {},
184
+ fqdnTransformation: {
185
+ paths: [],
186
+ transformation: _fromVeloEntity,
187
+ },
188
+ customTransformation: requestTransformation,
189
+ });
190
+ const { fromJSON } = (0, velo_1.serializer)({
191
+ rootSchema: _listAvailabilityTimeSlotsResponse,
192
+ depSchemas: {},
193
+ fqdnTransformation: {
194
+ paths: [...['Array#timeSlots']],
195
+ transformation: _toVeloEntity,
196
+ },
197
+ customTransformation: responseTransformation,
198
+ });
199
+ const payload = toAmbassadorRequest([options]);
200
+ const reqOpts = ambassadorWixBookingsAvailabilityV2TimeSlot.listAvailabilityTimeSlots(payload);
201
+ __log(`"ListAvailabilityTimeSlots" sending request with: ${__inspect(reqOpts)}`);
202
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
203
+ try {
204
+ const result = yield httpClient.request(reqOpts);
205
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
206
+ return fromJSON(result.data);
207
+ }
208
+ catch (err) {
209
+ const transformedError = (0, transform_error_1.transformError)(err, {
210
+ spreadPathsToArguments: {},
211
+ explicitPathsToArguments: {
212
+ serviceId: '$[0].serviceId',
213
+ fromLocalDate: '$[0].fromLocalDate',
214
+ toLocalDate: '$[0].toLocalDate',
215
+ timeZone: '$[0].timeZone',
216
+ locations: '$[0].locations',
217
+ resourceIds: '$[0].resourceIds',
218
+ includeResourceTypeIds: '$[0].includeResourceTypeIds',
219
+ bookable: '$[0].bookable',
220
+ bookingPolicyViolations: '$[0].bookingPolicyViolations',
221
+ timeSlotsPerDay: '$[0].timeSlotsPerDay',
222
+ cursorPaging: '$[0].cursorPaging',
223
+ },
224
+ singleArgumentUnchanged: false,
225
+ }, ['options']);
226
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
227
+ throw transformedError;
228
+ }
229
+ });
230
+ }
231
+ exports.listAvailabilityTimeSlots = listAvailabilityTimeSlots;
232
+ /**
233
+ * Retrieves an available `TimeSlot` that match the provided filters.
234
+ *
235
+ * Throws `SlotNotFound` if there is no such available time slot.
236
+ *
237
+ * <blockquote class="important">
238
+ * <p><strong>Important:</strong><br/>
239
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
240
+ * </blockquote>
241
+ *
242
+ * By default,
243
+ * if you don't provide `includeResourceTypeIds` or `resourceIds` in request,
244
+ * we return all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
245
+ * the service within the time slot.
246
+ *
247
+ * If you specify `includeResourceTypeIds` or `resourceIds` in request,
248
+ * the returned `TimeSlot` will contain only `AvailableResources` with at least one available resource
249
+ * which match the given resources filters,
250
+ * each contains all available resources out of those requested.
251
+ *
252
+ *
253
+ * <blockquote class="tip">
254
+ * <p><strong>Tip:</strong><br/>
255
+ * 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>
256
+ * </blockquote>
257
+ * @param serviceId - Service ID of the time slot.
258
+ * Currently supported only for services of type `APPOINTMENT`.
259
+ * @param localStartDate - Local start date of the time slot, in ISO-8601 format.
260
+ * For example, "2024-01-30T13:30:00".
261
+ * @param localEndDate - Local end date of the time slot, in ISO-8601 format.
262
+ * For example, "2024-01-30T14:30:00".
263
+ * @param timeZone - Time zone, in IANA time zone format.
264
+ * @param location - The location of the time slot.
265
+ *
266
+ * You must provide a specific `locationType`.
267
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
268
+ *
269
+ * <blockquote class="warning">
270
+ * <p>Supports filtering by location type, or by location ID.
271
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
272
+ * </blockquote>
273
+ * @public
274
+ * @documentationMaturity preview
275
+ * @requiredField localEndDate
276
+ * @requiredField localStartDate
277
+ * @requiredField location
278
+ * @requiredField serviceId
279
+ * @requiredField timeZone
280
+ * @permissionScope Read Bookings - Public Data
281
+ * @permissionScope Manage Bookings Services and Settings
282
+ * @permissionScope Read Bookings - Including Participants
283
+ * @permissionScope Read Bookings - all read permissions
284
+ * @permissionScope Read Bookings Calendar Availability
285
+ * @permissionScope Manage Bookings - all permissions
286
+ * @applicableIdentity APP
287
+ * @applicableIdentity MEMBER
288
+ * @applicableIdentity VISITOR
289
+ */
290
+ function getAvailabilityTimeSlot(serviceId, localStartDate, localEndDate, timeZone, location, options) {
291
+ var _a, _b, _c;
292
+ return __awaiter(this, arguments, void 0, function* () {
293
+ const requestTransformation = {
294
+ serviceId: '$[0]',
295
+ localStartDate: '$[1]',
296
+ localEndDate: '$[2]',
297
+ timeZone: '$[3]',
298
+ location: '$[4]',
299
+ resourceIds: '$[5].resourceIds',
300
+ includeResourceTypeIds: '$[5].includeResourceTypeIds',
301
+ };
302
+ const responseTransformation = '$';
303
+ // @ts-ignore
304
+ const { httpClient, sideEffects } = arguments[6];
305
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
306
+ rootSchema: _getAvailabilityTimeSlotRequest,
307
+ depSchemas: {},
308
+ fqdnTransformation: {
309
+ paths: [],
310
+ transformation: _fromVeloEntity,
311
+ },
312
+ customTransformation: requestTransformation,
313
+ });
314
+ const { fromJSON } = (0, velo_1.serializer)({
315
+ rootSchema: _getAvailabilityTimeSlotResponse,
316
+ depSchemas: {},
317
+ fqdnTransformation: {
318
+ paths: [...['timeSlot']],
319
+ transformation: _toVeloEntity,
320
+ },
321
+ customTransformation: responseTransformation,
322
+ });
323
+ const payload = toAmbassadorRequest([
324
+ serviceId,
325
+ localStartDate,
326
+ localEndDate,
327
+ timeZone,
328
+ location,
329
+ options,
330
+ ]);
331
+ const reqOpts = ambassadorWixBookingsAvailabilityV2TimeSlot.getAvailabilityTimeSlot(payload);
332
+ __log(`"GetAvailabilityTimeSlot" sending request with: ${__inspect(reqOpts)}`);
333
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
334
+ try {
335
+ const result = yield httpClient.request(reqOpts);
336
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
337
+ return fromJSON(result.data);
338
+ }
339
+ catch (err) {
340
+ const transformedError = (0, transform_error_1.transformError)(err, {
341
+ spreadPathsToArguments: {},
342
+ explicitPathsToArguments: {
343
+ serviceId: '$[0]',
344
+ localStartDate: '$[1]',
345
+ localEndDate: '$[2]',
346
+ timeZone: '$[3]',
347
+ location: '$[4]',
348
+ resourceIds: '$[5].resourceIds',
349
+ includeResourceTypeIds: '$[5].includeResourceTypeIds',
350
+ },
351
+ singleArgumentUnchanged: false,
352
+ }, [
353
+ 'serviceId',
354
+ 'localStartDate',
355
+ 'localEndDate',
356
+ 'timeZone',
357
+ 'location',
358
+ 'options',
359
+ ]);
360
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
361
+ throw transformedError;
362
+ }
363
+ });
364
+ }
365
+ exports.getAvailabilityTimeSlot = getAvailabilityTimeSlot;
366
+ //# 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,kDAAqD;AACrD,sEAAuF;AAEvF,+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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,WAAW,CAAE,SAAS,4DAAG,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;QACtC,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;gBACE,sBAAsB,EAAE,EAAE;gBAC1B,wBAAwB,EAAE;oBACxB,SAAS,EAAE,MAAM;oBACjB,cAAc,EAAE,MAAM;oBACtB,YAAY,EAAE,MAAM;oBACpB,QAAQ,EAAE,MAAM;oBAChB,QAAQ,EAAE,MAAM;oBAChB,WAAW,EAAE,kBAAkB;oBAC/B,sBAAsB,EAAE,6BAA6B;iBACtD;gBACD,uBAAuB,EAAE,KAAK;aAC/B,EACD;gBACE,WAAW;gBACX,gBAAgB;gBAChB,cAAc;gBACd,UAAU;gBACV,UAAU;gBACV,SAAS;aACV,CACF,CAAC;YACF,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,4DAAG,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;QACzB,CAAC;;CACF;AArGD,0DAqGC"}
@@ -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>;