Files
ncd-fe/packages/pl-api/lib/entities/async-refresh.ts
nicole mikołajczyk a76ad6ccae pl-api: add mastodon 4.5 stuff
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-10-31 17:56:57 +01:00

21 lines
464 B
TypeScript

import * as v from 'valibot';
/**
* @category Schemas
* @see {@link https://docs.joinmastodon.org/entities/AsyncRefresh/}
*/
const asyncRefreshSchema = v.object({
async_refresh: v.object({
id: v.string(),
status: v.picklist(['running', 'finished']),
result_count: v.nullable(v.number()),
}),
});
/**
* @category Entity types
*/
type AsyncRefresh = v.InferOutput<typeof asyncRefreshSchema>;
export { asyncRefreshSchema, type AsyncRefresh };