pleroma/packages/pl-api/lib/entities/admin/domain.ts
marcin mikołajczak a6bc160caa pl-api: Do some blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 00:25:30 +02:00

13 lines
382 B
TypeScript

import * as v from 'valibot';
const adminDomainSchema = v.object({
domain: v.fallback(v.string(), ''),
id: z.coerce.string(),
public: v.fallback(v.boolean(), false),
resolves: v.fallback(v.boolean(), false),
last_checked_at: z.string().datetime().catch(''),
});
type AdminDomain = v.InferOutput<typeof adminDomainSchema>
export { adminDomainSchema, type AdminDomain };