Files
sign/packages/trpc/server/api-token-router/schema.ts

20 lines
618 B
TypeScript
Raw Normal View History

2023-11-24 13:59:33 +02:00
import { z } from 'zod';
export const ZGetApiTokenByIdQuerySchema = z.object({
id: z.number().min(1),
});
export type TGetApiTokenByIdQuerySchema = z.infer<typeof ZGetApiTokenByIdQuerySchema>;
2023-11-24 13:59:33 +02:00
export const ZCreateTokenMutationSchema = z.object({
tokenName: z.string().min(3, { message: 'The token name should be 3 characters or longer' }),
});
export type TCreateTokenMutationSchema = z.infer<typeof ZCreateTokenMutationSchema>;
2023-11-24 13:59:33 +02:00
export const ZDeleteTokenByIdMutationSchema = z.object({
id: z.number().min(1),
});
export type TDeleteTokenByIdMutationSchema = z.infer<typeof ZDeleteTokenByIdMutationSchema>;