@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
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bookings — the materialized appointments created when someone books an
|
|
3
|
+
* event type.
|
|
4
|
+
*
|
|
5
|
+
* Each Booking may have multiple attendees (seated events), multiple
|
|
6
|
+
* references (one per external system: Google Calendar event id, Zoom
|
|
7
|
+
* meeting id, etc.), and a recurring parent (for recurring series).
|
|
8
|
+
*/
|
|
9
|
+
import {
|
|
10
|
+
table,
|
|
11
|
+
text,
|
|
12
|
+
integer,
|
|
13
|
+
ownableColumns,
|
|
14
|
+
createSharesTable,
|
|
15
|
+
} from "@agent-native/core/db/schema";
|
|
16
|
+
|
|
17
|
+
export const bookings = table("bookings", {
|
|
18
|
+
id: text("id").primaryKey(),
|
|
19
|
+
/** Public booking uid used in URLs like /booking/:uid and /reschedule/:uid */
|
|
20
|
+
uid: text("uid").notNull().unique(),
|
|
21
|
+
eventTypeId: text("event_type_id").notNull(),
|
|
22
|
+
/** Organizer email (assigned host for round-robin) */
|
|
23
|
+
hostEmail: text("host_email").notNull(),
|
|
24
|
+
|
|
25
|
+
title: text("title").notNull(),
|
|
26
|
+
description: text("description"),
|
|
27
|
+
|
|
28
|
+
/** ISO 8601 UTC */
|
|
29
|
+
startTime: text("start_time").notNull(),
|
|
30
|
+
endTime: text("end_time").notNull(),
|
|
31
|
+
/** Timezone in which the organizer/attendees originally picked the slot */
|
|
32
|
+
timezone: text("timezone").notNull().default("UTC"),
|
|
33
|
+
|
|
34
|
+
status: text("status", {
|
|
35
|
+
enum: ["pending", "confirmed", "cancelled", "rejected", "rescheduled"],
|
|
36
|
+
})
|
|
37
|
+
.notNull()
|
|
38
|
+
.default("confirmed"),
|
|
39
|
+
|
|
40
|
+
/** JSON Location — see shared types */
|
|
41
|
+
location: text("location"),
|
|
42
|
+
|
|
43
|
+
/** JSON object of custom field responses */
|
|
44
|
+
customResponses: text("custom_responses"),
|
|
45
|
+
|
|
46
|
+
/** Reschedule/cancel tokens for public magic links */
|
|
47
|
+
cancelToken: text("cancel_token"),
|
|
48
|
+
rescheduleToken: text("reschedule_token"),
|
|
49
|
+
|
|
50
|
+
/** uid of the booking this one replaced (reschedule chain) */
|
|
51
|
+
fromReschedule: text("from_reschedule"),
|
|
52
|
+
cancellationReason: text("cancellation_reason"),
|
|
53
|
+
reschedulingReason: text("rescheduling_reason"),
|
|
54
|
+
|
|
55
|
+
/** Calendar invite iCal UID (stable across reschedules for RFC 5545 compliance) */
|
|
56
|
+
iCalUid: text("ical_uid").notNull(),
|
|
57
|
+
iCalSequence: integer("ical_sequence").notNull().default(0),
|
|
58
|
+
|
|
59
|
+
/** Recurring series parent id; null for non-recurring */
|
|
60
|
+
recurringEventId: text("recurring_event_id"),
|
|
61
|
+
|
|
62
|
+
/** Payment state (Tier 2) */
|
|
63
|
+
paid: integer("paid", { mode: "boolean" }).notNull().default(false),
|
|
64
|
+
|
|
65
|
+
/** Whether the host marked themselves a no-show */
|
|
66
|
+
noShowHost: integer("no_show_host", { mode: "boolean" })
|
|
67
|
+
.notNull()
|
|
68
|
+
.default(false),
|
|
69
|
+
|
|
70
|
+
metadata: text("metadata"),
|
|
71
|
+
createdAt: text("created_at").notNull(),
|
|
72
|
+
updatedAt: text("updated_at").notNull(),
|
|
73
|
+
|
|
74
|
+
...ownableColumns(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/** Attendees attached to a booking (N for seated events, 1 for personal). */
|
|
78
|
+
export const bookingAttendees = table("booking_attendees", {
|
|
79
|
+
id: text("id").primaryKey(),
|
|
80
|
+
bookingId: text("booking_id").notNull(),
|
|
81
|
+
email: text("email").notNull(),
|
|
82
|
+
name: text("name").notNull(),
|
|
83
|
+
timezone: text("timezone"),
|
|
84
|
+
locale: text("locale"),
|
|
85
|
+
noShow: integer("no_show", { mode: "boolean" }).notNull().default(false),
|
|
86
|
+
createdAt: text("created_at").notNull(),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* External system references — Google Calendar event ids, Zoom meeting ids,
|
|
91
|
+
* ICS UIDs, etc. One booking → many references.
|
|
92
|
+
*/
|
|
93
|
+
export const bookingReferences = table("booking_references", {
|
|
94
|
+
id: text("id").primaryKey(),
|
|
95
|
+
bookingId: text("booking_id").notNull(),
|
|
96
|
+
/** Provider kind: "google_calendar", "office365_calendar", "zoom_video", … */
|
|
97
|
+
type: text("type").notNull(),
|
|
98
|
+
externalId: text("external_id").notNull(),
|
|
99
|
+
meetingUrl: text("meeting_url"),
|
|
100
|
+
meetingPassword: text("meeting_password"),
|
|
101
|
+
credentialId: text("credential_id"),
|
|
102
|
+
createdAt: text("created_at").notNull(),
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/** Seat reservations — one per attendee on a seated event. */
|
|
106
|
+
export const bookingSeats = table("booking_seats", {
|
|
107
|
+
id: text("id").primaryKey(),
|
|
108
|
+
bookingId: text("booking_id").notNull(),
|
|
109
|
+
attendeeId: text("attendee_id").notNull(),
|
|
110
|
+
/** Opaque reference string used for attendee self-manage links */
|
|
111
|
+
referenceUid: text("reference_uid").notNull().unique(),
|
|
112
|
+
createdAt: text("created_at").notNull(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/** Internal notes on a booking (host-only). */
|
|
116
|
+
export const bookingNotes = table("booking_notes", {
|
|
117
|
+
id: text("id").primaryKey(),
|
|
118
|
+
bookingId: text("booking_id").notNull(),
|
|
119
|
+
authorEmail: text("author_email").notNull(),
|
|
120
|
+
content: text("content").notNull(),
|
|
121
|
+
createdAt: text("created_at").notNull(),
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export const bookingShares = createSharesTable("booking_shares");
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar cache — short-TTL cache of busy intervals fetched from external
|
|
3
|
+
* calendars. Keyed by (credentialId, selected-calendars-hash, time-window).
|
|
4
|
+
*
|
|
5
|
+
* Booking the same slot twice at 3:00pm is the worst UX in a scheduling
|
|
6
|
+
* product, so this cache has a short TTL (default 5 min) and is explicitly
|
|
7
|
+
* busted on every booking create/update/cancel.
|
|
8
|
+
*/
|
|
9
|
+
import { table, text, integer } from "@agent-native/core/db/schema";
|
|
10
|
+
|
|
11
|
+
export const calendarCache = table("calendar_cache", {
|
|
12
|
+
id: text("id").primaryKey(),
|
|
13
|
+
credentialId: text("credential_id").notNull(),
|
|
14
|
+
/** Hash of (credentialId + sorted selected calendar ids + time range) */
|
|
15
|
+
cacheKey: text("cache_key").notNull().unique(),
|
|
16
|
+
/** ISO 8601 start of the queried window */
|
|
17
|
+
windowStart: text("window_start").notNull(),
|
|
18
|
+
windowEnd: text("window_end").notNull(),
|
|
19
|
+
/** JSON array of {start, end} busy intervals */
|
|
20
|
+
busyJson: text("busy_json").notNull(),
|
|
21
|
+
expiresAt: text("expires_at").notNull(),
|
|
22
|
+
createdAt: text("created_at").notNull(),
|
|
23
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credentials — thin view over framework `oauth_tokens` that records which
|
|
3
|
+
* calendar / video integrations a user has connected. The actual OAuth
|
|
4
|
+
* tokens live in core's `oauth_tokens` table; this table stores display
|
|
5
|
+
* metadata and flags needed by the scheduling UI (display name, invalid
|
|
6
|
+
* flag, app icon, default-for-type).
|
|
7
|
+
*/
|
|
8
|
+
import { table, text, integer } from "@agent-native/core/db/schema";
|
|
9
|
+
|
|
10
|
+
export const schedulingCredentials = table("scheduling_credentials", {
|
|
11
|
+
id: text("id").primaryKey(),
|
|
12
|
+
/** Provider slug: "google_calendar", "office365_calendar", "zoom_video", "daily_video", … */
|
|
13
|
+
type: text("type").notNull(),
|
|
14
|
+
/** Owner (user) — for team credentials, use teamId too */
|
|
15
|
+
userEmail: text("user_email"),
|
|
16
|
+
teamId: text("team_id"),
|
|
17
|
+
/** App id from framework app store */
|
|
18
|
+
appId: text("app_id"),
|
|
19
|
+
/** Core `oauth_tokens.id` if applicable */
|
|
20
|
+
oauthTokenId: text("oauth_token_id"),
|
|
21
|
+
/** Human-friendly label shown in UI */
|
|
22
|
+
displayName: text("display_name"),
|
|
23
|
+
/** External account email (e.g. Google account email) */
|
|
24
|
+
externalEmail: text("external_email"),
|
|
25
|
+
/** True after a 401/403 — UI prompts re-connect */
|
|
26
|
+
invalid: integer("invalid", { mode: "boolean" }).notNull().default(false),
|
|
27
|
+
/** Whether this is the user's default for its category (e.g. default video) */
|
|
28
|
+
isDefault: integer("is_default", { mode: "boolean" })
|
|
29
|
+
.notNull()
|
|
30
|
+
.default(false),
|
|
31
|
+
createdAt: text("created_at").notNull(),
|
|
32
|
+
updatedAt: text("updated_at").notNull(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Which external calendars a credential reads "busy" times from.
|
|
37
|
+
* A single credential (e.g. a Google account) may expose multiple calendars
|
|
38
|
+
* (primary, vacation, shared). Users pick a subset to check for conflicts,
|
|
39
|
+
* plus exactly one as the destination for new events.
|
|
40
|
+
*/
|
|
41
|
+
export const selectedCalendars = table("selected_calendars", {
|
|
42
|
+
id: text("id").primaryKey(),
|
|
43
|
+
credentialId: text("credential_id").notNull(),
|
|
44
|
+
userEmail: text("user_email").notNull(),
|
|
45
|
+
/** External calendar id from the provider */
|
|
46
|
+
externalId: text("external_id").notNull(),
|
|
47
|
+
/** Provider name for this entry */
|
|
48
|
+
integration: text("integration").notNull(),
|
|
49
|
+
/** Optional event-type-level override (only check this calendar for that event) */
|
|
50
|
+
eventTypeId: text("event_type_id"),
|
|
51
|
+
createdAt: text("created_at").notNull(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const destinationCalendars = table("destination_calendars", {
|
|
55
|
+
id: text("id").primaryKey(),
|
|
56
|
+
credentialId: text("credential_id").notNull(),
|
|
57
|
+
userEmail: text("user_email").notNull(),
|
|
58
|
+
/** Provider name */
|
|
59
|
+
integration: text("integration").notNull(),
|
|
60
|
+
externalId: text("external_id").notNull(),
|
|
61
|
+
primaryEmail: text("primary_email"),
|
|
62
|
+
/** Optional event-type-level override */
|
|
63
|
+
eventTypeId: text("event_type_id"),
|
|
64
|
+
createdAt: text("created_at").notNull(),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/** Verified sender emails for workflows sending from a custom address. */
|
|
68
|
+
export const verifiedEmails = table("verified_emails", {
|
|
69
|
+
id: text("id").primaryKey(),
|
|
70
|
+
email: text("email").notNull(),
|
|
71
|
+
userEmail: text("user_email"),
|
|
72
|
+
teamId: text("team_id"),
|
|
73
|
+
verifiedAt: text("verified_at").notNull(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/** Verified phone numbers for workflows sending SMS. */
|
|
77
|
+
export const verifiedNumbers = table("verified_numbers", {
|
|
78
|
+
id: text("id").primaryKey(),
|
|
79
|
+
phoneNumber: text("phone_number").notNull(),
|
|
80
|
+
userEmail: text("user_email"),
|
|
81
|
+
teamId: text("team_id"),
|
|
82
|
+
verifiedAt: text("verified_at").notNull(),
|
|
83
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event types — the top-level bookable definition.
|
|
3
|
+
*
|
|
4
|
+
* An EventType represents "a 30-minute intro call", "a team round-robin sales
|
|
5
|
+
* demo", or "a managed internal 1:1". It is the primary resource users create,
|
|
6
|
+
* edit, and share booking links for.
|
|
7
|
+
*
|
|
8
|
+
* Ownership: personal event types are owned by a user (ownerEmail);
|
|
9
|
+
* team event types are owned by a team (teamId). Sharing is via the framework
|
|
10
|
+
* sharing system (`event_type_shares`).
|
|
11
|
+
*/
|
|
12
|
+
import {
|
|
13
|
+
table,
|
|
14
|
+
text,
|
|
15
|
+
integer,
|
|
16
|
+
ownableColumns,
|
|
17
|
+
createSharesTable,
|
|
18
|
+
} from "@agent-native/core/db/schema";
|
|
19
|
+
|
|
20
|
+
export const eventTypes = table("event_types", {
|
|
21
|
+
id: text("id").primaryKey(),
|
|
22
|
+
|
|
23
|
+
// Identity
|
|
24
|
+
title: text("title").notNull(),
|
|
25
|
+
slug: text("slug").notNull(),
|
|
26
|
+
description: text("description"),
|
|
27
|
+
/** Default duration in minutes */
|
|
28
|
+
length: integer("length").notNull().default(30),
|
|
29
|
+
/** JSON array of additional duration choices, e.g. [15, 30, 60] */
|
|
30
|
+
durations: text("durations"),
|
|
31
|
+
position: integer("position").notNull().default(0),
|
|
32
|
+
hidden: integer("hidden", { mode: "boolean" }).notNull().default(false),
|
|
33
|
+
color: text("color"),
|
|
34
|
+
|
|
35
|
+
// Scheduling model
|
|
36
|
+
schedulingType: text("scheduling_type", {
|
|
37
|
+
enum: ["personal", "collective", "round-robin", "managed"],
|
|
38
|
+
})
|
|
39
|
+
.notNull()
|
|
40
|
+
.default("personal"),
|
|
41
|
+
/** Team id if this is a team event type; null for personal */
|
|
42
|
+
teamId: text("team_id"),
|
|
43
|
+
|
|
44
|
+
// Locations (JSON array of Location objects)
|
|
45
|
+
locations: text("locations"),
|
|
46
|
+
|
|
47
|
+
// Custom fields (JSON array of CustomField objects)
|
|
48
|
+
customFields: text("custom_fields"),
|
|
49
|
+
|
|
50
|
+
// Default schedule reference
|
|
51
|
+
scheduleId: text("schedule_id"),
|
|
52
|
+
|
|
53
|
+
// Buffers & notice
|
|
54
|
+
minimumBookingNotice: integer("minimum_booking_notice").notNull().default(0),
|
|
55
|
+
beforeEventBuffer: integer("before_event_buffer").notNull().default(0),
|
|
56
|
+
afterEventBuffer: integer("after_event_buffer").notNull().default(0),
|
|
57
|
+
/** Slot granularity in minutes; null = use duration */
|
|
58
|
+
slotInterval: integer("slot_interval"),
|
|
59
|
+
|
|
60
|
+
// Booking window
|
|
61
|
+
periodType: text("period_type", {
|
|
62
|
+
enum: ["unlimited", "rolling", "range"],
|
|
63
|
+
})
|
|
64
|
+
.notNull()
|
|
65
|
+
.default("rolling"),
|
|
66
|
+
periodDays: integer("period_days").default(60),
|
|
67
|
+
periodStartDate: text("period_start_date"),
|
|
68
|
+
periodEndDate: text("period_end_date"),
|
|
69
|
+
|
|
70
|
+
// Capacity & policies
|
|
71
|
+
seatsPerTimeSlot: integer("seats_per_time_slot"),
|
|
72
|
+
requiresConfirmation: integer("requires_confirmation", { mode: "boolean" })
|
|
73
|
+
.notNull()
|
|
74
|
+
.default(false),
|
|
75
|
+
disableGuests: integer("disable_guests", { mode: "boolean" })
|
|
76
|
+
.notNull()
|
|
77
|
+
.default(false),
|
|
78
|
+
hideCalendarNotes: integer("hide_calendar_notes", { mode: "boolean" })
|
|
79
|
+
.notNull()
|
|
80
|
+
.default(false),
|
|
81
|
+
successRedirectUrl: text("success_redirect_url"),
|
|
82
|
+
bookingLimits: text("booking_limits"),
|
|
83
|
+
/** Lock timezone on Booker (for in-person or local-only events) */
|
|
84
|
+
lockTimeZoneToggle: integer("lock_time_zone_toggle", { mode: "boolean" })
|
|
85
|
+
.notNull()
|
|
86
|
+
.default(false),
|
|
87
|
+
|
|
88
|
+
// Recurring (JSON RecurringEventRule) — Tier 2
|
|
89
|
+
recurringEvent: text("recurring_event"),
|
|
90
|
+
|
|
91
|
+
// Templated event name: "{name} + {host}"
|
|
92
|
+
eventName: text("event_name"),
|
|
93
|
+
|
|
94
|
+
// Misc
|
|
95
|
+
metadata: text("metadata"),
|
|
96
|
+
createdAt: text("created_at").notNull(),
|
|
97
|
+
updatedAt: text("updated_at").notNull(),
|
|
98
|
+
|
|
99
|
+
...ownableColumns(),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Host assignments for team / round-robin / collective event types.
|
|
104
|
+
* Composite key (userEmail, eventTypeId).
|
|
105
|
+
*/
|
|
106
|
+
export const eventTypeHosts = table("event_type_hosts", {
|
|
107
|
+
eventTypeId: text("event_type_id").notNull(),
|
|
108
|
+
userEmail: text("user_email").notNull(),
|
|
109
|
+
/** Fixed hosts always attend; non-fixed hosts rotate in round-robin */
|
|
110
|
+
isFixed: integer("is_fixed", { mode: "boolean" }).notNull().default(false),
|
|
111
|
+
/** Relative weight for weighted round-robin (default 1) */
|
|
112
|
+
weight: integer("weight").notNull().default(1),
|
|
113
|
+
/** Lower number = higher priority in round-robin tiebreak */
|
|
114
|
+
priority: integer("priority").notNull().default(2),
|
|
115
|
+
/** Host-specific schedule override; null = use host's default */
|
|
116
|
+
scheduleId: text("schedule_id"),
|
|
117
|
+
groupId: text("group_id"),
|
|
118
|
+
createdAt: text("created_at").notNull(),
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/** Host groups — collective assignment within a round-robin group. */
|
|
122
|
+
export const eventTypeHostGroups = table("event_type_host_groups", {
|
|
123
|
+
id: text("id").primaryKey(),
|
|
124
|
+
eventTypeId: text("event_type_id").notNull(),
|
|
125
|
+
name: text("name").notNull(),
|
|
126
|
+
createdAt: text("created_at").notNull(),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Rename history — e.g. `/me/old-slug` → `/me/new-slug`.
|
|
131
|
+
* Public booker redirects the old slug to the new one.
|
|
132
|
+
*/
|
|
133
|
+
export const eventTypeSlugRedirects = table("event_type_slug_redirects", {
|
|
134
|
+
/** Composite: "ownerEmail:slug" or "team:teamId:slug" — unique across ownership scope */
|
|
135
|
+
oldKey: text("old_key").primaryKey(),
|
|
136
|
+
newKey: text("new_key").notNull(),
|
|
137
|
+
eventTypeId: text("event_type_id"),
|
|
138
|
+
createdAt: text("created_at").notNull(),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
/** Hashed private links (`/d/:hash/:slug`) — shareable tokens that don't expose the owner's username. */
|
|
142
|
+
export const hashedLinks = table("hashed_links", {
|
|
143
|
+
id: text("id").primaryKey(),
|
|
144
|
+
hash: text("hash").notNull().unique(),
|
|
145
|
+
eventTypeId: text("event_type_id").notNull(),
|
|
146
|
+
expiresAt: text("expires_at"),
|
|
147
|
+
isSingleUse: integer("is_single_use", { mode: "boolean" })
|
|
148
|
+
.notNull()
|
|
149
|
+
.default(false),
|
|
150
|
+
usedAt: text("used_at"),
|
|
151
|
+
createdAt: text("created_at").notNull(),
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
export const eventTypeShares = createSharesTable("event_type_shares");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel export for all scheduling schema tables.
|
|
3
|
+
*
|
|
4
|
+
* Consumer apps compose this with their own schema:
|
|
5
|
+
*
|
|
6
|
+
* // server/db/schema.ts
|
|
7
|
+
* export * from "@agent-native/scheduling/schema";
|
|
8
|
+
* export * from "./local-tables.js";
|
|
9
|
+
*
|
|
10
|
+
* Drizzle's schema scanner picks up all tables from the combined namespace.
|
|
11
|
+
*/
|
|
12
|
+
export * from "./event-types.js";
|
|
13
|
+
export * from "./schedules.js";
|
|
14
|
+
export * from "./bookings.js";
|
|
15
|
+
export * from "./teams.js";
|
|
16
|
+
export * from "./credentials.js";
|
|
17
|
+
export * from "./calendar-cache.js";
|
|
18
|
+
export * from "./workflows.js";
|
|
19
|
+
export * from "./routing-forms.js";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routing forms — ChiliPiper-style pre-booking forms that route prospects to
|
|
3
|
+
* the right event type based on their answers.
|
|
4
|
+
*
|
|
5
|
+
* A form has fields (text/select/multi), rules (match conditions → action),
|
|
6
|
+
* and a fallback. Public form URL is `/forms/:formId`; on submit we evaluate
|
|
7
|
+
* rules in order and either redirect to an event-type booker, open an
|
|
8
|
+
* external URL, or show a custom message.
|
|
9
|
+
*/
|
|
10
|
+
import {
|
|
11
|
+
table,
|
|
12
|
+
text,
|
|
13
|
+
integer,
|
|
14
|
+
ownableColumns,
|
|
15
|
+
createSharesTable,
|
|
16
|
+
} from "@agent-native/core/db/schema";
|
|
17
|
+
|
|
18
|
+
export const routingForms = table("routing_forms", {
|
|
19
|
+
id: text("id").primaryKey(),
|
|
20
|
+
name: text("name").notNull(),
|
|
21
|
+
description: text("description"),
|
|
22
|
+
teamId: text("team_id"),
|
|
23
|
+
disabled: integer("disabled", { mode: "boolean" }).notNull().default(false),
|
|
24
|
+
/** JSON array of RoutingFormField */
|
|
25
|
+
fields: text("fields").notNull().default("[]"),
|
|
26
|
+
/** JSON array of RoutingFormRule */
|
|
27
|
+
rules: text("rules").notNull().default("[]"),
|
|
28
|
+
/** JSON RoutingFormRule action object for when no rules match */
|
|
29
|
+
fallback: text("fallback"),
|
|
30
|
+
createdAt: text("created_at").notNull(),
|
|
31
|
+
updatedAt: text("updated_at").notNull(),
|
|
32
|
+
...ownableColumns(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const routingFormResponses = table("routing_form_responses", {
|
|
36
|
+
id: text("id").primaryKey(),
|
|
37
|
+
formId: text("form_id").notNull(),
|
|
38
|
+
/** JSON object of fieldId → value */
|
|
39
|
+
response: text("response").notNull(),
|
|
40
|
+
/** Booking id if the response resulted in a booking */
|
|
41
|
+
bookingId: text("booking_id"),
|
|
42
|
+
/** Which rule matched (null if fallback) */
|
|
43
|
+
matchedRuleId: text("matched_rule_id"),
|
|
44
|
+
/** Resulting action description for quick filtering */
|
|
45
|
+
routedTo: text("routed_to"),
|
|
46
|
+
/** Submitter context */
|
|
47
|
+
submitterEmail: text("submitter_email"),
|
|
48
|
+
submitterIp: text("submitter_ip"),
|
|
49
|
+
createdAt: text("created_at").notNull(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export const routingFormShares = createSharesTable("routing_form_shares");
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schedules — named availability presets ("Working Hours", "Evenings").
|
|
3
|
+
*
|
|
4
|
+
* A Schedule has weekly rules (e.g. Mon-Fri 9am-5pm) stored as rows in
|
|
5
|
+
* `schedule_availability`, plus one-off overrides stored in `date_overrides`.
|
|
6
|
+
*
|
|
7
|
+
* Each user has one default schedule; event types can pick any of the user's
|
|
8
|
+
* schedules, or a host-specific override for team events.
|
|
9
|
+
*/
|
|
10
|
+
import {
|
|
11
|
+
table,
|
|
12
|
+
text,
|
|
13
|
+
integer,
|
|
14
|
+
ownableColumns,
|
|
15
|
+
createSharesTable,
|
|
16
|
+
} from "@agent-native/core/db/schema";
|
|
17
|
+
|
|
18
|
+
export const schedules = table("schedules", {
|
|
19
|
+
id: text("id").primaryKey(),
|
|
20
|
+
name: text("name").notNull(),
|
|
21
|
+
timezone: text("timezone").notNull().default("UTC"),
|
|
22
|
+
isDefault: integer("is_default", { mode: "boolean" })
|
|
23
|
+
.notNull()
|
|
24
|
+
.default(false),
|
|
25
|
+
createdAt: text("created_at").notNull(),
|
|
26
|
+
updatedAt: text("updated_at").notNull(),
|
|
27
|
+
...ownableColumns(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Weekly availability rules.
|
|
32
|
+
* Each row is one interval on one day-of-week for one schedule.
|
|
33
|
+
* Example: scheduleId=X, day=1 (Mon), startTime="09:00", endTime="12:00".
|
|
34
|
+
*/
|
|
35
|
+
export const scheduleAvailability = table("schedule_availability", {
|
|
36
|
+
id: text("id").primaryKey(),
|
|
37
|
+
scheduleId: text("schedule_id").notNull(),
|
|
38
|
+
/** 0=Sunday … 6=Saturday */
|
|
39
|
+
day: integer("day").notNull(),
|
|
40
|
+
/** "HH:MM" in schedule's timezone */
|
|
41
|
+
startTime: text("start_time").notNull(),
|
|
42
|
+
endTime: text("end_time").notNull(),
|
|
43
|
+
createdAt: text("created_at").notNull(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Date-specific overrides.
|
|
48
|
+
* Example: scheduleId=X, date="2026-04-25", intervals=[] (fully blocked).
|
|
49
|
+
* Or intervals=[{"09:00"-"11:00"}] (only 9-11 on that day).
|
|
50
|
+
*/
|
|
51
|
+
export const dateOverrides = table("date_overrides", {
|
|
52
|
+
id: text("id").primaryKey(),
|
|
53
|
+
scheduleId: text("schedule_id").notNull(),
|
|
54
|
+
/** YYYY-MM-DD in schedule's timezone */
|
|
55
|
+
date: text("date").notNull(),
|
|
56
|
+
/** JSON array of {startTime,endTime}. Empty = fully blocked. */
|
|
57
|
+
intervals: text("intervals").notNull().default("[]"),
|
|
58
|
+
createdAt: text("created_at").notNull(),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/** Time-zoned travel windows that override the user's default timezone. */
|
|
62
|
+
export const travelSchedules = table("travel_schedules", {
|
|
63
|
+
id: text("id").primaryKey(),
|
|
64
|
+
userEmail: text("user_email").notNull(),
|
|
65
|
+
startDate: text("start_date").notNull(),
|
|
66
|
+
endDate: text("end_date").notNull(),
|
|
67
|
+
timezone: text("timezone").notNull(),
|
|
68
|
+
createdAt: text("created_at").notNull(),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/** Out of office — blocks bookings and optionally redirects to a coworker. */
|
|
72
|
+
export const outOfOfficeEntries = table("out_of_office_entries", {
|
|
73
|
+
id: text("id").primaryKey(),
|
|
74
|
+
userEmail: text("user_email").notNull(),
|
|
75
|
+
startDate: text("start_date").notNull(),
|
|
76
|
+
endDate: text("end_date").notNull(),
|
|
77
|
+
reason: text("reason"),
|
|
78
|
+
notes: text("notes"),
|
|
79
|
+
redirectUserEmail: text("redirect_user_email"),
|
|
80
|
+
createdAt: text("created_at").notNull(),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const scheduleShares = createSharesTable("schedule_shares");
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Teams — groupings of users who share event types, round-robin across hosts,
|
|
3
|
+
* and present a team booking page at `/team/:slug`.
|
|
4
|
+
*
|
|
5
|
+
* Framework `org` provides heavier identity (for full multi-tenant orgs);
|
|
6
|
+
* teams here are lighter-weight and may be scoped to a single org.
|
|
7
|
+
*/
|
|
8
|
+
import {
|
|
9
|
+
table,
|
|
10
|
+
text,
|
|
11
|
+
integer,
|
|
12
|
+
ownableColumns,
|
|
13
|
+
createSharesTable,
|
|
14
|
+
} from "@agent-native/core/db/schema";
|
|
15
|
+
|
|
16
|
+
export const teams = table("teams", {
|
|
17
|
+
id: text("id").primaryKey(),
|
|
18
|
+
slug: text("slug").notNull().unique(),
|
|
19
|
+
name: text("name").notNull(),
|
|
20
|
+
logoUrl: text("logo_url"),
|
|
21
|
+
brandColor: text("brand_color"),
|
|
22
|
+
darkBrandColor: text("dark_brand_color"),
|
|
23
|
+
bio: text("bio"),
|
|
24
|
+
hideBranding: integer("hide_branding", { mode: "boolean" })
|
|
25
|
+
.notNull()
|
|
26
|
+
.default(false),
|
|
27
|
+
metadata: text("metadata"),
|
|
28
|
+
createdAt: text("created_at").notNull(),
|
|
29
|
+
updatedAt: text("updated_at").notNull(),
|
|
30
|
+
...ownableColumns(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const teamMembers = table("team_members", {
|
|
34
|
+
id: text("id").primaryKey(),
|
|
35
|
+
teamId: text("team_id").notNull(),
|
|
36
|
+
userEmail: text("user_email").notNull(),
|
|
37
|
+
role: text("role", { enum: ["owner", "admin", "member"] })
|
|
38
|
+
.notNull()
|
|
39
|
+
.default("member"),
|
|
40
|
+
accepted: integer("accepted", { mode: "boolean" }).notNull().default(false),
|
|
41
|
+
inviteToken: text("invite_token"),
|
|
42
|
+
invitedAt: text("invited_at").notNull(),
|
|
43
|
+
joinedAt: text("joined_at"),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const teamShares = createSharesTable("team_shares");
|