Files
cal.diy/packages/trpc/server/routers/viewer/dsync/_router.tsx
T
1b5d50c45c feat: SCIM Group Provisioning To Teams Within An Org (#13850)
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: CarinaWolli <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Kiran K <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: zomars <[email protected]>
Co-authored-by: Carina Wollendorfer <[email protected]>
2024-03-07 16:16:53 -07:00

31 lines
1.2 KiB
TypeScript

import authedOrgAdminProcedure from "../../../procedures/authedProcedure";
import { router, importHandler } from "../../../trpc";
import { ZCreateInputSchema } from "./create.schema";
import { ZDeleteInputSchema } from "./delete.schema";
import { ZGetInputSchema } from "./get.schema";
import { teamGroupMappingRouter } from "./teamGroupMapping/_router";
const NAMESPACE = "dsync";
const namespaced = (s: string) => `${NAMESPACE}.${s}`;
export const dsyncRouter = router({
// Create directory sync connection
create: authedOrgAdminProcedure.input(ZCreateInputSchema).mutation(async (opts) => {
const handler = await importHandler(namespaced("create"), () => import("./create.handler"));
return handler(opts);
}),
// Get directory sync connection
get: authedOrgAdminProcedure.input(ZGetInputSchema).query(async (opts) => {
const handler = await importHandler(namespaced("get"), () => import("./get.handler"));
return handler(opts);
}),
// Delete directory sync connection
delete: authedOrgAdminProcedure.input(ZDeleteInputSchema).mutation(async (opts) => {
const handler = await importHandler(namespaced("delete"), () => import("./delete.handler"));
return handler(opts);
}),
teamGroupMapping: teamGroupMappingRouter,
});