bigbuffet-rw/packages/pl-api/lib/entities/admin/ip.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

16 lines
341 B
TypeScript

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