Files
calendar/packages/trpc/server/routers/viewer/apiKeys/_router.tsx
T
Keith WilliamsGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>keith@cal.com <keith@cal.com>Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>keith@cal.com <keith@cal.com>keith@cal.com <keith@cal.com>keith@cal.com <keith@cal.com>devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>keith@cal.com <keith@cal.com>
6615b885d1 chore: Make app compatible with Fluid Compute (#19841)
* 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: keith@cal.com <keith@cal.com>

* 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: keith@cal.com <keith@cal.com>

* Fixing types

* Fixing type issues

* chore: Remove importHandler references for Fluid Compute compatibility

Co-Authored-By: keith@cal.com <keith@cal.com>

* chore: Remove importHandler references from attributes router for Fluid Compute compatibility

Co-Authored-By: keith@cal.com <keith@cal.com>

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: keith@cal.com <keith@cal.com>
2025-04-14 18:27:59 -04:00

64 lines
1.8 KiB
TypeScript

import authedProcedure from "../../../procedures/authedProcedure";
import { router } from "../../../trpc";
import { ZCreateInputSchema } from "./create.schema";
import { ZDeleteInputSchema } from "./delete.schema";
import { ZEditInputSchema } from "./edit.schema";
import { ZFindKeyOfTypeInputSchema } from "./findKeyOfType.schema";
type ApiKeysRouterHandlerCache = {
list?: typeof import("./list.handler").listHandler;
findKeyOfType?: typeof import("./findKeyOfType.handler").findKeyOfTypeHandler;
create?: typeof import("./create.handler").createHandler;
edit?: typeof import("./edit.handler").editHandler;
delete?: typeof import("./delete.handler").deleteHandler;
};
export const apiKeysRouter = router({
// List keys
list: authedProcedure.query(async ({ ctx }) => {
const { listHandler } = await import("./list.handler");
return listHandler({
ctx,
});
}),
// Find key of type
findKeyOfType: authedProcedure.input(ZFindKeyOfTypeInputSchema).query(async ({ ctx, input }) => {
const { findKeyOfTypeHandler } = await import("./findKeyOfType.handler");
return findKeyOfTypeHandler({
ctx,
input,
});
}),
// Create a new key
create: authedProcedure.input(ZCreateInputSchema).mutation(async ({ ctx, input }) => {
const { createHandler } = await import("./create.handler");
return createHandler({
ctx,
input,
});
}),
edit: authedProcedure.input(ZEditInputSchema).mutation(async ({ ctx, input }) => {
const { editHandler } = await import("./edit.handler");
return editHandler({
ctx,
input,
});
}),
delete: authedProcedure.input(ZDeleteInputSchema).mutation(async ({ ctx, input }) => {
const { deleteHandler } = await import("./delete.handler");
return deleteHandler({
ctx,
input,
});
}),
});