Files
ncd-fe/packages/pl-api/lib/entities/notification-request.ts
marcin mikołajczak a6bc160caa pl-api: Do some blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 00:25:30 +02:00

20 lines
585 B
TypeScript

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