pleroma/packages/pl-api/lib/entities/admin/domain.ts
marcin mikołajczak 0bed543c20 pl-api: moar blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 22:50:34 +02:00

13 lines
405 B
TypeScript

import * as v from 'valibot';
const adminDomainSchema = v.object({
domain: v.fallback(v.string(), ''),
id: v.pipe(v.unknown(), v.transform(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 };