Files
outline/server/routes/api/authenticationProviders/schema.ts
Tom Moor 428b3c9553 chore: Ensure comment data is validated before persisting (#6322)
Fix flash on render of comment create
2023-12-28 10:46:50 -08:00

28 lines
711 B
TypeScript

import { z } from "zod";
import { BaseSchema } from "@server/routes/api/schema";
export const AuthenticationProvidersInfoSchema = BaseSchema.extend({
body: z.object({
/** Authentication Provider Id */
id: z.string().uuid(),
}),
});
export type AuthenticationProvidersInfoReq = z.infer<
typeof AuthenticationProvidersInfoSchema
>;
export const AuthenticationProvidersUpdateSchema = BaseSchema.extend({
body: z.object({
/** Authentication Provider Id */
id: z.string().uuid(),
/** Whether the Authentication Provider is enabled or not */
isEnabled: z.boolean(),
}),
});
export type AuthenticationProvidersUpdateReq = z.infer<
typeof AuthenticationProvidersUpdateSchema
>;