mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
* chore: Make app compatible with Fluid Compute * Removed isCold from me api endpoint * chore: Remove handler caching for Fluid Compute compatibility (#20692) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> * fix client_id issue * chore: Remove UNSTABLE_HANDLER_CACHE for Fluid Compute compatibility (#20694) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> * Fixing types * Fixing type issues * chore: Remove importHandler references for Fluid Compute compatibility Co-Authored-By: [email protected] <[email protected]> * chore: Remove importHandler references from attributes router for Fluid Compute compatibility Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
50 lines
1.7 KiB
TypeScript
50 lines
1.7 KiB
TypeScript
import authedProcedure from "../../../procedures/authedProcedure";
|
|
import { router } from "../../../trpc";
|
|
import { ZCalendarOverlayInputSchema } from "./calendarOverlay.schema";
|
|
import { scheduleRouter } from "./schedule/_router";
|
|
import { ZListTeamAvailaiblityScheme } from "./team/listTeamAvailability.schema";
|
|
import { ZUserInputSchema } from "./user.schema";
|
|
|
|
type AvailabilityRouterHandlerCache = {
|
|
list?: typeof import("./list.handler").listHandler;
|
|
user?: typeof import("./user.handler").userHandler;
|
|
calendarOverlay?: typeof import("./calendarOverlay.handler").calendarOverlayHandler;
|
|
listTeamAvailability?: typeof import("./team/listTeamAvailability.handler").listTeamAvailabilityHandler;
|
|
};
|
|
|
|
export const availabilityRouter = router({
|
|
list: authedProcedure.query(async ({ ctx }) => {
|
|
const { listHandler } = await import("./list.handler");
|
|
|
|
return listHandler({
|
|
ctx,
|
|
});
|
|
}),
|
|
|
|
user: authedProcedure.input(ZUserInputSchema).query(async ({ ctx, input }) => {
|
|
const { userHandler } = await import("./user.handler");
|
|
|
|
return userHandler({
|
|
ctx,
|
|
input,
|
|
});
|
|
}),
|
|
listTeam: authedProcedure.input(ZListTeamAvailaiblityScheme).query(async ({ ctx, input }) => {
|
|
const { listTeamAvailabilityHandler } = await import("./team/listTeamAvailability.handler");
|
|
|
|
return listTeamAvailabilityHandler({
|
|
ctx,
|
|
input,
|
|
});
|
|
}),
|
|
schedule: scheduleRouter,
|
|
calendarOverlay: authedProcedure.input(ZCalendarOverlayInputSchema).query(async ({ ctx, input }) => {
|
|
const { calendarOverlayHandler } = await import("./calendarOverlay.handler");
|
|
|
|
return calendarOverlayHandler({
|
|
ctx,
|
|
input,
|
|
});
|
|
}),
|
|
});
|