@agent-native/scheduling 0.1.12 → 0.1.14
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/dist/actions/_helpers.d.ts.map +1 -1
- package/dist/actions/_helpers.js.map +1 -1
- package/dist/actions/accept-team-invite.d.ts.map +1 -1
- package/dist/actions/accept-team-invite.js +1 -1
- package/dist/actions/accept-team-invite.js.map +1 -1
- package/dist/actions/add-booking-attendee.d.ts.map +1 -1
- package/dist/actions/add-booking-attendee.js +1 -1
- package/dist/actions/add-booking-attendee.js.map +1 -1
- package/dist/actions/add-booking-note.d.ts.map +1 -1
- package/dist/actions/add-booking-note.js +1 -1
- package/dist/actions/add-booking-note.js.map +1 -1
- package/dist/actions/add-date-override.d.ts.map +1 -1
- package/dist/actions/add-date-override.js.map +1 -1
- package/dist/actions/add-private-link.d.ts.map +1 -1
- package/dist/actions/add-private-link.js +2 -2
- package/dist/actions/add-private-link.js.map +1 -1
- package/dist/actions/assign-round-robin-host.d.ts +1 -1
- package/dist/actions/assign-round-robin-host.d.ts.map +1 -1
- package/dist/actions/assign-round-robin-host.js +3 -3
- package/dist/actions/assign-round-robin-host.js.map +1 -1
- package/dist/actions/cancel-booking.d.ts.map +1 -1
- package/dist/actions/cancel-booking.js.map +1 -1
- package/dist/actions/check-availability.d.ts +2 -2
- package/dist/actions/check-availability.d.ts.map +1 -1
- package/dist/actions/check-availability.js +1 -1
- package/dist/actions/check-availability.js.map +1 -1
- package/dist/actions/confirm-booking.d.ts.map +1 -1
- package/dist/actions/confirm-booking.js.map +1 -1
- package/dist/actions/connect-calendar.d.ts.map +1 -1
- package/dist/actions/connect-calendar.js +1 -1
- package/dist/actions/connect-calendar.js.map +1 -1
- package/dist/actions/connect-video.d.ts.map +1 -1
- package/dist/actions/connect-video.js.map +1 -1
- package/dist/actions/create-booking.d.ts +4 -4
- package/dist/actions/create-booking.d.ts.map +1 -1
- package/dist/actions/create-booking.js +1 -1
- package/dist/actions/create-booking.js.map +1 -1
- package/dist/actions/create-event-type.d.ts +1 -1
- package/dist/actions/create-event-type.d.ts.map +1 -1
- package/dist/actions/create-event-type.js.map +1 -1
- package/dist/actions/create-host-group.d.ts.map +1 -1
- package/dist/actions/create-host-group.js +1 -1
- package/dist/actions/create-host-group.js.map +1 -1
- package/dist/actions/create-routing-form.d.ts.map +1 -1
- package/dist/actions/create-routing-form.js +1 -1
- package/dist/actions/create-routing-form.js.map +1 -1
- package/dist/actions/create-schedule.d.ts.map +1 -1
- package/dist/actions/create-schedule.js.map +1 -1
- package/dist/actions/create-team.d.ts.map +1 -1
- package/dist/actions/create-team.js +1 -1
- package/dist/actions/create-team.js.map +1 -1
- package/dist/actions/create-workflow.d.ts +2 -2
- package/dist/actions/create-workflow.d.ts.map +1 -1
- package/dist/actions/create-workflow.js +1 -1
- package/dist/actions/create-workflow.js.map +1 -1
- package/dist/actions/delete-event-type.d.ts.map +1 -1
- package/dist/actions/delete-event-type.js +1 -1
- package/dist/actions/delete-event-type.js.map +1 -1
- package/dist/actions/delete-routing-form.d.ts.map +1 -1
- package/dist/actions/delete-routing-form.js +2 -2
- package/dist/actions/delete-routing-form.js.map +1 -1
- package/dist/actions/delete-schedule.d.ts.map +1 -1
- package/dist/actions/delete-schedule.js +1 -1
- package/dist/actions/delete-schedule.js.map +1 -1
- package/dist/actions/delete-workflow.d.ts.map +1 -1
- package/dist/actions/delete-workflow.js +2 -2
- package/dist/actions/delete-workflow.js.map +1 -1
- package/dist/actions/disconnect-calendar.d.ts.map +1 -1
- package/dist/actions/disconnect-calendar.js +1 -1
- package/dist/actions/disconnect-calendar.js.map +1 -1
- package/dist/actions/duplicate-event-type.d.ts.map +1 -1
- package/dist/actions/duplicate-event-type.js.map +1 -1
- package/dist/actions/export-bookings-csv.d.ts.map +1 -1
- package/dist/actions/export-bookings-csv.js.map +1 -1
- package/dist/actions/find-available-slot.d.ts.map +1 -1
- package/dist/actions/find-available-slot.js +1 -1
- package/dist/actions/find-available-slot.js.map +1 -1
- package/dist/actions/get-availability.d.ts +1 -1
- package/dist/actions/get-availability.d.ts.map +1 -1
- package/dist/actions/get-availability.js.map +1 -1
- package/dist/actions/get-booking.d.ts.map +1 -1
- package/dist/actions/get-booking.js.map +1 -1
- package/dist/actions/get-event-type.d.ts.map +1 -1
- package/dist/actions/get-event-type.js.map +1 -1
- package/dist/actions/install-conferencing-app.d.ts +1 -1
- package/dist/actions/install-conferencing-app.d.ts.map +1 -1
- package/dist/actions/install-conferencing-app.js +1 -1
- package/dist/actions/install-conferencing-app.js.map +1 -1
- package/dist/actions/invite-team-member.d.ts +1 -1
- package/dist/actions/invite-team-member.d.ts.map +1 -1
- package/dist/actions/invite-team-member.js +1 -1
- package/dist/actions/invite-team-member.js.map +1 -1
- package/dist/actions/list-bookings.d.ts +1 -1
- package/dist/actions/list-bookings.d.ts.map +1 -1
- package/dist/actions/list-bookings.js.map +1 -1
- package/dist/actions/list-calendar-integrations.d.ts.map +1 -1
- package/dist/actions/list-calendar-integrations.js +1 -1
- package/dist/actions/list-calendar-integrations.js.map +1 -1
- package/dist/actions/list-event-types.d.ts.map +1 -1
- package/dist/actions/list-event-types.js.map +1 -1
- package/dist/actions/list-routing-form-responses.d.ts.map +1 -1
- package/dist/actions/list-routing-form-responses.js +1 -1
- package/dist/actions/list-routing-form-responses.js.map +1 -1
- package/dist/actions/list-routing-forms.d.ts.map +1 -1
- package/dist/actions/list-routing-forms.js +2 -2
- package/dist/actions/list-routing-forms.js.map +1 -1
- package/dist/actions/list-schedules.d.ts.map +1 -1
- package/dist/actions/list-schedules.js.map +1 -1
- package/dist/actions/list-selected-calendars.d.ts +2 -2
- package/dist/actions/list-selected-calendars.d.ts.map +1 -1
- package/dist/actions/list-selected-calendars.js +1 -1
- package/dist/actions/list-selected-calendars.js.map +1 -1
- package/dist/actions/list-workflows.d.ts.map +1 -1
- package/dist/actions/list-workflows.js +2 -2
- package/dist/actions/list-workflows.js.map +1 -1
- package/dist/actions/mark-no-show.d.ts.map +1 -1
- package/dist/actions/mark-no-show.js.map +1 -1
- package/dist/actions/refresh-busy-times.d.ts.map +1 -1
- package/dist/actions/refresh-busy-times.js +1 -1
- package/dist/actions/refresh-busy-times.js.map +1 -1
- package/dist/actions/remove-booking-attendee.d.ts.map +1 -1
- package/dist/actions/remove-booking-attendee.js +1 -1
- package/dist/actions/remove-booking-attendee.js.map +1 -1
- package/dist/actions/remove-date-override.d.ts.map +1 -1
- package/dist/actions/remove-date-override.js.map +1 -1
- package/dist/actions/remove-team-member.d.ts.map +1 -1
- package/dist/actions/remove-team-member.js +1 -1
- package/dist/actions/remove-team-member.js.map +1 -1
- package/dist/actions/reorder-event-types.d.ts.map +1 -1
- package/dist/actions/reorder-event-types.js +1 -1
- package/dist/actions/reorder-event-types.js.map +1 -1
- package/dist/actions/reschedule-booking.d.ts.map +1 -1
- package/dist/actions/reschedule-booking.js.map +1 -1
- package/dist/actions/revoke-private-link.d.ts.map +1 -1
- package/dist/actions/revoke-private-link.js +1 -1
- package/dist/actions/revoke-private-link.js.map +1 -1
- package/dist/actions/send-reschedule-link.d.ts.map +1 -1
- package/dist/actions/send-reschedule-link.js.map +1 -1
- package/dist/actions/set-appearance.d.ts +1 -1
- package/dist/actions/set-appearance.d.ts.map +1 -1
- package/dist/actions/set-default-conferencing-app.d.ts.map +1 -1
- package/dist/actions/set-default-conferencing-app.js +1 -1
- package/dist/actions/set-default-conferencing-app.js.map +1 -1
- package/dist/actions/set-default-schedule.d.ts.map +1 -1
- package/dist/actions/set-default-schedule.js +1 -1
- package/dist/actions/set-default-schedule.js.map +1 -1
- package/dist/actions/set-destination-calendar.d.ts.map +1 -1
- package/dist/actions/set-destination-calendar.js +1 -1
- package/dist/actions/set-destination-calendar.js.map +1 -1
- package/dist/actions/set-event-type-hosts.d.ts.map +1 -1
- package/dist/actions/set-event-type-hosts.js +2 -2
- package/dist/actions/set-event-type-hosts.js.map +1 -1
- package/dist/actions/set-event-type-location.d.ts.map +1 -1
- package/dist/actions/set-event-type-location.js +1 -1
- package/dist/actions/set-event-type-location.js.map +1 -1
- package/dist/actions/set-host-availability-override.d.ts.map +1 -1
- package/dist/actions/set-host-availability-override.js +1 -1
- package/dist/actions/set-host-availability-override.js.map +1 -1
- package/dist/actions/set-team-branding.d.ts.map +1 -1
- package/dist/actions/set-team-branding.js +1 -1
- package/dist/actions/set-team-branding.js.map +1 -1
- package/dist/actions/submit-routing-form-response.d.ts.map +1 -1
- package/dist/actions/submit-routing-form-response.js +2 -2
- package/dist/actions/submit-routing-form-response.js.map +1 -1
- package/dist/actions/toggle-event-type-hidden.d.ts.map +1 -1
- package/dist/actions/toggle-event-type-hidden.js +1 -1
- package/dist/actions/toggle-event-type-hidden.js.map +1 -1
- package/dist/actions/toggle-selected-calendar.d.ts.map +1 -1
- package/dist/actions/toggle-selected-calendar.js +1 -1
- package/dist/actions/toggle-selected-calendar.js.map +1 -1
- package/dist/actions/toggle-workflow.d.ts.map +1 -1
- package/dist/actions/toggle-workflow.js +2 -2
- package/dist/actions/toggle-workflow.js.map +1 -1
- package/dist/actions/update-event-type.d.ts +2 -2
- package/dist/actions/update-event-type.d.ts.map +1 -1
- package/dist/actions/update-event-type.js +1 -1
- package/dist/actions/update-event-type.js.map +1 -1
- package/dist/actions/update-member-role.d.ts +1 -1
- package/dist/actions/update-member-role.d.ts.map +1 -1
- package/dist/actions/update-member-role.js +1 -1
- package/dist/actions/update-member-role.js.map +1 -1
- package/dist/actions/update-profile.d.ts +1 -1
- package/dist/actions/update-profile.d.ts.map +1 -1
- package/dist/actions/update-profile.js.map +1 -1
- package/dist/actions/update-routing-form.d.ts.map +1 -1
- package/dist/actions/update-routing-form.js +2 -2
- package/dist/actions/update-routing-form.js.map +1 -1
- package/dist/actions/update-schedule.d.ts.map +1 -1
- package/dist/actions/update-schedule.js +1 -1
- package/dist/actions/update-schedule.js.map +1 -1
- package/dist/actions/update-workflow.d.ts +2 -2
- package/dist/actions/update-workflow.d.ts.map +1 -1
- package/dist/actions/update-workflow.js +4 -4
- package/dist/actions/update-workflow.js.map +1 -1
- package/dist/core/limits.d.ts.map +1 -1
- package/dist/core/limits.js.map +1 -1
- package/dist/core/slots.d.ts +1 -1
- package/dist/core/slots.d.ts.map +1 -1
- package/dist/core/slots.js +3 -3
- package/dist/core/slots.js.map +1 -1
- package/dist/react/components/SlotPicker.d.ts +1 -1
- package/dist/react/components/SlotPicker.d.ts.map +1 -1
- package/dist/react/components/SlotPicker.js.map +1 -1
- package/dist/react/components/TimezoneSelect.d.ts +1 -1
- package/dist/react/components/TimezoneSelect.d.ts.map +1 -1
- package/dist/react/components/booking-links/AvailabilityEditor.d.ts +1 -1
- package/dist/react/components/booking-links/AvailabilityEditor.d.ts.map +1 -1
- package/dist/react/components/booking-links/AvailabilityEditor.js.map +1 -1
- package/dist/react/components/booking-links/BookingLinkCreateDialog.d.ts +1 -1
- package/dist/react/components/booking-links/BookingLinkCreateDialog.d.ts.map +1 -1
- package/dist/react/components/booking-links/BookingLinkCreateDialog.js +3 -3
- package/dist/react/components/booking-links/BookingLinkCreateDialog.js.map +1 -1
- package/dist/react/components/booking-links/ConferencingSelector.d.ts +1 -1
- package/dist/react/components/booking-links/ConferencingSelector.d.ts.map +1 -1
- package/dist/react/components/booking-links/ConferencingSelector.js +3 -3
- package/dist/react/components/booking-links/ConferencingSelector.js.map +1 -1
- package/dist/react/components/booking-links/CustomFieldsEditor.d.ts +1 -1
- package/dist/react/components/booking-links/CustomFieldsEditor.d.ts.map +1 -1
- package/dist/react/components/booking-links/CustomFieldsEditor.js +6 -6
- package/dist/react/components/booking-links/CustomFieldsEditor.js.map +1 -1
- package/dist/react/components/booking-links/DurationPicker.d.ts +1 -1
- package/dist/react/components/booking-links/DurationPicker.d.ts.map +1 -1
- package/dist/react/components/booking-links/DurationPicker.js +1 -1
- package/dist/react/components/booking-links/DurationPicker.js.map +1 -1
- package/dist/react/components/booking-links/SlugEditor.d.ts +1 -1
- package/dist/react/components/booking-links/SlugEditor.d.ts.map +1 -1
- package/dist/react/components/booking-links/SlugEditor.js.map +1 -1
- package/dist/react/hooks/useBookingFlow.d.ts.map +1 -1
- package/dist/react/hooks/useBookingFlow.js.map +1 -1
- package/dist/react/hooks/useEventType.d.ts.map +1 -1
- package/dist/react/hooks/useEventType.js.map +1 -1
- package/dist/react/hooks/useReschedule.d.ts.map +1 -1
- package/dist/react/hooks/useReschedule.js.map +1 -1
- package/dist/react/hooks/useSlots.d.ts.map +1 -1
- package/dist/react/hooks/useSlots.js.map +1 -1
- package/dist/react/i18n.d.ts +6 -0
- package/dist/react/i18n.d.ts.map +1 -1
- package/dist/react/i18n.js +6 -0
- package/dist/react/i18n.js.map +1 -1
- package/dist/schema/bookings.d.ts +9 -9
- package/dist/schema/calendar-cache.d.ts +1 -1
- package/dist/schema/credentials.d.ts +5 -5
- package/dist/schema/event-types.d.ts +10 -10
- package/dist/schema/routing-forms.d.ts +5 -5
- package/dist/schema/schedules.d.ts +8 -8
- package/dist/schema/teams.d.ts +6 -6
- package/dist/schema/workflows.d.ts +13 -13
- package/dist/server/availability-engine.d.ts.map +1 -1
- package/dist/server/availability-engine.js +2 -2
- package/dist/server/availability-engine.js.map +1 -1
- package/dist/server/booking-service.d.ts.map +1 -1
- package/dist/server/booking-service.js +3 -3
- package/dist/server/booking-service.js.map +1 -1
- package/dist/server/bookings-repo.d.ts.map +1 -1
- package/dist/server/bookings-repo.js +1 -1
- package/dist/server/bookings-repo.js.map +1 -1
- package/dist/server/event-types-repo.d.ts.map +1 -1
- package/dist/server/event-types-repo.js +1 -1
- package/dist/server/event-types-repo.js.map +1 -1
- package/dist/server/hooks.d.ts.map +1 -1
- package/dist/server/hooks.js +1 -1
- package/dist/server/hooks.js.map +1 -1
- package/dist/server/providers/google-calendar.d.ts.map +1 -1
- package/dist/server/providers/office365.d.ts.map +1 -1
- package/dist/server/schedules-repo.d.ts.map +1 -1
- package/dist/server/schedules-repo.js +1 -1
- package/dist/server/schedules-repo.js.map +1 -1
- package/dist/server/video-oauth.d.ts.map +1 -1
- package/dist/server/video-oauth.js +1 -1
- package/dist/server/video-oauth.js.map +1 -1
- package/package.json +30 -29
- package/src/actions/_helpers.ts +1 -0
- package/src/actions/accept-team-invite.ts +2 -1
- package/src/actions/add-booking-attendee.ts +2 -1
- package/src/actions/add-booking-note.ts +2 -1
- package/src/actions/add-date-override.ts +1 -0
- package/src/actions/add-private-link.ts +3 -2
- package/src/actions/assign-round-robin-host.ts +4 -3
- package/src/actions/cancel-booking.ts +1 -0
- package/src/actions/check-availability.ts +2 -1
- package/src/actions/confirm-booking.ts +1 -0
- package/src/actions/connect-calendar.ts +2 -1
- package/src/actions/connect-video.ts +1 -0
- package/src/actions/create-booking.ts +2 -1
- package/src/actions/create-event-type.ts +1 -0
- package/src/actions/create-host-group.ts +2 -1
- package/src/actions/create-routing-form.ts +2 -1
- package/src/actions/create-schedule.ts +1 -0
- package/src/actions/create-team.ts +2 -1
- package/src/actions/create-workflow.ts +2 -1
- package/src/actions/delete-event-type.ts +2 -1
- package/src/actions/delete-routing-form.ts +3 -2
- package/src/actions/delete-schedule.ts +2 -1
- package/src/actions/delete-workflow.ts +3 -2
- package/src/actions/disconnect-calendar.ts +2 -1
- package/src/actions/duplicate-event-type.ts +1 -0
- package/src/actions/export-bookings-csv.ts +1 -0
- package/src/actions/find-available-slot.ts +2 -1
- package/src/actions/get-availability.ts +1 -0
- package/src/actions/get-booking.ts +1 -0
- package/src/actions/get-event-type.ts +1 -0
- package/src/actions/install-conferencing-app.ts +2 -1
- package/src/actions/invite-team-member.ts +2 -1
- package/src/actions/list-bookings.ts +1 -0
- package/src/actions/list-calendar-integrations.ts +2 -1
- package/src/actions/list-event-types.ts +1 -0
- package/src/actions/list-routing-form-responses.ts +2 -1
- package/src/actions/list-routing-forms.ts +3 -2
- package/src/actions/list-schedules.ts +1 -0
- package/src/actions/list-selected-calendars.ts +2 -1
- package/src/actions/list-workflows.ts +3 -2
- package/src/actions/mark-no-show.ts +1 -0
- package/src/actions/refresh-busy-times.ts +2 -1
- package/src/actions/remove-booking-attendee.ts +2 -1
- package/src/actions/remove-date-override.ts +1 -0
- package/src/actions/remove-team-member.ts +2 -1
- package/src/actions/reorder-event-types.ts +2 -1
- package/src/actions/reschedule-booking.ts +1 -0
- package/src/actions/revoke-private-link.ts +2 -1
- package/src/actions/send-reschedule-link.ts +1 -0
- package/src/actions/set-default-conferencing-app.ts +2 -1
- package/src/actions/set-default-schedule.ts +2 -1
- package/src/actions/set-destination-calendar.ts +2 -1
- package/src/actions/set-event-type-hosts.ts +3 -2
- package/src/actions/set-event-type-location.ts +2 -1
- package/src/actions/set-host-availability-override.ts +2 -1
- package/src/actions/set-team-branding.ts +2 -1
- package/src/actions/submit-routing-form-response.ts +3 -2
- package/src/actions/toggle-event-type-hidden.ts +2 -1
- package/src/actions/toggle-selected-calendar.ts +2 -1
- package/src/actions/toggle-workflow.ts +3 -2
- package/src/actions/update-event-type.ts +2 -1
- package/src/actions/update-member-role.ts +2 -1
- package/src/actions/update-profile.ts +1 -0
- package/src/actions/update-routing-form.ts +3 -2
- package/src/actions/update-schedule.ts +2 -1
- package/src/actions/update-workflow.ts +5 -4
- package/src/core/limits.ts +3 -2
- package/src/core/round-robin.test.ts +2 -1
- package/src/core/slots.test.ts +2 -1
- package/src/core/slots.ts +4 -4
- package/src/react/components/SlotPicker.tsx +3 -2
- package/src/react/components/_shadcn-shims.d.ts +1 -1
- package/src/react/components/booking-links/AvailabilityEditor.tsx +3 -1
- package/src/react/components/booking-links/BookingLinkCreateDialog.tsx +5 -3
- package/src/react/components/booking-links/ConferencingSelector.tsx +12 -10
- package/src/react/components/booking-links/CustomFieldsEditor.tsx +16 -14
- package/src/react/components/booking-links/DurationPicker.tsx +3 -1
- package/src/react/components/booking-links/SlugEditor.tsx +2 -0
- package/src/react/hooks/useBookingFlow.ts +1 -0
- package/src/react/hooks/useEventType.ts +1 -0
- package/src/react/hooks/useReschedule.ts +1 -0
- package/src/react/hooks/useSlots.ts +1 -0
- package/src/react/i18n.ts +6 -0
- package/src/server/availability-engine.ts +5 -4
- package/src/server/booking-service.ts +4 -3
- package/src/server/bookings-repo.ts +2 -1
- package/src/server/event-types-repo.ts +2 -1
- package/src/server/hooks.ts +2 -1
- package/src/server/providers/google-calendar.ts +1 -1
- package/src/server/providers/office365.ts +1 -1
- package/src/server/schedules-repo.ts +2 -1
- package/src/server/video-oauth-state.test.ts +1 -0
- package/src/server/video-oauth.ts +2 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { nanoid } from "nanoid";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getCalendarProvider } from "../server/providers/registry.js";
|
|
5
6
|
|
|
6
7
|
function badRequest(message: string): Error & { statusCode: number } {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
import { defineAction } from "@agent-native/core";
|
|
19
19
|
import { getRequestUserEmail } from "@agent-native/core/server/request-context";
|
|
20
20
|
import { z } from "zod";
|
|
21
|
+
|
|
21
22
|
import { getVideoProvider } from "../server/providers/registry.js";
|
|
22
23
|
import { signVideoOAuthState } from "../server/video-oauth-state.js";
|
|
23
24
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
import { createBooking } from "../server/booking-service.js";
|
|
3
5
|
import {
|
|
4
6
|
getEventTypeById,
|
|
5
7
|
getEventTypeBySlug,
|
|
6
8
|
} from "../server/event-types-repo.js";
|
|
7
|
-
import { createBooking } from "../server/booking-service.js";
|
|
8
9
|
import { currentOrgId } from "./_helpers.js";
|
|
9
10
|
|
|
10
11
|
export default defineAction({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { nanoid } from "nanoid";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getSchedulingContext } from "../server/context.js";
|
|
5
6
|
import { currentUserEmail, currentOrgId } from "./_helpers.js";
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { nanoid } from "nanoid";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getSchedulingContext } from "../server/context.js";
|
|
5
6
|
import { currentUserEmail, currentOrgId } from "./_helpers.js";
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { nanoid } from "nanoid";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getSchedulingContext } from "../server/context.js";
|
|
5
6
|
import { currentUserEmail, currentOrgId } from "./_helpers.js";
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { deleteEventType } from "../server/event-types-repo.js";
|
|
5
6
|
|
|
6
7
|
export default defineAction({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { eq } from "drizzle-orm";
|
|
4
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { eq } from "drizzle-orm";
|
|
4
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import { getAvailableSlots } from "../server/availability-engine.js";
|
|
5
|
+
import { getEventTypeById } from "../server/event-types-repo.js";
|
|
5
6
|
import { currentUserEmail } from "./_helpers.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { eq } from "drizzle-orm";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getSchedulingContext } from "../server/context.js";
|
|
5
6
|
import { listCalendarProviders } from "../server/providers/registry.js";
|
|
6
7
|
import { currentUserEmail } from "./_helpers.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { and, eq } from "drizzle-orm";
|
|
4
2
|
import { accessFilter } from "@agent-native/core/sharing";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
import { assertTeamMember, currentUserEmailOrNull } from "./_helpers.js";
|
|
7
8
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { eq } from "drizzle-orm";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getSchedulingContext } from "../server/context.js";
|
|
5
6
|
import { getCalendarProvider } from "../server/providers/registry.js";
|
|
6
7
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { and, eq } from "drizzle-orm";
|
|
4
2
|
import { accessFilter } from "@agent-native/core/sharing";
|
|
3
|
+
import { and, eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
import { assertTeamMember, currentUserEmailOrNull } from "./_helpers.js";
|
|
7
8
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { and, eq } from "drizzle-orm";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { getBookingByUid } from "../server/bookings-repo.js";
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { updateEventType } from "../server/event-types-repo.js";
|
|
5
6
|
|
|
6
7
|
export default defineAction({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { setDefaultSchedule } from "../server/schedules-repo.js";
|
|
5
6
|
import { currentUserEmail } from "./_helpers.js";
|
|
6
7
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { eq } from "drizzle-orm";
|
|
4
3
|
import { nanoid } from "nanoid";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
import { currentUserEmail } from "./_helpers.js";
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { eq } from "drizzle-orm";
|
|
4
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { updateEventType } from "../server/event-types-repo.js";
|
|
5
6
|
|
|
6
7
|
export default defineAction({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { nanoid } from "nanoid";
|
|
4
2
|
import { eq } from "drizzle-orm";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { and, eq } from "drizzle-orm";
|
|
4
3
|
import { nanoid } from "nanoid";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
import { currentUserEmail } from "./_helpers.js";
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { eq } from "drizzle-orm";
|
|
4
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
4
5
|
import { updateEventType } from "../server/event-types-repo.js";
|
|
5
6
|
|
|
6
7
|
export default defineAction({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { eq } from "drizzle-orm";
|
|
4
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { eq } from "drizzle-orm";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
5
6
|
import { getSchedulingContext } from "../server/context.js";
|
|
6
7
|
|
|
7
8
|
export default defineAction({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { nanoid } from "nanoid";
|
|
4
|
-
import { eq } from "drizzle-orm";
|
|
5
|
-
import { isBlockedToolUrl } from "@agent-native/core/tools/url-safety";
|
|
6
2
|
import { assertAccess } from "@agent-native/core/sharing";
|
|
3
|
+
import { isBlockedToolUrl } from "@agent-native/core/tools/url-safety";
|
|
4
|
+
import { eq } from "drizzle-orm";
|
|
5
|
+
import { nanoid } from "nanoid";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
|
|
7
8
|
import { getSchedulingContext } from "../server/context.js";
|
|
8
9
|
|
|
9
10
|
function assertWorkflowStepUrlsAllowed(
|
package/src/core/limits.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { TZDate } from "@date-fns/tz";
|
|
2
|
+
import { startOfWeek, startOfMonth, startOfYear, format } from "date-fns";
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* Booking limits enforcement.
|
|
3
6
|
*
|
|
@@ -7,8 +10,6 @@
|
|
|
7
10
|
* time would exceed any limit.
|
|
8
11
|
*/
|
|
9
12
|
import type { BookingLimits } from "../shared/index.js";
|
|
10
|
-
import { TZDate } from "@date-fns/tz";
|
|
11
|
-
import { startOfWeek, startOfMonth, startOfYear, format } from "date-fns";
|
|
12
13
|
|
|
13
14
|
export interface BookingCounts {
|
|
14
15
|
perDay: Record<string, number>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import type { Host } from "../shared/index.js";
|
|
4
|
+
import { assignRoundRobin, type HostMetrics } from "./round-robin.js";
|
|
4
5
|
|
|
5
6
|
const host = (email: string, overrides: Partial<Host> = {}): Host => ({
|
|
6
7
|
userEmail: email,
|
package/src/core/slots.test.ts
CHANGED
package/src/core/slots.ts
CHANGED
|
@@ -22,16 +22,16 @@ import type {
|
|
|
22
22
|
BookingLimits,
|
|
23
23
|
PeriodType,
|
|
24
24
|
} from "../shared/index.js";
|
|
25
|
+
import { expandSlotForConflictCheck } from "./buffers.js";
|
|
26
|
+
import { hasConflict, mergeBusy } from "./conflicts.js";
|
|
27
|
+
import { exceedsLimits, type BookingCounts } from "./limits.js";
|
|
28
|
+
import { evaluateAvailabilityForDate, type ScheduleInput } from "./rules.js";
|
|
25
29
|
import {
|
|
26
30
|
addMinutes,
|
|
27
31
|
getDayOfWeek,
|
|
28
32
|
zonedTimeToUtc,
|
|
29
33
|
localDatesInRange,
|
|
30
34
|
} from "./time.js";
|
|
31
|
-
import { evaluateAvailabilityForDate, type ScheduleInput } from "./rules.js";
|
|
32
|
-
import { hasConflict, mergeBusy } from "./conflicts.js";
|
|
33
|
-
import { exceedsLimits, type BookingCounts } from "./limits.js";
|
|
34
|
-
import { expandSlotForConflictCheck } from "./buffers.js";
|
|
35
35
|
|
|
36
36
|
export interface ComputeSlotsInput {
|
|
37
37
|
/** Event type duration, minutes */
|