Files
ncd-fe/packages/pl-api/lib/client/async-refreshes.ts
nicole mikołajczyk a4dd5e0358 pl-api: reimport TypeObject, need to eep
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-27 02:32:38 +01:00

21 lines
569 B
TypeScript

import * as v from 'valibot';
import { asyncRefreshSchema } from '@/entities';
import type { PlApiBaseClient } from '@/client-base';
/** Experimental async refreshes API methods */
const asyncRefreshes = (client: PlApiBaseClient) => ({
/**
* Get Status of Async Refresh
* @see {@link https://docs.joinmastodon.org/methods/async_refreshes/#show}
*/
show: async (id: string) => {
const response = await client.request(`/api/v1_alpha/async_refreshes/${id}`);
return v.parse(asyncRefreshSchema, response.json);
},
});
export { asyncRefreshes };