* helper * Add script to move notification settings * wip, removal of NotificationSettings * event name * iteration * test * test * Remove last of NotificationSettings model * refactor * More fixes * snapshots * Change emails to class instances for type safety * test * docs * Update migration for self-hosted * tsc
23 lines
572 B
TypeScript
23 lines
572 B
TypeScript
import { z } from "zod";
|
|
import { NotificationEventType } from "@shared/types";
|
|
|
|
export const UsersNotificationsSubscribeSchema = z.object({
|
|
body: z.object({
|
|
eventType: z.nativeEnum(NotificationEventType),
|
|
}),
|
|
});
|
|
|
|
export type UsersNotificationsSubscribeReq = z.infer<
|
|
typeof UsersNotificationsSubscribeSchema
|
|
>;
|
|
|
|
export const UsersNotificationsUnsubscribeSchema = z.object({
|
|
body: z.object({
|
|
eventType: z.nativeEnum(NotificationEventType),
|
|
}),
|
|
});
|
|
|
|
export type UsersNotificationsUnsubscribeReq = z.infer<
|
|
typeof UsersNotificationsUnsubscribeSchema
|
|
>;
|