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

22 lines
553 B
TypeScript

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