bigbuffet-rw/packages/pl-api/lib/entities/admin/moderation-log-entry.ts

14 lines
537 B
TypeScript
Raw Normal View History

import * as v from 'valibot';
/** @see {@link https://docs.pleroma.social/backend/development/API/admin_api/#get-apiv1pleromaadminmoderation_log} */
const adminModerationLogEntrySchema = v.object({
id: v.pipe(v.unknown(), v.transform(String)),
data: v.fallback(v.record(v.string(), v.any()), {}),
time: v.fallback(v.number(), 0),
message: v.fallback(v.string(), ''),
});
type AdminModerationLogEntry = v.InferOutput<typeof adminModerationLogEntrySchema>
export { adminModerationLogEntrySchema, type AdminModerationLogEntry };