bigbuffet-rw/packages/pl-api/lib/entities/relationship-severance-event.ts
2024-10-14 20:54:44 +02:00

16 lines
600 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: v.picklist(['domain_block', 'user_domain_block', 'account_suspension']),
purged: v.string(),
relationships_count: v.fallback(v.optional(v.number()), undefined),
created_at: dateSchema,
});
type RelationshipSeveranceEvent = v.InferOutput<typeof relationshipSeveranceEventSchema>;
export { relationshipSeveranceEventSchema, type RelationshipSeveranceEvent };