UNPKG

ngx-mat-lib

Version:

A bunch of utilities and components to use in your Angular 7+ apps!

31 lines (30 loc) 1.57 kB
import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from "@angular/common/http"; import { XmatGenericObject, XmatMock, XmatMocksCallbacks } from "../models/index"; import { XmatConstantsService } from "./xmat-constants.service"; import { XmatMocksListService } from "./xmat-mocks-list.service"; import { Observable } from "rxjs"; export declare class XmatMockService implements HttpInterceptor { protected _xmatConstants: XmatConstantsService; protected _xmatMocksList: XmatMocksListService; protected _defaultResponseBody: XmatGenericObject; protected _fileEndings: { ok: string; ko: string; }; protected _mocks: XmatMocksCallbacks; protected readonly _ds: string; protected readonly _fileNameSpace: string; protected readonly _mocksBaseUrl: string; protected readonly _paramsPlaceholder: string; protected readonly _qm: string; protected readonly _queryUrlParam: string; protected readonly _restBaseUrl: string; protected _defaultMockDelay: number; protected _logEnabled: boolean; constructor(_xmatConstants: XmatConstantsService, _xmatMocksList: XmatMocksListService); intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>; protected _extractUrlParams(serviceUrl: string): string[]; protected _mockExists(mockKey: any): boolean; protected _generateJsonUrl(serviceUrl: string, methodKey: string, fileSuffix?: string, status?: string): string; protected _pushMockHandler(mock: XmatMock): void; }