@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,30 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
5
|
+
import { assertTeamAdmin } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Invite a user to a team",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
teamId: z.string(),
|
|
11
|
+
email: z.string(),
|
|
12
|
+
role: z.enum(["owner", "admin", "member"]).default("member"),
|
|
13
|
+
}),
|
|
14
|
+
run: async (args) => {
|
|
15
|
+
await assertTeamAdmin(args.teamId);
|
|
16
|
+
const { getDb, schema } = getSchedulingContext();
|
|
17
|
+
const token = nanoid(24);
|
|
18
|
+
const id = nanoid();
|
|
19
|
+
await getDb().insert(schema.teamMembers).values({
|
|
20
|
+
id,
|
|
21
|
+
teamId: args.teamId,
|
|
22
|
+
userEmail: args.email,
|
|
23
|
+
role: args.role,
|
|
24
|
+
accepted: false,
|
|
25
|
+
inviteToken: token,
|
|
26
|
+
invitedAt: new Date().toISOString(),
|
|
27
|
+
});
|
|
28
|
+
return { inviteToken: token, memberId: id };
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { listBookings } from "../server/bookings-repo.js";
|
|
4
|
+
import { currentUserEmail } from "./_helpers.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"List bookings the current user owns, hosts, has been shared on, or that match the active org's visibility — filtered by status / range",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
status: z
|
|
11
|
+
.enum(["upcoming", "past", "unconfirmed", "cancelled", "confirmed"])
|
|
12
|
+
.or(z.literal("recurring"))
|
|
13
|
+
.optional(),
|
|
14
|
+
eventTypeId: z.string().optional(),
|
|
15
|
+
attendeeEmail: z.string().optional(),
|
|
16
|
+
from: z.string().optional(),
|
|
17
|
+
to: z.string().optional(),
|
|
18
|
+
limit: z.number().optional(),
|
|
19
|
+
/**
|
|
20
|
+
* If true, narrow to bookings where you are the host. Defaults to false
|
|
21
|
+
* so org-shared bookings + bookings shared with you appear too.
|
|
22
|
+
*/
|
|
23
|
+
onlyMine: z.boolean().optional().default(false),
|
|
24
|
+
}),
|
|
25
|
+
run: async (args) => {
|
|
26
|
+
const email = currentUserEmail();
|
|
27
|
+
const { onlyMine, ...rest } = args;
|
|
28
|
+
return {
|
|
29
|
+
bookings: await listBookings({
|
|
30
|
+
...rest,
|
|
31
|
+
useAccessFilter: true,
|
|
32
|
+
hostEmail: onlyMine ? email : undefined,
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { listCalendarProviders } from "../server/providers/registry.js";
|
|
6
|
+
import { currentUserEmail } from "./_helpers.js";
|
|
7
|
+
|
|
8
|
+
export default defineAction({
|
|
9
|
+
description: "List calendar integrations (available + installed)",
|
|
10
|
+
schema: z.object({}),
|
|
11
|
+
run: async () => {
|
|
12
|
+
const { getDb, schema } = getSchedulingContext();
|
|
13
|
+
const email = currentUserEmail();
|
|
14
|
+
const credentials = await getDb()
|
|
15
|
+
.select()
|
|
16
|
+
.from(schema.schedulingCredentials)
|
|
17
|
+
.where(eq(schema.schedulingCredentials.userEmail, email));
|
|
18
|
+
return {
|
|
19
|
+
available: listCalendarProviders().map((p) => ({
|
|
20
|
+
kind: p.kind,
|
|
21
|
+
label: p.label,
|
|
22
|
+
})),
|
|
23
|
+
installed: credentials,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { listEventTypes } from "../server/event-types-repo.js";
|
|
4
|
+
import { assertTeamMember, currentUserEmailOrNull } from "./_helpers.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"List event types visible to the current user — owned, shared, org-visible, or scoped to a team the user is a member of",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
teamId: z.string().optional(),
|
|
11
|
+
includeHidden: z.boolean().optional().default(false),
|
|
12
|
+
}),
|
|
13
|
+
run: async (args) => {
|
|
14
|
+
if (!currentUserEmailOrNull()) return { eventTypes: [] };
|
|
15
|
+
if (args.teamId) {
|
|
16
|
+
await assertTeamMember(args.teamId);
|
|
17
|
+
return {
|
|
18
|
+
eventTypes: await listEventTypes({
|
|
19
|
+
teamId: args.teamId,
|
|
20
|
+
includeHidden: args.includeHidden,
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
eventTypes: await listEventTypes({
|
|
26
|
+
useAccessFilter: true,
|
|
27
|
+
includeHidden: args.includeHidden,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { eq, desc } from "drizzle-orm";
|
|
4
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description: "List responses to a routing form",
|
|
8
|
+
schema: z.object({ formId: z.string(), limit: z.number().optional() }),
|
|
9
|
+
run: async (args) => {
|
|
10
|
+
const { getDb, schema } = getSchedulingContext();
|
|
11
|
+
const rows = await getDb()
|
|
12
|
+
.select()
|
|
13
|
+
.from(schema.routingFormResponses)
|
|
14
|
+
.where(eq(schema.routingFormResponses.formId, args.formId))
|
|
15
|
+
.orderBy(desc(schema.routingFormResponses.createdAt))
|
|
16
|
+
.limit(args.limit ?? 100);
|
|
17
|
+
return {
|
|
18
|
+
responses: rows.map((r: any) => ({
|
|
19
|
+
...r,
|
|
20
|
+
response: JSON.parse(r.response),
|
|
21
|
+
})),
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { accessFilter } from "@agent-native/core/sharing";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
import { assertTeamMember, currentUserEmailOrNull } from "./_helpers.js";
|
|
7
|
+
|
|
8
|
+
export default defineAction({
|
|
9
|
+
description:
|
|
10
|
+
"List routing forms visible to the current user — owned, shared, org-visible, or scoped to a team the user is a member of",
|
|
11
|
+
schema: z.object({ teamId: z.string().optional() }),
|
|
12
|
+
run: async (args) => {
|
|
13
|
+
const { getDb, schema } = getSchedulingContext();
|
|
14
|
+
if (!currentUserEmailOrNull()) return { forms: [] };
|
|
15
|
+
if (args.teamId) {
|
|
16
|
+
await assertTeamMember(args.teamId);
|
|
17
|
+
const rows = await getDb()
|
|
18
|
+
.select()
|
|
19
|
+
.from(schema.routingForms)
|
|
20
|
+
.where(
|
|
21
|
+
and(
|
|
22
|
+
eq(schema.routingForms.teamId, args.teamId),
|
|
23
|
+
accessFilter(schema.routingForms, schema.routingFormShares),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
return { forms: rows };
|
|
27
|
+
}
|
|
28
|
+
const rows = await getDb()
|
|
29
|
+
.select()
|
|
30
|
+
.from(schema.routingForms)
|
|
31
|
+
.where(accessFilter(schema.routingForms, schema.routingFormShares));
|
|
32
|
+
return { forms: rows };
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { listSchedules } from "../server/schedules-repo.js";
|
|
4
|
+
import { currentUserEmailOrNull } from "./_helpers.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"List availability schedules visible to the current user — owned, shared, or matching org visibility",
|
|
9
|
+
schema: z.object({}),
|
|
10
|
+
run: async () => {
|
|
11
|
+
if (!currentUserEmailOrNull()) return { schedules: [] };
|
|
12
|
+
return {
|
|
13
|
+
schedules: await listSchedules({ useAccessFilter: true }),
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { getCalendarProvider } from "../server/providers/registry.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description:
|
|
9
|
+
"List all calendars a credential has access to, with selected flag",
|
|
10
|
+
schema: z.object({ credentialId: z.string() }),
|
|
11
|
+
run: async (args) => {
|
|
12
|
+
const { getDb, schema } = getSchedulingContext();
|
|
13
|
+
const cred = await getDb()
|
|
14
|
+
.select()
|
|
15
|
+
.from(schema.schedulingCredentials)
|
|
16
|
+
.where(eq(schema.schedulingCredentials.id, args.credentialId));
|
|
17
|
+
if (!cred[0]) throw new Error("Credential not found");
|
|
18
|
+
const provider = getCalendarProvider(cred[0].type);
|
|
19
|
+
if (!provider) throw new Error(`No provider for ${cred[0].type}`);
|
|
20
|
+
const all = await provider.listCalendars({
|
|
21
|
+
credentialId: args.credentialId,
|
|
22
|
+
});
|
|
23
|
+
const selected = await getDb()
|
|
24
|
+
.select({ externalId: schema.selectedCalendars.externalId })
|
|
25
|
+
.from(schema.selectedCalendars)
|
|
26
|
+
.where(eq(schema.selectedCalendars.credentialId, args.credentialId));
|
|
27
|
+
const selectedSet = new Set(selected.map((r: any) => r.externalId));
|
|
28
|
+
const destination = await getDb()
|
|
29
|
+
.select({ externalId: schema.destinationCalendars.externalId })
|
|
30
|
+
.from(schema.destinationCalendars)
|
|
31
|
+
.where(eq(schema.destinationCalendars.credentialId, args.credentialId));
|
|
32
|
+
const destinationId = destination[0]?.externalId;
|
|
33
|
+
return {
|
|
34
|
+
calendars: all.map((c) => ({
|
|
35
|
+
...c,
|
|
36
|
+
isSelected: selectedSet.has(c.externalId),
|
|
37
|
+
isDestination: c.externalId === destinationId,
|
|
38
|
+
})),
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { accessFilter } from "@agent-native/core/sharing";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
import { assertTeamMember, currentUserEmailOrNull } from "./_helpers.js";
|
|
7
|
+
|
|
8
|
+
export default defineAction({
|
|
9
|
+
description:
|
|
10
|
+
"List workflows visible to the current user — owned, shared, org-visible, or scoped to a team the user is a member of",
|
|
11
|
+
schema: z.object({ teamId: z.string().optional() }),
|
|
12
|
+
run: async (args) => {
|
|
13
|
+
const { getDb, schema } = getSchedulingContext();
|
|
14
|
+
if (!currentUserEmailOrNull()) return { workflows: [] };
|
|
15
|
+
if (args.teamId) {
|
|
16
|
+
await assertTeamMember(args.teamId);
|
|
17
|
+
const rows = await getDb()
|
|
18
|
+
.select()
|
|
19
|
+
.from(schema.workflows)
|
|
20
|
+
.where(
|
|
21
|
+
and(
|
|
22
|
+
eq(schema.workflows.teamId, args.teamId),
|
|
23
|
+
accessFilter(schema.workflows, schema.workflowShares),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
return { workflows: rows };
|
|
27
|
+
}
|
|
28
|
+
const rows = await getDb()
|
|
29
|
+
.select()
|
|
30
|
+
.from(schema.workflows)
|
|
31
|
+
.where(accessFilter(schema.workflows, schema.workflowShares));
|
|
32
|
+
return { workflows: rows };
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { markNoShow } from "../server/booking-service.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description: "Mark an attendee as no-show on a booking",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
uid: z.string(),
|
|
9
|
+
attendeeEmail: z.string(),
|
|
10
|
+
}),
|
|
11
|
+
run: async (args) => {
|
|
12
|
+
await markNoShow(args.uid, args.attendeeEmail);
|
|
13
|
+
return { ok: true };
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { currentUserEmail } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description:
|
|
9
|
+
"Bust the calendar cache for a user (force fresh busy-time lookup)",
|
|
10
|
+
schema: z.object({ userEmail: z.string().optional() }),
|
|
11
|
+
run: async (args) => {
|
|
12
|
+
const { getDb, schema } = getSchedulingContext();
|
|
13
|
+
const email = args.userEmail ?? currentUserEmail();
|
|
14
|
+
// Delete cache rows for all of this user's credentials
|
|
15
|
+
const creds = await getDb()
|
|
16
|
+
.select({ id: schema.schedulingCredentials.id })
|
|
17
|
+
.from(schema.schedulingCredentials)
|
|
18
|
+
.where(eq(schema.schedulingCredentials.userEmail, email));
|
|
19
|
+
for (const c of creds) {
|
|
20
|
+
await getDb()
|
|
21
|
+
.delete(schema.calendarCache)
|
|
22
|
+
.where(eq(schema.calendarCache.credentialId, c.id));
|
|
23
|
+
}
|
|
24
|
+
return { ok: true, credentialsBusted: creds.length };
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { getBookingByUid } from "../server/bookings-repo.js";
|
|
5
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Remove an attendee from a booking",
|
|
9
|
+
schema: z.object({ uid: z.string(), email: z.string() }),
|
|
10
|
+
run: async (args) => {
|
|
11
|
+
const booking = await getBookingByUid(args.uid);
|
|
12
|
+
if (!booking) throw new Error(`Booking ${args.uid} not found`);
|
|
13
|
+
const { getDb, schema } = getSchedulingContext();
|
|
14
|
+
await getDb()
|
|
15
|
+
.delete(schema.bookingAttendees)
|
|
16
|
+
.where(
|
|
17
|
+
and(
|
|
18
|
+
eq(schema.bookingAttendees.bookingId, booking.id),
|
|
19
|
+
eq(schema.bookingAttendees.email, args.email),
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
return { booking: await getBookingByUid(args.uid) };
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { removeDateOverride } from "../server/schedules-repo.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description: "Remove a date-specific override from a schedule",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
scheduleId: z.string(),
|
|
9
|
+
date: z.string(),
|
|
10
|
+
}),
|
|
11
|
+
run: async (args) => {
|
|
12
|
+
await removeDateOverride(args.scheduleId, args.date);
|
|
13
|
+
return { ok: true };
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
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: "Remove a user from a team",
|
|
9
|
+
schema: z.object({ teamId: z.string(), email: z.string() }),
|
|
10
|
+
run: async (args) => {
|
|
11
|
+
await assertTeamAdmin(args.teamId);
|
|
12
|
+
const { getDb, schema } = getSchedulingContext();
|
|
13
|
+
await getDb()
|
|
14
|
+
.delete(schema.teamMembers)
|
|
15
|
+
.where(
|
|
16
|
+
and(
|
|
17
|
+
eq(schema.teamMembers.teamId, args.teamId),
|
|
18
|
+
eq(schema.teamMembers.userEmail, args.email),
|
|
19
|
+
),
|
|
20
|
+
);
|
|
21
|
+
return { ok: true };
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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: "Reorder event types by passing the desired id order",
|
|
8
|
+
schema: z.object({ ids: z.array(z.string()) }),
|
|
9
|
+
run: async (args) => {
|
|
10
|
+
for (let i = 0; i < args.ids.length; i++) {
|
|
11
|
+
await assertAccess("event-type", args.ids[i], "editor");
|
|
12
|
+
}
|
|
13
|
+
for (let i = 0; i < args.ids.length; i++) {
|
|
14
|
+
await updateEventType(args.ids[i], { position: i });
|
|
15
|
+
}
|
|
16
|
+
return { ok: true };
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { rescheduleBooking } from "../server/booking-service.js";
|
|
4
|
+
import { getBookingByUid } from "../server/bookings-repo.js";
|
|
5
|
+
import { currentUserEmailOrNull } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Reschedule a booking to a new start/end time",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
uid: z.string(),
|
|
11
|
+
newStartTime: z.string(),
|
|
12
|
+
newEndTime: z.string(),
|
|
13
|
+
reason: z.string().optional(),
|
|
14
|
+
rescheduledBy: z.enum(["attendee", "host"]).optional(),
|
|
15
|
+
token: z.string().optional(),
|
|
16
|
+
}),
|
|
17
|
+
run: async (args) => ({
|
|
18
|
+
booking: await rescheduleBookingAfterAccessCheck(args),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
async function rescheduleBookingAfterAccessCheck(args: {
|
|
23
|
+
uid: string;
|
|
24
|
+
newStartTime: string;
|
|
25
|
+
newEndTime: string;
|
|
26
|
+
reason?: string;
|
|
27
|
+
rescheduledBy?: "attendee" | "host";
|
|
28
|
+
token?: string;
|
|
29
|
+
}) {
|
|
30
|
+
const booking = await getBookingByUid(args.uid);
|
|
31
|
+
if (!booking) throw new Error(`Booking ${args.uid} not found`);
|
|
32
|
+
const userEmail = currentUserEmailOrNull();
|
|
33
|
+
const isHost = !!userEmail && userEmail === booking.hostEmail;
|
|
34
|
+
const hasToken = !!args.token && args.token === booking.rescheduleToken;
|
|
35
|
+
if (!isHost && !hasToken) {
|
|
36
|
+
throw new Error("Not authorized to reschedule this booking");
|
|
37
|
+
}
|
|
38
|
+
return rescheduleBooking({
|
|
39
|
+
uid: args.uid,
|
|
40
|
+
newStartTime: args.newStartTime,
|
|
41
|
+
newEndTime: args.newEndTime,
|
|
42
|
+
reason: args.reason,
|
|
43
|
+
rescheduledBy: args.rescheduledBy,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description: "Revoke a private hashed link",
|
|
8
|
+
schema: z.object({ hash: z.string() }),
|
|
9
|
+
run: async (args) => {
|
|
10
|
+
const { getDb, schema } = getSchedulingContext();
|
|
11
|
+
await getDb()
|
|
12
|
+
.delete(schema.hashedLinks)
|
|
13
|
+
.where(eq(schema.hashedLinks.hash, args.hash));
|
|
14
|
+
return { ok: true };
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { getBookingByUid } from "../server/bookings-repo.js";
|
|
4
|
+
import { getSchedulingContext } from "../server/context.js";
|
|
5
|
+
|
|
6
|
+
export default defineAction({
|
|
7
|
+
description:
|
|
8
|
+
"Return the public reschedule URL for a booking (send it to an attendee)",
|
|
9
|
+
schema: z.object({ uid: z.string() }),
|
|
10
|
+
run: async (args) => {
|
|
11
|
+
const booking = await getBookingByUid(args.uid);
|
|
12
|
+
if (!booking) throw new Error(`Booking ${args.uid} not found`);
|
|
13
|
+
const baseUrl = getSchedulingContext().publicBaseUrl ?? "";
|
|
14
|
+
return {
|
|
15
|
+
url: `${baseUrl}/reschedule/${booking.uid}?token=${booking.rescheduleToken}`,
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
export default defineAction({
|
|
5
|
+
description:
|
|
6
|
+
"Set appearance settings (theme, brand colors, hide branding) — a convenience wrapper over update-profile",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
theme: z.enum(["light", "dark", "system"]).optional(),
|
|
9
|
+
brandColor: z.string().optional(),
|
|
10
|
+
darkBrandColor: z.string().optional(),
|
|
11
|
+
hideBranding: z.boolean().optional(),
|
|
12
|
+
}),
|
|
13
|
+
run: async (args) => {
|
|
14
|
+
const core: any = await import("@agent-native/core");
|
|
15
|
+
if (core.writeSetting) {
|
|
16
|
+
const existing = (await core.readSetting?.("profile-settings")) ?? {};
|
|
17
|
+
await core.writeSetting("profile-settings", {
|
|
18
|
+
...(existing as object),
|
|
19
|
+
...args,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return { ok: true };
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { currentUserEmail } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Mark a video app credential as the user's default",
|
|
9
|
+
schema: z.object({ credentialId: z.string() }),
|
|
10
|
+
run: async (args) => {
|
|
11
|
+
const { getDb, schema } = getSchedulingContext();
|
|
12
|
+
const email = currentUserEmail();
|
|
13
|
+
const allVideo = await getDb()
|
|
14
|
+
.select()
|
|
15
|
+
.from(schema.schedulingCredentials)
|
|
16
|
+
.where(eq(schema.schedulingCredentials.userEmail, email));
|
|
17
|
+
for (const c of allVideo) {
|
|
18
|
+
await getDb()
|
|
19
|
+
.update(schema.schedulingCredentials)
|
|
20
|
+
.set({ isDefault: c.id === args.credentialId })
|
|
21
|
+
.where(eq(schema.schedulingCredentials.id, c.id));
|
|
22
|
+
}
|
|
23
|
+
return { ok: true };
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { assertAccess } from "@agent-native/core/sharing";
|
|
4
|
+
import { setDefaultSchedule } from "../server/schedules-repo.js";
|
|
5
|
+
import { currentUserEmail } from "./_helpers.js";
|
|
6
|
+
|
|
7
|
+
export default defineAction({
|
|
8
|
+
description: "Mark a schedule as the user's default",
|
|
9
|
+
schema: z.object({ id: z.string() }),
|
|
10
|
+
run: async (args) => {
|
|
11
|
+
await assertAccess("schedule", args.id, "editor");
|
|
12
|
+
await setDefaultSchedule(currentUserEmail(), args.id);
|
|
13
|
+
return { ok: true };
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { 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:
|
|
10
|
+
"Set the destination calendar for new events (optionally scoped to an event type)",
|
|
11
|
+
schema: z.object({
|
|
12
|
+
credentialId: z.string(),
|
|
13
|
+
externalId: z.string(),
|
|
14
|
+
eventTypeId: z.string().optional(),
|
|
15
|
+
}),
|
|
16
|
+
run: async (args) => {
|
|
17
|
+
const { getDb, schema } = getSchedulingContext();
|
|
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()
|
|
24
|
+
.delete(schema.destinationCalendars)
|
|
25
|
+
.where(eq(schema.destinationCalendars.credentialId, args.credentialId));
|
|
26
|
+
await getDb()
|
|
27
|
+
.insert(schema.destinationCalendars)
|
|
28
|
+
.values({
|
|
29
|
+
id: nanoid(),
|
|
30
|
+
credentialId: args.credentialId,
|
|
31
|
+
userEmail: currentUserEmail(),
|
|
32
|
+
integration: cred[0].type,
|
|
33
|
+
externalId: args.externalId,
|
|
34
|
+
eventTypeId: args.eventTypeId ?? null,
|
|
35
|
+
createdAt: new Date().toISOString(),
|
|
36
|
+
});
|
|
37
|
+
return { ok: true };
|
|
38
|
+
},
|
|
39
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
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: "Set the hosts assigned to an event type",
|
|
9
|
+
schema: z.object({
|
|
10
|
+
eventTypeId: z.string(),
|
|
11
|
+
hosts: z.array(
|
|
12
|
+
z.object({
|
|
13
|
+
userEmail: z.string(),
|
|
14
|
+
isFixed: z.boolean().optional().default(false),
|
|
15
|
+
weight: z.number().optional().default(1),
|
|
16
|
+
priority: z.number().optional().default(2),
|
|
17
|
+
scheduleId: z.string().optional(),
|
|
18
|
+
}),
|
|
19
|
+
),
|
|
20
|
+
}),
|
|
21
|
+
run: async (args) => {
|
|
22
|
+
await assertAccess("event-type", args.eventTypeId, "editor");
|
|
23
|
+
const { getDb, schema } = getSchedulingContext();
|
|
24
|
+
const now = new Date().toISOString();
|
|
25
|
+
await getDb()
|
|
26
|
+
.delete(schema.eventTypeHosts)
|
|
27
|
+
.where(eq(schema.eventTypeHosts.eventTypeId, args.eventTypeId));
|
|
28
|
+
for (const h of args.hosts) {
|
|
29
|
+
await getDb()
|
|
30
|
+
.insert(schema.eventTypeHosts)
|
|
31
|
+
.values({
|
|
32
|
+
eventTypeId: args.eventTypeId,
|
|
33
|
+
userEmail: h.userEmail,
|
|
34
|
+
isFixed: h.isFixed ?? false,
|
|
35
|
+
weight: h.weight ?? 1,
|
|
36
|
+
priority: h.priority ?? 2,
|
|
37
|
+
scheduleId: h.scheduleId ?? null,
|
|
38
|
+
createdAt: now,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return { ok: true };
|
|
42
|
+
},
|
|
43
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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: "Set the location(s) on an event type",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
id: z.string(),
|
|
10
|
+
locations: z.array(z.any()),
|
|
11
|
+
}),
|
|
12
|
+
run: async (args) => {
|
|
13
|
+
await assertAccess("event-type", args.id, "editor");
|
|
14
|
+
return {
|
|
15
|
+
eventType: await updateEventType(args.id, { locations: args.locations }),
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
});
|