import { AbstractAutoService } from './abstract.autoservice'; import { MessageArgs } from '../../bus.api'; import { RestObject } from '../services/rest/rest.model'; export declare const MOCK_FAKE_ERROR = 400; export declare const MOCK_UNIMPLEMENTED_ERROR = 444; /** * This is the abstract class for deriving xxx.autorest.mock.ts files in all the services. */ export declare abstract class AbstractAutoRestMock extends AbstractAutoService { mustFail: boolean; protected name: string; private listensTo; private restError; private pvtForceResponse; private pvtForceError; protected debug: boolean; constructor(name: string, listensTo: string); /** * Check if there is a forced response without popping the stack */ get hasForceResponse(): boolean; /** * Push a response onto the stack. If a NULL is passed, set the stack to undefined. * * @param response any */ set forceResponse(response: any); /** * Return the value at the top of the stack. Pop the stack unless there is only one element in the stack. */ get forceResponse(): any; /** * Check if there is a forced error without popping the stack */ get hasForceError(): boolean; /** * Push a error onto the stack. If a NULL is passed, set the stack to undefined. * * @param error any */ set forceError(error: any); /** * Return the value at the top of the stack. Pop the stack unless there is only one element in the stack. */ get forceError(): any; protected handleData(data: any, restObject: RestObject, args?: MessageArgs): void; protected handleError(err: any, restObject: RestObject, args?: MessageArgs): void; protected unhandledError(restRequestObject: RestObject, apiClass: string): void; protected handleServiceRequest(restRequestObject: RestObject, requestArgs?: MessageArgs): void; private unimplemented; protected httpGet(restRequestObject: RestObject, args?: MessageArgs): void; protected httpPost(restRequestObject: RestObject, args?: MessageArgs): void; protected httpPut(restRequestObject: RestObject, args?: MessageArgs): void; protected httpPatch(restRequestObject: RestObject, args?: MessageArgs): void; protected httpDelete(restRequestObject: RestObject, args?: MessageArgs): void; }