UNPKG

@tapis/tapisui-api

Version:

Typescript library for making api calls with react query

18 lines (15 loc) 436 B
import { Pods } from '@tapis/tapis-typescript'; import { apiGenerator, errorDecoder } from '../utils'; const listSnapshots = ( basePath: string, jwt: string ): Promise<Pods.SnapshotsResponse> => { const api: Pods.SnapshotsApi = apiGenerator<Pods.SnapshotsApi>( Pods, Pods.SnapshotsApi, basePath, jwt ); return errorDecoder<Pods.SnapshotsResponse>(() => api.listSnapshots()); }; export default listSnapshots;