bigbuffet-rw/packages/pl-api/lib/entities/admin/domain.ts
marcin mikołajczak a521c9044d make pl-api compile
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-16 17:03:27 +02:00

15 lines
462 B
TypeScript

import * as v from 'valibot';
import { datetimeSchema } from '../utils';
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: v.fallback(v.nullable(datetimeSchema), null),
});
type AdminDomain = v.InferOutput<typeof adminDomainSchema>
export { adminDomainSchema, type AdminDomain };