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-

22 lines (21 loc) 1.04 kB
import { RestModel, UrlCallbackParam } from "../models/restmodels"; import { Schema, StringOrNumberKeys } from '../models/Schema'; import { HttpError, Callback } from "../.."; export default class ComplexSearchActions<Opts, S extends Schema<any>, IdKey extends StringOrNumberKeys<S['RealType']> & StringOrNumberKeys<S['PopulatedType']> & string, GetItem = S['RealType'][], MetaData = null> { private url; private actions; private restModel; private queue; constructor(restModel: RestModel<Opts, S, IdKey, GetItem, MetaData>, url: UrlCallbackParam<Opts>); private getUri; get(opts: Opts, queryString: string, callback?: Callback<{ items: S['RealType'][]; metadata: MetaData; }, HttpError>): any; fetchIfNeeded(opts: Opts, queryString?: string, callback?: Callback<{ items: S['RealType'][]; metadata: MetaData | null | any; }, HttpError>): any; fetchPopulatedIfNeeded(opts: Opts, queryString?: string): any; invalidate(opts: Opts, queryString?: string): any; }