bigbuffet-rw/packages/pl-api/lib/entities/notification-policy.ts
marcin mikołajczak 036fa32cd3 Add pl-api to workspace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:43:23 +02:00

17 lines
559 B
TypeScript

import { z } from 'zod';
/** @see {@link https://docs.joinmastodon.org/entities/NotificationPolicy} */
const notificationPolicySchema = z.object({
filter_not_following: z.boolean(),
filter_not_followers: z.boolean(),
filter_new_accounts: z.boolean(),
filter_private_mentions: z.boolean(),
summary: z.object({
pending_requests_count: z.number().int(),
pending_notifications_count: z.number().int(),
}),
});
type NotificationPolicy = z.infer<typeof notificationPolicySchema>;
export { notificationPolicySchema, type NotificationPolicy };