bigbuffet-rw/packages/pl-api/lib/entities/admin/domain.ts
marcin mikołajczak bc65755862 pl-api: Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-29 16:01:54 +01:00

21 lines
537 B
TypeScript

import * as v from 'valibot';
import { datetimeSchema } from '../utils';
/**
* @category Admin schemas
*/
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),
});
/**
* @category Admin entity types
*/
type AdminDomain = v.InferOutput<typeof adminDomainSchema>
export { adminDomainSchema, type AdminDomain };