+1








1b5d50c45c
Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Kiran K <mailtokirankk@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: zomars <zomars@me.com> Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
31 lines
1.2 KiB
TypeScript
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,
|
|
});
|