import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Injector } from '@angular/core';
import { DropdownOptions, Operator } from '../classes/form-schema';
import { ModelShareLinkByPermission } from '../components/share-link-by-permission/models/share-link-by-permission';
import { Filter, GridInfo, Include, Sort } from '../models/grid-info';
import { ResponseResult } from '../models/response-result';
import { CommonService } from './common.service';
import { SignalRService } from './signalr.service';
export declare abstract class BaseService {
    _http: HttpClient;
    _injector: Injector;
    _signalrServicePrivate: SignalRService;
    serviceUri: string;
    endPoint: string;
    serviceCode: string;
    entityName: string;
    objectName: string;
    useWorkflow: boolean;
    apiGetData: string;
    apiGetAll: string;
    apiGetDetailByFilter: string;
    fieldSort: string;
    fieldSuDung: string;
    disableFieldNotUse: boolean;
    readonly RETRY_COUNT: number;
    readonly REPLAY_COUNT: number;
    readonly LIMIT_DEFAULT: number;
    protected _commonService: CommonService;
    constructor(http: HttpClient, injector: Injector, serviceUri: string);
    setCurrentServiceUri(key: string): void;
    getKeyWorkflowSetting(): string;
    private subscribeSignalR;
    private unSubscribeSignalR;
    defaultGetSignalR(apiUrl: any): Promise<ResponseResult>;
    defaultPostSignalR(apiUrl: any, data: any): Promise<ResponseResult>;
    getCacheResponse(key: any): Promise<ResponseResult>;
    getObjectDisplayModel(id: string): Promise<ResponseResult>;
    postGridInfo(url: string, gridInfo: GridInfo): Promise<ResponseResult>;
    getByGridRequest(gridInfo: GridInfo, plusUrl?: string): Promise<ResponseResult>;
    getByGridRequestWithBodyOld(gridInfo: GridInfo, plusUrl?: string): Promise<ResponseResult>;
    baseGetTreeData(gridInfo: GridInfo, plusUrl?: string): Promise<ResponseResult>;
    private convertValueFilterToOldBase;
    /**
     * Chỉ dùng trong trường hợp muốn gửi request đến custom route GetData/{plusUrl}
     */
    getDataCustomRoute(plusUrl: string, filters?: Filter[], fields?: string, sorts?: Sort[], pageSize?: number, page?: number): Promise<ResponseResult>;
    getAllWithInclude(filters?: Filter[], fields?: string, sorts?: Sort[], includes?: Include[], plusUrl?: string): Promise<ResponseResult>;
    getByIds(ids: string[], fields?: string, sorts?: Sort[], plusUrl?: string): Promise<ResponseResult>;
    getAllWithIgnore(filters?: Filter[], fields?: string, sorts?: Sort[]): Promise<ResponseResult>;
    getAll(filters?: Filter[], fields?: string, sorts?: Sort[], plusUrl?: string): Promise<ResponseResult>;
    getAllByGridInfo(gridInfo: GridInfo, plusUrl?: string): Promise<ResponseResult>;
    checkExistByFilter(filters: Filter[]): Promise<ResponseResult>;
    checkDuplicatedByField(field: string, value: any, id: any): Promise<any>;
    private generateGridInfoDropdown;
    private setDefaultOptions;
    private setDefaultOptionsTree;
    getDataDropdown(options?: DropdownOptions): Promise<any[]>;
    getDataDropdownByFilter(filters: Filter[], options?: DropdownOptions): Promise<any[]>;
    getDataDropdownByFilterRaw(filters: Filter[], options?: DropdownOptions): Promise<ResponseResult>;
    private _getDataDropdownByFilter;
    /**
     * Tao tree list tu du lieu duoc cho, cu the la du lieu TreeModel => da duoc sort theo Truong MaPhanCap
     * @param rawData
     * @param fieldParent field gia tri cha trong model con. VD: IdCha
     * @param fieldParentTreeItem field gia tri cua model cha. VD: Id
     * @private
     */
    getTreeModelBase(rawData: any[], fieldParent: string, fieldParentTreeItem: string): any[];
    /**
     * Tao tree data tu du lieu duoc cho
     * @param rawData
     * @param fieldParent field gia tri cha trong model con
     * @param fieldParentTreeItem field gia tri cua model cha
     * @private
     */
    getTreeData(rawData: any, fieldParent: string, fieldParentTreeItem: string): any[];
    getTreeDataDropdown(fieldParent: string, valueParentRoot?: number, options?: DropdownOptions): Promise<any[]>;
    getTreeDataDropdownByFilter(filters: Filter[], fieldParent: string, valueParentRoot?: number, options?: DropdownOptions): Promise<any[]>;
    getTreeDataDropdownByFilterRaw(filters: Filter[], fieldParent: string, valueParentRoot?: number, options?: DropdownOptions): Promise<ResponseResult>;
    private getFieldsFromDropdownOptions;
    /**
     * get detail với api do Dev tự viết, mặc định url 'Custom/{id}'
     * @param id - id bản ghi
     * @param plusUrl - api sẽ thành => 'PlusUrl/{id}'
     * @param queryParam - queryParam thêm vào sau url, nếu cần
     */
    getDetailCustom(id: string, plusUrl?: string, queryParam?: string): Promise<ResponseResult>;
    getDetail(id: any): Promise<ResponseResult>;
    getDetailWithFields(id: string, fields?: string, sorts?: Sort[], includes?: Include[]): Promise<ResponseResult>;
    getDetailWithPermission(id: any, pid?: string, plusUrl?: string): Promise<ResponseResult>;
    getDetailByPid(pid: any): Promise<ResponseResult>;
    getByInstanceId(instanceId: any): Promise<ResponseResult>;
    getDetailByCode(code: string): Promise<ResponseResult>;
    getDetailByFilter(filters?: Filter[], sorts?: Sort[], fields?: string, includes?: Include[]): Promise<ResponseResult>;
    countByFilter(filters?: Filter[]): Promise<ResponseResult>;
    getLastDetailByFilter(filters?: Filter[], sorts?: Sort[]): Promise<ResponseResult>;
    getWorkflowSettingByCode(workflowCode: string): Promise<any>;
    getAllAsync(): Promise<ResponseResult>;
    post(item: any, plusUrl?: string): Promise<ResponseResult>;
    put(id: string, item: any, plusUrl?: string): Promise<ResponseResult>;
    delete(id: number): Promise<ResponseResult>;
    deleteById(id: string): Promise<ResponseResult>;
    deleteMany(lstId: string): Promise<ResponseResult>;
    defaultGet(apiUrl: any, options?: HttpOptions): Promise<ResponseResult>;
    getIgnoreClientCache(apiUrl: any): Promise<ResponseResult>;
    defaultPost(apiUrl: any, data: any, options?: HttpOptions): Promise<ResponseResult>;
    defaultPut(apiUrl: any, data: any): Promise<ResponseResult>;
    defaultDelete(apiUrl: any): Promise<ResponseResult>;
    getFileByGetRequest(url: any, fileName: any): void;
    getFileByPostRequest(url: any, data: any, fileName: any): void;
    private saveFileFromObservable;
    getEntityMetadata(): Promise<ResponseResult>;
    saveEntityMetadata(data: any): Promise<ResponseResult>;
    changeMetadataStatus(id: number, metadataType: string): Promise<ResponseResult>;
    saveAndChangeMetadataStatus(id: number, metadataType: string, data: any): Promise<ResponseResult>;
    getEntityPermission(): Promise<ResponseResult>;
    saveEntityPermission(data: any): Promise<ResponseResult>;
    updateEntityPermission(id: string, item: any): Promise<ResponseResult>;
    deleteEntityPermission(id: number): Promise<ResponseResult>;
    getWfHistoryByEntityItem(id: number): Promise<ResponseResult>;
    getDicStatusNhomTrangThai(statuses: string[]): Promise<ResponseResult>;
    validateProcessWorkflow(id: number, actionCode: string, data: any): Promise<ResponseResult>;
    processWorkflow(id: number, actionCode: string, data: any): Promise<ResponseResult>;
    getUserInProcessForm(workflowCode: string, stateCode: string, actionCode: string, itemId: string): Promise<ResponseResult>;
    handleError(error: any, injector: Injector): Promise<ResponseResult>;
    protected saveAsExcelFile(buffer: any, fileName: string): void;
    putWithPlusUrl(id: string, item: any, plusUrl: string): Promise<ResponseResult>;
    getByField(field: string, arrValue: any, getFields?: string, sortField?: any, sortDir?: any): Promise<any[]>;
    getByFieldToDic(field: string, arrValue: any, getFields: any, keyField?: any, valueField?: any): Promise<any>;
    newFilter(field: string, operator: Operator, value: any, valueIsField?: boolean): Filter;
    newFilterV4(field: string, operator: Operator, value: string): Filter;
    newBindingFilter(column: string, operator: Operator, sourceField: string, subField?: string): Filter;
    getDataTrinhKy(item: any, rowData?: any): Promise<any[]>;
    exportToPdf(id: string, content: string): Promise<ResponseResult>;
    startWorkflow(id: string, workflowCode: string): Promise<ResponseResult>;
    getActionAllow(id: string): Promise<ResponseResult>;
    getActionAllowInStart(workflowCode: string, serviceCode?: string): Promise<ResponseResult>;
    validateChangeState(itemWorkflowHistory: any): Promise<ResponseResult>;
    insertBulkAsync(models: any): Promise<ResponseResult>;
    updateBulkAsync(models: any): Promise<ResponseResult>;
    autoNextStep(itemId: string): Promise<ResponseResult>;
    changeStateBaseByAction(itemId: string, actionCode: string): Promise<ResponseResult>;
    changeState(itemWorkflowHistory: any): Promise<ResponseResult>;
    choYKien(itemWorkflowHistory: any): Promise<ResponseResult>;
    getPermissionSharedByItemIds(ids: string[]): Promise<ResponseResult>;
    getSharedKey(data: ModelShareLinkByPermission): Promise<ResponseResult>;
    deleteLinkSharing(ids: string[]): Promise<ResponseResult>;
    rollback(rowData: any, lstObjectName: string[]): Promise<ResponseResult>;
    rollbackByHistory(itemId: string, idHistory: string, lstObjectName: string[]): Promise<ResponseResult>;
    /**
     * Rollback quy trình về trạng thái trước
     * @param id id của bản ghi
     */
    rollbackWorkflow(id: string): Promise<ResponseResult>;
    /**
     * Update trạng thái workflow core sang đã duyệt quyết định
     */
    updateDaDuyetQuyetDinh(id: string, idQuyetDinh: string): Promise<ResponseResult>;
    updateMaPhanCapBase(): Promise<ResponseResult>;
    sortGroupLastModelBase(): Promise<ResponseResult>;
    getTreeDataBase(): Promise<ResponseResult>;
    reorderDataByField(data: any): Promise<ResponseResult>;
}
export declare class HttpOptions {
    headers?: HttpHeaders | {
        [header: string]: string | string[];
    };
    observe?: 'body';
    params?: HttpParams | {
        [param: string]: string | string[];
    };
    reportProgress?: boolean;
    responseType?: 'json';
    withCredentials?: boolean;
}
//# sourceMappingURL=base.service.d.ts.map