UNPKG

faker-api

Version:

A fully customizible rest api faking package that allows you to mock , clone and fake Rest API with fake yet realistic data

21 lines 955 B
import { ViewSet } from "./viewset"; import { Model } from "./../"; import { Request, Response } from "express"; /** * This viewset is used to create an in-memory stateful data of a specific method, this is useful when you need random data but can be access from different part of your application an expect it to provide thesame data everytime */ declare abstract class StatefulViewSet extends ViewSet { private models; private lastId; private model; constructor(model: Model); get(request: Request, response: Response): void; create(request: Request, response: Response): void; retreive(request: Request, response: Response, id: any): void; update(request: Request, response: Response, id: any): void; delete(request: Request, response: Response, id: any): void; protected getItem(id: any): any; addItem(item: any, id?: any): any; } export { StatefulViewSet }; //# sourceMappingURL=stateful-viewset.d.ts.map