bigbuffet-rw/packages/pl-api/lib/entities/admin/email-domain-block.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

22 lines
542 B
TypeScript

import { z } from 'zod';
import { dateSchema } from '../utils';
/** @see {@link https://docs.joinmastodon.org/entities/Admin_EmailDomainBlock/} */
const adminEmailDomainBlockSchema = z.object({
id: z.string(),
domain: z.string(),
created_at: dateSchema,
history: z.array(z.object({
day: z.coerce.string(),
accounts: z.coerce.string(),
uses: z.coerce.string(),
})),
});
type AdminEmailDomainBlock = z.infer<typeof adminEmailDomainBlockSchema>;
export {
adminEmailDomainBlockSchema,
type AdminEmailDomainBlock,
};