2024-10-13 15:25:30 -07:00
|
|
|
import * as v from 'valibot';
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
/** @see {@link https://docs.pleroma.social/backend/development/API/admin_api/#get-apiv1pleromaadminmoderation_log} */
|
2024-10-13 15:25:30 -07:00
|
|
|
const adminModerationLogEntrySchema = v.object({
|
2024-10-14 13:50:34 -07:00
|
|
|
id: v.pipe(v.unknown(), v.transform(String)),
|
2024-10-14 11:54:44 -07:00
|
|
|
data: v.fallback(v.record(v.string(), v.any()), {}),
|
2024-10-13 15:25:30 -07:00
|
|
|
time: v.fallback(v.number(), 0),
|
|
|
|
message: v.fallback(v.string(), ''),
|
2024-08-28 04:43:23 -07:00
|
|
|
});
|
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
type AdminModerationLogEntry = v.InferOutput<typeof adminModerationLogEntrySchema>
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export { adminModerationLogEntrySchema, type AdminModerationLogEntry };
|