@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,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HMAC-signed state for video conferencing OAuth flows.
|
|
3
|
+
*
|
|
4
|
+
* The `state` value sent to the OAuth provider must round-trip back to our
|
|
5
|
+
* callback verbatim. We use HMAC-SHA256 to bind the state to the kind +
|
|
6
|
+
* authenticated user email + a server secret + a freshness timestamp.
|
|
7
|
+
* The callback re-derives the HMAC and rejects mismatches — this prevents
|
|
8
|
+
* an attacker from forging a callback for someone else's account or
|
|
9
|
+
* replaying an old completed flow.
|
|
10
|
+
*
|
|
11
|
+
* Output format:
|
|
12
|
+
* <random-nonce>.<timestamp>.<kind>.<base64url-hmac>
|
|
13
|
+
*
|
|
14
|
+
* The nonce keeps every issued state distinct even if the same user
|
|
15
|
+
* starts two parallel OAuth flows for the same provider. The timestamp
|
|
16
|
+
* lets us bound replay attempts (default: 10 minutes).
|
|
17
|
+
*/
|
|
18
|
+
import crypto from "node:crypto";
|
|
19
|
+
|
|
20
|
+
const SEPARATOR = ".";
|
|
21
|
+
const STATE_TTL_MS = 10 * 60 * 1000; // 10 minutes
|
|
22
|
+
|
|
23
|
+
function getStateSecret(): string {
|
|
24
|
+
const secret =
|
|
25
|
+
process.env.SCHEDULING_OAUTH_STATE_SECRET ||
|
|
26
|
+
process.env.BETTER_AUTH_SECRET ||
|
|
27
|
+
process.env.AUTH_SECRET;
|
|
28
|
+
if (!secret) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
"OAuth state secret is not configured. Set BETTER_AUTH_SECRET (or SCHEDULING_OAUTH_STATE_SECRET).",
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
return secret;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function b64url(buf: Buffer): string {
|
|
37
|
+
return buf
|
|
38
|
+
.toString("base64")
|
|
39
|
+
.replace(/=+$/, "")
|
|
40
|
+
.replace(/\+/g, "-")
|
|
41
|
+
.replace(/\//g, "_");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function hmac(message: string, secret: string): string {
|
|
45
|
+
return b64url(crypto.createHmac("sha256", secret).update(message).digest());
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function safeFragment(value: string): string {
|
|
49
|
+
// The encoded payload uses dots as separators, so any literal dot in the
|
|
50
|
+
// user email would corrupt parsing. Replace dots and any non-printable
|
|
51
|
+
// characters before signing.
|
|
52
|
+
return value.replace(/[^A-Za-z0-9_@-]/g, "_");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Mint a fresh signed state value bound to the current authenticated user
|
|
57
|
+
* and the requested OAuth `kind`.
|
|
58
|
+
*/
|
|
59
|
+
export function signVideoOAuthState(opts: {
|
|
60
|
+
kind: string;
|
|
61
|
+
userEmail: string;
|
|
62
|
+
}): string {
|
|
63
|
+
const nonce = crypto.randomBytes(12).toString("hex");
|
|
64
|
+
const timestamp = Date.now().toString(36);
|
|
65
|
+
const safeKind = safeFragment(opts.kind);
|
|
66
|
+
const safeEmail = safeFragment(opts.userEmail.toLowerCase());
|
|
67
|
+
const message = [nonce, timestamp, safeKind, safeEmail].join(SEPARATOR);
|
|
68
|
+
const sig = hmac(message, getStateSecret());
|
|
69
|
+
return [nonce, timestamp, safeKind, sig].join(SEPARATOR);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Verify a state value returned from the OAuth provider matches one
|
|
74
|
+
* minted by `signVideoOAuthState` for the same authenticated user.
|
|
75
|
+
*
|
|
76
|
+
* Returns `true` only when:
|
|
77
|
+
* 1. The state has the expected shape
|
|
78
|
+
* 2. The HMAC matches (kind + user-email + secret)
|
|
79
|
+
* 3. The state is not older than STATE_TTL_MS
|
|
80
|
+
*
|
|
81
|
+
* Uses `crypto.timingSafeEqual` to prevent timing-based recovery of the
|
|
82
|
+
* signature.
|
|
83
|
+
*/
|
|
84
|
+
export function verifyVideoOAuthState(opts: {
|
|
85
|
+
state: string | undefined | null;
|
|
86
|
+
kind: string;
|
|
87
|
+
userEmail: string;
|
|
88
|
+
/** Override default 10-minute TTL (for tests). */
|
|
89
|
+
ttlMs?: number;
|
|
90
|
+
}): boolean {
|
|
91
|
+
if (!opts.state || typeof opts.state !== "string") return false;
|
|
92
|
+
const parts = opts.state.split(SEPARATOR);
|
|
93
|
+
if (parts.length !== 4) return false;
|
|
94
|
+
const [nonce, timestamp, kindFragment, providedSig] = parts;
|
|
95
|
+
if (!nonce || !timestamp || !kindFragment || !providedSig) return false;
|
|
96
|
+
|
|
97
|
+
const expectedKind = safeFragment(opts.kind);
|
|
98
|
+
if (kindFragment !== expectedKind) return false;
|
|
99
|
+
|
|
100
|
+
const safeEmail = safeFragment(opts.userEmail.toLowerCase());
|
|
101
|
+
const message = [nonce, timestamp, kindFragment, safeEmail].join(SEPARATOR);
|
|
102
|
+
const expectedSig = hmac(message, getStateSecret());
|
|
103
|
+
|
|
104
|
+
const a = Buffer.from(providedSig);
|
|
105
|
+
const b = Buffer.from(expectedSig);
|
|
106
|
+
if (a.length !== b.length) return false;
|
|
107
|
+
if (!crypto.timingSafeEqual(a, b)) return false;
|
|
108
|
+
|
|
109
|
+
// Freshness check.
|
|
110
|
+
const ttl = opts.ttlMs ?? STATE_TTL_MS;
|
|
111
|
+
const issuedAt = Number.parseInt(timestamp, 36);
|
|
112
|
+
if (!Number.isFinite(issuedAt)) return false;
|
|
113
|
+
if (Date.now() - issuedAt > ttl) return false;
|
|
114
|
+
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side helper for completing video conferencing OAuth callbacks.
|
|
3
|
+
*
|
|
4
|
+
* Templates mount this under `/_agent-native/oauth/<kind>/callback.get.ts`
|
|
5
|
+
* and forward the h3 event. The helper:
|
|
6
|
+
* 1. Looks up the video provider by kind
|
|
7
|
+
* 2. Allocates a `scheduling_credentials` row (so `credentialId` is stable)
|
|
8
|
+
* 3. Calls the provider's `completeOAuth` (tokens get persisted via the
|
|
9
|
+
* provider's `updateTokens` callback, typically against core's
|
|
10
|
+
* `oauth_tokens` table, keyed by `credentialId`)
|
|
11
|
+
* 4. Updates the credential row with display metadata
|
|
12
|
+
*
|
|
13
|
+
* It is intentionally agnostic to the consumer's auth/session plumbing —
|
|
14
|
+
* pass in `userEmail` explicitly.
|
|
15
|
+
*/
|
|
16
|
+
import { nanoid } from "nanoid";
|
|
17
|
+
import { eq } from "drizzle-orm";
|
|
18
|
+
import { getSchedulingContext } from "./context.js";
|
|
19
|
+
import { getVideoProvider } from "./providers/registry.js";
|
|
20
|
+
|
|
21
|
+
export interface CompleteVideoOAuthResult {
|
|
22
|
+
credentialId: string;
|
|
23
|
+
kind: string;
|
|
24
|
+
externalEmail?: string;
|
|
25
|
+
externalAccountId: string;
|
|
26
|
+
displayName?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Complete a video-provider OAuth callback. Throws on any failure so the
|
|
31
|
+
* caller can decide how to render the error (HTML page, JSON, redirect).
|
|
32
|
+
*/
|
|
33
|
+
export async function completeVideoOAuth(opts: {
|
|
34
|
+
kind: string;
|
|
35
|
+
userEmail: string;
|
|
36
|
+
code: string;
|
|
37
|
+
redirectUri: string;
|
|
38
|
+
}): Promise<CompleteVideoOAuthResult> {
|
|
39
|
+
const { kind, userEmail, code, redirectUri } = opts;
|
|
40
|
+
const provider = getVideoProvider(kind);
|
|
41
|
+
if (!provider) {
|
|
42
|
+
throw new Error(`No video provider registered for ${kind}`);
|
|
43
|
+
}
|
|
44
|
+
if (!provider.completeOAuth) {
|
|
45
|
+
throw new Error(`Video provider ${kind} does not support OAuth`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const { getDb, schema } = getSchedulingContext();
|
|
49
|
+
const now = new Date().toISOString();
|
|
50
|
+
const credentialId = nanoid();
|
|
51
|
+
|
|
52
|
+
// Insert row up-front so `updateTokens(credentialId, ...)` inside
|
|
53
|
+
// completeOAuth has a stable key to write against.
|
|
54
|
+
await getDb().insert(schema.schedulingCredentials).values({
|
|
55
|
+
id: credentialId,
|
|
56
|
+
type: kind,
|
|
57
|
+
userEmail,
|
|
58
|
+
appId: kind,
|
|
59
|
+
oauthTokenId: credentialId,
|
|
60
|
+
isDefault: false,
|
|
61
|
+
invalid: false,
|
|
62
|
+
createdAt: now,
|
|
63
|
+
updatedAt: now,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
let result: Awaited<ReturnType<NonNullable<typeof provider.completeOAuth>>>;
|
|
67
|
+
try {
|
|
68
|
+
result = await provider.completeOAuth({
|
|
69
|
+
credentialId,
|
|
70
|
+
userEmail,
|
|
71
|
+
code,
|
|
72
|
+
redirectUri,
|
|
73
|
+
});
|
|
74
|
+
} catch (err) {
|
|
75
|
+
// Roll back the credentials row on failure.
|
|
76
|
+
await getDb()
|
|
77
|
+
.delete(schema.schedulingCredentials)
|
|
78
|
+
.where(eq(schema.schedulingCredentials.id, credentialId));
|
|
79
|
+
throw err;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Update the credential row with external identity metadata.
|
|
83
|
+
await getDb()
|
|
84
|
+
.update(schema.schedulingCredentials)
|
|
85
|
+
.set({
|
|
86
|
+
externalEmail: result.externalEmail ?? null,
|
|
87
|
+
displayName: result.displayName ?? null,
|
|
88
|
+
updatedAt: new Date().toISOString(),
|
|
89
|
+
})
|
|
90
|
+
.where(eq(schema.schedulingCredentials.id, credentialId));
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
credentialId,
|
|
94
|
+
kind,
|
|
95
|
+
externalEmail: result.externalEmail,
|
|
96
|
+
externalAccountId: result.externalAccountId,
|
|
97
|
+
displayName: result.displayName,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire-level types shared between server, actions, and React client.
|
|
3
|
+
* These are the primary stable contract of the package.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type SchedulingType =
|
|
7
|
+
| "personal"
|
|
8
|
+
| "collective"
|
|
9
|
+
| "round-robin"
|
|
10
|
+
| "managed";
|
|
11
|
+
|
|
12
|
+
export type BookingStatus =
|
|
13
|
+
| "pending"
|
|
14
|
+
| "confirmed"
|
|
15
|
+
| "cancelled"
|
|
16
|
+
| "rejected"
|
|
17
|
+
| "rescheduled";
|
|
18
|
+
|
|
19
|
+
export type LocationKind =
|
|
20
|
+
| "builtin-video"
|
|
21
|
+
| "zoom"
|
|
22
|
+
| "google-meet"
|
|
23
|
+
| "teams"
|
|
24
|
+
| "phone"
|
|
25
|
+
| "in-person"
|
|
26
|
+
| "custom-link"
|
|
27
|
+
| "attendee-phone"
|
|
28
|
+
| "organizer-phone"
|
|
29
|
+
| "attendee-choice";
|
|
30
|
+
|
|
31
|
+
export interface Location {
|
|
32
|
+
kind: LocationKind;
|
|
33
|
+
/** Provider credential id, if applicable */
|
|
34
|
+
credentialId?: string;
|
|
35
|
+
/** Meeting link override */
|
|
36
|
+
link?: string;
|
|
37
|
+
/** Street address for in-person */
|
|
38
|
+
address?: string;
|
|
39
|
+
/** Phone number for phone/organizer-phone */
|
|
40
|
+
phone?: string;
|
|
41
|
+
/** Display name shown in booking UI */
|
|
42
|
+
label?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type PeriodType = "unlimited" | "rolling" | "range";
|
|
46
|
+
|
|
47
|
+
export interface BookingLimits {
|
|
48
|
+
/** Max bookings in one day */
|
|
49
|
+
perDay?: number;
|
|
50
|
+
/** Max bookings in one week (starting on user's configured start of week) */
|
|
51
|
+
perWeek?: number;
|
|
52
|
+
/** Max bookings in one month */
|
|
53
|
+
perMonth?: number;
|
|
54
|
+
/** Max bookings in one year */
|
|
55
|
+
perYear?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface CustomField {
|
|
59
|
+
id: string;
|
|
60
|
+
type:
|
|
61
|
+
| "text"
|
|
62
|
+
| "textarea"
|
|
63
|
+
| "number"
|
|
64
|
+
| "email"
|
|
65
|
+
| "phone"
|
|
66
|
+
| "select"
|
|
67
|
+
| "multiselect"
|
|
68
|
+
| "boolean"
|
|
69
|
+
| "radio";
|
|
70
|
+
label: string;
|
|
71
|
+
placeholder?: string;
|
|
72
|
+
required: boolean;
|
|
73
|
+
options?: string[];
|
|
74
|
+
/** Default/preset value for this field */
|
|
75
|
+
defaultValue?: string | number | boolean;
|
|
76
|
+
/** Internal identifier stored on booking responses */
|
|
77
|
+
name: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface RecurringEventRule {
|
|
81
|
+
/** iCal RRULE format, e.g. "FREQ=WEEKLY;COUNT=4" */
|
|
82
|
+
rrule: string;
|
|
83
|
+
/** Max number of occurrences */
|
|
84
|
+
count?: number;
|
|
85
|
+
/** How occurrences are labeled on the booker ("Weekly for 4 weeks") */
|
|
86
|
+
description?: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface EventType {
|
|
90
|
+
id: string;
|
|
91
|
+
title: string;
|
|
92
|
+
slug: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
length: number;
|
|
95
|
+
/** Optional additional duration choices */
|
|
96
|
+
durations?: number[];
|
|
97
|
+
hidden: boolean;
|
|
98
|
+
position: number;
|
|
99
|
+
schedulingType: SchedulingType;
|
|
100
|
+
/** If personal, the owner; if team, null (team event types) */
|
|
101
|
+
ownerEmail?: string;
|
|
102
|
+
teamId?: string;
|
|
103
|
+
/** Default schedule ID if not set at event level */
|
|
104
|
+
scheduleId?: string;
|
|
105
|
+
locations: Location[];
|
|
106
|
+
customFields: CustomField[];
|
|
107
|
+
minimumBookingNotice: number;
|
|
108
|
+
beforeEventBuffer: number;
|
|
109
|
+
afterEventBuffer: number;
|
|
110
|
+
slotInterval: number | null;
|
|
111
|
+
periodType: PeriodType;
|
|
112
|
+
periodDays?: number;
|
|
113
|
+
periodStartDate?: string;
|
|
114
|
+
periodEndDate?: string;
|
|
115
|
+
seatsPerTimeSlot?: number;
|
|
116
|
+
requiresConfirmation: boolean;
|
|
117
|
+
disableGuests: boolean;
|
|
118
|
+
hideCalendarNotes: boolean;
|
|
119
|
+
successRedirectUrl?: string;
|
|
120
|
+
bookingLimits?: BookingLimits;
|
|
121
|
+
lockTimeZoneToggle: boolean;
|
|
122
|
+
color?: string;
|
|
123
|
+
eventName?: string;
|
|
124
|
+
recurringEvent?: RecurringEventRule;
|
|
125
|
+
metadata?: Record<string, any>;
|
|
126
|
+
createdAt: string;
|
|
127
|
+
updatedAt: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface Slot {
|
|
131
|
+
/** ISO 8601 start time in UTC */
|
|
132
|
+
start: string;
|
|
133
|
+
/** ISO 8601 end time in UTC */
|
|
134
|
+
end: string;
|
|
135
|
+
/** True if this slot can still be booked (not full for seated events) */
|
|
136
|
+
available: boolean;
|
|
137
|
+
/** Seats remaining, for seated events */
|
|
138
|
+
seatsRemaining?: number;
|
|
139
|
+
/** Assigned host for round-robin events (email) */
|
|
140
|
+
hostEmail?: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface AvailabilityInterval {
|
|
144
|
+
/** "HH:MM" in schedule's timezone */
|
|
145
|
+
startTime: string;
|
|
146
|
+
/** "HH:MM" in schedule's timezone */
|
|
147
|
+
endTime: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface WeeklyAvailability {
|
|
151
|
+
/** 0=Sunday … 6=Saturday, ISO-like */
|
|
152
|
+
day: number;
|
|
153
|
+
intervals: AvailabilityInterval[];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface DateOverride {
|
|
157
|
+
/** YYYY-MM-DD in schedule's timezone */
|
|
158
|
+
date: string;
|
|
159
|
+
/** Empty array = fully blocked */
|
|
160
|
+
intervals: AvailabilityInterval[];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface Schedule {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
timezone: string;
|
|
167
|
+
ownerEmail: string;
|
|
168
|
+
weeklyAvailability: WeeklyAvailability[];
|
|
169
|
+
dateOverrides: DateOverride[];
|
|
170
|
+
isDefault: boolean;
|
|
171
|
+
createdAt: string;
|
|
172
|
+
updatedAt: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface Attendee {
|
|
176
|
+
email: string;
|
|
177
|
+
name: string;
|
|
178
|
+
timezone?: string;
|
|
179
|
+
locale?: string;
|
|
180
|
+
noShow?: boolean;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface BookingReference {
|
|
184
|
+
type: string;
|
|
185
|
+
externalId: string;
|
|
186
|
+
meetingUrl?: string;
|
|
187
|
+
meetingPassword?: string;
|
|
188
|
+
credentialId?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface Booking {
|
|
192
|
+
id: string;
|
|
193
|
+
uid: string;
|
|
194
|
+
eventTypeId: string;
|
|
195
|
+
hostEmail: string;
|
|
196
|
+
title: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
startTime: string;
|
|
199
|
+
endTime: string;
|
|
200
|
+
timezone: string;
|
|
201
|
+
status: BookingStatus;
|
|
202
|
+
location?: Location;
|
|
203
|
+
attendees: Attendee[];
|
|
204
|
+
references: BookingReference[];
|
|
205
|
+
customResponses?: Record<string, any>;
|
|
206
|
+
cancellationReason?: string;
|
|
207
|
+
reschedulingReason?: string;
|
|
208
|
+
cancelToken?: string;
|
|
209
|
+
rescheduleToken?: string;
|
|
210
|
+
fromReschedule?: string;
|
|
211
|
+
iCalUid: string;
|
|
212
|
+
iCalSequence: number;
|
|
213
|
+
recurringEventId?: string;
|
|
214
|
+
paid?: boolean;
|
|
215
|
+
metadata?: Record<string, any>;
|
|
216
|
+
createdAt: string;
|
|
217
|
+
updatedAt: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface Host {
|
|
221
|
+
userEmail: string;
|
|
222
|
+
eventTypeId: string;
|
|
223
|
+
scheduleId?: string;
|
|
224
|
+
isFixed: boolean;
|
|
225
|
+
weight: number;
|
|
226
|
+
priority: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface BusyInterval {
|
|
230
|
+
/** ISO 8601 UTC */
|
|
231
|
+
start: string;
|
|
232
|
+
/** ISO 8601 UTC */
|
|
233
|
+
end: string;
|
|
234
|
+
source?: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export interface Team {
|
|
238
|
+
id: string;
|
|
239
|
+
slug: string;
|
|
240
|
+
name: string;
|
|
241
|
+
logoUrl?: string;
|
|
242
|
+
brandColor?: string;
|
|
243
|
+
darkBrandColor?: string;
|
|
244
|
+
bio?: string;
|
|
245
|
+
hideBranding: boolean;
|
|
246
|
+
metadata?: Record<string, any>;
|
|
247
|
+
createdAt: string;
|
|
248
|
+
updatedAt: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type TeamRole = "owner" | "admin" | "member";
|
|
252
|
+
|
|
253
|
+
export interface TeamMember {
|
|
254
|
+
teamId: string;
|
|
255
|
+
userEmail: string;
|
|
256
|
+
role: TeamRole;
|
|
257
|
+
accepted: boolean;
|
|
258
|
+
joinedAt?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export type WorkflowTrigger =
|
|
262
|
+
| "new-booking"
|
|
263
|
+
| "before-event"
|
|
264
|
+
| "after-event"
|
|
265
|
+
| "reschedule"
|
|
266
|
+
| "cancellation"
|
|
267
|
+
| "no-show";
|
|
268
|
+
|
|
269
|
+
export type WorkflowStepAction =
|
|
270
|
+
| "email-host"
|
|
271
|
+
| "email-attendee"
|
|
272
|
+
| "email-address"
|
|
273
|
+
| "sms-attendee"
|
|
274
|
+
| "sms-host"
|
|
275
|
+
| "sms-number"
|
|
276
|
+
| "webhook";
|
|
277
|
+
|
|
278
|
+
export interface WorkflowStep {
|
|
279
|
+
id: string;
|
|
280
|
+
order: number;
|
|
281
|
+
action: WorkflowStepAction;
|
|
282
|
+
/** Minutes from trigger; negative = before (for before-event), positive = after */
|
|
283
|
+
offsetMinutes: number;
|
|
284
|
+
sendTo?: string;
|
|
285
|
+
emailSubject?: string;
|
|
286
|
+
emailBody?: string;
|
|
287
|
+
smsBody?: string;
|
|
288
|
+
webhookUrl?: string;
|
|
289
|
+
template?: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface Workflow {
|
|
293
|
+
id: string;
|
|
294
|
+
name: string;
|
|
295
|
+
trigger: WorkflowTrigger;
|
|
296
|
+
ownerEmail?: string;
|
|
297
|
+
teamId?: string;
|
|
298
|
+
activeOnEventTypeIds: string[];
|
|
299
|
+
steps: WorkflowStep[];
|
|
300
|
+
disabled: boolean;
|
|
301
|
+
createdAt: string;
|
|
302
|
+
updatedAt: string;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export type RoutingFormFieldType =
|
|
306
|
+
| "text"
|
|
307
|
+
| "email"
|
|
308
|
+
| "phone"
|
|
309
|
+
| "number"
|
|
310
|
+
| "select"
|
|
311
|
+
| "multi";
|
|
312
|
+
|
|
313
|
+
export interface RoutingFormField {
|
|
314
|
+
id: string;
|
|
315
|
+
name: string;
|
|
316
|
+
label: string;
|
|
317
|
+
type: RoutingFormFieldType;
|
|
318
|
+
required: boolean;
|
|
319
|
+
options?: string[];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface RoutingFormRule {
|
|
323
|
+
id: string;
|
|
324
|
+
/** Array of `{fieldId, op, value}` expressions ANDed together */
|
|
325
|
+
conditions: {
|
|
326
|
+
fieldId: string;
|
|
327
|
+
op: "equals" | "not-equals" | "contains" | "starts-with" | "in";
|
|
328
|
+
value: string | string[];
|
|
329
|
+
}[];
|
|
330
|
+
action:
|
|
331
|
+
| { kind: "event-type"; eventTypeId: string; teamId?: string }
|
|
332
|
+
| { kind: "external-url"; url: string }
|
|
333
|
+
| { kind: "custom-message"; message: string };
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export interface RoutingForm {
|
|
337
|
+
id: string;
|
|
338
|
+
name: string;
|
|
339
|
+
description?: string;
|
|
340
|
+
ownerEmail?: string;
|
|
341
|
+
teamId?: string;
|
|
342
|
+
fields: RoutingFormField[];
|
|
343
|
+
rules: RoutingFormRule[];
|
|
344
|
+
/** Action taken when no rules match */
|
|
345
|
+
fallback:
|
|
346
|
+
| { kind: "event-type"; eventTypeId: string }
|
|
347
|
+
| { kind: "external-url"; url: string }
|
|
348
|
+
| { kind: "custom-message"; message: string };
|
|
349
|
+
createdAt: string;
|
|
350
|
+
updatedAt: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface HashedLink {
|
|
354
|
+
id: string;
|
|
355
|
+
hash: string;
|
|
356
|
+
eventTypeId: string;
|
|
357
|
+
expiresAt?: string;
|
|
358
|
+
isSingleUse: boolean;
|
|
359
|
+
usedAt?: string;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/** Round-robin assignment strategy */
|
|
363
|
+
export type RoundRobinStrategy =
|
|
364
|
+
| "lowest-recent-bookings"
|
|
365
|
+
| "weighted"
|
|
366
|
+
| "calibrated";
|
package/src/version.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VERSION = "0.1.0";
|