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

26 lines
585 B
TypeScript

import * as v from 'valibot';
/**
* @category Admin schemas
* @see {@link https://docs.joinmastodon.org/entities/Admin_Dimension/}
*/
const adminDimensionSchema = v.object({
key: v.string(),
data: v.object({
key: v.string(),
human_key: v.string(),
value: v.string(),
unit: v.fallback(v.optional(v.string()), undefined),
human_value: v.fallback(v.optional(v.string()), undefined),
}),
});
/**
* @category Admin entity types
*/
type AdminDimension = v.InferOutput<typeof adminDimensionSchema>;
export {
adminDimensionSchema,
type AdminDimension,
};