import { HttpResponse } from '@angular/common/http'; export declare class NgxExcelHttpResponse { protected httpResponse: HttpResponse; protected originalResponse: HttpResponse; protected meta: { [name: string]: any; }; protected model: any; protected collections: { [name: string]: Array; }; constructor(httpResponse: HttpResponse); protected getResponseBody(): { code?: number; message?: string; meta?: { [name: string]: any; }; data?: any; _embedded?: { [name: string]: any[]; }; }; /** * 获得接口返回的响应码 */ getCode(): number; /** * 获得接口返回的附加信息 */ getMessage(): string; /** * 获得接口返回的元信息 */ getMetas(): { [name: string]: any; }; /** * 获得接口返回的指定元信息 * @param name 元信息键名 * @param defaultValue 默认值 */ getMeta(name: string, defaultValue?: any): any; /** * 手动设置元信息 * @param name 元信息键名 * @param value 元信息值 */ setMeta(name: string, value: any): NgxExcelHttpResponse; /** * 获得接口返回的主资源 * @param transform 转换方法 */ getModel(transform?: (o: any) => T): T; /** * 手动设置主资源 * @param model 主资源 */ setModel(model: T): NgxExcelHttpResponse; /** * 获得接口返回的资源集合 * @param name 资源集合键名 * @param transform 转换方法 */ getCollection(name: string, transform?: (o: any) => T): T[]; /** * 手动设置资源集合 * @param name 资源集合键名 * @param collection 集合列表 */ setCollection(name: string, collection: T[]): NgxExcelHttpResponse; }