bigbuffet-rw/packages/pl-api/lib/entities/admin/email-domain-block.ts
marcin mikołajczak bc65755862 pl-api: Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-29 16:01:54 +01:00

28 lines
701 B
TypeScript

import * as v from 'valibot';
import { datetimeSchema } from '../utils';
/**
* @category Admin schemas
* @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)),
})),
});
/**
* @category Admin entity types
*/
type AdminEmailDomainBlock = v.InferOutput<typeof adminEmailDomainBlockSchema>;
export {
adminEmailDomainBlockSchema,
type AdminEmailDomainBlock,
};