Files
outline/server/routes/api/users/schema.ts
Tom Moor 45831e9469 Remove NotificationSettings table (#5036
* 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
2023-03-18 06:32:41 -07:00

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
>;