@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,1083 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ /**
8
+ * The `TimeSlot` object represents the availability information
9
+ * for an `Appointment` service's specific slot, including:
10
+ *
11
+ * 1. Whether the slot is bookable for the given service?
12
+ *
13
+ * 2. In what location the service is available for this slot?
14
+ *
15
+ * 3. Which available resources can provide the service for this slot?
16
+ *
17
+ * 4. Does booking the slot for the service violates any of the service booking policies?
18
+ *
19
+ * 5. What is the total capacity and remaining capacity of the service at the time of the calculation of the `TimeSlot`?
20
+ *
21
+ * > __Note:__
22
+ * > When the `TimeSlot` has a non empty `NestedTimeSlots`, it represents the availability information
23
+ * > for a given list of `Appointment` services within a specific time slot.
24
+ */
25
+ export interface TimeSlot {
26
+ /**
27
+ * Service ID.
28
+ *
29
+ * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.
30
+ * > Instead, each nested time slot has its own serviceId.
31
+ */
32
+ serviceId?: string | null;
33
+ /**
34
+ * Local start date of the time slot in ISO-8601 format.
35
+ * For example, "2024-01-30T13:30:00".
36
+ */
37
+ localStartDate?: string | null;
38
+ /**
39
+ * Local end date of the time slot in ISO-8601 format.
40
+ * For example, "2024-01-30T14:30:00".
41
+ */
42
+ localEndDate?: string | null;
43
+ /**
44
+ * Whether the slot is bookable according to the service's booking policies.
45
+ *
46
+ * If booking this time slot does not violates any of the service's booking policies,
47
+ * the returned value is `true`. Otherwise, returns `false`.
48
+ */
49
+ bookable?: boolean | null;
50
+ /** The geographic location of the slot. */
51
+ location?: Location;
52
+ /** Total number of spots for the slot. */
53
+ totalCapacity?: number | null;
54
+ /**
55
+ * Remaining number of spots for the slot.
56
+ * For example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0.
57
+ */
58
+ remainingCapacity?: number | null;
59
+ /**
60
+ * Indicators for booking policy violations for the slot.
61
+ *
62
+ * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
63
+ * we will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
64
+ */
65
+ bookingPolicyViolations?: BookingPolicyViolations;
66
+ /**
67
+ * List of `AvailableResources` for the time slot.
68
+ * Each `AvailableResources` contains information about available resources of the same type.
69
+ *
70
+ * > Not returned from `MultiServiceAvailabilityTimeSlots` API calls.
71
+ * > Instead, each nested time slot has its own available resources.
72
+ */
73
+ availableResources?: AvailableResources[];
74
+ /**
75
+ * > Nested time slots.
76
+ * > Returned only from `MultiServiceAvailabilityTimeSlots` API calls.
77
+ */
78
+ nestedTimeSlots?: NestedTimeSlot[];
79
+ }
80
+ export interface Location {
81
+ /** Business Location ID. Present only if the location is a business location. */
82
+ _id?: string | null;
83
+ /** The location name. */
84
+ name?: string | null;
85
+ /** A string representation for the full address of the location. */
86
+ formattedAddress?: string | null;
87
+ /**
88
+ * The type of location:
89
+ * - `CUSTOM`: The location is specific to this service, and is not derived from the business location.
90
+ * - `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.
91
+ * - `CUSTOMER`: The location is determined by the customer and is not set up beforehand.
92
+ */
93
+ locationType?: LocationType;
94
+ }
95
+ export declare enum LocationType {
96
+ UNKNOWN_LOCATION_TYPE = "UNKNOWN_LOCATION_TYPE",
97
+ /** A business location, either the default business address, or locations defined for the business by the Business Info. */
98
+ BUSINESS = "BUSINESS",
99
+ /** The location is unique to this service and isn't defined as one of the business locations. */
100
+ CUSTOM = "CUSTOM",
101
+ /** The location can be determined by the customer and is not set up beforehand. */
102
+ CUSTOMER = "CUSTOMER"
103
+ }
104
+ /** relevant for event based slots, and not for availability based slots */
105
+ export interface EventInfo {
106
+ }
107
+ export interface WaitingList {
108
+ /** Total number of spots in this wait list. */
109
+ totalCapacity?: number | null;
110
+ /**
111
+ * Number of remaining spots for this wait list.
112
+ * For example, a Yoga event with 10 waitList spots and 3 registered
113
+ * on the waitList has 10 `total_capacity` and 7 `remaining_capacity`.
114
+ */
115
+ remainingCapacity?: number | null;
116
+ }
117
+ export interface BookingPolicyViolations {
118
+ /** Bookings policy violation. Too early to book this slot. */
119
+ tooEarlyToBook?: boolean | null;
120
+ /** Bookings policy violation. Too late to book this slot. */
121
+ tooLateToBook?: boolean | null;
122
+ /** Bookings policy violation. Online booking is disabled for the `TimeSlot` service. */
123
+ bookOnlineDisabled?: boolean | null;
124
+ }
125
+ export interface AvailableResources {
126
+ /** Resource type ID. */
127
+ resourceTypeId?: string | null;
128
+ /**
129
+ * Available resources for the time slot.
130
+ *
131
+ * + When returned from `ListAvailabilityTimeSlots`, empty by default.
132
+ * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
133
+ * contains __up__ to 10 available resources out of those provided.
134
+ *
135
+ * + When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.
136
+ * + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
137
+ * contains all of the available resources out of those provided.
138
+ *
139
+ *
140
+ * > + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.
141
+ * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
142
+ * > contains __up__ to 10 available resources out of those provided.
143
+ *
144
+ * > + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.
145
+ * > + + If you provided `includeResourceTypeIds` or `resourceIds` in request,
146
+ * > contains all of the available resources out of those provided.
147
+ */
148
+ resources?: Resource[];
149
+ /**
150
+ * Whether there are more available resources for the slot that are not listed in `resources` due to size limitations.
151
+ * @readonly
152
+ */
153
+ hasMoreAvailableResources?: boolean | null;
154
+ }
155
+ export interface Resource {
156
+ /** Resource ID. */
157
+ _id?: string;
158
+ /** Resource name. */
159
+ name?: string | null;
160
+ }
161
+ export interface NestedTimeSlot {
162
+ /** Service ID of the nested time slot. */
163
+ serviceId?: string;
164
+ /**
165
+ * Local start date of the nested time slot in ISO-8601 format.
166
+ * For example, "2024-01-30T13:30:00".
167
+ */
168
+ localStartDate?: string;
169
+ /**
170
+ * Local end date of the nested time slot in ISO-8601 format.
171
+ * For example, "2024-01-30T14:30:00".
172
+ */
173
+ localEndDate?: string;
174
+ /**
175
+ * List of `AvailableResources` for the nested time slot.
176
+ * Each `AvailableResources` contains information about available resources of the same type.
177
+ */
178
+ availableResources?: AvailableResources[];
179
+ }
180
+ export interface CalculateEventBasedAvailabilityRequest {
181
+ serviceIds?: string[];
182
+ from?: string;
183
+ to?: string;
184
+ timeZone?: string;
185
+ /**
186
+ * TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006
187
+ * TODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)
188
+ * Aliza's suggestion to consider locks in bookable
189
+ */
190
+ bookable?: boolean | null;
191
+ /** support filtering by location type, or by locationId. Other fields like `name` are ignored */
192
+ location?: Location[];
193
+ resourceIds?: string[];
194
+ /** if not empty, return slots with openSpots >= X */
195
+ openSpots?: number | null;
196
+ /**
197
+ * each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined
198
+ * we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
199
+ */
200
+ bookingPolicyViolations?: BookingPolicyViolations;
201
+ /**
202
+ * Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
203
+ * at most 3 available slots are returned for each day in the date range specified in the query's
204
+ * `filter`.
205
+ *
206
+ * When a day has both bookable and non-bookable slots, bookable slots are returned first.
207
+ * Non-bookable slots are returned according to the specified filters, after all
208
+ * bookable slots are already included.
209
+ */
210
+ slotsPerDay?: number | null;
211
+ cursorPaging?: CursorPaging;
212
+ }
213
+ export interface CursorPaging {
214
+ /** Maximum number of items to return in the results. */
215
+ limit?: number | null;
216
+ /**
217
+ * Pointer to the next or previous page in the list of results.
218
+ *
219
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
220
+ * Not relevant for the first request.
221
+ */
222
+ cursor?: string | null;
223
+ }
224
+ export interface CalculateEventBasedAvailabilityResponse {
225
+ slots?: TimeSlot[];
226
+ cursorPagingMetadata?: CursorPagingMetadata;
227
+ }
228
+ export interface CursorPagingMetadata {
229
+ /** Number of items returned in the response. */
230
+ count?: number | null;
231
+ /** Cursor strings that point to the next page, previous page, or both. */
232
+ cursors?: Cursors;
233
+ /**
234
+ * Whether there are more pages to retrieve following the current page.
235
+ *
236
+ * + `true`: Another page of results can be retrieved.
237
+ * + `false`: This is the last page.
238
+ */
239
+ hasNext?: boolean | null;
240
+ }
241
+ export interface Cursors {
242
+ /** Cursor string pointing to the next page in the list of results. */
243
+ next?: string | null;
244
+ /** Cursor pointing to the previous page in the list of results. */
245
+ prev?: string | null;
246
+ }
247
+ export interface ListEventTimeSlotsRequest {
248
+ /** The services for which the time slots are being returned. */
249
+ serviceIds?: string[] | null;
250
+ /**
251
+ * Local start date for which event time slots are returned, in ISO-8601 format.
252
+ * E.g, "2024-01-30T13:30:00".
253
+ * Required, unless `cursorPaging` is provided.
254
+ */
255
+ fromLocalDate?: string | null;
256
+ /**
257
+ * Local end date for which event time slots are returned, in ISO-8601 format.
258
+ * E.g, "2024-01-30T13:30:00".
259
+ * Required, unless `cursorPaging` is provided.
260
+ */
261
+ toLocalDate?: string | null;
262
+ /**
263
+ * The time zone, in IANA time zone format.
264
+ * Default is the Wix Business time zone.
265
+ */
266
+ timeZone?: string | null;
267
+ /** TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006 */
268
+ bookable?: boolean | null;
269
+ /** support filtering by location type, or by locationId. Other fields like `name` are ignored */
270
+ location?: Location[];
271
+ /** TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default? */
272
+ resourceIds?: string[] | null;
273
+ /** if not empty, return slots with remainingCapacity >= X */
274
+ remainingCapacity?: number | null;
275
+ /**
276
+ * each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined
277
+ * we will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`.
278
+ */
279
+ bookingPolicyViolations?: BookingPolicyViolations;
280
+ /**
281
+ * Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
282
+ * at most 3 available slots are returned for each day in the date range specified in the query's
283
+ * `filter`.
284
+ *
285
+ * When a day has both bookable and non-bookable slots, bookable slots are returned first.
286
+ * Non-bookable slots are returned according to the specified filters, after all
287
+ * bookable slots are already included.
288
+ */
289
+ timeSlotsPerDay?: number | null;
290
+ cursorPaging?: CursorPaging;
291
+ }
292
+ export interface ListEventTimeSlotsResponse {
293
+ /** TODO: maxsize */
294
+ timeSlots?: TimeSlot[];
295
+ /** The time zone, in IANA time zone format. */
296
+ timeZone?: string | null;
297
+ cursorPagingMetadata?: CursorPagingMetadata;
298
+ }
299
+ export interface ListMultiServiceAvailabilityTimeSlotsRequest {
300
+ /**
301
+ * Services for which the multiService time slots are being returned for.
302
+ * Each service contains its own resources filters within.
303
+ *
304
+ * MinSize: `2`.
305
+ * MaxSize: `8`.
306
+ *
307
+ * Required, unless `cursorPaging`.`cursor` is provided.
308
+ */
309
+ services?: Service[];
310
+ /**
311
+ * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.
312
+ * For example, "2024-01-30T13:30:00".
313
+ *
314
+ * Each returned `TimeSlot` in response has a `localStartDate`
315
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
316
+ *
317
+ * Required, unless `cursorPaging`.`cursor` is provided.
318
+ */
319
+ fromLocalDate?: string | null;
320
+ /**
321
+ * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.
322
+ * For example, "2024-01-30T14:30:00".
323
+ *
324
+ * Each returned `TimeSlot` in response has a `localStartDate`
325
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
326
+ *
327
+ * Required, unless `cursorPaging`.`cursor` is provided.
328
+ */
329
+ toLocalDate?: string | null;
330
+ /**
331
+ * Time zone, in IANA time zone format.
332
+ *
333
+ * Required, unless `cursorPaging`.`cursor` is provided.
334
+ */
335
+ timeZone?: string | null;
336
+ /**
337
+ * Location for which the multiService TimeSlots are being returned for.
338
+ *
339
+ * You can specify location or location type for which the TimeSlots will be returned for.
340
+ * If locationType is `BUSINESS`, you __must__ provide a locationId.
341
+ *
342
+ * <blockquote class="warning">
343
+ * <p><strong>warning:</strong><br/>
344
+ * Supports filtering by location type, or by location ID. </br>
345
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
346
+ * </blockquote>
347
+ *
348
+ * Required, unless `cursorPaging`.`cursor` is provided.
349
+ */
350
+ location?: Location;
351
+ /**
352
+ * Whether the `TimeSlot` is bookable according to all of the services booking policies.
353
+ *
354
+ * If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,
355
+ * returns as `false`. Otherwise, returns as `true`.
356
+ *
357
+ * > __Note:__
358
+ * > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,
359
+ * > while a `TimeSlot` with no available resources will not be returned at all.
360
+ */
361
+ bookable?: boolean | null;
362
+ /**
363
+ * Indicators for service's booking policy violations for booking the `TimeSlot`.
364
+ *
365
+ * A bookable time slot must not violate any policy,
366
+ * therefor, this filter is only relevant when `bookable` filter is false.
367
+ *
368
+ * Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s
369
+ * has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether
370
+ * the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.
371
+ *
372
+ * Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
373
+ * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
374
+ */
375
+ bookingPolicyViolations?: BookingPolicyViolations;
376
+ /**
377
+ * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,
378
+ * we return at most 3 available TimeSlots for each day within the date range specified in request.
379
+ *
380
+ * By default,
381
+ * if `bookable` filter was not specified,
382
+ * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
383
+ *
384
+ * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
385
+ * `un-bookable` slots will be returned according to the specified filters.
386
+ */
387
+ timeSlotsPerDay?: number | null;
388
+ /**
389
+ * CursorPaging.
390
+ *
391
+ * Enables you to fetch TimeSlots in smaller, more manageable chunks
392
+ * by setting a limit on the number of results returned in response.
393
+ * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
394
+ *
395
+ * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
396
+ * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
397
+ * returned cursor to the next call as `cursorPaging`.`cursor`.
398
+ *
399
+ * For the first call, you should only specify the `limit` for the results page.
400
+ * For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`
401
+ * the `cursorPaging`.`limit`. You may pass a different `limit`.
402
+ * No need to specify any additional parameters.
403
+ *
404
+ * <blockquote class="important">
405
+ * <p><strong>Important:</strong><br/>
406
+ * If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
407
+ * the response will contain the default size of results which is `1000`.
408
+ * </p>
409
+ * </blockquote>
410
+ */
411
+ cursorPaging?: CommonCursorPaging;
412
+ }
413
+ export interface Service {
414
+ /** Service ID. */
415
+ serviceId?: string;
416
+ /** Resources to include in response. */
417
+ resourceIds?: string[];
418
+ /**
419
+ * The resource type ID's to include in returned time slots.
420
+ * This is in addition to the specifically requested resources.
421
+ *
422
+ * <blockquote class="important">
423
+ * Currently supported only for Staff Member resource type.
424
+ * Staff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155
425
+ * </blockquote>
426
+ */
427
+ includeResourceTypeIds?: string[];
428
+ }
429
+ export interface CommonCursorPaging {
430
+ /**
431
+ * Number of results to load.
432
+ *
433
+ * Default: `1000`.
434
+ * Max: `1000`.
435
+ */
436
+ limit?: number | null;
437
+ /**
438
+ * Pointer to the next or previous page in the list of results.
439
+ *
440
+ * You can get the relevant cursor token
441
+ * from the `pagingMetadata` object in the previous call's response.
442
+ * Not relevant for the first request.
443
+ */
444
+ cursor?: string | null;
445
+ }
446
+ export interface ListMultiServiceAvailabilityTimeSlotsResponse {
447
+ /** Time slots. */
448
+ timeSlots?: TimeSlot[];
449
+ /**
450
+ * Time zone, in IANA time zone format.
451
+ * Shared for all TimeSlots in response.
452
+ */
453
+ timeZone?: string | null;
454
+ /**
455
+ * CursorPagingMetaData.
456
+ * Contains information about the next page of results.
457
+ *
458
+ * By default,
459
+ * if there are more than 1000 results,
460
+ * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.
461
+ *
462
+ * <blockquote class="important">
463
+ * <p><strong>Important:</strong><br/>
464
+ * <code class="grey-background">count</code> is not supported.</p>
465
+ * </blockquote>
466
+ */
467
+ cursorPagingMetadata?: CommonCursorPagingMetadata;
468
+ }
469
+ export interface CommonCursorPagingMetadata {
470
+ /** Offset that was requested. */
471
+ cursors?: CommonCursors;
472
+ /**
473
+ * Indicates if there are more results after the current page.
474
+ * If `true`, another page of results can be retrieved.
475
+ * If `false`, this is the last page.
476
+ */
477
+ hasNext?: boolean | null;
478
+ }
479
+ export interface CommonCursors {
480
+ /** Cursor pointing to next page in the list of results. */
481
+ next?: string | null;
482
+ /** Cursor pointing to previous page in the list of results. */
483
+ prev?: string | null;
484
+ }
485
+ export interface GetMultiServiceAvailabilityTimeSlotRequest {
486
+ /**
487
+ * Services for which the multiService TimeSlots are being returned for.
488
+ * Each service contains its own resources filters within.
489
+ *
490
+ * MinSize: 2.
491
+ * MaxSize: 8.
492
+ */
493
+ services: Service[];
494
+ /**
495
+ * Local start date of the time slot, in ISO-8601 format.
496
+ * For example, "2024-01-30T13:30:00".
497
+ */
498
+ localStartDate: string;
499
+ /**
500
+ * Local end date of the time slot, in ISO-8601 format.
501
+ * For example, "2024-01-30T14:30:00".
502
+ */
503
+ localEndDate: string;
504
+ /** Time zone, in IANA time zone format. */
505
+ timeZone: string | null;
506
+ /**
507
+ * The location of the time slot.
508
+ *
509
+ * You must provide a specific `locationType`.
510
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
511
+ *
512
+ * <blockquote class="warning">
513
+ * <p>Supports filtering by location type, or by location ID.
514
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
515
+ * </blockquote>
516
+ */
517
+ location: Location;
518
+ }
519
+ export interface GetMultiServiceAvailabilityTimeSlotResponse {
520
+ /** Time slot. */
521
+ timeSlot?: TimeSlot;
522
+ /** The time zone, in IANA time zone format. */
523
+ timeZone?: string | null;
524
+ }
525
+ export interface ListAvailabilityTimeSlotsRequest {
526
+ /**
527
+ * Service ID for which the time slots are being returned for.
528
+ * Currently supported only for services of type `APPOINTMENT`.
529
+ *
530
+ * Required, unless `cursorPaging`.`cursor` is provided.
531
+ */
532
+ serviceId?: string | null;
533
+ /**
534
+ * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.
535
+ * For example, "2024-01-30T13:30:00".
536
+ *
537
+ * Each returned `TimeSlot` in response has a `localStartDate`
538
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
539
+ *
540
+ * Required, unless `cursorPaging`.`cursor` is provided.
541
+ */
542
+ fromLocalDate?: string | null;
543
+ /**
544
+ * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.
545
+ * For example, "2024-01-30T14:30:00".
546
+ *
547
+ * Each returned `TimeSlot` in response has a `localStartDate`
548
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
549
+ *
550
+ * Required, unless `cursorPaging`.`cursor` is provided.
551
+ */
552
+ toLocalDate?: string | null;
553
+ /**
554
+ * Time zone, in IANA time zone format.
555
+ *
556
+ * Required, unless `cursorPaging`.`cursor` is provided.
557
+ */
558
+ timeZone?: string | null;
559
+ /**
560
+ * Locations to include in response.
561
+ *
562
+ * By default,
563
+ * if no locations are provided,
564
+ * the response contains TimeSlots for all locations where the service is available.
565
+ *
566
+ * You can specify locations or location types for which the time slots will be returned for.
567
+ * If locationType is `BUSINESS`, you __must__ provide a locationId.
568
+ *
569
+ * <blockquote class="warning">
570
+ * <p><strong>warning:</strong><br/>
571
+ * Supports filtering by location type, or by location ID. </br>
572
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
573
+ * </blockquote>
574
+ */
575
+ locations?: Location[];
576
+ /**
577
+ * Resources to include in response.
578
+ *
579
+ * If specified,
580
+ * the returned TimeSlots will contain __up__ to 10 available resources out of the provided list.
581
+ * Otherwise, the returned TimeSlots returns with an empty `AvailableResources`.
582
+ */
583
+ resourceIds?: string[];
584
+ /**
585
+ * Resource type ID's to include in response, this is in addition to the requested `resourceIds`.
586
+ *
587
+ * If specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`
588
+ * out of those specified, each contains __up__ to 10 available resources of this type.
589
+ */
590
+ includeResourceTypeIds?: string[];
591
+ /**
592
+ * Whether the `TimeSlot` is bookable according to the service's booking policies.
593
+ *
594
+ * If booking this `TimeSlot` does not violates any of the service's booking policies,
595
+ * returns as `true`. Otherwise, returns as `false`.
596
+ *
597
+ * > __Note:__
598
+ * > A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,
599
+ * > while a time slot with no available resources will not be returned at all.
600
+ */
601
+ bookable?: boolean | null;
602
+ /**
603
+ * Indicators for service's booking policy violations for booking the `TimeSlot`.
604
+ *
605
+ * A bookable time slot must not violate any policy,
606
+ * therefor, this filter is only relevant when `bookable` filter is false.
607
+ *
608
+ * Each nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
609
+ * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
610
+ */
611
+ bookingPolicyViolations?: BookingPolicyViolations;
612
+ /**
613
+ * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,
614
+ * we return at most 3 available TimeSlots for each day within the date range specified in request.
615
+ *
616
+ * By default,
617
+ * if `bookable` filter was not specified,
618
+ * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
619
+ *
620
+ * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
621
+ * `un-bookable` slots will be returned according to the specified filters.
622
+ */
623
+ timeSlotsPerDay?: number | null;
624
+ /**
625
+ * CursorPaging.
626
+ *
627
+ * Enables you to fetch results in smaller, more manageable chunks
628
+ * by setting a limit on the number of results returned in response.
629
+ * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
630
+ *
631
+ * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
632
+ * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
633
+ * returned cursor to the next call as `cursorPaging`.`cursor`.
634
+ *
635
+ * For the first call, you should only specify the `limit` for the results page.
636
+ * For each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and
637
+ * a `cursorPaging`.`limit`.
638
+ * No need to specify any additional parameters.
639
+ *
640
+ * <blockquote class="important">
641
+ * <p><strong>Important:</strong><br/>
642
+ * If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
643
+ * the response will contain the default size of results which is `1000`.
644
+ * </p>
645
+ * </blockquote>
646
+ */
647
+ cursorPaging?: CommonCursorPaging;
648
+ }
649
+ export interface ListAvailabilityTimeSlotsResponse {
650
+ /** Time slots. */
651
+ timeSlots?: TimeSlot[];
652
+ /**
653
+ * Time zone, in IANA time zone format.
654
+ * Shared for all TimeSlots in response.
655
+ */
656
+ timeZone?: string | null;
657
+ /**
658
+ * CursorPagingMetaData.
659
+ * Contains information about the next page of results.
660
+ *
661
+ * By default,
662
+ * if there are more than 1000 results,
663
+ * the response will contain a `cursorPagingMetaData` with a cursor to the next page of results.
664
+ *
665
+ * <blockquote class="important">
666
+ * <p><strong>Important:</strong><br/>
667
+ * <code class="grey-background">count</code> is not supported.</p>
668
+ * </blockquote>
669
+ */
670
+ cursorPagingMetadata?: CommonCursorPagingMetadata;
671
+ }
672
+ export interface GetAvailabilityTimeSlotRequest {
673
+ /**
674
+ * Service ID of the time slot.
675
+ * Currently supported only for services of type `APPOINTMENT`.
676
+ */
677
+ serviceId: string;
678
+ /**
679
+ * Local start date of the time slot, in ISO-8601 format.
680
+ * For example, "2024-01-30T13:30:00".
681
+ */
682
+ localStartDate: string;
683
+ /**
684
+ * Local end date of the time slot, in ISO-8601 format.
685
+ * For example, "2024-01-30T14:30:00".
686
+ */
687
+ localEndDate: string;
688
+ /** Time zone, in IANA time zone format. */
689
+ timeZone: string | null;
690
+ /**
691
+ * The location of the time slot.
692
+ *
693
+ * You must provide a specific `locationType`.
694
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
695
+ *
696
+ * <blockquote class="warning">
697
+ * <p>Supports filtering by location type, or by location ID.
698
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
699
+ * </blockquote>
700
+ */
701
+ location: Location;
702
+ /**
703
+ * Resources to include in response.
704
+ *
705
+ * If specified,
706
+ * the returned `TimeSlot` contains only the available resources out of provided list.
707
+ * Otherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.
708
+ */
709
+ resourceIds?: string[];
710
+ /**
711
+ * Resource type IDs to include in response, this is in addition to the requested `resourceIds`.
712
+ *
713
+ * If specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`
714
+ * out of those specified, each contains all the available resources of this type.
715
+ */
716
+ includeResourceTypeIds?: string[];
717
+ }
718
+ export interface GetAvailabilityTimeSlotResponse {
719
+ /** Time slot. */
720
+ timeSlot?: TimeSlot;
721
+ /** Time zone, in IANA time zone format. */
722
+ timeZone?: string | null;
723
+ }
724
+ export interface ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields {
725
+ timeSlots: {
726
+ location?: {
727
+ locationType: LocationType;
728
+ };
729
+ availableResources: {
730
+ resources: {
731
+ _id: string;
732
+ }[];
733
+ }[];
734
+ nestedTimeSlots: {
735
+ serviceId: string;
736
+ localStartDate: string;
737
+ localEndDate: string;
738
+ availableResources: {
739
+ resources: {
740
+ _id: string;
741
+ }[];
742
+ }[];
743
+ }[];
744
+ }[];
745
+ }
746
+ export interface GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields {
747
+ timeSlot?: {
748
+ location?: {
749
+ locationType: LocationType;
750
+ };
751
+ availableResources: {
752
+ resources: {
753
+ _id: string;
754
+ }[];
755
+ }[];
756
+ nestedTimeSlots: {
757
+ serviceId: string;
758
+ localStartDate: string;
759
+ localEndDate: string;
760
+ availableResources: {
761
+ resources: {
762
+ _id: string;
763
+ }[];
764
+ }[];
765
+ }[];
766
+ };
767
+ }
768
+ export interface ListAvailabilityTimeSlotsResponseNonNullableFields {
769
+ timeSlots: {
770
+ location?: {
771
+ locationType: LocationType;
772
+ };
773
+ availableResources: {
774
+ resources: {
775
+ _id: string;
776
+ }[];
777
+ }[];
778
+ nestedTimeSlots: {
779
+ serviceId: string;
780
+ localStartDate: string;
781
+ localEndDate: string;
782
+ availableResources: {
783
+ resources: {
784
+ _id: string;
785
+ }[];
786
+ }[];
787
+ }[];
788
+ }[];
789
+ }
790
+ export interface GetAvailabilityTimeSlotResponseNonNullableFields {
791
+ timeSlot?: {
792
+ location?: {
793
+ locationType: LocationType;
794
+ };
795
+ availableResources: {
796
+ resources: {
797
+ _id: string;
798
+ }[];
799
+ }[];
800
+ nestedTimeSlots: {
801
+ serviceId: string;
802
+ localStartDate: string;
803
+ localEndDate: string;
804
+ availableResources: {
805
+ resources: {
806
+ _id: string;
807
+ }[];
808
+ }[];
809
+ }[];
810
+ };
811
+ }
812
+ /**
813
+ * Retrieves a list of multiService `TimeSlot`s that match the provided filters.
814
+ *
815
+ * <blockquote class="important">
816
+ * <p><strong>Important:</strong><br/>
817
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
818
+ * </blockquote>
819
+ *
820
+ * The request body __must__ include either:
821
+ * + All of the following filters: `service`.`serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone`. You may add additional filters as you wish.
822
+ * + A `cursorPaging` with a valid `cursor` from previous response.
823
+ *
824
+ *
825
+ * Each [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response
826
+ * represents the availability of the given sequence of services in a specific order, location, and within a given range of time.
827
+ *
828
+ * Each `TimeSlot`.`NestedTimeSlot` represents a single service from the given list. The order of the `NestedTimeSlots` is the same as the order
829
+ * of the given services in request.
830
+ * The first `NestedTimeSlot` has `localStartDate` within the given `fromLocalDate` and `toLocalDate` exclusive,
831
+ * and each following `NestedTimeSlot` has a `localStartDate` that equals to the previous `NestedTimeSlot`'s `localEndDate`.
832
+ *
833
+ * By default,
834
+ * the response contains at most 1000 results.
835
+ * If there are more than 1000 results, we return a `cursorPagingMetadata` with
836
+ * a cursor for the next page of results, regardless of whether a `cursorPaging`
837
+ * was provided in request.
838
+ *
839
+ * > __Notes:__
840
+ * > + All nested time slots share the same location.
841
+ * > + You can pass up to 8 services in request.
842
+ *
843
+ * ### AvailableResources in response:
844
+ * The `TimeSlot`.`NestedTimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service
845
+ * within the `NestedTimeSlot` range of time. Each `AvailableResources` contains information about available resources of the same type.
846
+ *
847
+ * <blockquote class="important">
848
+ * <p><strong>Important:</strong><br/>
849
+ * By default,
850
+ * if you don't specify <code class="grey-background">service</code>.<code class="grey-background">includeResourceTypeIds</code>
851
+ * or <code class="grey-background">service</code>.<code class="grey-background">resourceIds</code> filters in request,
852
+ * we return TimeSlots with <code class="grey-background">NestedTimeSlot</code>s with an empty <code class="grey-background">AvailableResources</code>.
853
+ * <br/><strong>Note:</strong><br/> Not specifying resources filters can be handy in case you want to avoid large response in flows that only
854
+ * 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)
855
+ * is an example for such flow.
856
+ * </p>
857
+ * </blockquote>
858
+ *
859
+ *
860
+ * If you wish to get a list of available resources for a `TimeSlot`.`NestedTimeSlot` you should either:
861
+ * + provide `service`.`resourceIds` in request.
862
+ * + provide `service`.`includeResourceTypeIds` in request.
863
+ *
864
+ * __Notes:__
865
+ * + 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.
866
+ * + If an `AvailableResources` has more available resources which are not listed within it, we return `AvailableResources`.`hasMoreAvailableResources` as true.
867
+ * + 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).
868
+ *
869
+ *
870
+ * ### Availability VS Bookability
871
+ * An `available` time slot is not necessarily `bookable`.
872
+ * The `bookable` field of a `TimeSlot` indicates whether the customer can book all of the of the services within the given time slot,
873
+ * at a specific period of time.
874
+ * 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).
875
+ *
876
+ * By default,
877
+ * + 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.
878
+ * + 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`.
879
+ * + 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.
880
+ *
881
+ * <blockquote class="important">
882
+ * <p><strong>Important:</strong>
883
+ * Because of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.
884
+ * 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>
885
+ * </blockquote>
886
+ *
887
+ * ### ListAvailabilityTimeSlots runs with the following defaults:
888
+ * + `localStartDate` is sorted in `ASC` order.
889
+ * + `cursorPaging`.`limit` is `1000`.
890
+ * @public
891
+ * @documentationMaturity preview
892
+ * @permissionScope Read Bookings - Public Data
893
+ * @permissionScope Manage Bookings Services and Settings
894
+ * @permissionScope Read Bookings - Including Participants
895
+ * @permissionScope Read Bookings - all read permissions
896
+ * @permissionScope Read Bookings Calendar Availability
897
+ * @permissionScope Manage Bookings - all permissions
898
+ * @applicableIdentity APP
899
+ * @applicableIdentity MEMBER
900
+ * @applicableIdentity VISITOR
901
+ */
902
+ export declare function listMultiServiceAvailabilityTimeSlots(options?: ListMultiServiceAvailabilityTimeSlotsOptions): Promise<ListMultiServiceAvailabilityTimeSlotsResponse & ListMultiServiceAvailabilityTimeSlotsResponseNonNullableFields>;
903
+ export interface ListMultiServiceAvailabilityTimeSlotsOptions {
904
+ /**
905
+ * Services for which the multiService time slots are being returned for.
906
+ * Each service contains its own resources filters within.
907
+ *
908
+ * MinSize: `2`.
909
+ * MaxSize: `8`.
910
+ *
911
+ * Required, unless `cursorPaging`.`cursor` is provided.
912
+ */
913
+ services?: Service[];
914
+ /**
915
+ * Lower boundary for `localStartDate` to include in response, in ISO-8601 format.
916
+ * For example, "2024-01-30T13:30:00".
917
+ *
918
+ * Each returned `TimeSlot` in response has a `localStartDate`
919
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
920
+ *
921
+ * Required, unless `cursorPaging`.`cursor` is provided.
922
+ */
923
+ fromLocalDate?: string | null;
924
+ /**
925
+ * Upper boundary for `localStartDate` to include in response, in ISO-8601 format.
926
+ * For example, "2024-01-30T14:30:00".
927
+ *
928
+ * Each returned `TimeSlot` in response has a `localStartDate`
929
+ * within the provided `fromLocalDate` and `toLocalDate` exclusive.
930
+ *
931
+ * Required, unless `cursorPaging`.`cursor` is provided.
932
+ */
933
+ toLocalDate?: string | null;
934
+ /**
935
+ * Time zone, in IANA time zone format.
936
+ *
937
+ * Required, unless `cursorPaging`.`cursor` is provided.
938
+ */
939
+ timeZone?: string | null;
940
+ /**
941
+ * Location for which the multiService TimeSlots are being returned for.
942
+ *
943
+ * You can specify location or location type for which the TimeSlots will be returned for.
944
+ * If locationType is `BUSINESS`, you __must__ provide a locationId.
945
+ *
946
+ * <blockquote class="warning">
947
+ * <p><strong>warning:</strong><br/>
948
+ * Supports filtering by location type, or by location ID. </br>
949
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
950
+ * </blockquote>
951
+ *
952
+ * Required, unless `cursorPaging`.`cursor` is provided.
953
+ */
954
+ location?: Location;
955
+ /**
956
+ * Whether the `TimeSlot` is bookable according to all of the services booking policies.
957
+ *
958
+ * If booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,
959
+ * returns as `false`. Otherwise, returns as `true`.
960
+ *
961
+ * > __Note:__
962
+ * > A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,
963
+ * > while a `TimeSlot` with no available resources will not be returned at all.
964
+ */
965
+ bookable?: boolean | null;
966
+ /**
967
+ * Indicators for service's booking policy violations for booking the `TimeSlot`.
968
+ *
969
+ * A bookable time slot must not violate any policy,
970
+ * therefor, this filter is only relevant when `bookable` filter is false.
971
+ *
972
+ * Each nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s
973
+ * has a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether
974
+ * the other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.
975
+ *
976
+ * Each nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined
977
+ * we return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.
978
+ */
979
+ bookingPolicyViolations?: BookingPolicyViolations;
980
+ /**
981
+ * Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,
982
+ * we return at most 3 available TimeSlots for each day within the date range specified in request.
983
+ *
984
+ * By default,
985
+ * if `bookable` filter was not specified,
986
+ * and a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.
987
+ *
988
+ * If the number of `bookable` slots is less than the requested `timeSlotsPerDay`,
989
+ * `un-bookable` slots will be returned according to the specified filters.
990
+ */
991
+ timeSlotsPerDay?: number | null;
992
+ /**
993
+ * CursorPaging.
994
+ *
995
+ * Enables you to fetch TimeSlots in smaller, more manageable chunks
996
+ * by setting a limit on the number of results returned in response.
997
+ * This is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.
998
+ *
999
+ * If there are more results than the specified limit, the response will contain a `cursorPagingMetaData`
1000
+ * with a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the
1001
+ * returned cursor to the next call as `cursorPaging`.`cursor`.
1002
+ *
1003
+ * For the first call, you should only specify the `limit` for the results page.
1004
+ * For each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`
1005
+ * the `cursorPaging`.`limit`. You may pass a different `limit`.
1006
+ * No need to specify any additional parameters.
1007
+ *
1008
+ * <blockquote class="important">
1009
+ * <p><strong>Important:</strong><br/>
1010
+ * If you only provide a <code class="grey-background">cursorPaging</code>. <code class="grey-background">cursor</code>,
1011
+ * the response will contain the default size of results which is `1000`.
1012
+ * </p>
1013
+ * </blockquote>
1014
+ */
1015
+ cursorPaging?: CommonCursorPaging;
1016
+ }
1017
+ /**
1018
+ * Retrieves an available multiService `TimeSlot` that match the provided filters.
1019
+ *
1020
+ * Throws `SlotNotFound` if there is no such available time slot.
1021
+ *
1022
+ * <blockquote class="important">
1023
+ * <p><strong>Important:</strong><br/>
1024
+ * Currently supported only for services of type <code class="grey-background">APPOINTMENT</code>.</p>
1025
+ * </blockquote>
1026
+ *
1027
+ * By default,
1028
+ * if you don't provide a `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
1029
+ * we return for each `TimeSlot`.`NestedTimeSlot` all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide
1030
+ * the corresponding service within the time slot.
1031
+ *
1032
+ * If you specify `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,
1033
+ * the returned `TimeSlot`.`NestedTimeSlot` for this service will contain only `AvailableResources` with at least one available resource
1034
+ * which match the given resources filters,
1035
+ * each contains all available resources out of those requested.
1036
+ *
1037
+ * + Notes:
1038
+ * + All nested time slots share the same location.
1039
+ * + You can pass up to 8 services.
1040
+ *
1041
+ * <blockquote class="tip">
1042
+ * <p><strong>Tip:</strong><br/>
1043
+ * 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>
1044
+ * </blockquote>
1045
+ * @param services - Services for which the multiService TimeSlots are being returned for.
1046
+ * Each service contains its own resources filters within.
1047
+ *
1048
+ * MinSize: 2.
1049
+ * MaxSize: 8.
1050
+ * @param localStartDate - Local start date of the time slot, in ISO-8601 format.
1051
+ * For example, "2024-01-30T13:30:00".
1052
+ * @param localEndDate - Local end date of the time slot, in ISO-8601 format.
1053
+ * For example, "2024-01-30T14:30:00".
1054
+ * @param timeZone - Time zone, in IANA time zone format.
1055
+ * @param location - The location of the time slot.
1056
+ *
1057
+ * You must provide a specific `locationType`.
1058
+ * If locationType is `BUSINESS`, you __must__ also provide a `locationId`.
1059
+ *
1060
+ * <blockquote class="warning">
1061
+ * <p>Supports filtering by location type, or by location ID.
1062
+ * Other fields like <code class="grey-background">name</code> are ignored.</p>
1063
+ * </blockquote>
1064
+ * @public
1065
+ * @documentationMaturity preview
1066
+ * @requiredField localEndDate
1067
+ * @requiredField localStartDate
1068
+ * @requiredField location
1069
+ * @requiredField location.locationType
1070
+ * @requiredField services
1071
+ * @requiredField services.serviceId
1072
+ * @requiredField timeZone
1073
+ * @permissionScope Read Bookings - Public Data
1074
+ * @permissionScope Manage Bookings Services and Settings
1075
+ * @permissionScope Read Bookings - Including Participants
1076
+ * @permissionScope Read Bookings - all read permissions
1077
+ * @permissionScope Read Bookings Calendar Availability
1078
+ * @permissionScope Manage Bookings - all permissions
1079
+ * @applicableIdentity APP
1080
+ * @applicableIdentity MEMBER
1081
+ * @applicableIdentity VISITOR
1082
+ */
1083
+ export declare function getMultiServiceAvailabilityTimeSlot(services: Service[], localStartDate: string, localEndDate: string, timeZone: string | null, location: Location): Promise<GetMultiServiceAvailabilityTimeSlotResponse & GetMultiServiceAvailabilityTimeSlotResponseNonNullableFields>;