chore: use cuids for webhooks

This commit is contained in:
Mythie
2024-02-27 12:13:56 +11:00
parent a31057d0d1
commit c2daa964c0
9 changed files with 46 additions and 30 deletions

View File

@ -11,22 +11,22 @@ export const ZCreateWebhookFormSchema = z.object({
enabled: z.boolean(),
});
export const ZGetWebhookByIdQuerySchema = z.object({
id: z.number(),
});
export const ZEditWebhookMutationSchema = ZCreateWebhookFormSchema.extend({
id: z.number(),
});
export const ZDeleteWebhookMutationSchema = z.object({
id: z.number(),
});
export type TCreateWebhookFormSchema = z.infer<typeof ZCreateWebhookFormSchema>;
export const ZGetWebhookByIdQuerySchema = z.object({
id: z.string(),
});
export type TGetWebhookByIdQuerySchema = z.infer<typeof ZGetWebhookByIdQuerySchema>;
export type TDeleteWebhookMutationSchema = z.infer<typeof ZDeleteWebhookMutationSchema>;
export const ZEditWebhookMutationSchema = ZCreateWebhookFormSchema.extend({
id: z.string(),
});
export type TEditWebhookMutationSchema = z.infer<typeof ZEditWebhookMutationSchema>;
export const ZDeleteWebhookMutationSchema = z.object({
id: z.string(),
});
export type TDeleteWebhookMutationSchema = z.infer<typeof ZDeleteWebhookMutationSchema>;