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-apiv1pleromaadminrules} */
|
2024-10-13 15:25:30 -07:00
|
|
|
const adminRuleSchema = v.object({
|
|
|
|
id: v.string(),
|
|
|
|
text: v.fallback(v.string(), ''),
|
|
|
|
hint: v.fallback(v.string(), ''),
|
|
|
|
priority: v.fallback(v.nullable(v.number()), null),
|
2024-08-28 04:43:23 -07:00
|
|
|
});
|
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
type AdminRule = v.InferOutput<typeof adminRuleSchema>;
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export { adminRuleSchema, type AdminRule };
|