2024-10-13 15:25:30 -07:00
|
|
|
import * as v from 'valibot';
|
2024-08-28 04:43:23 -07:00
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
const adminRelaySchema = z.preprocess((data: any) => ({ id: data.actor, ...data }), v.object({
|
|
|
|
actor: v.fallback(v.string(), ''),
|
|
|
|
id: v.string(),
|
|
|
|
followed_back: v.fallback(v.boolean(), false),
|
2024-08-28 04:43:23 -07:00
|
|
|
}));
|
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
type AdminRelay = v.InferOutput<typeof adminRelaySchema>
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export { adminRelaySchema, type AdminRelay };
|