import z from "zod"; import { publicProcedure } from "../context"; import { type FeatureFlags, flagsService } from "../services/flags"; export const flagsRouter = { get: publicProcedure .route({ method: "GET", path: "/flags", tags: ["Feature Flags"], operationId: "getFeatureFlags", summary: "Get feature flags", description: "Returns the current feature flags for this Reactive Resume instance. Feature flags control instance-wide settings such as whether new user signups or email-based authentication are disabled. No authentication required.", successDescription: "The current feature flags for this instance.", }) .output( z.object({ disableSignups: z.boolean().describe("Whether new user signups are disabled on this instance."), disableEmailAuth: z.boolean().describe("Whether email-based authentication is disabled on this instance."), }), ) .handler((): FeatureFlags => flagsService.getFlags()), };