Files
ncd-fe/packages/pl-api/lib/client/async-refreshes.ts
nicole mikołajczyk d5d453e645 pl-api: allow importing parts of the client
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2026-02-23 10:39:26 +01:00

21 lines
571 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 };