@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,27 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"Set a host-specific availability schedule override for an event type",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
eventTypeId: z.string(),
|
|
11
|
+
userEmail: z.string(),
|
|
12
|
+
scheduleId: z.string().nullable(),
|
|
13
|
+
}),
|
|
14
|
+
run: async (args) => {
|
|
15
|
+
const { getDb, schema } = getSchedulingContext();
|
|
16
|
+
await getDb()
|
|
17
|
+
.update(schema.eventTypeHosts)
|
|
18
|
+
.set({ scheduleId: args.scheduleId })
|
|
19
|
+
.where(
|
|
20
|
+
and(
|
|
21
|
+
eq(schema.eventTypeHosts.eventTypeId, args.eventTypeId),
|
|
22
|
+
eq(schema.eventTypeHosts.userEmail, args.userEmail),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
return { ok: true };
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
5
|
+
import { assertTeamAdmin } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Update a team's branding (name, logo, colors, bio)",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
id: z.string(),
|
|
11
|
+
name: z.string().optional(),
|
|
12
|
+
logoUrl: z.string().nullable().optional(),
|
|
13
|
+
brandColor: z.string().nullable().optional(),
|
|
14
|
+
darkBrandColor: z.string().nullable().optional(),
|
|
15
|
+
bio: z.string().nullable().optional(),
|
|
16
|
+
hideBranding: z.boolean().optional(),
|
|
17
|
+
}),
|
|
18
|
+
run: async (args) => {
|
|
19
|
+
await assertTeamAdmin(args.id);
|
|
20
|
+
const { getDb, schema } = getSchedulingContext();
|
|
21
|
+
const { id, ...set } = args;
|
|
22
|
+
await getDb()
|
|
23
|
+
.update(schema.teams)
|
|
24
|
+
.set({ ...set, updatedAt: new Date().toISOString() })
|
|
25
|
+
.where(eq(schema.teams.id, id));
|
|
26
|
+
return { ok: true };
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
import { eq } from "drizzle-orm";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Store a public routing form submission response",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
formId: z.string(),
|
|
11
|
+
response: z.record(z.string(), z.any()),
|
|
12
|
+
bookingId: z.string().optional(),
|
|
13
|
+
matchedRuleId: z.string().optional(),
|
|
14
|
+
routedTo: z.string().optional(),
|
|
15
|
+
submitterEmail: z.string().optional(),
|
|
16
|
+
}),
|
|
17
|
+
run: async (args) => {
|
|
18
|
+
const { getDb, schema } = getSchedulingContext();
|
|
19
|
+
const [form] = await getDb()
|
|
20
|
+
.select({
|
|
21
|
+
id: schema.routingForms.id,
|
|
22
|
+
disabled: schema.routingForms.disabled,
|
|
23
|
+
})
|
|
24
|
+
.from(schema.routingForms)
|
|
25
|
+
.where(eq(schema.routingForms.id, args.formId))
|
|
26
|
+
.limit(1);
|
|
27
|
+
if (!form || form.disabled) {
|
|
28
|
+
throw new Error(`Routing form not found: ${args.formId}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const id = nanoid();
|
|
32
|
+
await getDb()
|
|
33
|
+
.insert(schema.routingFormResponses)
|
|
34
|
+
.values({
|
|
35
|
+
id,
|
|
36
|
+
formId: args.formId,
|
|
37
|
+
response: JSON.stringify(args.response),
|
|
38
|
+
bookingId: args.bookingId ?? null,
|
|
39
|
+
matchedRuleId: args.matchedRuleId ?? null,
|
|
40
|
+
routedTo: args.routedTo ?? null,
|
|
41
|
+
submitterEmail: args.submitterEmail ?? null,
|
|
42
|
+
submitterIp: null,
|
|
43
|
+
createdAt: new Date().toISOString(),
|
|
44
|
+
});
|
|
45
|
+
return { id };
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
4
|
+
import {
|
|
5
|
+
updateEventType,
|
|
6
|
+
getEventTypeById,
|
|
7
|
+
} from "../server/event-types-repo.js";
|
|
8
|
+
|
|
9
|
+
export default defineAction({
|
|
10
|
+
description: "Toggle hidden (unpublished) state on an event type",
|
|
11
|
+
schema: z.object({ id: z.string(), hidden: z.boolean().optional() }),
|
|
12
|
+
run: async (args) => {
|
|
13
|
+
await assertAccess("event-type", args.id, "editor");
|
|
14
|
+
const current = await getEventTypeById(args.id);
|
|
15
|
+
if (!current) throw new Error("Event type not found");
|
|
16
|
+
const target = args.hidden ?? !current.hidden;
|
|
17
|
+
return {
|
|
18
|
+
eventType: await updateEventType(args.id, { hidden: target }),
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { nanoid } from "nanoid";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
import { currentUserEmail } from "./_helpers.js";
|
|
7
|
+
|
|
8
|
+
export default defineAction({
|
|
9
|
+
description: "Toggle whether a calendar is checked for conflicts",
|
|
10
|
+
schema: z.object({
|
|
11
|
+
credentialId: z.string(),
|
|
12
|
+
externalId: z.string(),
|
|
13
|
+
include: z.boolean(),
|
|
14
|
+
}),
|
|
15
|
+
run: async (args) => {
|
|
16
|
+
const { getDb, schema } = getSchedulingContext();
|
|
17
|
+
if (args.include) {
|
|
18
|
+
const cred = await getDb()
|
|
19
|
+
.select()
|
|
20
|
+
.from(schema.schedulingCredentials)
|
|
21
|
+
.where(eq(schema.schedulingCredentials.id, args.credentialId));
|
|
22
|
+
if (!cred[0]) throw new Error("Credential not found");
|
|
23
|
+
await getDb().insert(schema.selectedCalendars).values({
|
|
24
|
+
id: nanoid(),
|
|
25
|
+
credentialId: args.credentialId,
|
|
26
|
+
userEmail: currentUserEmail(),
|
|
27
|
+
externalId: args.externalId,
|
|
28
|
+
integration: cred[0].type,
|
|
29
|
+
createdAt: new Date().toISOString(),
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
await getDb()
|
|
33
|
+
.delete(schema.selectedCalendars)
|
|
34
|
+
.where(
|
|
35
|
+
and(
|
|
36
|
+
eq(schema.selectedCalendars.credentialId, args.credentialId),
|
|
37
|
+
eq(schema.selectedCalendars.externalId, args.externalId),
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return { ok: true };
|
|
42
|
+
},
|
|
43
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Toggle a workflow's disabled state",
|
|
9
|
+
schema: z.object({ id: z.string(), disabled: z.boolean().optional() }),
|
|
10
|
+
run: async (args) => {
|
|
11
|
+
await assertAccess("workflow", args.id, "editor");
|
|
12
|
+
const { getDb, schema } = getSchedulingContext();
|
|
13
|
+
const rows = await getDb()
|
|
14
|
+
.select()
|
|
15
|
+
.from(schema.workflows)
|
|
16
|
+
.where(eq(schema.workflows.id, args.id));
|
|
17
|
+
if (!rows[0]) throw new Error("Workflow not found");
|
|
18
|
+
const newDisabled = args.disabled ?? !rows[0].disabled;
|
|
19
|
+
await getDb()
|
|
20
|
+
.update(schema.workflows)
|
|
21
|
+
.set({ disabled: newDisabled, updatedAt: new Date().toISOString() })
|
|
22
|
+
.where(eq(schema.workflows.id, args.id));
|
|
23
|
+
return { disabled: newDisabled };
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
4
|
+
import { updateEventType } from "../server/event-types-repo.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description: "Update one or more fields on an event type",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
id: z.string(),
|
|
10
|
+
title: z.string().optional(),
|
|
11
|
+
slug: z.string().optional(),
|
|
12
|
+
description: z.string().nullable().optional(),
|
|
13
|
+
length: z.coerce.number().optional(),
|
|
14
|
+
durations: z.array(z.number()).optional(),
|
|
15
|
+
hidden: z.boolean().optional(),
|
|
16
|
+
position: z.number().optional(),
|
|
17
|
+
schedulingType: z
|
|
18
|
+
.enum(["personal", "collective", "round-robin", "managed"])
|
|
19
|
+
.optional(),
|
|
20
|
+
scheduleId: z.string().nullable().optional(),
|
|
21
|
+
locations: z.array(z.any()).optional(),
|
|
22
|
+
customFields: z.array(z.any()).optional(),
|
|
23
|
+
minimumBookingNotice: z.number().optional(),
|
|
24
|
+
beforeEventBuffer: z.number().optional(),
|
|
25
|
+
afterEventBuffer: z.number().optional(),
|
|
26
|
+
slotInterval: z.number().nullable().optional(),
|
|
27
|
+
periodType: z.enum(["unlimited", "rolling", "range"]).optional(),
|
|
28
|
+
periodDays: z.number().nullable().optional(),
|
|
29
|
+
periodStartDate: z.string().nullable().optional(),
|
|
30
|
+
periodEndDate: z.string().nullable().optional(),
|
|
31
|
+
seatsPerTimeSlot: z.number().nullable().optional(),
|
|
32
|
+
requiresConfirmation: z.boolean().optional(),
|
|
33
|
+
disableGuests: z.boolean().optional(),
|
|
34
|
+
hideCalendarNotes: z.boolean().optional(),
|
|
35
|
+
successRedirectUrl: z.string().nullable().optional(),
|
|
36
|
+
bookingLimits: z.any().optional(),
|
|
37
|
+
lockTimeZoneToggle: z.boolean().optional(),
|
|
38
|
+
color: z.string().nullable().optional(),
|
|
39
|
+
eventName: z.string().nullable().optional(),
|
|
40
|
+
recurringEvent: z
|
|
41
|
+
.object({
|
|
42
|
+
rrule: z.string(),
|
|
43
|
+
count: z.number().optional(),
|
|
44
|
+
description: z.string().optional(),
|
|
45
|
+
})
|
|
46
|
+
.nullable()
|
|
47
|
+
.optional(),
|
|
48
|
+
}),
|
|
49
|
+
run: async (args) => {
|
|
50
|
+
const { id, ...patch } = args;
|
|
51
|
+
await assertAccess("event-type", id, "editor");
|
|
52
|
+
return { eventType: await updateEventType(id, patch as any) };
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
5
|
+
import { assertTeamAdmin } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Update a team member's role",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
teamId: z.string(),
|
|
11
|
+
email: z.string(),
|
|
12
|
+
role: z.enum(["owner", "admin", "member"]),
|
|
13
|
+
}),
|
|
14
|
+
run: async (args) => {
|
|
15
|
+
await assertTeamAdmin(args.teamId);
|
|
16
|
+
const { getDb, schema } = getSchedulingContext();
|
|
17
|
+
await getDb()
|
|
18
|
+
.update(schema.teamMembers)
|
|
19
|
+
.set({ role: args.role })
|
|
20
|
+
.where(
|
|
21
|
+
and(
|
|
22
|
+
eq(schema.teamMembers.teamId, args.teamId),
|
|
23
|
+
eq(schema.teamMembers.userEmail, args.email),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
return { ok: true };
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
4
|
+
import { currentUserEmail } from "./_helpers.js";
|
|
5
|
+
|
|
6
|
+
// Profile data lives in consumer-provided settings (not the scheduling schema);
|
|
7
|
+
// this action delegates to the core `settings` subsystem via a well-known key.
|
|
8
|
+
export default defineAction({
|
|
9
|
+
description:
|
|
10
|
+
"Update the current user's profile (name, bio, timezone, brand colors, etc.)",
|
|
11
|
+
schema: z.object({
|
|
12
|
+
name: z.string().optional(),
|
|
13
|
+
bio: z.string().optional(),
|
|
14
|
+
avatarUrl: z.string().optional(),
|
|
15
|
+
timezone: z.string().optional(),
|
|
16
|
+
weekStart: z.enum(["sunday", "monday"]).optional(),
|
|
17
|
+
timeFormat: z.enum(["12h", "24h"]).optional(),
|
|
18
|
+
brandColor: z.string().optional(),
|
|
19
|
+
darkBrandColor: z.string().optional(),
|
|
20
|
+
hideBranding: z.boolean().optional(),
|
|
21
|
+
}),
|
|
22
|
+
run: async (args) => {
|
|
23
|
+
// The consumer template wires a `profile-settings` settings key; we just
|
|
24
|
+
// read/merge/write it. Accessed via dynamic import to avoid a hard dep on
|
|
25
|
+
// the core settings API here (different consumers may use alternate stores).
|
|
26
|
+
const core: any = await import("@agent-native/core");
|
|
27
|
+
if (core.writeSetting) {
|
|
28
|
+
const existing = (await core.readSetting?.("profile-settings")) ?? {};
|
|
29
|
+
await core.writeSetting("profile-settings", {
|
|
30
|
+
...(existing as object),
|
|
31
|
+
...args,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return { ok: true, userEmail: currentUserEmail() };
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Update a routing form's metadata, fields, rules, or fallback",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
id: z.string(),
|
|
11
|
+
name: z.string().optional(),
|
|
12
|
+
description: z.string().nullable().optional(),
|
|
13
|
+
disabled: z.boolean().optional(),
|
|
14
|
+
fields: z.array(z.any()).optional(),
|
|
15
|
+
rules: z.array(z.any()).optional(),
|
|
16
|
+
fallback: z.any().optional(),
|
|
17
|
+
}),
|
|
18
|
+
run: async (args) => {
|
|
19
|
+
await assertAccess("routing-form", args.id, "editor");
|
|
20
|
+
const { getDb, schema } = getSchedulingContext();
|
|
21
|
+
const set: any = { updatedAt: new Date().toISOString() };
|
|
22
|
+
if (args.name != null) set.name = args.name;
|
|
23
|
+
if (args.description !== undefined)
|
|
24
|
+
set.description = args.description ?? null;
|
|
25
|
+
if (args.disabled != null) set.disabled = args.disabled;
|
|
26
|
+
if (args.fields != null) set.fields = JSON.stringify(args.fields);
|
|
27
|
+
if (args.rules != null) set.rules = JSON.stringify(args.rules);
|
|
28
|
+
if (args.fallback !== undefined)
|
|
29
|
+
set.fallback = args.fallback ? JSON.stringify(args.fallback) : null;
|
|
30
|
+
await getDb()
|
|
31
|
+
.update(schema.routingForms)
|
|
32
|
+
.set(set)
|
|
33
|
+
.where(eq(schema.routingForms.id, args.id));
|
|
34
|
+
return { ok: true };
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
4
|
+
import { updateSchedule } from "../server/schedules-repo.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"Update a schedule's name, timezone, weekly availability, or date overrides",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
id: z.string(),
|
|
11
|
+
name: z.string().optional(),
|
|
12
|
+
timezone: z.string().optional(),
|
|
13
|
+
isDefault: z.boolean().optional(),
|
|
14
|
+
weeklyAvailability: z
|
|
15
|
+
.array(
|
|
16
|
+
z.object({
|
|
17
|
+
day: z.number().min(0).max(6),
|
|
18
|
+
intervals: z.array(
|
|
19
|
+
z.object({
|
|
20
|
+
startTime: z.string(),
|
|
21
|
+
endTime: z.string(),
|
|
22
|
+
}),
|
|
23
|
+
),
|
|
24
|
+
}),
|
|
25
|
+
)
|
|
26
|
+
.optional(),
|
|
27
|
+
dateOverrides: z
|
|
28
|
+
.array(
|
|
29
|
+
z.object({
|
|
30
|
+
date: z.string(),
|
|
31
|
+
intervals: z.array(
|
|
32
|
+
z.object({
|
|
33
|
+
startTime: z.string(),
|
|
34
|
+
endTime: z.string(),
|
|
35
|
+
}),
|
|
36
|
+
),
|
|
37
|
+
}),
|
|
38
|
+
)
|
|
39
|
+
.optional(),
|
|
40
|
+
}),
|
|
41
|
+
run: async (args) => {
|
|
42
|
+
await assertAccess("schedule", args.id, "editor");
|
|
43
|
+
return {
|
|
44
|
+
schedule: await updateSchedule(args.id, {
|
|
45
|
+
name: args.name,
|
|
46
|
+
timezone: args.timezone,
|
|
47
|
+
isDefault: args.isDefault,
|
|
48
|
+
weeklyAvailability: args.weeklyAvailability as any,
|
|
49
|
+
dateOverrides: args.dateOverrides as any,
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
import { eq } from "drizzle-orm";
|
|
5
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
6
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
7
|
+
|
|
8
|
+
export default defineAction({
|
|
9
|
+
description:
|
|
10
|
+
"Update workflow name/trigger/active-event-types, or replace its steps",
|
|
11
|
+
schema: z.object({
|
|
12
|
+
id: z.string(),
|
|
13
|
+
name: z.string().optional(),
|
|
14
|
+
trigger: z
|
|
15
|
+
.enum([
|
|
16
|
+
"new-booking",
|
|
17
|
+
"before-event",
|
|
18
|
+
"after-event",
|
|
19
|
+
"reschedule",
|
|
20
|
+
"cancellation",
|
|
21
|
+
"no-show",
|
|
22
|
+
])
|
|
23
|
+
.optional(),
|
|
24
|
+
disabled: z.boolean().optional(),
|
|
25
|
+
activeOnEventTypeIds: z.array(z.string()).optional(),
|
|
26
|
+
steps: z
|
|
27
|
+
.array(
|
|
28
|
+
z.object({
|
|
29
|
+
action: z.enum([
|
|
30
|
+
"email-host",
|
|
31
|
+
"email-attendee",
|
|
32
|
+
"email-address",
|
|
33
|
+
"sms-attendee",
|
|
34
|
+
"sms-host",
|
|
35
|
+
"sms-number",
|
|
36
|
+
"webhook",
|
|
37
|
+
]),
|
|
38
|
+
offsetMinutes: z.number().default(0),
|
|
39
|
+
sendTo: z.string().optional(),
|
|
40
|
+
emailSubject: z.string().optional(),
|
|
41
|
+
emailBody: z.string().optional(),
|
|
42
|
+
smsBody: z.string().optional(),
|
|
43
|
+
webhookUrl: z.string().optional(),
|
|
44
|
+
template: z.string().optional(),
|
|
45
|
+
}),
|
|
46
|
+
)
|
|
47
|
+
.optional(),
|
|
48
|
+
}),
|
|
49
|
+
run: async (args) => {
|
|
50
|
+
await assertAccess("workflow", args.id, "editor");
|
|
51
|
+
const { getDb, schema } = getSchedulingContext();
|
|
52
|
+
const now = new Date().toISOString();
|
|
53
|
+
const set: any = { updatedAt: now };
|
|
54
|
+
if (args.name != null) set.name = args.name;
|
|
55
|
+
if (args.trigger != null) set.trigger = args.trigger;
|
|
56
|
+
if (args.disabled != null) set.disabled = args.disabled;
|
|
57
|
+
if (args.activeOnEventTypeIds != null)
|
|
58
|
+
set.activeOnEventTypeIds = JSON.stringify(args.activeOnEventTypeIds);
|
|
59
|
+
await getDb()
|
|
60
|
+
.update(schema.workflows)
|
|
61
|
+
.set(set)
|
|
62
|
+
.where(eq(schema.workflows.id, args.id));
|
|
63
|
+
if (args.steps) {
|
|
64
|
+
await getDb()
|
|
65
|
+
.delete(schema.workflowSteps)
|
|
66
|
+
.where(eq(schema.workflowSteps.workflowId, args.id));
|
|
67
|
+
for (let i = 0; i < args.steps.length; i++) {
|
|
68
|
+
const s = args.steps[i];
|
|
69
|
+
await getDb()
|
|
70
|
+
.insert(schema.workflowSteps)
|
|
71
|
+
.values({
|
|
72
|
+
id: nanoid(),
|
|
73
|
+
workflowId: args.id,
|
|
74
|
+
order: i,
|
|
75
|
+
action: s.action,
|
|
76
|
+
offsetMinutes: s.offsetMinutes,
|
|
77
|
+
sendTo: s.sendTo ?? null,
|
|
78
|
+
emailSubject: s.emailSubject ?? null,
|
|
79
|
+
emailBody: s.emailBody ?? null,
|
|
80
|
+
smsBody: s.smsBody ?? null,
|
|
81
|
+
webhookUrl: s.webhookUrl ?? null,
|
|
82
|
+
template: s.template ?? null,
|
|
83
|
+
createdAt: now,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return { ok: true };
|
|
88
|
+
},
|
|
89
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buffer application.
|
|
3
|
+
*
|
|
4
|
+
* Buffers pad a slot with prep/cool-down time that the host needs but the
|
|
5
|
+
* attendee shouldn't see as part of the meeting. A before-event buffer
|
|
6
|
+
* means the slot reserves extra time before its displayed start; the slot
|
|
7
|
+
* itself is still shown at the true meeting time.
|
|
8
|
+
*
|
|
9
|
+
* The practical effect: a slot [10:00–10:30] with before=10 means the host
|
|
10
|
+
* is considered "busy" from 09:50 to 10:30, so it conflicts with a 09:00–09:50
|
|
11
|
+
* meeting only if THAT meeting also has an after-buffer.
|
|
12
|
+
*/
|
|
13
|
+
import type { BusyInterval } from "../shared/index.js";
|
|
14
|
+
import { addMinutes } from "./time.js";
|
|
15
|
+
|
|
16
|
+
/** Expand a busy interval to include before/after buffers. */
|
|
17
|
+
export function applyBuffers(
|
|
18
|
+
busy: BusyInterval,
|
|
19
|
+
beforeMinutes: number,
|
|
20
|
+
afterMinutes: number,
|
|
21
|
+
): BusyInterval {
|
|
22
|
+
return {
|
|
23
|
+
...busy,
|
|
24
|
+
start: new Date(
|
|
25
|
+
addMinutes(new Date(busy.start), -beforeMinutes),
|
|
26
|
+
).toISOString(),
|
|
27
|
+
end: new Date(addMinutes(new Date(busy.end), afterMinutes)).toISOString(),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Expand a proposed slot window (start→end) to include the event type's
|
|
33
|
+
* before/after buffers. The expanded window is what collision detection
|
|
34
|
+
* uses; the displayed slot remains the unexpanded window.
|
|
35
|
+
*/
|
|
36
|
+
export function expandSlotForConflictCheck(
|
|
37
|
+
start: Date,
|
|
38
|
+
end: Date,
|
|
39
|
+
beforeMinutes: number,
|
|
40
|
+
afterMinutes: number,
|
|
41
|
+
): { start: Date; end: Date } {
|
|
42
|
+
return {
|
|
43
|
+
start: addMinutes(start, -beforeMinutes),
|
|
44
|
+
end: addMinutes(end, afterMinutes),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conflict detection — does a proposed interval overlap any busy interval?
|
|
3
|
+
*/
|
|
4
|
+
import type { BusyInterval } from "../shared/index.js";
|
|
5
|
+
import { overlaps } from "./time.js";
|
|
6
|
+
|
|
7
|
+
export function hasConflict(
|
|
8
|
+
slot: { start: Date; end: Date },
|
|
9
|
+
busy: BusyInterval[],
|
|
10
|
+
): boolean {
|
|
11
|
+
for (const b of busy) {
|
|
12
|
+
if (
|
|
13
|
+
overlaps(slot, {
|
|
14
|
+
start: new Date(b.start),
|
|
15
|
+
end: new Date(b.end),
|
|
16
|
+
})
|
|
17
|
+
) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Merge overlapping busy intervals into a canonical, non-overlapping set. */
|
|
25
|
+
export function mergeBusy(busy: BusyInterval[]): BusyInterval[] {
|
|
26
|
+
if (busy.length === 0) return [];
|
|
27
|
+
const sorted = busy
|
|
28
|
+
.map((b) => ({
|
|
29
|
+
start: new Date(b.start),
|
|
30
|
+
end: new Date(b.end),
|
|
31
|
+
source: b.source,
|
|
32
|
+
}))
|
|
33
|
+
.sort((a, b) => a.start.getTime() - b.start.getTime());
|
|
34
|
+
const out: { start: Date; end: Date; source?: string }[] = [sorted[0]];
|
|
35
|
+
for (let i = 1; i < sorted.length; i++) {
|
|
36
|
+
const last = out[out.length - 1];
|
|
37
|
+
const cur = sorted[i];
|
|
38
|
+
if (cur.start <= last.end) {
|
|
39
|
+
if (cur.end > last.end) last.end = cur.end;
|
|
40
|
+
} else {
|
|
41
|
+
out.push(cur);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return out.map((b) => ({
|
|
45
|
+
start: b.start.toISOString(),
|
|
46
|
+
end: b.end.toISOString(),
|
|
47
|
+
source: b.source,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Booking limits enforcement.
|
|
3
|
+
*
|
|
4
|
+
* Limits constrain how many bookings an event type can receive in a time
|
|
5
|
+
* window (day / week / month / year). We pass in existing booking counts
|
|
6
|
+
* per bucket and return a function that tells us whether a proposed start
|
|
7
|
+
* time would exceed any limit.
|
|
8
|
+
*/
|
|
9
|
+
import type { BookingLimits } from "../shared/index.js";
|
|
10
|
+
import { TZDate } from "@date-fns/tz";
|
|
11
|
+
import { startOfWeek, startOfMonth, startOfYear, format } from "date-fns";
|
|
12
|
+
|
|
13
|
+
export interface BookingCounts {
|
|
14
|
+
perDay: Record<string, number>;
|
|
15
|
+
perWeek: Record<string, number>;
|
|
16
|
+
perMonth: Record<string, number>;
|
|
17
|
+
perYear: Record<string, number>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function bucketKeysForSlot(
|
|
21
|
+
slotStart: Date,
|
|
22
|
+
timezone: string,
|
|
23
|
+
weekStartsOn: 0 | 1 = 0,
|
|
24
|
+
): { day: string; week: string; month: string; year: string } {
|
|
25
|
+
const local = new TZDate(slotStart.getTime(), timezone);
|
|
26
|
+
const day = format(local, "yyyy-MM-dd");
|
|
27
|
+
const week = format(startOfWeek(local, { weekStartsOn }), "yyyy-MM-dd");
|
|
28
|
+
const month = format(startOfMonth(local), "yyyy-MM");
|
|
29
|
+
const year = format(startOfYear(local), "yyyy");
|
|
30
|
+
return { day, week, month, year };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function exceedsLimits(
|
|
34
|
+
slotStart: Date,
|
|
35
|
+
timezone: string,
|
|
36
|
+
limits: BookingLimits | undefined,
|
|
37
|
+
counts: BookingCounts,
|
|
38
|
+
weekStartsOn: 0 | 1 = 0,
|
|
39
|
+
): boolean {
|
|
40
|
+
if (!limits) return false;
|
|
41
|
+
const keys = bucketKeysForSlot(slotStart, timezone, weekStartsOn);
|
|
42
|
+
if (limits.perDay != null && (counts.perDay[keys.day] ?? 0) >= limits.perDay)
|
|
43
|
+
return true;
|
|
44
|
+
if (
|
|
45
|
+
limits.perWeek != null &&
|
|
46
|
+
(counts.perWeek[keys.week] ?? 0) >= limits.perWeek
|
|
47
|
+
)
|
|
48
|
+
return true;
|
|
49
|
+
if (
|
|
50
|
+
limits.perMonth != null &&
|
|
51
|
+
(counts.perMonth[keys.month] ?? 0) >= limits.perMonth
|
|
52
|
+
)
|
|
53
|
+
return true;
|
|
54
|
+
if (
|
|
55
|
+
limits.perYear != null &&
|
|
56
|
+
(counts.perYear[keys.year] ?? 0) >= limits.perYear
|
|
57
|
+
)
|
|
58
|
+
return true;
|
|
59
|
+
return false;
|
|
60
|
+
}
|