@agent-native/scheduling 0.1.13 → 0.1.15

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 (363) hide show
  1. package/dist/actions/_helpers.d.ts.map +1 -1
  2. package/dist/actions/_helpers.js.map +1 -1
  3. package/dist/actions/accept-team-invite.d.ts.map +1 -1
  4. package/dist/actions/accept-team-invite.js +1 -1
  5. package/dist/actions/accept-team-invite.js.map +1 -1
  6. package/dist/actions/add-booking-attendee.d.ts.map +1 -1
  7. package/dist/actions/add-booking-attendee.js +1 -1
  8. package/dist/actions/add-booking-attendee.js.map +1 -1
  9. package/dist/actions/add-booking-note.d.ts.map +1 -1
  10. package/dist/actions/add-booking-note.js +1 -1
  11. package/dist/actions/add-booking-note.js.map +1 -1
  12. package/dist/actions/add-date-override.d.ts.map +1 -1
  13. package/dist/actions/add-date-override.js.map +1 -1
  14. package/dist/actions/add-private-link.d.ts.map +1 -1
  15. package/dist/actions/add-private-link.js +2 -2
  16. package/dist/actions/add-private-link.js.map +1 -1
  17. package/dist/actions/assign-round-robin-host.d.ts +1 -1
  18. package/dist/actions/assign-round-robin-host.d.ts.map +1 -1
  19. package/dist/actions/assign-round-robin-host.js +3 -3
  20. package/dist/actions/assign-round-robin-host.js.map +1 -1
  21. package/dist/actions/cancel-booking.d.ts.map +1 -1
  22. package/dist/actions/cancel-booking.js.map +1 -1
  23. package/dist/actions/check-availability.d.ts +2 -2
  24. package/dist/actions/check-availability.d.ts.map +1 -1
  25. package/dist/actions/check-availability.js +1 -1
  26. package/dist/actions/check-availability.js.map +1 -1
  27. package/dist/actions/confirm-booking.d.ts.map +1 -1
  28. package/dist/actions/confirm-booking.js.map +1 -1
  29. package/dist/actions/connect-calendar.d.ts.map +1 -1
  30. package/dist/actions/connect-calendar.js +1 -1
  31. package/dist/actions/connect-calendar.js.map +1 -1
  32. package/dist/actions/connect-video.d.ts.map +1 -1
  33. package/dist/actions/connect-video.js.map +1 -1
  34. package/dist/actions/create-booking.d.ts +4 -4
  35. package/dist/actions/create-booking.d.ts.map +1 -1
  36. package/dist/actions/create-booking.js +1 -1
  37. package/dist/actions/create-booking.js.map +1 -1
  38. package/dist/actions/create-event-type.d.ts +1 -1
  39. package/dist/actions/create-event-type.d.ts.map +1 -1
  40. package/dist/actions/create-event-type.js.map +1 -1
  41. package/dist/actions/create-host-group.d.ts.map +1 -1
  42. package/dist/actions/create-host-group.js +1 -1
  43. package/dist/actions/create-host-group.js.map +1 -1
  44. package/dist/actions/create-routing-form.d.ts.map +1 -1
  45. package/dist/actions/create-routing-form.js +1 -1
  46. package/dist/actions/create-routing-form.js.map +1 -1
  47. package/dist/actions/create-schedule.d.ts.map +1 -1
  48. package/dist/actions/create-schedule.js.map +1 -1
  49. package/dist/actions/create-team.d.ts.map +1 -1
  50. package/dist/actions/create-team.js +1 -1
  51. package/dist/actions/create-team.js.map +1 -1
  52. package/dist/actions/create-workflow.d.ts +2 -2
  53. package/dist/actions/create-workflow.d.ts.map +1 -1
  54. package/dist/actions/create-workflow.js +1 -1
  55. package/dist/actions/create-workflow.js.map +1 -1
  56. package/dist/actions/delete-event-type.d.ts.map +1 -1
  57. package/dist/actions/delete-event-type.js +1 -1
  58. package/dist/actions/delete-event-type.js.map +1 -1
  59. package/dist/actions/delete-routing-form.d.ts.map +1 -1
  60. package/dist/actions/delete-routing-form.js +2 -2
  61. package/dist/actions/delete-routing-form.js.map +1 -1
  62. package/dist/actions/delete-schedule.d.ts.map +1 -1
  63. package/dist/actions/delete-schedule.js +1 -1
  64. package/dist/actions/delete-schedule.js.map +1 -1
  65. package/dist/actions/delete-workflow.d.ts.map +1 -1
  66. package/dist/actions/delete-workflow.js +2 -2
  67. package/dist/actions/delete-workflow.js.map +1 -1
  68. package/dist/actions/disconnect-calendar.d.ts.map +1 -1
  69. package/dist/actions/disconnect-calendar.js +1 -1
  70. package/dist/actions/disconnect-calendar.js.map +1 -1
  71. package/dist/actions/duplicate-event-type.d.ts.map +1 -1
  72. package/dist/actions/duplicate-event-type.js.map +1 -1
  73. package/dist/actions/export-bookings-csv.d.ts.map +1 -1
  74. package/dist/actions/export-bookings-csv.js.map +1 -1
  75. package/dist/actions/find-available-slot.d.ts.map +1 -1
  76. package/dist/actions/find-available-slot.js +1 -1
  77. package/dist/actions/find-available-slot.js.map +1 -1
  78. package/dist/actions/get-availability.d.ts +1 -1
  79. package/dist/actions/get-availability.d.ts.map +1 -1
  80. package/dist/actions/get-availability.js.map +1 -1
  81. package/dist/actions/get-booking.d.ts.map +1 -1
  82. package/dist/actions/get-booking.js.map +1 -1
  83. package/dist/actions/get-event-type.d.ts.map +1 -1
  84. package/dist/actions/get-event-type.js.map +1 -1
  85. package/dist/actions/install-conferencing-app.d.ts +1 -1
  86. package/dist/actions/install-conferencing-app.d.ts.map +1 -1
  87. package/dist/actions/install-conferencing-app.js +1 -1
  88. package/dist/actions/install-conferencing-app.js.map +1 -1
  89. package/dist/actions/invite-team-member.d.ts +1 -1
  90. package/dist/actions/invite-team-member.d.ts.map +1 -1
  91. package/dist/actions/invite-team-member.js +1 -1
  92. package/dist/actions/invite-team-member.js.map +1 -1
  93. package/dist/actions/list-bookings.d.ts +1 -1
  94. package/dist/actions/list-bookings.d.ts.map +1 -1
  95. package/dist/actions/list-bookings.js.map +1 -1
  96. package/dist/actions/list-calendar-integrations.d.ts.map +1 -1
  97. package/dist/actions/list-calendar-integrations.js +1 -1
  98. package/dist/actions/list-calendar-integrations.js.map +1 -1
  99. package/dist/actions/list-event-types.d.ts.map +1 -1
  100. package/dist/actions/list-event-types.js.map +1 -1
  101. package/dist/actions/list-routing-form-responses.d.ts.map +1 -1
  102. package/dist/actions/list-routing-form-responses.js +1 -1
  103. package/dist/actions/list-routing-form-responses.js.map +1 -1
  104. package/dist/actions/list-routing-forms.d.ts.map +1 -1
  105. package/dist/actions/list-routing-forms.js +2 -2
  106. package/dist/actions/list-routing-forms.js.map +1 -1
  107. package/dist/actions/list-schedules.d.ts.map +1 -1
  108. package/dist/actions/list-schedules.js.map +1 -1
  109. package/dist/actions/list-selected-calendars.d.ts +2 -2
  110. package/dist/actions/list-selected-calendars.d.ts.map +1 -1
  111. package/dist/actions/list-selected-calendars.js +1 -1
  112. package/dist/actions/list-selected-calendars.js.map +1 -1
  113. package/dist/actions/list-workflows.d.ts.map +1 -1
  114. package/dist/actions/list-workflows.js +2 -2
  115. package/dist/actions/list-workflows.js.map +1 -1
  116. package/dist/actions/mark-no-show.d.ts.map +1 -1
  117. package/dist/actions/mark-no-show.js.map +1 -1
  118. package/dist/actions/refresh-busy-times.d.ts.map +1 -1
  119. package/dist/actions/refresh-busy-times.js +1 -1
  120. package/dist/actions/refresh-busy-times.js.map +1 -1
  121. package/dist/actions/remove-booking-attendee.d.ts.map +1 -1
  122. package/dist/actions/remove-booking-attendee.js +1 -1
  123. package/dist/actions/remove-booking-attendee.js.map +1 -1
  124. package/dist/actions/remove-date-override.d.ts.map +1 -1
  125. package/dist/actions/remove-date-override.js.map +1 -1
  126. package/dist/actions/remove-team-member.d.ts.map +1 -1
  127. package/dist/actions/remove-team-member.js +1 -1
  128. package/dist/actions/remove-team-member.js.map +1 -1
  129. package/dist/actions/reorder-event-types.d.ts.map +1 -1
  130. package/dist/actions/reorder-event-types.js +1 -1
  131. package/dist/actions/reorder-event-types.js.map +1 -1
  132. package/dist/actions/reschedule-booking.d.ts.map +1 -1
  133. package/dist/actions/reschedule-booking.js.map +1 -1
  134. package/dist/actions/revoke-private-link.d.ts.map +1 -1
  135. package/dist/actions/revoke-private-link.js +1 -1
  136. package/dist/actions/revoke-private-link.js.map +1 -1
  137. package/dist/actions/send-reschedule-link.d.ts.map +1 -1
  138. package/dist/actions/send-reschedule-link.js.map +1 -1
  139. package/dist/actions/set-appearance.d.ts +1 -1
  140. package/dist/actions/set-appearance.d.ts.map +1 -1
  141. package/dist/actions/set-default-conferencing-app.d.ts.map +1 -1
  142. package/dist/actions/set-default-conferencing-app.js +1 -1
  143. package/dist/actions/set-default-conferencing-app.js.map +1 -1
  144. package/dist/actions/set-default-schedule.d.ts.map +1 -1
  145. package/dist/actions/set-default-schedule.js +1 -1
  146. package/dist/actions/set-default-schedule.js.map +1 -1
  147. package/dist/actions/set-destination-calendar.d.ts.map +1 -1
  148. package/dist/actions/set-destination-calendar.js +1 -1
  149. package/dist/actions/set-destination-calendar.js.map +1 -1
  150. package/dist/actions/set-event-type-hosts.d.ts.map +1 -1
  151. package/dist/actions/set-event-type-hosts.js +2 -2
  152. package/dist/actions/set-event-type-hosts.js.map +1 -1
  153. package/dist/actions/set-event-type-location.d.ts.map +1 -1
  154. package/dist/actions/set-event-type-location.js +1 -1
  155. package/dist/actions/set-event-type-location.js.map +1 -1
  156. package/dist/actions/set-host-availability-override.d.ts.map +1 -1
  157. package/dist/actions/set-host-availability-override.js +1 -1
  158. package/dist/actions/set-host-availability-override.js.map +1 -1
  159. package/dist/actions/set-team-branding.d.ts.map +1 -1
  160. package/dist/actions/set-team-branding.js +1 -1
  161. package/dist/actions/set-team-branding.js.map +1 -1
  162. package/dist/actions/submit-routing-form-response.d.ts.map +1 -1
  163. package/dist/actions/submit-routing-form-response.js +2 -2
  164. package/dist/actions/submit-routing-form-response.js.map +1 -1
  165. package/dist/actions/toggle-event-type-hidden.d.ts.map +1 -1
  166. package/dist/actions/toggle-event-type-hidden.js +1 -1
  167. package/dist/actions/toggle-event-type-hidden.js.map +1 -1
  168. package/dist/actions/toggle-selected-calendar.d.ts.map +1 -1
  169. package/dist/actions/toggle-selected-calendar.js +1 -1
  170. package/dist/actions/toggle-selected-calendar.js.map +1 -1
  171. package/dist/actions/toggle-workflow.d.ts.map +1 -1
  172. package/dist/actions/toggle-workflow.js +2 -2
  173. package/dist/actions/toggle-workflow.js.map +1 -1
  174. package/dist/actions/update-event-type.d.ts +2 -2
  175. package/dist/actions/update-event-type.d.ts.map +1 -1
  176. package/dist/actions/update-event-type.js +1 -1
  177. package/dist/actions/update-event-type.js.map +1 -1
  178. package/dist/actions/update-member-role.d.ts +1 -1
  179. package/dist/actions/update-member-role.d.ts.map +1 -1
  180. package/dist/actions/update-member-role.js +1 -1
  181. package/dist/actions/update-member-role.js.map +1 -1
  182. package/dist/actions/update-profile.d.ts +1 -1
  183. package/dist/actions/update-profile.d.ts.map +1 -1
  184. package/dist/actions/update-profile.js.map +1 -1
  185. package/dist/actions/update-routing-form.d.ts.map +1 -1
  186. package/dist/actions/update-routing-form.js +2 -2
  187. package/dist/actions/update-routing-form.js.map +1 -1
  188. package/dist/actions/update-schedule.d.ts.map +1 -1
  189. package/dist/actions/update-schedule.js +1 -1
  190. package/dist/actions/update-schedule.js.map +1 -1
  191. package/dist/actions/update-workflow.d.ts +2 -2
  192. package/dist/actions/update-workflow.d.ts.map +1 -1
  193. package/dist/actions/update-workflow.js +4 -4
  194. package/dist/actions/update-workflow.js.map +1 -1
  195. package/dist/core/limits.d.ts.map +1 -1
  196. package/dist/core/limits.js.map +1 -1
  197. package/dist/core/slots.d.ts +1 -1
  198. package/dist/core/slots.d.ts.map +1 -1
  199. package/dist/core/slots.js +3 -3
  200. package/dist/core/slots.js.map +1 -1
  201. package/dist/react/components/SlotPicker.d.ts +1 -1
  202. package/dist/react/components/SlotPicker.d.ts.map +1 -1
  203. package/dist/react/components/SlotPicker.js.map +1 -1
  204. package/dist/react/components/TimezoneSelect.d.ts +1 -1
  205. package/dist/react/components/TimezoneSelect.d.ts.map +1 -1
  206. package/dist/react/components/booking-links/AvailabilityEditor.d.ts +1 -1
  207. package/dist/react/components/booking-links/AvailabilityEditor.d.ts.map +1 -1
  208. package/dist/react/components/booking-links/AvailabilityEditor.js.map +1 -1
  209. package/dist/react/components/booking-links/BookingLinkCreateDialog.d.ts +1 -1
  210. package/dist/react/components/booking-links/BookingLinkCreateDialog.d.ts.map +1 -1
  211. package/dist/react/components/booking-links/BookingLinkCreateDialog.js +1 -1
  212. package/dist/react/components/booking-links/BookingLinkCreateDialog.js.map +1 -1
  213. package/dist/react/components/booking-links/ConferencingSelector.d.ts +1 -1
  214. package/dist/react/components/booking-links/ConferencingSelector.d.ts.map +1 -1
  215. package/dist/react/components/booking-links/ConferencingSelector.js +2 -2
  216. package/dist/react/components/booking-links/ConferencingSelector.js.map +1 -1
  217. package/dist/react/components/booking-links/CustomFieldsEditor.d.ts +1 -1
  218. package/dist/react/components/booking-links/CustomFieldsEditor.d.ts.map +1 -1
  219. package/dist/react/components/booking-links/CustomFieldsEditor.js +3 -3
  220. package/dist/react/components/booking-links/CustomFieldsEditor.js.map +1 -1
  221. package/dist/react/components/booking-links/DurationPicker.d.ts +1 -1
  222. package/dist/react/components/booking-links/DurationPicker.d.ts.map +1 -1
  223. package/dist/react/components/booking-links/DurationPicker.js +1 -1
  224. package/dist/react/components/booking-links/DurationPicker.js.map +1 -1
  225. package/dist/react/components/booking-links/SlugEditor.d.ts +1 -1
  226. package/dist/react/components/booking-links/SlugEditor.d.ts.map +1 -1
  227. package/dist/react/components/booking-links/SlugEditor.js.map +1 -1
  228. package/dist/react/hooks/useBookingFlow.d.ts.map +1 -1
  229. package/dist/react/hooks/useBookingFlow.js.map +1 -1
  230. package/dist/react/hooks/useEventType.d.ts.map +1 -1
  231. package/dist/react/hooks/useEventType.js.map +1 -1
  232. package/dist/react/hooks/useReschedule.d.ts.map +1 -1
  233. package/dist/react/hooks/useReschedule.js.map +1 -1
  234. package/dist/react/hooks/useSlots.d.ts.map +1 -1
  235. package/dist/react/hooks/useSlots.js.map +1 -1
  236. package/dist/react/i18n.d.ts.map +1 -1
  237. package/dist/react/i18n.js +102 -0
  238. package/dist/react/i18n.js.map +1 -1
  239. package/dist/schema/bookings.d.ts +9 -9
  240. package/dist/schema/calendar-cache.d.ts +1 -1
  241. package/dist/schema/credentials.d.ts +5 -5
  242. package/dist/schema/event-types.d.ts +10 -10
  243. package/dist/schema/routing-forms.d.ts +5 -5
  244. package/dist/schema/schedules.d.ts +8 -8
  245. package/dist/schema/teams.d.ts +6 -6
  246. package/dist/schema/workflows.d.ts +13 -13
  247. package/dist/server/availability-engine.d.ts.map +1 -1
  248. package/dist/server/availability-engine.js +2 -2
  249. package/dist/server/availability-engine.js.map +1 -1
  250. package/dist/server/booking-service.d.ts.map +1 -1
  251. package/dist/server/booking-service.js +3 -3
  252. package/dist/server/booking-service.js.map +1 -1
  253. package/dist/server/bookings-repo.d.ts.map +1 -1
  254. package/dist/server/bookings-repo.js +1 -1
  255. package/dist/server/bookings-repo.js.map +1 -1
  256. package/dist/server/event-types-repo.d.ts.map +1 -1
  257. package/dist/server/event-types-repo.js +1 -1
  258. package/dist/server/event-types-repo.js.map +1 -1
  259. package/dist/server/hooks.d.ts.map +1 -1
  260. package/dist/server/hooks.js +1 -1
  261. package/dist/server/hooks.js.map +1 -1
  262. package/dist/server/providers/google-calendar.d.ts.map +1 -1
  263. package/dist/server/providers/office365.d.ts.map +1 -1
  264. package/dist/server/schedules-repo.d.ts.map +1 -1
  265. package/dist/server/schedules-repo.js +1 -1
  266. package/dist/server/schedules-repo.js.map +1 -1
  267. package/dist/server/video-oauth.d.ts.map +1 -1
  268. package/dist/server/video-oauth.js +1 -1
  269. package/dist/server/video-oauth.js.map +1 -1
  270. package/package.json +30 -29
  271. package/src/actions/_helpers.ts +1 -0
  272. package/src/actions/accept-team-invite.ts +2 -1
  273. package/src/actions/add-booking-attendee.ts +2 -1
  274. package/src/actions/add-booking-note.ts +2 -1
  275. package/src/actions/add-date-override.ts +1 -0
  276. package/src/actions/add-private-link.ts +3 -2
  277. package/src/actions/assign-round-robin-host.ts +4 -3
  278. package/src/actions/cancel-booking.ts +1 -0
  279. package/src/actions/check-availability.ts +2 -1
  280. package/src/actions/confirm-booking.ts +1 -0
  281. package/src/actions/connect-calendar.ts +2 -1
  282. package/src/actions/connect-video.ts +1 -0
  283. package/src/actions/create-booking.ts +2 -1
  284. package/src/actions/create-event-type.ts +1 -0
  285. package/src/actions/create-host-group.ts +2 -1
  286. package/src/actions/create-routing-form.ts +2 -1
  287. package/src/actions/create-schedule.ts +1 -0
  288. package/src/actions/create-team.ts +2 -1
  289. package/src/actions/create-workflow.ts +2 -1
  290. package/src/actions/delete-event-type.ts +2 -1
  291. package/src/actions/delete-routing-form.ts +3 -2
  292. package/src/actions/delete-schedule.ts +2 -1
  293. package/src/actions/delete-workflow.ts +3 -2
  294. package/src/actions/disconnect-calendar.ts +2 -1
  295. package/src/actions/duplicate-event-type.ts +1 -0
  296. package/src/actions/export-bookings-csv.ts +1 -0
  297. package/src/actions/find-available-slot.ts +2 -1
  298. package/src/actions/get-availability.ts +1 -0
  299. package/src/actions/get-booking.ts +1 -0
  300. package/src/actions/get-event-type.ts +1 -0
  301. package/src/actions/install-conferencing-app.ts +2 -1
  302. package/src/actions/invite-team-member.ts +2 -1
  303. package/src/actions/list-bookings.ts +1 -0
  304. package/src/actions/list-calendar-integrations.ts +2 -1
  305. package/src/actions/list-event-types.ts +1 -0
  306. package/src/actions/list-routing-form-responses.ts +2 -1
  307. package/src/actions/list-routing-forms.ts +3 -2
  308. package/src/actions/list-schedules.ts +1 -0
  309. package/src/actions/list-selected-calendars.ts +2 -1
  310. package/src/actions/list-workflows.ts +3 -2
  311. package/src/actions/mark-no-show.ts +1 -0
  312. package/src/actions/refresh-busy-times.ts +2 -1
  313. package/src/actions/remove-booking-attendee.ts +2 -1
  314. package/src/actions/remove-date-override.ts +1 -0
  315. package/src/actions/remove-team-member.ts +2 -1
  316. package/src/actions/reorder-event-types.ts +2 -1
  317. package/src/actions/reschedule-booking.ts +1 -0
  318. package/src/actions/revoke-private-link.ts +2 -1
  319. package/src/actions/send-reschedule-link.ts +1 -0
  320. package/src/actions/set-default-conferencing-app.ts +2 -1
  321. package/src/actions/set-default-schedule.ts +2 -1
  322. package/src/actions/set-destination-calendar.ts +2 -1
  323. package/src/actions/set-event-type-hosts.ts +3 -2
  324. package/src/actions/set-event-type-location.ts +2 -1
  325. package/src/actions/set-host-availability-override.ts +2 -1
  326. package/src/actions/set-team-branding.ts +2 -1
  327. package/src/actions/submit-routing-form-response.ts +3 -2
  328. package/src/actions/toggle-event-type-hidden.ts +2 -1
  329. package/src/actions/toggle-selected-calendar.ts +2 -1
  330. package/src/actions/toggle-workflow.ts +3 -2
  331. package/src/actions/update-event-type.ts +2 -1
  332. package/src/actions/update-member-role.ts +2 -1
  333. package/src/actions/update-profile.ts +1 -0
  334. package/src/actions/update-routing-form.ts +3 -2
  335. package/src/actions/update-schedule.ts +2 -1
  336. package/src/actions/update-workflow.ts +5 -4
  337. package/src/core/limits.ts +3 -2
  338. package/src/core/round-robin.test.ts +2 -1
  339. package/src/core/slots.test.ts +2 -1
  340. package/src/core/slots.ts +4 -4
  341. package/src/react/components/SlotPicker.tsx +3 -2
  342. package/src/react/components/_shadcn-shims.d.ts +1 -1
  343. package/src/react/components/booking-links/AvailabilityEditor.tsx +3 -1
  344. package/src/react/components/booking-links/BookingLinkCreateDialog.tsx +3 -1
  345. package/src/react/components/booking-links/ConferencingSelector.tsx +11 -9
  346. package/src/react/components/booking-links/CustomFieldsEditor.tsx +13 -11
  347. package/src/react/components/booking-links/DurationPicker.tsx +3 -1
  348. package/src/react/components/booking-links/SlugEditor.tsx +2 -0
  349. package/src/react/hooks/useBookingFlow.ts +1 -0
  350. package/src/react/hooks/useEventType.ts +1 -0
  351. package/src/react/hooks/useReschedule.ts +1 -0
  352. package/src/react/hooks/useSlots.ts +1 -0
  353. package/src/react/i18n.ts +106 -0
  354. package/src/server/availability-engine.ts +5 -4
  355. package/src/server/booking-service.ts +4 -3
  356. package/src/server/bookings-repo.ts +2 -1
  357. package/src/server/event-types-repo.ts +2 -1
  358. package/src/server/hooks.ts +2 -1
  359. package/src/server/providers/google-calendar.ts +1 -1
  360. package/src/server/providers/office365.ts +1 -1
  361. package/src/server/schedules-repo.ts +2 -1
  362. package/src/server/video-oauth-state.test.ts +1 -0
  363. package/src/server/video-oauth.ts +2 -1
