2023-11-24 13:59:33 +02:00
|
|
|
import { z } from 'zod';
|
|
|
|
|
|
|
|
|
|
export const ZGetApiTokenByIdQuerySchema = z.object({
|
|
|
|
|
id: z.number().min(1),
|
|
|
|
|
});
|
|
|
|
|
|
2023-12-31 13:58:15 +11:00
|
|
|
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' }),
|
|
|
|
|
});
|
|
|
|
|
|
2023-12-31 13:58:15 +11:00
|
|
|
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),
|
|
|
|
|
});
|
2023-12-31 13:58:15 +11:00
|
|
|
|
|
|
|
|
export type TDeleteTokenByIdMutationSchema = z.infer<typeof ZDeleteTokenByIdMutationSchema>;
|