bigbuffet-rw/packages/pl-api/lib/entities/admin/ip.ts
marcin mikołajczak 2f7e149f75 pl-api: Mostly finish migration to valibot
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-16 01:08:56 +02:00

16 lines
333 B
TypeScript

import * as v from 'valibot';
import { dateSchema } from '../utils';
/** @see {@link https://docs.joinmastodon.org/entities/Admin_Ip/} */
const adminIpSchema = v.object({
ip: v.pipe(v.string(), v.ip()),
used_at: dateSchema,
});
type AdminIp = v.InferOutput<typeof adminIpSchema>;
export {
adminIpSchema,
type AdminIp,
};