bigbuffet-rw/packages/pl-api/lib/entities/notification-request.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

19 lines
574 B
TypeScript

import { z } from 'zod';
import { dateSchema } from './utils';
import { accountSchema, statusSchema } from '.';
/** @see {@link https://docs.joinmastodon.org/entities/NotificationRequest} */
const notificationRequestSchema = z.object({
id: z.string(),
created_at: dateSchema,
updated_at: dateSchema,
account: accountSchema,
notifications_count: z.coerce.string(),
last_status: statusSchema.optional().catch(undefined),
});
type NotificationRequest = z.infer<typeof notificationRequestSchema>;
export { notificationRequestSchema, type NotificationRequest };