2024-10-13 15:25:30 -07:00
|
|
|
import * as v from 'valibot';
|
2024-08-28 04:43:23 -07:00
|
|
|
|
2024-10-16 08:03:27 -07:00
|
|
|
import { datetimeSchema } from '../utils';
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
/** @see {@link https://docs.joinmastodon.org/entities/Admin_Ip/} */
|
2024-10-13 15:25:30 -07:00
|
|
|
const adminIpSchema = v.object({
|
2024-10-15 16:08:56 -07:00
|
|
|
ip: v.pipe(v.string(), v.ip()),
|
2024-10-16 08:03:27 -07:00
|
|
|
used_at: datetimeSchema,
|
2024-08-28 04:43:23 -07:00
|
|
|
});
|
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
type AdminIp = v.InferOutput<typeof adminIpSchema>;
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export {
|
|
|
|
adminIpSchema,
|
|
|
|
type AdminIp,
|
|
|
|
};
|