@agent-native/scheduling 0.1.1
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.
- package/README.md +58 -0
- package/dist/actions/_helpers.d.ts +12 -0
- package/dist/actions/_helpers.d.ts.map +1 -0
- package/dist/actions/_helpers.js +49 -0
- package/dist/actions/_helpers.js.map +1 -0
- package/dist/actions/accept-team-invite.d.ts +3 -0
- package/dist/actions/accept-team-invite.d.ts.map +1 -0
- package/dist/actions/accept-team-invite.js +27 -0
- package/dist/actions/accept-team-invite.js.map +1 -0
- package/dist/actions/add-booking-attendee.d.ts +3 -0
- package/dist/actions/add-booking-attendee.d.ts.map +1 -0
- package/dist/actions/add-booking-attendee.js +33 -0
- package/dist/actions/add-booking-attendee.js.map +1 -0
- package/dist/actions/add-booking-note.d.ts +3 -0
- package/dist/actions/add-booking-note.d.ts.map +1 -0
- package/dist/actions/add-booking-note.js +26 -0
- package/dist/actions/add-booking-note.js.map +1 -0
- package/dist/actions/add-date-override.d.ts +3 -0
- package/dist/actions/add-date-override.d.ts.map +1 -0
- package/dist/actions/add-date-override.js +16 -0
- package/dist/actions/add-date-override.js.map +1 -0
- package/dist/actions/add-private-link.d.ts +3 -0
- package/dist/actions/add-private-link.d.ts.map +1 -0
- package/dist/actions/add-private-link.js +31 -0
- package/dist/actions/add-private-link.js.map +1 -0
- package/dist/actions/assign-round-robin-host.d.ts +3 -0
- package/dist/actions/assign-round-robin-host.d.ts.map +1 -0
- package/dist/actions/assign-round-robin-host.js +48 -0
- package/dist/actions/assign-round-robin-host.js.map +1 -0
- package/dist/actions/cancel-booking.d.ts +3 -0
- package/dist/actions/cancel-booking.d.ts.map +1 -0
- package/dist/actions/cancel-booking.js +34 -0
- package/dist/actions/cancel-booking.js.map +1 -0
- package/dist/actions/check-availability.d.ts +3 -0
- package/dist/actions/check-availability.d.ts.map +1 -0
- package/dist/actions/check-availability.js +43 -0
- package/dist/actions/check-availability.js.map +1 -0
- package/dist/actions/confirm-booking.d.ts +3 -0
- package/dist/actions/confirm-booking.d.ts.map +1 -0
- package/dist/actions/confirm-booking.js +12 -0
- package/dist/actions/confirm-booking.js.map +1 -0
- package/dist/actions/connect-calendar.d.ts +3 -0
- package/dist/actions/connect-calendar.d.ts.map +1 -0
- package/dist/actions/connect-calendar.js +26 -0
- package/dist/actions/connect-calendar.js.map +1 -0
- package/dist/actions/connect-video.d.ts +3 -0
- package/dist/actions/connect-video.d.ts.map +1 -0
- package/dist/actions/connect-video.js +54 -0
- package/dist/actions/connect-video.js.map +1 -0
- package/dist/actions/create-booking.d.ts +3 -0
- package/dist/actions/create-booking.d.ts.map +1 -0
- package/dist/actions/create-booking.js +60 -0
- package/dist/actions/create-booking.js.map +1 -0
- package/dist/actions/create-event-type.d.ts +3 -0
- package/dist/actions/create-event-type.d.ts.map +1 -0
- package/dist/actions/create-event-type.js +45 -0
- package/dist/actions/create-event-type.js.map +1 -0
- package/dist/actions/create-host-group.d.ts +3 -0
- package/dist/actions/create-host-group.d.ts.map +1 -0
- package/dist/actions/create-host-group.js +25 -0
- package/dist/actions/create-host-group.js.map +1 -0
- package/dist/actions/create-routing-form.d.ts +3 -0
- package/dist/actions/create-routing-form.d.ts.map +1 -0
- package/dist/actions/create-routing-form.js +39 -0
- package/dist/actions/create-routing-form.js.map +1 -0
- package/dist/actions/create-schedule.d.ts +3 -0
- package/dist/actions/create-schedule.d.ts.map +1 -0
- package/dist/actions/create-schedule.js +32 -0
- package/dist/actions/create-schedule.js.map +1 -0
- package/dist/actions/create-team.d.ts +3 -0
- package/dist/actions/create-team.d.ts.map +1 -0
- package/dist/actions/create-team.js +44 -0
- package/dist/actions/create-team.js.map +1 -0
- package/dist/actions/create-workflow.d.ts +3 -0
- package/dist/actions/create-workflow.d.ts.map +1 -0
- package/dist/actions/create-workflow.js +81 -0
- package/dist/actions/create-workflow.js.map +1 -0
- package/dist/actions/delete-event-type.d.ts +3 -0
- package/dist/actions/delete-event-type.d.ts.map +1 -0
- package/dist/actions/delete-event-type.js +14 -0
- package/dist/actions/delete-event-type.js.map +1 -0
- package/dist/actions/delete-routing-form.d.ts +3 -0
- package/dist/actions/delete-routing-form.d.ts.map +1 -0
- package/dist/actions/delete-routing-form.js +21 -0
- package/dist/actions/delete-routing-form.js.map +1 -0
- package/dist/actions/delete-schedule.d.ts +3 -0
- package/dist/actions/delete-schedule.d.ts.map +1 -0
- package/dist/actions/delete-schedule.js +14 -0
- package/dist/actions/delete-schedule.js.map +1 -0
- package/dist/actions/delete-workflow.d.ts +3 -0
- package/dist/actions/delete-workflow.d.ts.map +1 -0
- package/dist/actions/delete-workflow.js +21 -0
- package/dist/actions/delete-workflow.js.map +1 -0
- package/dist/actions/disconnect-calendar.d.ts +3 -0
- package/dist/actions/disconnect-calendar.d.ts.map +1 -0
- package/dist/actions/disconnect-calendar.js +22 -0
- package/dist/actions/disconnect-calendar.js.map +1 -0
- package/dist/actions/duplicate-event-type.d.ts +3 -0
- package/dist/actions/duplicate-event-type.d.ts.map +1 -0
- package/dist/actions/duplicate-event-type.js +34 -0
- package/dist/actions/duplicate-event-type.js.map +1 -0
- package/dist/actions/export-bookings-csv.d.ts +3 -0
- package/dist/actions/export-bookings-csv.d.ts.map +1 -0
- package/dist/actions/export-bookings-csv.js +53 -0
- package/dist/actions/export-bookings-csv.js.map +1 -0
- package/dist/actions/find-available-slot.d.ts +3 -0
- package/dist/actions/find-available-slot.d.ts.map +1 -0
- package/dist/actions/find-available-slot.js +39 -0
- package/dist/actions/find-available-slot.js.map +1 -0
- package/dist/actions/get-availability.d.ts +3 -0
- package/dist/actions/get-availability.d.ts.map +1 -0
- package/dist/actions/get-availability.js +20 -0
- package/dist/actions/get-availability.js.map +1 -0
- package/dist/actions/get-booking.d.ts +3 -0
- package/dist/actions/get-booking.d.ts.map +1 -0
- package/dist/actions/get-booking.js +9 -0
- package/dist/actions/get-booking.js.map +1 -0
- package/dist/actions/get-event-type.d.ts +3 -0
- package/dist/actions/get-event-type.d.ts.map +1 -0
- package/dist/actions/get-event-type.js +27 -0
- package/dist/actions/get-event-type.js.map +1 -0
- package/dist/actions/install-conferencing-app.d.ts +3 -0
- package/dist/actions/install-conferencing-app.d.ts.map +1 -0
- package/dist/actions/install-conferencing-app.js +28 -0
- package/dist/actions/install-conferencing-app.js.map +1 -0
- package/dist/actions/invite-team-member.d.ts +3 -0
- package/dist/actions/invite-team-member.d.ts.map +1 -0
- package/dist/actions/invite-team-member.js +30 -0
- package/dist/actions/invite-team-member.js.map +1 -0
- package/dist/actions/list-bookings.d.ts +3 -0
- package/dist/actions/list-bookings.d.ts.map +1 -0
- package/dist/actions/list-bookings.js +35 -0
- package/dist/actions/list-bookings.js.map +1 -0
- package/dist/actions/list-calendar-integrations.d.ts +3 -0
- package/dist/actions/list-calendar-integrations.d.ts.map +1 -0
- package/dist/actions/list-calendar-integrations.js +26 -0
- package/dist/actions/list-calendar-integrations.js.map +1 -0
- package/dist/actions/list-event-types.d.ts +3 -0
- package/dist/actions/list-event-types.d.ts.map +1 -0
- package/dist/actions/list-event-types.js +31 -0
- package/dist/actions/list-event-types.js.map +1 -0
- package/dist/actions/list-routing-form-responses.d.ts +3 -0
- package/dist/actions/list-routing-form-responses.d.ts.map +1 -0
- package/dist/actions/list-routing-form-responses.js +24 -0
- package/dist/actions/list-routing-form-responses.js.map +1 -0
- package/dist/actions/list-routing-forms.d.ts +3 -0
- package/dist/actions/list-routing-forms.d.ts.map +1 -0
- package/dist/actions/list-routing-forms.js +29 -0
- package/dist/actions/list-routing-forms.js.map +1 -0
- package/dist/actions/list-schedules.d.ts +3 -0
- package/dist/actions/list-schedules.d.ts.map +1 -0
- package/dist/actions/list-schedules.js +16 -0
- package/dist/actions/list-schedules.js.map +1 -0
- package/dist/actions/list-selected-calendars.d.ts +3 -0
- package/dist/actions/list-selected-calendars.d.ts.map +1 -0
- package/dist/actions/list-selected-calendars.js +42 -0
- package/dist/actions/list-selected-calendars.js.map +1 -0
- package/dist/actions/list-workflows.d.ts +3 -0
- package/dist/actions/list-workflows.d.ts.map +1 -0
- package/dist/actions/list-workflows.js +29 -0
- package/dist/actions/list-workflows.js.map +1 -0
- package/dist/actions/mark-no-show.d.ts +3 -0
- package/dist/actions/mark-no-show.d.ts.map +1 -0
- package/dist/actions/mark-no-show.js +15 -0
- package/dist/actions/mark-no-show.js.map +1 -0
- package/dist/actions/refresh-busy-times.d.ts +3 -0
- package/dist/actions/refresh-busy-times.d.ts.map +1 -0
- package/dist/actions/refresh-busy-times.js +25 -0
- package/dist/actions/refresh-busy-times.js.map +1 -0
- package/dist/actions/remove-booking-attendee.d.ts +3 -0
- package/dist/actions/remove-booking-attendee.d.ts.map +1 -0
- package/dist/actions/remove-booking-attendee.js +20 -0
- package/dist/actions/remove-booking-attendee.js.map +1 -0
- package/dist/actions/remove-date-override.d.ts +3 -0
- package/dist/actions/remove-date-override.d.ts.map +1 -0
- package/dist/actions/remove-date-override.js +15 -0
- package/dist/actions/remove-date-override.js.map +1 -0
- package/dist/actions/remove-team-member.d.ts +3 -0
- package/dist/actions/remove-team-member.d.ts.map +1 -0
- package/dist/actions/remove-team-member.js +18 -0
- package/dist/actions/remove-team-member.js.map +1 -0
- package/dist/actions/reorder-event-types.d.ts +3 -0
- package/dist/actions/reorder-event-types.d.ts.map +1 -0
- package/dist/actions/reorder-event-types.js +18 -0
- package/dist/actions/reorder-event-types.js.map +1 -0
- package/dist/actions/reschedule-booking.d.ts +3 -0
- package/dist/actions/reschedule-booking.d.ts.map +1 -0
- package/dist/actions/reschedule-booking.js +38 -0
- package/dist/actions/reschedule-booking.js.map +1 -0
- package/dist/actions/revoke-private-link.d.ts +3 -0
- package/dist/actions/revoke-private-link.d.ts.map +1 -0
- package/dist/actions/revoke-private-link.js +16 -0
- package/dist/actions/revoke-private-link.js.map +1 -0
- package/dist/actions/send-reschedule-link.d.ts +3 -0
- package/dist/actions/send-reschedule-link.d.ts.map +1 -0
- package/dist/actions/send-reschedule-link.js +18 -0
- package/dist/actions/send-reschedule-link.js.map +1 -0
- package/dist/actions/set-appearance.d.ts +3 -0
- package/dist/actions/set-appearance.d.ts.map +1 -0
- package/dist/actions/set-appearance.js +23 -0
- package/dist/actions/set-appearance.js.map +1 -0
- package/dist/actions/set-default-conferencing-app.d.ts +3 -0
- package/dist/actions/set-default-conferencing-app.d.ts.map +1 -0
- package/dist/actions/set-default-conferencing-app.js +25 -0
- package/dist/actions/set-default-conferencing-app.js.map +1 -0
- package/dist/actions/set-default-schedule.d.ts +3 -0
- package/dist/actions/set-default-schedule.d.ts.map +1 -0
- package/dist/actions/set-default-schedule.js +15 -0
- package/dist/actions/set-default-schedule.js.map +1 -0
- package/dist/actions/set-destination-calendar.d.ts +3 -0
- package/dist/actions/set-destination-calendar.d.ts.map +1 -0
- package/dist/actions/set-destination-calendar.js +39 -0
- package/dist/actions/set-destination-calendar.js.map +1 -0
- package/dist/actions/set-event-type-hosts.d.ts +3 -0
- package/dist/actions/set-event-type-hosts.d.ts.map +1 -0
- package/dist/actions/set-event-type-hosts.js +41 -0
- package/dist/actions/set-event-type-hosts.js.map +1 -0
- package/dist/actions/set-event-type-location.d.ts +3 -0
- package/dist/actions/set-event-type-location.d.ts.map +1 -0
- package/dist/actions/set-event-type-location.js +18 -0
- package/dist/actions/set-event-type-location.js.map +1 -0
- package/dist/actions/set-host-availability-override.d.ts +3 -0
- package/dist/actions/set-host-availability-override.d.ts.map +1 -0
- package/dist/actions/set-host-availability-override.js +21 -0
- package/dist/actions/set-host-availability-override.js.map +1 -0
- package/dist/actions/set-team-branding.d.ts +3 -0
- package/dist/actions/set-team-branding.d.ts.map +1 -0
- package/dist/actions/set-team-branding.js +28 -0
- package/dist/actions/set-team-branding.js.map +1 -0
- package/dist/actions/submit-routing-form-response.d.ts +3 -0
- package/dist/actions/submit-routing-form-response.d.ts.map +1 -0
- package/dist/actions/submit-routing-form-response.js +46 -0
- package/dist/actions/submit-routing-form-response.js.map +1 -0
- package/dist/actions/toggle-event-type-hidden.d.ts +3 -0
- package/dist/actions/toggle-event-type-hidden.d.ts.map +1 -0
- package/dist/actions/toggle-event-type-hidden.js +19 -0
- package/dist/actions/toggle-event-type-hidden.js.map +1 -0
- package/dist/actions/toggle-selected-calendar.d.ts +3 -0
- package/dist/actions/toggle-selected-calendar.d.ts.map +1 -0
- package/dist/actions/toggle-selected-calendar.js +40 -0
- package/dist/actions/toggle-selected-calendar.js.map +1 -0
- package/dist/actions/toggle-workflow.d.ts +3 -0
- package/dist/actions/toggle-workflow.d.ts.map +1 -0
- package/dist/actions/toggle-workflow.js +26 -0
- package/dist/actions/toggle-workflow.js.map +1 -0
- package/dist/actions/update-event-type.d.ts +3 -0
- package/dist/actions/update-event-type.d.ts.map +1 -0
- package/dist/actions/update-event-type.js +54 -0
- package/dist/actions/update-event-type.js.map +1 -0
- package/dist/actions/update-member-role.d.ts +3 -0
- package/dist/actions/update-member-role.d.ts.map +1 -0
- package/dist/actions/update-member-role.js +23 -0
- package/dist/actions/update-member-role.js.map +1 -0
- package/dist/actions/update-profile.d.ts +3 -0
- package/dist/actions/update-profile.d.ts.map +1 -0
- package/dist/actions/update-profile.js +34 -0
- package/dist/actions/update-profile.js.map +1 -0
- package/dist/actions/update-routing-form.d.ts +3 -0
- package/dist/actions/update-routing-form.d.ts.map +1 -0
- package/dist/actions/update-routing-form.js +40 -0
- package/dist/actions/update-routing-form.js.map +1 -0
- package/dist/actions/update-schedule.d.ts +3 -0
- package/dist/actions/update-schedule.d.ts.map +1 -0
- package/dist/actions/update-schedule.js +44 -0
- package/dist/actions/update-schedule.js.map +1 -0
- package/dist/actions/update-workflow.d.ts +3 -0
- package/dist/actions/update-workflow.d.ts.map +1 -0
- package/dist/actions/update-workflow.js +89 -0
- package/dist/actions/update-workflow.js.map +1 -0
- package/dist/core/buffers.d.ts +25 -0
- package/dist/core/buffers.d.ts.map +1 -0
- package/dist/core/buffers.js +21 -0
- package/dist/core/buffers.js.map +1 -0
- package/dist/core/conflicts.d.ts +11 -0
- package/dist/core/conflicts.d.ts.map +1 -0
- package/dist/core/conflicts.js +42 -0
- package/dist/core/conflicts.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/limits.d.ts +23 -0
- package/dist/core/limits.d.ts.map +1 -0
- package/dist/core/limits.js +28 -0
- package/dist/core/limits.js.map +1 -0
- package/dist/core/round-robin.d.ts +31 -0
- package/dist/core/round-robin.d.ts.map +1 -0
- package/dist/core/round-robin.js +57 -0
- package/dist/core/round-robin.js.map +1 -0
- package/dist/core/rrule.d.ts +2 -0
- package/dist/core/rrule.d.ts.map +1 -0
- package/dist/core/rrule.js +14 -0
- package/dist/core/rrule.js.map +1 -0
- package/dist/core/rules.d.ts +26 -0
- package/dist/core/rules.d.ts.map +1 -0
- package/dist/core/rules.js +40 -0
- package/dist/core/rules.js.map +1 -0
- package/dist/core/slots.d.ts +58 -0
- package/dist/core/slots.d.ts.map +1 -0
- package/dist/core/slots.js +98 -0
- package/dist/core/slots.js.map +1 -0
- package/dist/core/time.d.ts +52 -0
- package/dist/core/time.d.ts.map +1 -0
- package/dist/core/time.js +109 -0
- package/dist/core/time.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +28 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +160 -0
- package/dist/manifest.js.map +1 -0
- package/dist/react/components/SlotPicker.d.ts +21 -0
- package/dist/react/components/SlotPicker.d.ts.map +1 -0
- package/dist/react/components/SlotPicker.js +15 -0
- package/dist/react/components/SlotPicker.js.map +1 -0
- package/dist/react/components/TimezoneSelect.d.ts +7 -0
- package/dist/react/components/TimezoneSelect.d.ts.map +1 -0
- package/dist/react/components/TimezoneSelect.js +31 -0
- package/dist/react/components/TimezoneSelect.js.map +1 -0
- package/dist/react/components/booking-links/AvailabilityEditor.d.ts +21 -0
- package/dist/react/components/booking-links/AvailabilityEditor.d.ts.map +1 -0
- package/dist/react/components/booking-links/AvailabilityEditor.js +102 -0
- package/dist/react/components/booking-links/AvailabilityEditor.js.map +1 -0
- package/dist/react/components/booking-links/BookingLinkCreateDialog.d.ts +22 -0
- package/dist/react/components/booking-links/BookingLinkCreateDialog.d.ts.map +1 -0
- package/dist/react/components/booking-links/BookingLinkCreateDialog.js +75 -0
- package/dist/react/components/booking-links/BookingLinkCreateDialog.js.map +1 -0
- package/dist/react/components/booking-links/ConferencingSelector.d.ts +19 -0
- package/dist/react/components/booking-links/ConferencingSelector.d.ts.map +1 -0
- package/dist/react/components/booking-links/ConferencingSelector.js +87 -0
- package/dist/react/components/booking-links/ConferencingSelector.js.map +1 -0
- package/dist/react/components/booking-links/CustomFieldsEditor.d.ts +19 -0
- package/dist/react/components/booking-links/CustomFieldsEditor.d.ts.map +1 -0
- package/dist/react/components/booking-links/CustomFieldsEditor.js +117 -0
- package/dist/react/components/booking-links/CustomFieldsEditor.js.map +1 -0
- package/dist/react/components/booking-links/DurationPicker.d.ts +9 -0
- package/dist/react/components/booking-links/DurationPicker.d.ts.map +1 -0
- package/dist/react/components/booking-links/DurationPicker.js +56 -0
- package/dist/react/components/booking-links/DurationPicker.js.map +1 -0
- package/dist/react/components/booking-links/SlugEditor.d.ts +15 -0
- package/dist/react/components/booking-links/SlugEditor.d.ts.map +1 -0
- package/dist/react/components/booking-links/SlugEditor.js +64 -0
- package/dist/react/components/booking-links/SlugEditor.js.map +1 -0
- package/dist/react/components/booking-links/index.d.ts +16 -0
- package/dist/react/components/booking-links/index.d.ts.map +1 -0
- package/dist/react/components/booking-links/index.js +16 -0
- package/dist/react/components/booking-links/index.js.map +1 -0
- package/dist/react/components/index.d.ts +14 -0
- package/dist/react/components/index.d.ts.map +1 -0
- package/dist/react/components/index.js +14 -0
- package/dist/react/components/index.js.map +1 -0
- package/dist/react/hooks/useBookingFlow.d.ts +33 -0
- package/dist/react/hooks/useBookingFlow.d.ts.map +1 -0
- package/dist/react/hooks/useBookingFlow.js +51 -0
- package/dist/react/hooks/useBookingFlow.js.map +1 -0
- package/dist/react/hooks/useEventType.d.ts +21 -0
- package/dist/react/hooks/useEventType.d.ts.map +1 -0
- package/dist/react/hooks/useEventType.js +38 -0
- package/dist/react/hooks/useEventType.js.map +1 -0
- package/dist/react/hooks/useReschedule.d.ts +13 -0
- package/dist/react/hooks/useReschedule.d.ts.map +1 -0
- package/dist/react/hooks/useReschedule.js +33 -0
- package/dist/react/hooks/useReschedule.js.map +1 -0
- package/dist/react/hooks/useSlots.d.ts +32 -0
- package/dist/react/hooks/useSlots.d.ts.map +1 -0
- package/dist/react/hooks/useSlots.js +59 -0
- package/dist/react/hooks/useSlots.js.map +1 -0
- package/dist/react/hooks/useTimezone.d.ts +3 -0
- package/dist/react/hooks/useTimezone.d.ts.map +1 -0
- package/dist/react/hooks/useTimezone.js +30 -0
- package/dist/react/hooks/useTimezone.js.map +1 -0
- package/dist/react/index.d.ts +11 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +11 -0
- package/dist/react/index.js.map +1 -0
- package/dist/schema/bookings.d.ts +1201 -0
- package/dist/schema/bookings.d.ts.map +1 -0
- package/dist/schema/bookings.js +100 -0
- package/dist/schema/bookings.js.map +1 -0
- package/dist/schema/calendar-cache.d.ts +160 -0
- package/dist/schema/calendar-cache.d.ts.map +1 -0
- package/dist/schema/calendar-cache.js +23 -0
- package/dist/schema/calendar-cache.js.map +1 -0
- package/dist/schema/credentials.d.ts +743 -0
- package/dist/schema/credentials.d.ts.map +1 -0
- package/dist/schema/credentials.js +79 -0
- package/dist/schema/credentials.js.map +1 -0
- package/dist/schema/event-types.d.ts +1292 -0
- package/dist/schema/event-types.d.ts.map +1 -0
- package/dist/schema/event-types.js +131 -0
- package/dist/schema/event-types.js.map +1 -0
- package/dist/schema/index.d.ts +20 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +20 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/routing-forms.d.ts +571 -0
- package/dist/schema/routing-forms.d.ts.map +1 -0
- package/dist/schema/routing-forms.js +44 -0
- package/dist/schema/routing-forms.js.map +1 -0
- package/dist/schema/schedules.d.ts +830 -0
- package/dist/schema/schedules.d.ts.map +1 -0
- package/dist/schema/schedules.js +72 -0
- package/dist/schema/schedules.js.map +1 -0
- package/dist/schema/teams.d.ts +569 -0
- package/dist/schema/teams.d.ts.map +1 -0
- package/dist/schema/teams.js +38 -0
- package/dist/schema/teams.js.map +1 -0
- package/dist/schema/workflows.d.ts +1367 -0
- package/dist/schema/workflows.d.ts.map +1 -0
- package/dist/schema/workflows.js +116 -0
- package/dist/schema/workflows.js.map +1 -0
- package/dist/server/availability-engine.d.ts +21 -0
- package/dist/server/availability-engine.d.ts.map +1 -0
- package/dist/server/availability-engine.js +135 -0
- package/dist/server/availability-engine.js.map +1 -0
- package/dist/server/booking-service.d.ts +46 -0
- package/dist/server/booking-service.d.ts.map +1 -0
- package/dist/server/booking-service.js +198 -0
- package/dist/server/booking-service.js.map +1 -0
- package/dist/server/bookings-repo.d.ts +48 -0
- package/dist/server/bookings-repo.d.ts.map +1 -0
- package/dist/server/bookings-repo.js +244 -0
- package/dist/server/bookings-repo.js.map +1 -0
- package/dist/server/context.d.ts +33 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +11 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/db-types.d.ts +15 -0
- package/dist/server/db-types.d.ts.map +1 -0
- package/dist/server/db-types.js +2 -0
- package/dist/server/db-types.js.map +1 -0
- package/dist/server/event-types-repo.d.ts +46 -0
- package/dist/server/event-types-repo.d.ts.map +1 -0
- package/dist/server/event-types-repo.js +320 -0
- package/dist/server/event-types-repo.js.map +1 -0
- package/dist/server/hooks.d.ts +6 -0
- package/dist/server/hooks.d.ts.map +1 -0
- package/dist/server/hooks.js +173 -0
- package/dist/server/hooks.js.map +1 -0
- package/dist/server/ics.d.ts +12 -0
- package/dist/server/ics.d.ts.map +1 -0
- package/dist/server/ics.js +81 -0
- package/dist/server/ics.js.map +1 -0
- package/dist/server/index.d.ts +12 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +12 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/providers/builtin-video.d.ts +12 -0
- package/dist/server/providers/builtin-video.d.ts.map +1 -0
- package/dist/server/providers/builtin-video.js +50 -0
- package/dist/server/providers/builtin-video.js.map +1 -0
- package/dist/server/providers/cal-video.d.ts +12 -0
- package/dist/server/providers/cal-video.d.ts.map +1 -0
- package/dist/server/providers/cal-video.js +50 -0
- package/dist/server/providers/cal-video.js.map +1 -0
- package/dist/server/providers/google-calendar.d.ts +28 -0
- package/dist/server/providers/google-calendar.d.ts.map +1 -0
- package/dist/server/providers/google-calendar.js +163 -0
- package/dist/server/providers/google-calendar.js.map +1 -0
- package/dist/server/providers/google-meet.d.ts +10 -0
- package/dist/server/providers/google-meet.d.ts.map +1 -0
- package/dist/server/providers/google-meet.js +14 -0
- package/dist/server/providers/google-meet.js.map +1 -0
- package/dist/server/providers/index.d.ts +8 -0
- package/dist/server/providers/index.d.ts.map +1 -0
- package/dist/server/providers/index.js +8 -0
- package/dist/server/providers/index.js.map +1 -0
- package/dist/server/providers/office365.d.ts +21 -0
- package/dist/server/providers/office365.d.ts.map +1 -0
- package/dist/server/providers/office365.js +146 -0
- package/dist/server/providers/office365.js.map +1 -0
- package/dist/server/providers/registry.d.ts +14 -0
- package/dist/server/providers/registry.d.ts.map +1 -0
- package/dist/server/providers/registry.js +28 -0
- package/dist/server/providers/registry.js.map +1 -0
- package/dist/server/providers/types.d.ts +133 -0
- package/dist/server/providers/types.d.ts.map +1 -0
- package/dist/server/providers/types.js +2 -0
- package/dist/server/providers/types.js.map +1 -0
- package/dist/server/providers/zoom.d.ts +34 -0
- package/dist/server/providers/zoom.d.ts.map +1 -0
- package/dist/server/providers/zoom.js +111 -0
- package/dist/server/providers/zoom.js.map +1 -0
- package/dist/server/schedules-repo.d.ts +26 -0
- package/dist/server/schedules-repo.d.ts.map +1 -0
- package/dist/server/schedules-repo.js +223 -0
- package/dist/server/schedules-repo.js.map +1 -0
- package/dist/server/video-oauth-state.d.ts +28 -0
- package/dist/server/video-oauth-state.d.ts.map +1 -0
- package/dist/server/video-oauth-state.js +101 -0
- package/dist/server/video-oauth-state.js.map +1 -0
- package/dist/server/video-oauth.d.ts +18 -0
- package/dist/server/video-oauth.d.ts.map +1 -0
- package/dist/server/video-oauth.js +82 -0
- package/dist/server/video-oauth.js.map +1 -0
- package/dist/shared/index.d.ts +298 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +6 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/docs/UI_UNIFICATION.md +78 -0
- package/docs/actions.md +64 -0
- package/docs/eject.md +18 -0
- package/docs/llms-full.txt +1022 -0
- package/docs/llms.txt +89 -0
- package/docs/providers.md +68 -0
- package/docs/schema.md +86 -0
- package/docs/skills/availability/SKILL.md +44 -0
- package/docs/skills/booker/SKILL.md +51 -0
- package/docs/skills/bookings/SKILL.md +43 -0
- package/docs/skills/embeds/SKILL.md +49 -0
- package/docs/skills/event-types/SKILL.md +40 -0
- package/docs/skills/integrations/SKILL.md +52 -0
- package/docs/skills/routing-forms/SKILL.md +39 -0
- package/docs/skills/scheduling-basics/SKILL.md +51 -0
- package/docs/skills/slot-engine/SKILL.md +52 -0
- package/docs/skills/team-scheduling/SKILL.md +54 -0
- package/docs/skills/workflows/SKILL.md +55 -0
- package/package.json +87 -0
- package/src/actions/_helpers.ts +62 -0
- package/src/actions/accept-team-invite.ts +26 -0
- package/src/actions/add-booking-attendee.ts +32 -0
- package/src/actions/add-booking-note.ts +25 -0
- package/src/actions/add-date-override.ts +23 -0
- package/src/actions/add-private-link.ts +31 -0
- package/src/actions/assign-round-robin-host.ts +54 -0
- package/src/actions/cancel-booking.ts +39 -0
- package/src/actions/check-availability.ts +46 -0
- package/src/actions/confirm-booking.ts +15 -0
- package/src/actions/connect-calendar.ts +27 -0
- package/src/actions/connect-video.ts +57 -0
- package/src/actions/create-booking.ts +62 -0
- package/src/actions/create-event-type.ts +45 -0
- package/src/actions/create-host-group.ts +25 -0
- package/src/actions/create-routing-form.ts +39 -0
- package/src/actions/create-schedule.ts +36 -0
- package/src/actions/create-team.ts +44 -0
- package/src/actions/create-workflow.ts +83 -0
- package/src/actions/delete-event-type.ts +14 -0
- package/src/actions/delete-routing-form.ts +21 -0
- package/src/actions/delete-schedule.ts +14 -0
- package/src/actions/delete-workflow.ts +21 -0
- package/src/actions/disconnect-calendar.ts +22 -0
- package/src/actions/duplicate-event-type.ts +36 -0
- package/src/actions/export-bookings-csv.ts +54 -0
- package/src/actions/find-available-slot.ts +40 -0
- package/src/actions/get-availability.ts +20 -0
- package/src/actions/get-booking.ts +9 -0
- package/src/actions/get-event-type.ts +29 -0
- package/src/actions/install-conferencing-app.ts +29 -0
- package/src/actions/invite-team-member.ts +30 -0
- package/src/actions/list-bookings.ts +36 -0
- package/src/actions/list-calendar-integrations.ts +26 -0
- package/src/actions/list-event-types.ts +31 -0
- package/src/actions/list-routing-form-responses.ts +24 -0
- package/src/actions/list-routing-forms.ts +34 -0
- package/src/actions/list-schedules.ts +16 -0
- package/src/actions/list-selected-calendars.ts +41 -0
- package/src/actions/list-workflows.ts +34 -0
- package/src/actions/mark-no-show.ts +15 -0
- package/src/actions/refresh-busy-times.ts +26 -0
- package/src/actions/remove-booking-attendee.ts +24 -0
- package/src/actions/remove-date-override.ts +15 -0
- package/src/actions/remove-team-member.ts +23 -0
- package/src/actions/reorder-event-types.ts +18 -0
- package/src/actions/reschedule-booking.ts +45 -0
- package/src/actions/revoke-private-link.ts +16 -0
- package/src/actions/send-reschedule-link.ts +18 -0
- package/src/actions/set-appearance.ts +24 -0
- package/src/actions/set-default-conferencing-app.ts +25 -0
- package/src/actions/set-default-schedule.ts +15 -0
- package/src/actions/set-destination-calendar.ts +39 -0
- package/src/actions/set-event-type-hosts.ts +43 -0
- package/src/actions/set-event-type-location.ts +18 -0
- package/src/actions/set-host-availability-override.ts +27 -0
- package/src/actions/set-team-branding.ts +28 -0
- package/src/actions/submit-routing-form-response.ts +47 -0
- package/src/actions/toggle-event-type-hidden.ts +21 -0
- package/src/actions/toggle-selected-calendar.ts +43 -0
- package/src/actions/toggle-workflow.ts +25 -0
- package/src/actions/update-event-type.ts +54 -0
- package/src/actions/update-member-role.ts +28 -0
- package/src/actions/update-profile.ts +36 -0
- package/src/actions/update-routing-form.ts +36 -0
- package/src/actions/update-schedule.ts +53 -0
- package/src/actions/update-workflow.ts +89 -0
- package/src/core/buffers.ts +46 -0
- package/src/core/conflicts.ts +49 -0
- package/src/core/index.ts +8 -0
- package/src/core/limits.ts +60 -0
- package/src/core/round-robin.test.ts +95 -0
- package/src/core/round-robin.ts +103 -0
- package/src/core/rrule.ts +20 -0
- package/src/core/rules.ts +66 -0
- package/src/core/slots.test.ts +246 -0
- package/src/core/slots.ts +223 -0
- package/src/core/time.ts +136 -0
- package/src/index.ts +14 -0
- package/src/manifest.ts +174 -0
- package/src/react/components/SlotPicker.tsx +72 -0
- package/src/react/components/TimezoneSelect.tsx +55 -0
- package/src/react/components/_shadcn-shims.d.ts +251 -0
- package/src/react/components/booking-links/AvailabilityEditor.tsx +177 -0
- package/src/react/components/booking-links/BookingLinkCreateDialog.tsx +189 -0
- package/src/react/components/booking-links/ConferencingSelector.tsx +255 -0
- package/src/react/components/booking-links/CustomFieldsEditor.tsx +420 -0
- package/src/react/components/booking-links/DurationPicker.tsx +115 -0
- package/src/react/components/booking-links/SlugEditor.tsx +149 -0
- package/src/react/components/booking-links/index.ts +15 -0
- package/src/react/components/index.ts +13 -0
- package/src/react/hooks/useBookingFlow.ts +113 -0
- package/src/react/hooks/useEventType.ts +52 -0
- package/src/react/hooks/useReschedule.ts +39 -0
- package/src/react/hooks/useSlots.ts +88 -0
- package/src/react/hooks/useTimezone.ts +29 -0
- package/src/react/index.ts +10 -0
- package/src/schema/bookings.ts +124 -0
- package/src/schema/calendar-cache.ts +23 -0
- package/src/schema/credentials.ts +83 -0
- package/src/schema/event-types.ts +154 -0
- package/src/schema/index.ts +19 -0
- package/src/schema/routing-forms.ts +52 -0
- package/src/schema/schedules.ts +83 -0
- package/src/schema/teams.ts +46 -0
- package/src/schema/workflows.ts +128 -0
- package/src/server/availability-engine.ts +193 -0
- package/src/server/booking-service.ts +264 -0
- package/src/server/bookings-repo.ts +330 -0
- package/src/server/context.ts +49 -0
- package/src/server/db-types.ts +16 -0
- package/src/server/event-types-repo.ts +385 -0
- package/src/server/hooks.ts +213 -0
- package/src/server/ics.ts +99 -0
- package/src/server/index.ts +11 -0
- package/src/server/providers/builtin-video.ts +62 -0
- package/src/server/providers/google-calendar.ts +237 -0
- package/src/server/providers/google-meet.ts +22 -0
- package/src/server/providers/index.ts +7 -0
- package/src/server/providers/office365.ts +208 -0
- package/src/server/providers/registry.ts +43 -0
- package/src/server/providers/types.ts +126 -0
- package/src/server/providers/zoom.ts +173 -0
- package/src/server/schedules-repo.ts +279 -0
- package/src/server/video-oauth-state.test.ts +120 -0
- package/src/server/video-oauth-state.ts +116 -0
- package/src/server/video-oauth.ts +99 -0
- package/src/shared/index.ts +366 -0
- package/src/version.ts +1 -0
package/docs/llms.txt
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @agent-native/scheduling
|
|
2
|
+
|
|
3
|
+
Scheduling primitives for agent-native apps — event types, availability,
|
|
4
|
+
bookings, team scheduling, workflows, routing forms. A self-hosted,
|
|
5
|
+
locally-owned scheduling stack, not an API wrapper.
|
|
6
|
+
|
|
7
|
+
## What this package provides
|
|
8
|
+
|
|
9
|
+
- **Drizzle schemas** (`/schema`) — event_types, schedules, availability,
|
|
10
|
+
date_overrides, bookings, booking_attendees, booking_references, teams,
|
|
11
|
+
team_members, credentials, calendar_cache, selected_calendars,
|
|
12
|
+
destination_calendars, hashed_links, workflows, workflow_steps,
|
|
13
|
+
scheduled_reminders, webhooks, routing_forms, routing_form_responses,
|
|
14
|
+
api_keys, out_of_office_entries, travel_schedules.
|
|
15
|
+
- **Pure helpers** (`/core`) — DST-safe slot computation, timezone math,
|
|
16
|
+
availability rule evaluation, round-robin host selection, buffer
|
|
17
|
+
application, booking-limit bucketing, recurring-event expansion.
|
|
18
|
+
- **Server layer** (`/server`) — DB repos, availability engine, booking
|
|
19
|
+
service, pluggable calendar + video providers (Google Calendar, Outlook,
|
|
20
|
+
Zoom, Google Meet, built-in video), iCal generator, lifecycle hooks →
|
|
21
|
+
workflows.
|
|
22
|
+
- **Actions** (`/actions/*`) — ~55 `defineAction` modules covering every
|
|
23
|
+
operation in the product (event type CRUD, availability edit, booking
|
|
24
|
+
lifecycle, calendar connect, team ops, round-robin, workflows, routing
|
|
25
|
+
forms). Re-export from a consumer template's `actions/` folder for
|
|
26
|
+
zero-boilerplate adoption.
|
|
27
|
+
- **React primitives** (`/react`, `/react/components`) — headless hooks for
|
|
28
|
+
timezone, slots, booking flow; minimal unstyled primitives (SlotPicker,
|
|
29
|
+
TimezoneSelect).
|
|
30
|
+
- **Skill docs** (`/skills/*`) — drop-in agent skills for scheduling
|
|
31
|
+
concepts: `scheduling-basics`, `event-types`, `availability`, `bookings`,
|
|
32
|
+
`booker`, `slot-engine`, `team-scheduling`, `integrations`, `embeds`,
|
|
33
|
+
`workflows`, `routing-forms`.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
// server/db/schema.ts
|
|
39
|
+
export * from "@agent-native/scheduling/schema";
|
|
40
|
+
|
|
41
|
+
// server/bootstrap.ts
|
|
42
|
+
import { setSchedulingContext } from "@agent-native/scheduling/server";
|
|
43
|
+
import {
|
|
44
|
+
registerCalendarProvider,
|
|
45
|
+
registerVideoProvider,
|
|
46
|
+
createGoogleCalendarProvider,
|
|
47
|
+
createDailyVideoProvider,
|
|
48
|
+
} from "@agent-native/scheduling/server/providers";
|
|
49
|
+
import { getDb, schema } from "./db/index.js";
|
|
50
|
+
|
|
51
|
+
setSchedulingContext({
|
|
52
|
+
getDb,
|
|
53
|
+
schema,
|
|
54
|
+
getCurrentUserEmail: () => getRequestUserEmail(),
|
|
55
|
+
getCurrentOrgId: () => getRequestOrgId(),
|
|
56
|
+
publicBaseUrl: process.env.PUBLIC_URL,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
registerCalendarProvider(createGoogleCalendarProvider({
|
|
60
|
+
clientId: process.env.GOOGLE_CLIENT_ID!,
|
|
61
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
|
62
|
+
getAccessToken: fetchGoogleToken, // your implementation
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
registerVideoProvider(createDailyVideoProvider({
|
|
66
|
+
apiKey: process.env.DAILY_API_KEY!,
|
|
67
|
+
}));
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Full documentation
|
|
71
|
+
|
|
72
|
+
For the full bundled docs (every .md file concatenated), see
|
|
73
|
+
`llms-full.txt` in this folder.
|
|
74
|
+
|
|
75
|
+
## Individual skills
|
|
76
|
+
|
|
77
|
+
- skills/scheduling-basics/SKILL.md — Core concepts, terminology.
|
|
78
|
+
- skills/event-types/SKILL.md — Event type model, tabs, scheduling types.
|
|
79
|
+
- skills/availability/SKILL.md — Schedules, date overrides, timezone rules.
|
|
80
|
+
- skills/bookings/SKILL.md — Lifecycle, reschedule, cancel, no-show.
|
|
81
|
+
- skills/booker/SKILL.md — Public booking flow, state machine.
|
|
82
|
+
- skills/slot-engine/SKILL.md — The pure slot-computation function and
|
|
83
|
+
invariants.
|
|
84
|
+
- skills/team-scheduling/SKILL.md — Team event types, round-robin,
|
|
85
|
+
collective.
|
|
86
|
+
- skills/integrations/SKILL.md — Calendar + video provider integrations.
|
|
87
|
+
- skills/embeds/SKILL.md — Inline/popup/floating-button embeds.
|
|
88
|
+
- skills/workflows/SKILL.md — Trigger-based automations.
|
|
89
|
+
- skills/routing-forms/SKILL.md — Pre-booking routing forms.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Writing a custom provider
|
|
2
|
+
|
|
3
|
+
Scheduling needs two kinds of providers:
|
|
4
|
+
|
|
5
|
+
- **CalendarProvider** — reads busy intervals + writes events.
|
|
6
|
+
- **VideoProvider** — creates meeting rooms when a booking is confirmed.
|
|
7
|
+
|
|
8
|
+
Built-ins: Google Calendar, Office 365, Zoom, built-in video (Daily.co), Google
|
|
9
|
+
Meet (piggy-backs on Google Calendar).
|
|
10
|
+
|
|
11
|
+
## CalendarProvider
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { registerCalendarProvider } from "@agent-native/scheduling/server/providers";
|
|
15
|
+
|
|
16
|
+
registerCalendarProvider({
|
|
17
|
+
kind: "my_calendar",
|
|
18
|
+
label: "My Calendar",
|
|
19
|
+
async startOAuth({ redirectUri, state }) {
|
|
20
|
+
/* return { authUrl } */
|
|
21
|
+
},
|
|
22
|
+
async completeOAuth({ code, credentialId, userEmail, redirectUri }) {
|
|
23
|
+
/* exchange code, persist tokens, return externalEmail + calendars */
|
|
24
|
+
},
|
|
25
|
+
async listCalendars({ credentialId }) {
|
|
26
|
+
/* ... */
|
|
27
|
+
},
|
|
28
|
+
async getBusy({ credentialId, calendarExternalIds, start, end }) {
|
|
29
|
+
/* ... */
|
|
30
|
+
},
|
|
31
|
+
async createEvent({
|
|
32
|
+
credentialId,
|
|
33
|
+
calendarExternalId,
|
|
34
|
+
booking,
|
|
35
|
+
includeConference,
|
|
36
|
+
}) {
|
|
37
|
+
/* ... */
|
|
38
|
+
},
|
|
39
|
+
async updateEvent({ credentialId, externalId, booking }) {
|
|
40
|
+
/* ... */
|
|
41
|
+
},
|
|
42
|
+
async deleteEvent({ credentialId, externalId }) {
|
|
43
|
+
/* ... */
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
All methods receive a `credentialId` — use it to look up the OAuth token via
|
|
49
|
+
your token store. The package's `setSchedulingContext()` doesn't touch
|
|
50
|
+
tokens; consumers typically use core's `oauth_tokens` and pass a
|
|
51
|
+
`getAccessToken(credentialId)` callback.
|
|
52
|
+
|
|
53
|
+
## VideoProvider
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
registerVideoProvider({
|
|
57
|
+
kind: "my_video",
|
|
58
|
+
label: "My Video",
|
|
59
|
+
async createMeeting({ credentialId, booking }) {
|
|
60
|
+
return { meetingUrl, meetingId, meetingPassword? };
|
|
61
|
+
},
|
|
62
|
+
async deleteMeeting?({ credentialId, meetingId }) { /* ... */ },
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Video providers are invoked by the booking service when a booking's location
|
|
67
|
+
is `builtin-video`, `zoom`, `google-meet`, or `teams`. Meeting URLs land in
|
|
68
|
+
`booking_references`.
|
package/docs/schema.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Schema reference
|
|
2
|
+
|
|
3
|
+
All tables use dialect-agnostic helpers from `@agent-native/core/db/schema`
|
|
4
|
+
and compose with `ownableColumns()` + `createSharesTable()` for framework-
|
|
5
|
+
wide sharing.
|
|
6
|
+
|
|
7
|
+
## event_types
|
|
8
|
+
|
|
9
|
+
The primary bookable resource. Duration, location options, custom fields,
|
|
10
|
+
buffers, limits, period (rolling/range/unlimited), scheduling type
|
|
11
|
+
(personal/collective/round-robin/managed), optional team assignment,
|
|
12
|
+
hashed-link support.
|
|
13
|
+
|
|
14
|
+
## event_type_hosts
|
|
15
|
+
|
|
16
|
+
Join between event types and users for collective / round-robin. Each host
|
|
17
|
+
has `isFixed`, `weight`, `priority`, optional per-host `scheduleId` override.
|
|
18
|
+
|
|
19
|
+
## hashed_links
|
|
20
|
+
|
|
21
|
+
Private booking links: `/d/:hash/:slug`. Optional `expiresAt` and
|
|
22
|
+
`isSingleUse`.
|
|
23
|
+
|
|
24
|
+
## event_type_slug_redirects
|
|
25
|
+
|
|
26
|
+
Rename history so old URLs keep working.
|
|
27
|
+
|
|
28
|
+
## schedules / schedule_availability / date_overrides
|
|
29
|
+
|
|
30
|
+
Named availability presets. `schedules` is the header (name, timezone,
|
|
31
|
+
isDefault). `schedule_availability` rows are one weekly interval per day.
|
|
32
|
+
`date_overrides` replaces the weekly rule for a specific date (empty =
|
|
33
|
+
fully blocked).
|
|
34
|
+
|
|
35
|
+
## travel_schedules / out_of_office_entries
|
|
36
|
+
|
|
37
|
+
Per-user timezone overrides for trips; OOO windows that block bookings and
|
|
38
|
+
optionally redirect.
|
|
39
|
+
|
|
40
|
+
## bookings / booking_attendees / booking_references / booking_seats /
|
|
41
|
+
|
|
42
|
+
## booking_notes
|
|
43
|
+
|
|
44
|
+
Bookings are the materialized appointments. Attendees are N per booking.
|
|
45
|
+
References are external IDs (Google event id, Zoom meeting id). Seats are
|
|
46
|
+
reservation tokens for seated events. Notes are host-only.
|
|
47
|
+
|
|
48
|
+
## teams / team_members
|
|
49
|
+
|
|
50
|
+
Teams group users. `team_members.role` ∈ owner|admin|member.
|
|
51
|
+
|
|
52
|
+
## scheduling_credentials / selected_calendars / destination_calendars
|
|
53
|
+
|
|
54
|
+
`scheduling_credentials` is a view over OAuth tokens (with display metadata
|
|
55
|
+
and `invalid` flag). Selected calendars are read for busy-time. Destination
|
|
56
|
+
calendar is where new events get written.
|
|
57
|
+
|
|
58
|
+
## calendar_cache
|
|
59
|
+
|
|
60
|
+
Short-TTL cache of busy intervals. Busted on booking write.
|
|
61
|
+
|
|
62
|
+
## workflows / workflow_steps / scheduled_reminders
|
|
63
|
+
|
|
64
|
+
Trigger-based automations. `workflows` is the rule; `workflow_steps` are
|
|
65
|
+
ordered actions; `scheduled_reminders` are materialized sends waiting to
|
|
66
|
+
fire (drained by a recurring job).
|
|
67
|
+
|
|
68
|
+
## webhooks / webhook_deliveries / api_keys
|
|
69
|
+
|
|
70
|
+
Developer-facing surface: outgoing webhooks with HMAC-signed payloads, and
|
|
71
|
+
API keys for programmatic access.
|
|
72
|
+
|
|
73
|
+
## routing_forms / routing_form_responses
|
|
74
|
+
|
|
75
|
+
ChiliPiper-style routing forms. Fields + rules → either an event type,
|
|
76
|
+
external URL, or custom message.
|
|
77
|
+
|
|
78
|
+
## verified_emails / verified_numbers
|
|
79
|
+
|
|
80
|
+
Verified sender addresses / numbers used by workflows.
|
|
81
|
+
|
|
82
|
+
## Shares tables
|
|
83
|
+
|
|
84
|
+
For every ownable resource: `event_type_shares`, `schedule_shares`,
|
|
85
|
+
`team_shares`, `workflow_shares`, `routing_form_shares`, `booking_shares`.
|
|
86
|
+
Use `share-resource` / `set-resource-visibility` framework actions.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: availability
|
|
3
|
+
description: How schedules, weekly rules, date overrides, travel schedules, and out-of-office entries combine to determine when someone is bookable.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Availability
|
|
7
|
+
|
|
8
|
+
## Schedule
|
|
9
|
+
|
|
10
|
+
A named set of rules (e.g. "Working Hours"). Each user has ≥1 schedule and
|
|
11
|
+
marks one as `isDefault`. Event types either use the user's default or
|
|
12
|
+
reference a specific schedule.
|
|
13
|
+
|
|
14
|
+
Timezone is set on the schedule, not the user — lets you have a "Europe
|
|
15
|
+
hours" schedule and a "US hours" schedule for the same person.
|
|
16
|
+
|
|
17
|
+
## Weekly availability
|
|
18
|
+
|
|
19
|
+
Rows in `schedule_availability`: (day 0-6, startTime "HH:MM", endTime
|
|
20
|
+
"HH:MM"). You can have multiple intervals per day — e.g. Mon 9-12 and 1-5.
|
|
21
|
+
|
|
22
|
+
## Date overrides
|
|
23
|
+
|
|
24
|
+
Rows in `date_overrides`: (date "YYYY-MM-DD", intervals JSON).
|
|
25
|
+
- `intervals: []` → day fully blocked.
|
|
26
|
+
- `intervals: [{start, end}]` → only those times available on that date.
|
|
27
|
+
|
|
28
|
+
## Travel schedules
|
|
29
|
+
|
|
30
|
+
`travel_schedules` overrides the user's default timezone for a date range.
|
|
31
|
+
|
|
32
|
+
## Out of office
|
|
33
|
+
|
|
34
|
+
`out_of_office_entries` blocks bookings across a range, optionally with a
|
|
35
|
+
redirect to another team member.
|
|
36
|
+
|
|
37
|
+
## Common tasks
|
|
38
|
+
|
|
39
|
+
| User request | Action |
|
|
40
|
+
|---|---|
|
|
41
|
+
| "I'm unavailable next Friday" | `add-date-override --scheduleId <id> --date 2026-04-10 --intervals []` |
|
|
42
|
+
| "I take lunch 12-1 weekdays" | `update-schedule --weeklyAvailability [...9-12, 13-17...]` |
|
|
43
|
+
| "Create evenings schedule" | `create-schedule --name Evenings --weeklyAvailability [...]` |
|
|
44
|
+
| "Going to Tokyo next week" | Insert a `travel_schedules` row (no dedicated action yet) |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: booker
|
|
3
|
+
description: Public booking flow — the state machine, animations, and URL/app-state sync.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Booker
|
|
7
|
+
|
|
8
|
+
## Stages
|
|
9
|
+
|
|
10
|
+
1. **pick-date** — month grid shows days with availability
|
|
11
|
+
2. **pick-slot** — available slots on the selected day
|
|
12
|
+
3. **fill-form** — attendee form (name, email, custom fields)
|
|
13
|
+
4. **success** — confirmation with add-to-calendar buttons
|
|
14
|
+
|
|
15
|
+
Plus **reschedule** mode — prefilled from existing booking uid.
|
|
16
|
+
|
|
17
|
+
## Animations
|
|
18
|
+
|
|
19
|
+
Use motion (`motion/react`) `AnimatePresence` with `fadeInLeft` variants. The outer
|
|
20
|
+
container animates its width across stages: narrow (calendar only) → wider
|
|
21
|
+
(calendar + slots) → widest (form).
|
|
22
|
+
|
|
23
|
+
## Timezone + 12/24h
|
|
24
|
+
|
|
25
|
+
- Detect browser timezone at mount; let user override via dropdown.
|
|
26
|
+
- Persist choice to localStorage key `scheduling.timezone`.
|
|
27
|
+
- 12/24h toggle near slot column; persist to user settings.
|
|
28
|
+
|
|
29
|
+
## URL + application-state sync
|
|
30
|
+
|
|
31
|
+
Selected date, slot, timezone, and duration are mirrored to URL query
|
|
32
|
+
params AND `application_state.booker-state` so:
|
|
33
|
+
- Page refresh preserves selection.
|
|
34
|
+
- Agent can read the user's current pick.
|
|
35
|
+
|
|
36
|
+
## Copy-link affordance
|
|
37
|
+
|
|
38
|
+
Every event-type row has a "copy link" button. On click, write to clipboard
|
|
39
|
+
and toast "Copied!" with Sonner. Works on mobile Safari too.
|
|
40
|
+
|
|
41
|
+
## Accessibility
|
|
42
|
+
|
|
43
|
+
- Month grid is ARIA `grid` + `gridcell` with arrow-key nav.
|
|
44
|
+
- Slot buttons are keyboard-focusable, with `aria-pressed`.
|
|
45
|
+
- Focus returns to trigger on modal close.
|
|
46
|
+
- Toast content announced via `aria-live=polite`.
|
|
47
|
+
|
|
48
|
+
## Mobile
|
|
49
|
+
|
|
50
|
+
`< 768px`: stack vertically. Calendar full-width, slot list below, form
|
|
51
|
+
slides in as full-screen sheet.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bookings
|
|
3
|
+
description: Booking lifecycle — pending, confirmed, rescheduled, cancelled — plus attendees, references, no-shows, and reminders.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bookings
|
|
7
|
+
|
|
8
|
+
## Lifecycle
|
|
9
|
+
|
|
10
|
+
- **pending** — requires-confirmation event types start here
|
|
11
|
+
- **confirmed** — normal state
|
|
12
|
+
- **rescheduled** — the old booking after a reschedule (the new one is
|
|
13
|
+
confirmed; `from_reschedule` links them)
|
|
14
|
+
- **cancelled** — either party cancelled
|
|
15
|
+
- **rejected** — pending was declined
|
|
16
|
+
|
|
17
|
+
## Reschedule vs cancel+rebook
|
|
18
|
+
|
|
19
|
+
The `reschedule-booking` action creates a new booking with a link back to
|
|
20
|
+
the old via `fromReschedule`. iCalUID is preserved across the reschedule
|
|
21
|
+
chain (RFC 5545), and `iCalSequence` is bumped.
|
|
22
|
+
|
|
23
|
+
## No-show
|
|
24
|
+
|
|
25
|
+
`mark-no-show` sets `noShow: true` on an attendee. Round-robin calibration
|
|
26
|
+
uses this to penalize hosts whose attendees no-show frequently.
|
|
27
|
+
|
|
28
|
+
## Cancel / reschedule tokens
|
|
29
|
+
|
|
30
|
+
Every booking has a `cancelToken` and `rescheduleToken` used in public
|
|
31
|
+
magic links sent to attendees. These let them manage the booking without
|
|
32
|
+
logging in.
|
|
33
|
+
|
|
34
|
+
## References
|
|
35
|
+
|
|
36
|
+
External system IDs: Google Calendar event id, Zoom meeting id, Daily.co
|
|
37
|
+
room name. Stored in `booking_references`, used during cancel/reschedule to
|
|
38
|
+
propagate changes back to the source system.
|
|
39
|
+
|
|
40
|
+
## ICS
|
|
41
|
+
|
|
42
|
+
`/booking/:uid.ics` returns the RFC 5545 calendar file. Used for
|
|
43
|
+
confirmation-email attachments and "Add to calendar" buttons.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: embeds
|
|
3
|
+
description: Inline, popup, and floating-button embeds — snippet generation and theming.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Embeds
|
|
7
|
+
|
|
8
|
+
## Modes
|
|
9
|
+
|
|
10
|
+
- **inline** — iframe embedded in the page
|
|
11
|
+
- **popup** — trigger opens modal overlay with iframe
|
|
12
|
+
- **element-click / floating-button** — fixed-position trigger anywhere on
|
|
13
|
+
the page
|
|
14
|
+
|
|
15
|
+
## URL
|
|
16
|
+
|
|
17
|
+
Embed page: `/:user/:slug/embed` — same Booker, no chrome, theme honored
|
|
18
|
+
via query params.
|
|
19
|
+
|
|
20
|
+
## Snippet
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<script src="https://<host>/embed.js" async></script>
|
|
24
|
+
<div id="cal-inline-embed"></div>
|
|
25
|
+
<script>
|
|
26
|
+
Cal("init", { origin: "https://<host>" });
|
|
27
|
+
Cal("inline", {
|
|
28
|
+
elementOrSelector: "#cal-inline-embed",
|
|
29
|
+
calLink: "my-user/intro",
|
|
30
|
+
config: { theme: "light" }
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Theming
|
|
36
|
+
|
|
37
|
+
Query params on the embed URL:
|
|
38
|
+
- `theme=light|dark`
|
|
39
|
+
- `primaryColor=<hex>`
|
|
40
|
+
- `locale=en|es|...`
|
|
41
|
+
- `timeZone=America/Los_Angeles`
|
|
42
|
+
|
|
43
|
+
These override the event type's defaults for the embedded session only.
|
|
44
|
+
|
|
45
|
+
## Message passing
|
|
46
|
+
|
|
47
|
+
The iframe posts messages to the parent on lifecycle events:
|
|
48
|
+
`__cal.init`, `__cal.booking-successful`, `__cal.booking-cancelled`,
|
|
49
|
+
`__cal.booking-rescheduled`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: event-types
|
|
3
|
+
description: How event types work — fields, scheduling types, tabs in the editor, and the full set of configurable options.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Event types
|
|
7
|
+
|
|
8
|
+
## Editor tabs
|
|
9
|
+
- **Setup** — title, slug, duration(s), description, default location
|
|
10
|
+
- **Availability** — pick a schedule or override per-event-type
|
|
11
|
+
- **Limits** — buffers, min notice, booking window (rolling/range), caps
|
|
12
|
+
(perDay/perWeek/perMonth/perYear), slot interval
|
|
13
|
+
- **Advanced** — event name template, lock timezone, require confirmation,
|
|
14
|
+
disable guests, redirect URL, private hashed links, seats
|
|
15
|
+
- **Apps** — connect per-event location types (Zoom, Meet, etc.)
|
|
16
|
+
- **Workflows** — attach workflows to run on booking lifecycle events
|
|
17
|
+
|
|
18
|
+
## Scheduling types
|
|
19
|
+
|
|
20
|
+
| Type | Meaning |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `personal` | Owned by a user, only they host |
|
|
23
|
+
| `collective` | Team event; all selected hosts must be free |
|
|
24
|
+
| `round-robin` | Team event; assign to one host by rotation |
|
|
25
|
+
| `managed` | Parent event pushed to child event types across members |
|
|
26
|
+
|
|
27
|
+
## Location kinds
|
|
28
|
+
|
|
29
|
+
`builtin-video`, `zoom`, `google-meet`, `teams`, `phone`, `in-person`,
|
|
30
|
+
`custom-link`, `attendee-phone`, `organizer-phone`, `attendee-choice`.
|
|
31
|
+
|
|
32
|
+
## Custom fields
|
|
33
|
+
|
|
34
|
+
Text, textarea, number, email, phone, select, multiselect, boolean, radio.
|
|
35
|
+
Stored on the event type; responses stored on the booking.
|
|
36
|
+
|
|
37
|
+
## Hashed links
|
|
38
|
+
|
|
39
|
+
Private booking URLs at `/d/:hash/:slug`. Create via `add-private-link`,
|
|
40
|
+
optionally with `expiresAt` and `isSingleUse`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: integrations
|
|
3
|
+
description: Calendar + video provider integrations — Google Calendar, Office 365, Zoom, built-in video, Google Meet — and how to write new ones.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Integrations
|
|
7
|
+
|
|
8
|
+
## Calendar providers
|
|
9
|
+
|
|
10
|
+
- **google_calendar** — OAuth; read freeBusy + write events; optionally
|
|
11
|
+
create Google Meet conference via `includeConference=true`.
|
|
12
|
+
- **office365_calendar** — Microsoft Graph; read freeBusy + write events.
|
|
13
|
+
- **caldav** (planned) — generic CalDAV for Apple iCloud, Fastmail, etc.
|
|
14
|
+
|
|
15
|
+
## Video providers
|
|
16
|
+
|
|
17
|
+
- **builtin_video** — Daily.co-backed; zero OAuth; server-to-server API key.
|
|
18
|
+
- **zoom_video** — OAuth; create meetings via Zoom REST API.
|
|
19
|
+
- **google_meet** — piggy-backs on Google Calendar credential.
|
|
20
|
+
- **teams_video** (planned) — Microsoft Teams.
|
|
21
|
+
|
|
22
|
+
## Credential lifecycle
|
|
23
|
+
|
|
24
|
+
1. User clicks "Connect" → `connect-calendar` returns `authUrl` + `state`
|
|
25
|
+
2. Redirect to provider → consent → provider redirects to our callback
|
|
26
|
+
3. Server exchanges code → writes `scheduling_credentials` row +
|
|
27
|
+
core `oauth_tokens` entry
|
|
28
|
+
4. We fetch calendar list, let user pick "checked" + "destination"
|
|
29
|
+
5. Token expires → refresh flow runs silently; on failure, set
|
|
30
|
+
`invalid: true` and show re-connect banner
|
|
31
|
+
|
|
32
|
+
## Busy-time aggregation
|
|
33
|
+
|
|
34
|
+
`aggregateBusy({userEmail, rangeStart, rangeEnd})` merges:
|
|
35
|
+
- Confirmed bookings hosted by the user
|
|
36
|
+
- External busy from each `selected_calendars` entry via the provider
|
|
37
|
+
|
|
38
|
+
Cached in `calendar_cache` (short TTL, default 5 min). Busted on any
|
|
39
|
+
booking write for that host.
|
|
40
|
+
|
|
41
|
+
## Writing a new provider
|
|
42
|
+
|
|
43
|
+
See `docs/providers.md` for the full interface.
|
|
44
|
+
|
|
45
|
+
## Common tasks
|
|
46
|
+
|
|
47
|
+
| User | Action |
|
|
48
|
+
|---|---|
|
|
49
|
+
| "Connect Google Calendar" | `connect-calendar --kind google_calendar --redirectUri ...` → redirect to returned `authUrl` |
|
|
50
|
+
| "Stop checking my vacation calendar" | `toggle-selected-calendar --include false` for that externalId |
|
|
51
|
+
| "Default to Zoom for new bookings" | `set-default-conferencing-app --credentialId <zoom-cred>` |
|
|
52
|
+
| "Refresh calendar cache" | `refresh-busy-times` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: routing-forms
|
|
3
|
+
description: ChiliPiper-style pre-booking forms that route prospects to the right event type based on their answers.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Routing forms
|
|
7
|
+
|
|
8
|
+
## Shape
|
|
9
|
+
|
|
10
|
+
- **Fields** — text, email, phone, number, select, multi
|
|
11
|
+
- **Rules** — ordered list of `{conditions, action}`
|
|
12
|
+
- **Fallback** — action taken when no rule matches
|
|
13
|
+
|
|
14
|
+
## Rule conditions
|
|
15
|
+
|
|
16
|
+
`conditions: [{fieldId, op, value}, …]` — all ANDed together. Ops:
|
|
17
|
+
- `equals`, `not-equals`, `contains`, `starts-with`, `in` (value is array)
|
|
18
|
+
|
|
19
|
+
## Rule actions
|
|
20
|
+
|
|
21
|
+
- `{kind: "event-type", eventTypeId, teamId?}` → redirect to Booker
|
|
22
|
+
- `{kind: "external-url", url}` → redirect off-site
|
|
23
|
+
- `{kind: "custom-message", message}` → render message, no booking
|
|
24
|
+
|
|
25
|
+
## Public URL
|
|
26
|
+
|
|
27
|
+
`/forms/:formId` renders the form. On submit:
|
|
28
|
+
1. Walk rules in order; first match wins.
|
|
29
|
+
2. If none match, use `fallback`.
|
|
30
|
+
3. Record the response in `routing_form_responses` with `matchedRuleId`.
|
|
31
|
+
4. If the action is `event-type`, redirect to Booker with prefilled
|
|
32
|
+
`name` / `email` / custom-field values from the form answers.
|
|
33
|
+
|
|
34
|
+
## Common tasks
|
|
35
|
+
|
|
36
|
+
| User | Action |
|
|
37
|
+
|---|---|
|
|
38
|
+
| "Route enterprise prospects to Bob" | `create-routing-form` with a rule matching company size → Bob's event type |
|
|
39
|
+
| "See submissions" | `list-routing-form-responses --formId <id>` |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scheduling-basics
|
|
3
|
+
description: Core concepts of the scheduling package — event types, schedules, bookings, hosts, teams, and how they compose.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Scheduling basics
|
|
7
|
+
|
|
8
|
+
The mental model:
|
|
9
|
+
|
|
10
|
+
- **Event Type** — a definition of "a bookable thing" (30-minute intro call,
|
|
11
|
+
45-minute demo). Lives at `/:user/:slug` or `/team/:teamSlug/:slug`.
|
|
12
|
+
- **Schedule** — a named set of availability rules ("Working Hours",
|
|
13
|
+
"Evenings"). Weekly intervals plus date-specific overrides. Each user
|
|
14
|
+
has a default schedule; event types can pick any.
|
|
15
|
+
- **Booking** — the materialized appointment. Has attendees, references to
|
|
16
|
+
external systems (Google Calendar event, Zoom meeting), and a stable
|
|
17
|
+
iCalUID across reschedules.
|
|
18
|
+
- **Host** — a user assigned to an event type. Hosts have weights and
|
|
19
|
+
priorities for round-robin.
|
|
20
|
+
- **Team** — a group of users who can co-host event types.
|
|
21
|
+
- **Location** — where the meeting happens. Video (built-in, Zoom, Meet,
|
|
22
|
+
Teams), phone, in-person, or custom link.
|
|
23
|
+
|
|
24
|
+
## Workflows and routing forms
|
|
25
|
+
|
|
26
|
+
- **Workflow** — trigger + ordered steps. "Email attendee 1h before event."
|
|
27
|
+
- **Routing Form** — pre-booking form with rules that route to the right
|
|
28
|
+
event type based on answers. Like ChiliPiper.
|
|
29
|
+
|
|
30
|
+
## Public URLs
|
|
31
|
+
|
|
32
|
+
- `/:user` — user profile with event type list
|
|
33
|
+
- `/:user/:slug` — Booker for a personal event type
|
|
34
|
+
- `/:user/:slug/embed` — chromeless for iframe embedding
|
|
35
|
+
- `/team/:teamSlug` — team profile
|
|
36
|
+
- `/team/:teamSlug/:slug` — Booker for team event type (round-robin or collective)
|
|
37
|
+
- `/d/:hash/:slug` — private hashed-link Booker
|
|
38
|
+
- `/booking/:uid` — booking detail / manage
|
|
39
|
+
- `/reschedule/:uid` — reschedule Booker
|
|
40
|
+
- `/forms/:formId` — public routing form
|
|
41
|
+
|
|
42
|
+
## Common tasks
|
|
43
|
+
|
|
44
|
+
| User request | Action(s) |
|
|
45
|
+
|---|---|
|
|
46
|
+
| "Create a 30-minute intro meeting" | `create-event-type --title "Intro" --slug intro --length 30` |
|
|
47
|
+
| "What's my availability tomorrow?" | `check-availability --slug <slug> --from ... --to ...` |
|
|
48
|
+
| "Cancel my 3pm with Alex" | `list-bookings --status upcoming`, then `cancel-booking --uid ...` |
|
|
49
|
+
| "Block next Friday" | `add-date-override --scheduleId <id> --date 2026-04-10 --intervals []` |
|
|
50
|
+
| "Connect Google Calendar" | `connect-calendar --kind google_calendar --redirectUri ...` |
|
|
51
|
+
| "Make a team event rotating between Alice and Bob" | `create-event-type --schedulingType round-robin --teamId ...`, then `set-event-type-hosts` |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slot-engine
|
|
3
|
+
description: The pure `computeAvailableSlots` function — inputs, outputs, invariants, and debugging guide.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Slot engine
|
|
7
|
+
|
|
8
|
+
`import { computeAvailableSlots } from "@agent-native/scheduling/core"`
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
- Event type config (duration, buffers, minimum notice, period, limits,
|
|
12
|
+
slot interval)
|
|
13
|
+
- Schedule (timezone + weekly availability + date overrides)
|
|
14
|
+
- Busy intervals (UTC, aggregated from external calendars + existing
|
|
15
|
+
bookings)
|
|
16
|
+
- Booking counts by bucket (day/week/month/year) for limit enforcement
|
|
17
|
+
- Time range to compute over
|
|
18
|
+
- Optional seats-per-slot + seats-taken map
|
|
19
|
+
- Viewer timezone (for limit bucketing, if it differs from the schedule)
|
|
20
|
+
|
|
21
|
+
## Output
|
|
22
|
+
- Array of `Slot { start: ISO, end: ISO, available: boolean, seatsRemaining?, hostEmail? }`
|
|
23
|
+
|
|
24
|
+
## Invariants
|
|
25
|
+
|
|
26
|
+
The function guarantees, in order:
|
|
27
|
+
|
|
28
|
+
1. No slot falls in the past (`now + minimumBookingNotice` is the floor).
|
|
29
|
+
2. No slot overlaps a busy interval (with buffers applied).
|
|
30
|
+
3. No slot falls outside the schedule's available intervals for that day.
|
|
31
|
+
4. No slot exceeds a booking limit.
|
|
32
|
+
5. No slot falls outside the event's period (rolling/range).
|
|
33
|
+
6. DST-safe: we convert to UTC using the schedule's timezone before doing
|
|
34
|
+
any interval arithmetic.
|
|
35
|
+
|
|
36
|
+
## Debugging
|
|
37
|
+
|
|
38
|
+
If a slot is unexpectedly missing:
|
|
39
|
+
1. Check the schedule's weekly availability for that day-of-week in the
|
|
40
|
+
schedule's timezone (not UTC — weekends can shift across the date line).
|
|
41
|
+
2. Check date overrides for that local date (empty intervals = fully
|
|
42
|
+
blocked).
|
|
43
|
+
3. Check merged busy intervals for overlap, *including* the before/after
|
|
44
|
+
buffer expansion.
|
|
45
|
+
4. Check booking limits: a single existing booking can close a day.
|
|
46
|
+
5. Check period caps: rolling periods restrict how far in the future slots
|
|
47
|
+
appear.
|
|
48
|
+
|
|
49
|
+
If a slot is unexpectedly present:
|
|
50
|
+
1. Check that `now` is being passed correctly (defaults to `new Date()`).
|
|
51
|
+
2. Check that busy intervals from providers are in UTC.
|
|
52
|
+
3. Confirm slot interval matches what you expect (default = duration).
|