@@ -1,3 +1,6 @@
1
+ import { TZDate } from "@date-fns/tz";
2
+ import { format } from "date-fns";
3
+
1
4
  /**
2
5
  * SlotPicker — minimal, unstyled primitive that renders a vertical list of
3
6
  * available slots grouped by date. Consumers style the buttons via their
@@ -7,8 +10,6 @@
7
10
  * system for a fully styled picker.
8
11
  */
9
12
  import type { Slot } from "../../shared/index.js";
10
- import { TZDate } from "@date-fns/tz";
11
- import { format } from "date-fns";
12
13
  import { useSchedulingT } from "../i18n.js";
13
14
 
14
15
  export interface SlotPickerProps {
@@ -6,7 +6,7 @@
6
6
  * *build time* by the consumer's bundler (Vite / React Router) using the
7
7
  * template's `tsconfig.json` `paths` setting.
8
8
  *
9
- * The package itself doesn't have access to that alias during `tsc`
9
+ * The package itself doesn't have access to that alias during `tsgo`
10
10
  * compilation, so we declare broad shapes here to make the compiler happy
11
11
  * without coupling the package to a specific shadcn version. Runtime
12
12
  * behaviour is driven entirely by the consumer's actual shadcn modules.
@@ -1,3 +1,5 @@
1
+ import type { LocaleCode } from "@agent-native/core/client";
2
+
1
3
  /**
2
4
  * AvailabilityEditor — weekly schedule grid with per-day toggles and time
3
5
  * pickers. Matches the calendar template's visual baseline.
@@ -11,8 +13,8 @@
11
13
  */
12
14
  import { Input } from "@/components/ui/input";
13
15
  import { Switch } from "@/components/ui/switch";
16
+
14
17
  import { schedulingMessage, useSchedulingT } from "../../i18n.js";
15
- import type { LocaleCode } from "@agent-native/core/client";
16
18
 
17
19
  export type DayKey =
18
20
  | "monday"
@@ -10,6 +10,8 @@
10
10
  * label, textarea.
11
11
  */
12
12
  import { useEffect, useState } from "react";
13
+
14
+ import { Button } from "@/components/ui/button";
13
15
  import {
14
16
  Dialog,
15
17
  DialogContent,
@@ -18,10 +20,10 @@ import {
18
20
  DialogHeader,
19
21
  DialogTitle,
20
22
  } from "@/components/ui/dialog";
21
- import { Button } from "@/components/ui/button";
22
23
  import { Input } from "@/components/ui/input";
23
24
  import { Label } from "@/components/ui/label";
24
25
  import { Textarea } from "@/components/ui/textarea";
26
+
25
27
  import { useSchedulingT } from "../../i18n.js";
26
28
 
27
29
  export interface BookingLinkCreateDraft {
@@ -1,3 +1,11 @@
1
+ import {
2
+ IconBrandGoogle,
3
+ IconBrandZoom,
4
+ IconCheck,
5
+ IconLink,
6
+ IconVideo,
7
+ IconVideoOff,
8
+ } from "@tabler/icons-react";
1
9
  /**
2
10
  * ConferencingSelector — choose how a booking's video meeting is set up.
3
11
  *
@@ -23,24 +31,18 @@
23
31
  * - `onConnectGoogle` — optional, same shape as onConnectZoom
24
32
  */
25
33
  import { useId, type ComponentType } from "react";
26
- import {
27
- IconBrandGoogle,
28
- IconBrandZoom,
29
- IconCheck,
30
- IconLink,
31
- IconVideo,
32
- IconVideoOff,
33
- } from "@tabler/icons-react";
34
+
35
+ import { Badge } from "@/components/ui/badge";
34
36
  import { Button } from "@/components/ui/button";
35
37
  import { Input } from "@/components/ui/input";
36
38
  import { Label } from "@/components/ui/label";
37
- import { Badge } from "@/components/ui/badge";
38
39
  import {
39
40
  Select,
40
41
  SelectContent,
41
42
  SelectItem,
42
43
  SelectTrigger,
43
44
  } from "@/components/ui/select";
45
+
44
46
  import { useSchedulingT } from "../../i18n.js";
45
47
 
46
48
  export type ConferencingType = "none" | "google_meet" | "zoom" | "custom";
@@ -1,3 +1,13 @@
1
+ import {
2
+ IconChevronDown,
3
+ IconChevronLeft,
4
+ IconChevronRight,
5
+ IconGripVertical,
6
+ IconListCheck,
7
+ IconPlus,
8
+ IconTrash,
9
+ } from "@tabler/icons-react";
10
+ import { nanoid } from "nanoid";
1
11
  /**
2
12
  * CustomFieldsEditor — add, remove, reorder, and configure custom form
3
13
  * fields shown on a booking page.
@@ -13,20 +23,12 @@
13
23
  * textarea, switch. Icons from `@tabler/icons-react`.
14
24
  */
15
25
  import { useState } from "react";
16
- import { nanoid } from "nanoid";
17
- import {
18
- IconChevronDown,
19
- IconChevronLeft,
20
- IconChevronRight,
21
- IconGripVertical,
22
- IconListCheck,
23
- IconPlus,
24
- IconTrash,
25
- } from "@tabler/icons-react";
26
+
26
27
  import { Input } from "@/components/ui/input";
27
28
  import { Label } from "@/components/ui/label";
28
- import { Textarea } from "@/components/ui/textarea";
29
29
  import { Switch } from "@/components/ui/switch";
30
+ import { Textarea } from "@/components/ui/textarea";
31
+
30
32
  import { useSchedulingT } from "../../i18n.js";
31
33
 
32
34
  export type CustomFieldType =
@@ -1,3 +1,4 @@
1
+ import { IconPlus, IconX } from "@tabler/icons-react";
1
2
  /**
2
3
  * DurationPicker — multi-select of booking durations rendered as pills.
3
4
  *
@@ -8,9 +9,10 @@
8
9
  * Shadcn primitives expected in the consumer: button, input, label.
9
10
  */
10
11
  import { useState } from "react";
11
- import { IconPlus, IconX } from "@tabler/icons-react";
12
+
12
13
  import { Button } from "@/components/ui/button";
13
14
  import { Input } from "@/components/ui/input";
15
+
14
16
  import { useSchedulingT } from "../../i18n.js";
15
17
 
16
18
  const DEFAULT_PRESETS = [15, 30, 45, 60];
@@ -10,7 +10,9 @@
10
10
  * Shadcn primitives expected in the consumer: label.
11
11
  */
12
12
  import { useState } from "react";
13
+
13
14
  import { Label } from "@/components/ui/label";
15
+
14
16
  import { useSchedulingT } from "../../i18n.js";
15
17
 
16
18
  export interface SlugEditorProps {
@@ -9,6 +9,7 @@
9
9
  * and a page refresh see the same state.
10
10
  */
11
11
  import { useState, useCallback } from "react";
12
+
12
13
  import type { Slot } from "../../shared/index.js";
13
14
 
14
15
  export type BookerStage =
@@ -3,6 +3,7 @@
3
3
  * callback (typically calling the `get-event-type` action).
4
4
  */
5
5
  import { useEffect, useState } from "react";
6
+
6
7
  import type { EventType } from "../../shared/index.js";
7
8
 
8
9
  export interface UseEventTypeOpts {
@@ -3,6 +3,7 @@
3
3
  * reschedule flow that replaces its start/end time.
4
4
  */
5
5
  import { useEffect, useState } from "react";
6
+
6
7
  import type { Booking } from "../../shared/index.js";
7
8
 
8
9
  export interface UseRescheduleOpts {
@@ -7,6 +7,7 @@
7
7
  * that calls their own API (typically an action like `check-availability`).
8
8
  */
9
9
  import { useEffect, useState, useCallback } from "react";
10
+
10
11
  import type { Slot } from "../../shared/index.js";
11
12
 
12
13
  export interface UseSlotsOpts {
package/src/react/i18n.ts CHANGED
@@ -214,6 +214,112 @@ const translations: Partial<Record<LocaleCode, Partial<SchedulingMessages>>> = {
214
214
  providerNotConfigured: "{{provider}} 未在此服务器上配置。",
215
215
  providerNeedsCredentials: "{{provider}} 需要服务器 OAuth 凭据后才能使用。",
216
216
  },
217
+ "zh-TW": {
218
+ add: "新增",
219
+ addField: "新增欄位",
220
+ addEventTypeDescription: "建立新的可預約活動類型。",
221
+ addEventTypeTitle: "新增活動類型",
222
+ availableLeft: "剩餘",
223
+ bookersChooseBetween: "預約者將在這些時長中選擇:{{durations}}",
224
+ cancel: "取消",
225
+ clickToEditSlug: "按一下以編輯短網址",
226
+ clickToEditUsername: "按一下以編輯使用者名稱",
227
+ checkbox: "核取方塊",
228
+ company: "公司",
229
+ companyPlaceholder: "你的公司名稱",
230
+ conferencing: "會議",
231
+ connectGoogle: "連接 Google",
232
+ connectGoogleCalendar: "連接 Google 日曆",
233
+ connectGoogleCalendarDescription: "建立日曆活動時會自動產生 Meet 連結。",
234
+ connected: "已連接",
235
+ connectZoom: "連接 Zoom",
236
+ connectZoomAccount: "連接你的 Zoom 帳號",
237
+ connectZoomAccountDescription:
238
+ "我們會為每個預約建立真正的 Zoom 會議,無需貼上個人連結。",
239
+ continue: "繼續",
240
+ customFields: "自訂欄位",
241
+ customFieldsEmpty:
242
+ "新增自訂欄位以收集預約者資訊,例如 LinkedIn 個人檔案、公司名稱、電話號碼。",
243
+ customLink: "自訂連結",
244
+ customLinkDescription: "貼上任何會議 URL",
245
+ description: "說明",
246
+ dropdown: "下拉選單",
247
+ duration: "時長",
248
+ email: "電子郵件",
249
+ errorMessage: "錯誤訊息",
250
+ errorMessageHint: "(模式不相符時顯示)",
251
+ everyDay: "每天",
252
+ fieldLabel: "欄位標籤",
253
+ googleMeet: "Google Meet",
254
+ googleMeetDescription: "自動產生 Meet 連結",
255
+ inPersonOrOther: "實體或其他方式",
256
+ label: "標籤",
257
+ linkedInProfile: "LinkedIn 個人檔案",
258
+ linkedInUrlError: "請輸入有效的 LinkedIn 個人檔案 URL",
259
+ longText: "長文字",
260
+ meeting: "meeting",
261
+ meetingUrl: "會議 URL",
262
+ minutes: "分鐘",
263
+ minAbbrev: "分鐘",
264
+ monday: "星期一",
265
+ mon: "週一",
266
+ tuesday: "星期二",
267
+ tue: "週二",
268
+ wednesday: "星期三",
269
+ wed: "週三",
270
+ thursday: "星期四",
271
+ thu: "週四",
272
+ friday: "星期五",
273
+ fri: "週五",
274
+ saturday: "星期六",
275
+ sat: "週六",
276
+ sunday: "星期日",
277
+ sun: "週日",
278
+ moveDown: "下移",
279
+ moveUp: "上移",
280
+ newField: "新欄位",
281
+ noAvailabilitySet: "尚未設定可預約時間",
282
+ noConferencing: "無會議",
283
+ onePerLine: "(每行一個)",
284
+ optional: "選填",
285
+ options: "選項",
286
+ pattern: "模式",
287
+ phone: "電話",
288
+ phoneNumber: "電話號碼",
289
+ placeholder: "預留文字",
290
+ placeholderText: "預留文字",
291
+ presets: "預設",
292
+ regexOptional: "(正規表示式,選填)",
293
+ removeField: "移除欄位",
294
+ required: "必填",
295
+ saving: "儲存中...",
296
+ shortText: "短文字",
297
+ shortDescriptionPlaceholder: "預約者會看到的簡短說明。",
298
+ quickChatPlaceholder: "快速聊天",
299
+ quickChatSlugPlaceholder: "quick-chat",
300
+ optionListPlaceholder: "選項 1\n選項 2\n選項 3",
301
+ validationPatternPlaceholder:
302
+ "例如 ^https?://(www\\.)?linkedin\\.com/in/.+",
303
+ validationErrorPlaceholder: "例如 請輸入有效的 LinkedIn URL",
304
+ customMeetingUrlPlaceholder: "https://meet.example.com/room",
305
+ title: "標題",
306
+ to: "至",
307
+ toggleDay: "切換{{day}}",
308
+ type: "類型",
309
+ unavailable: "無法預約",
310
+ url: "URL",
311
+ validationPattern: "驗證模式",
312
+ website: "網站",
313
+ weekdays: "平日",
314
+ weekends: "週末",
315
+ yourName: "your-name",
316
+ zoom: "Zoom",
317
+ zoomDescription: "為每個預約自動建立會議",
318
+ zoomNotConfigured:
319
+ "請管理員設定 ZOOM_CLIENT_ID 和 ZOOM_CLIENT_SECRET 以啟用 Zoom OAuth。",
320
+ providerNotConfigured: "{{provider}} 尚未在此伺服器上設定。",
321
+ providerNeedsCredentials: "{{provider}} 需要伺服器 OAuth 憑證才能使用。",
322
+ },
217
323
  "es-ES": {
218
324
  add: "Añadir",
219
325
  addField: "Añadir campo",
@@ -7,18 +7,19 @@
7
7
  * calendars + existing bookings, and applies booking limits.
8
8
  */
9
9
  import { eq, gte, lt, and } from "drizzle-orm";
10
+
11
+ import type { BookingCounts } from "../core/limits.js";
12
+ import { bucketKeysForSlot } from "../core/limits.js";
13
+ import { computeAvailableSlots } from "../core/slots.js";
10
14
  import type {
11
15
  EventType,
12
16
  Schedule,
13
17
  BusyInterval,
14
18
  Slot,
15
19
  } from "../shared/index.js";
16
- import type { BookingCounts } from "../core/limits.js";
17
- import { computeAvailableSlots } from "../core/slots.js";
18
- import { bucketKeysForSlot } from "../core/limits.js";
19
- import { getScheduleById } from "./schedules-repo.js";
20
20
  import { getSchedulingContext } from "./context.js";
21
21
  import { getCalendarProvider } from "./providers/registry.js";
22
+ import { getScheduleById } from "./schedules-repo.js";
22
23
 
23
24
  export interface GetSlotsInput {
24
25
  eventType: EventType;
@@ -1,3 +1,5 @@
1
+ import { eq } from "drizzle-orm";
2
+
1
3
  /**
2
4
  * Booking lifecycle — create, reschedule, cancel — wired to providers and
3
5
  * workflow hooks.
@@ -23,15 +25,14 @@ import {
23
25
  markAttendeeNoShow,
24
26
  addBookingReference,
25
27
  } from "./bookings-repo.js";
28
+ import { getSchedulingContext } from "./context.js";
26
29
  import { getEventTypeById } from "./event-types-repo.js";
27
- import { getCalendarProvider, getVideoProvider } from "./providers/registry.js";
28
30
  import {
29
31
  onBookingCreated,
30
32
  onBookingCancelled,
31
33
  onBookingRescheduled,
32
34
  } from "./hooks.js";
33
- import { getSchedulingContext } from "./context.js";
34
- import { eq } from "drizzle-orm";
35
+ import { getCalendarProvider, getVideoProvider } from "./providers/registry.js";
35
36
 
36
37
  export interface CreateBookingInput {
37
38
  eventType: EventType;
@@ -1,9 +1,10 @@
1
+ import { accessFilter } from "@agent-native/core/sharing";
1
2
  /**
2
3
  * Data access for bookings + their attendees, references, and notes.
3
4
  */
4
5
  import { eq, and, gte, lt, or, desc, asc, isNotNull } from "drizzle-orm";
5
6
  import { nanoid } from "nanoid";
6
- import { accessFilter } from "@agent-native/core/sharing";
7
+
7
8
  import type {
8
9
  Booking,
9
10
  Attendee,
@@ -1,3 +1,4 @@
1
+ import { accessFilter } from "@agent-native/core/sharing";
1
2
  /**
2
3
  * Data access for event types.
3
4
  *
@@ -6,7 +7,7 @@
6
7
  */
7
8
  import { eq, and } from "drizzle-orm";
8
9
  import { nanoid } from "nanoid";
9
- import { accessFilter } from "@agent-native/core/sharing";
10
+
10
11
  import type {
11
12
  EventType,
12
13
  Location,
@@ -9,9 +9,10 @@
9
9
  */
10
10
  import { eq, and, inArray } from "drizzle-orm";
11
11
  import { nanoid } from "nanoid";
12
+
13
+ import { addMinutes } from "../core/time.js";
12
14
  import type { Booking, Workflow, WorkflowStep } from "../shared/index.js";
13
15
  import { getSchedulingContext } from "./context.js";
14
- import { addMinutes } from "../core/time.js";
15
16
 
16
17
  export async function onBookingCreated(booking: Booking): Promise<void> {
17
18
  await materializeReminders(booking, "new-booking");
@@ -1,3 +1,4 @@
1
+ import type { BusyInterval } from "../../shared/index.js";
1
2
  /**
2
3
  * Google Calendar provider.
3
4
  *
@@ -10,7 +11,6 @@
10
11
  * via the `getAccessToken` callback.
11
12
  */
12
13
  import type { CalendarProvider } from "./types.js";
13
- import type { BusyInterval } from "../../shared/index.js";
14
14
 
15
15
  export interface GoogleCalendarProviderConfig {
16
16
  clientId: string;
@@ -1,3 +1,4 @@
1
+ import type { BusyInterval } from "../../shared/index.js";
1
2
  /**
2
3
  * Office 365 / Outlook calendar provider via Microsoft Graph.
3
4
  *
@@ -5,7 +6,6 @@
5
6
  * Uses Microsoft Graph API for calendars and events.
6
7
  */
7
8
  import type { CalendarProvider } from "./types.js";
8
- import type { BusyInterval } from "../../shared/index.js";
9
9
 
10
10
  export interface Office365ProviderConfig {
11
11
  clientId: string;
@@ -1,10 +1,11 @@
1
+ import { accessFilter } from "@agent-native/core/sharing";
1
2
  /**
2
3
  * Data access for schedules — the weekly-hours + date-override definitions
3
4
  * that event types reference.
4
5
  */
5
6
  import { eq, and, inArray, type SQL } from "drizzle-orm";
6
7
  import { nanoid } from "nanoid";
7
- import { accessFilter } from "@agent-native/core/sharing";
8
+
8
9
  import type {
9
10
  Schedule,
10
11
  WeeklyAvailability,
@@ -1,4 +1,5 @@
1
1
  import { describe, expect, it, beforeEach, afterEach } from "vitest";
2
+
2
3
  import {
3
4
  signVideoOAuthState,
4
5
  verifyVideoOAuthState,
@@ -1,3 +1,4 @@
1
+ import { eq } from "drizzle-orm";
1
2
  /**
2
3
  * Server-side helper for completing video conferencing OAuth callbacks.
3
4
  *
@@ -14,7 +15,7 @@
14
15
  * pass in `userEmail` explicitly.
15
16
  */
16
17
  import { nanoid } from "nanoid";
17
- import { eq } from "drizzle-orm";
18
+
18
19
  import { getSchedulingContext } from "./context.js";
19
20
  import { getVideoProvider } from "./providers/registry.js";
20
21