bigbuffet-rw/packages/pl-api/lib/entities/admin/email-domain-block.ts
marcin mikołajczak a521c9044d make pl-api compile
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-16 17:03:27 +02:00

22 lines
630 B
TypeScript

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