Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@kaos/dashboard / dist / esm / utils / api.d.ts
Size: Mime:
import { Fetcher, SWRConfiguration } from 'swr';
import { IUseApiResults } from './index.types';
export declare function getUseApiFunction(fetcher: Fetcher): (path: string, params?: Record<string, any>, options?: SWRConfiguration) => IUseApiResults;
export declare function getLimitOffset(page: number, pageSize: number): [limit: number, offset: number];
export declare function makePaginatedApi(useListApi: (params: Record<string, any>, options?: SWRConfiguration) => IUseApiResults): (page: number, pageSize: number, params: Record<string, any>, options?: SWRConfiguration) => IUseApiResults;
export declare function getUseInfiniteApiFunction(fetcher: Fetcher): (path: string, params?: Record<string, any>, options?: SWRConfiguration) => {
    api: any[];
    loadNext: () => Promise<any[] | undefined>;
};