UNPKG

@rest-api/react-models

Version:

[![npm version](https://img.shields.io/npm/v/@rest-api/react-models)](https://www.npmjs.com/package/@rest-api/react-models) [![codecov](https://codecov.io/gh/hector7/rest-api-react-models/branch/master/graph/badge.svg)](https://codecov.io/gh/hector7/rest-

14 lines (13 loc) 767 B
import { Schema, StringOrNumberKeys } from '../models/Schema'; import { RestModel, UrlCallbackParam } from '../models/restmodels'; import { Callback, HttpError } from '../..'; export default class BasicSearchActions<S extends Schema<any>, IdKey extends StringOrNumberKeys<S['RealType']> & StringOrNumberKeys<S['PopulatedType']> & string, GetItem = S['RealType'][], MetaData = null> { private complexActions; constructor(model: RestModel<{}, S, IdKey, GetItem, MetaData>, url: UrlCallbackParam<{}>); fetchIfNeeded(queryString?: string, callback?: Callback<{ items: S['RealType'][]; metadata: MetaData | null | any; }, HttpError>): any; fetchPopulatedIfNeeded(queryString?: string): any; invalidate(queryString?: string): any; }