import { Box } from '../modules/box';
import { Config } from '../config';
import { GridDataSource } from './data-source';
import { IGetRowsParams } from "ag-grid-community";
import { I18N } from 'aurelia-i18n';
import { Repository, IRequestObject } from './repository';
import { CustomLogger } from '../modules/custom-logger';
import * as breeze from 'breeze-client';
import { IAgGridDataSource } from './ag-grid-data-source';
export interface CustomContextOptions {
    uri: string;
    metadata?: string;
}
export interface OrderByOption {
    propertyPaths: string;
    isDescending?: boolean;
}
export interface PagingOption {
    skip?: number;
    take?: number;
    pageNumber?: number;
}
export declare class ServiceBase<T extends breeze.Entity> {
    entityTypeName: string;
    private resourceName?;
    manager: breeze.EntityManager;
    logger: CustomLogger;
    box: Box;
    config: Config;
    i18n: I18N;
    displayNames: Array<string>;
    gridDataSource: GridDataSource<T>;
    repository: Repository<T>;
    constructor(entityTypeName: string, customContextOptions?: CustomContextOptions, resourceName?: string);
    createEntity(initialValues?: Partial<T>, sync?: boolean): any;
    createLinkedEntity<E extends breeze.Entity>(linkedEntityName: string, initialValues?: any, avoidMultipleAdd?: boolean): Promise<E>;
    deleteEntities(entitiesToDelete: T[], detachInverseFKEntities: boolean, beforeSaveAction?: ((entity: T) => void), force?: boolean): Promise<boolean>;
    fetchForDataGrid(resourceNames: string, params: IGetRowsParams, expands: any, quickFilter: string, queryCriteria: GridDataSource<T>, queryParameters?: any): Promise<import("./repository").QueryResults<T>>;
    getEntityById(id: number, ...expands: string[]): Promise<T>;
    getEntityByIdFromLocalCache(id: number, ...expands: string[]): Promise<T>;
    getAllEntities(...expands: string[]): Promise<T[]>;
    getEntities(predicates?: breeze.Predicate, expands?: string[], parameters?: any, orderBy?: OrderByOption, paging?: PagingOption): Promise<T[]>;
    getEntitiesFromDataSource(predicates?: breeze.Predicate, expands?: string[], parameters?: any, orderBy?: OrderByOption, paging?: PagingOption): Promise<T[]>;
    getEntitiesFromLocalCache(predicates?: breeze.Predicate, expands?: string[], orderBy?: OrderByOption, paging?: PagingOption): Promise<T[]>;
    getCount(predicates?: breeze.Predicate, parameters?: any): Promise<number>;
    firstEntity(predicates?: breeze.Predicate, expands?: string[], parameters?: any, orderBy?: OrderByOption, skip?: number): Promise<T>;
    save(silentSave?: boolean, byPassLocking?: boolean): Promise<void>;
    saveEntity(entityToSave: breeze.Entity, silentSave?: boolean): Promise<void>;
    saveEntities(entitiesToSave: breeze.Entity[], silentSave?: boolean): Promise<void>;
    lockRecordForEditing(entity: T): Promise<void>;
    cancel(silentMode?: boolean): void;
    getDefaultPredicates(filterText: any): any;
    rejectAnyEntityChangesFromCache(entityTypeName: string): void;
    private unselectAll;
    private getDisplayNames;
    private hasCustomDisplayNameAttribute;
    getDisplayNameValue(entity: T): string;
    setAllDetached(entities: breeze.Entity[]): void;
}
export declare class AgGridToBreezeTransformer {
    private resourceName;
    constructor(resourceName: string);
    getRequestObject(ds: IAgGridDataSource, request: any): IRequestObject;
    private manager;
    private getPredicatesFromParams;
    private getSortClause;
    private extractPredicatesFromFilter;
    private getBreezeOperatorFromFilterType;
    private fillPredicatesWithQuickFilter;
}
