pleroma/packages/pl-api/lib/entities/relationship-severance-event.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

16 lines
589 B
TypeScript

import * as v from 'valibot';
import { dateSchema } from './utils';
/** @see {@link https://docs.joinmastodon.org/entities/RelationshipSeveranceEvent/} */
const relationshipSeveranceEventSchema = v.object({
id: v.string(),
type: z.enum(['domain_block', 'user_domain_block', 'account_suspension']),
purged: v.string(),
relationships_count: z.number().optional().catch(undefined),
created_at: dateSchema,
});
type RelationshipSeveranceEvent = v.InferOutput<typeof relationshipSeveranceEventSchema>;
export { relationshipSeveranceEventSchema, type RelationshipSeveranceEvent };