import { DiscoveryService, ModuleRef } from "@nestjs/core";
import { CommonEntity } from "../entities/common.entity";
import { SolidBaseRepository } from "../repository/solid-base.repository";
import { SettingService } from "./setting.service";
import { EntityManager } from "typeorm";
import { BasicFilterDto } from "../dtos/basic-filters.dto";
import { FieldMetadata } from "../entities/field-metadata.entity";
import { MediaWithFullUrl } from "../interfaces";
import { CrudHelperService } from "./crud-helper.service";
import { ModelMetadataService } from "./model-metadata.service";
export declare class CRUDService<T extends CommonEntity> {
    readonly entityManager: EntityManager;
    readonly repo: SolidBaseRepository<T>;
    readonly modelName: string;
    readonly moduleName: string;
    readonly moduleRef: ModuleRef;
    readonly defaultDatasourceEntityManager?: EntityManager;
    private _modelMetadataService;
    private _crudHelperService;
    private _discoveryService;
    private _settingService;
    constructor(entityManager: EntityManager, repo: SolidBaseRepository<T>, modelName: string, moduleName: string, moduleRef: ModuleRef, defaultDatasourceEntityManager?: EntityManager);
    protected get modelMetadataService(): ModelMetadataService;
    protected get crudHelperService(): CrudHelperService;
    protected get discoveryService(): DiscoveryService;
    protected get settingService(): SettingService;
    private tryCreateAsExtensionUser;
    create(createDto: any, files?: Express.Multer.File[], solidRequestContext?: any): Promise<T>;
    private loadModel;
    private validateAndTransformDto;
    private saveMedia;
    update(id: number, updateDto: any, files?: Express.Multer.File[], isPartialUpdate?: boolean, solidRequestContext?: any, isUpdate?: boolean): Promise<T>;
    delete(id: number, solidRequestContext?: any): Promise<T>;
    private fieldCrudManager;
    private isSkipComputation;
    find(basicFilterDto: BasicFilterDto, solidRequestContext?: any): Promise<{
        meta: {
            totalRecords: number;
        };
        groupMeta: any[];
        groupRecords: any[];
        records?: undefined;
    } | {
        meta: {
            totalRecords: number;
            currentPage: number;
            nextPage: number;
            prevPage: number;
            totalPages: number;
            perPage: number;
        };
        records: T[];
        groupMeta?: undefined;
        groupRecords?: undefined;
    }>;
    private handleNonGroupFind;
    private handleGroupFind;
    private wrapFindResponse;
    private handlePopulateUserIdFields;
    private handlePopulateMedia;
    private populateMediaObject;
    private appendMediaKey;
    private getMediaFieldEntities;
    getMediaWithFullUrl(mediaEntity: any, mediaFieldMetadata: FieldMetadata): Promise<MediaWithFullUrl[]>;
    findOne(id: number, query?: any, solidRequestContext?: any): Promise<T>;
    createMany(createDtos: any[], solidRequestContext?: any): Promise<T[]>;
    insertMany(createDtos: any[], filesArray?: Express.Multer.File[][], solidRequestContext?: any): Promise<T[]>;
    deleteMany(ids: number[], solidRequestContext?: any): Promise<any>;
    recover(id: number, solidRequestContext?: any): Promise<{
        message: string;
        data: T;
    }>;
    recoverMany(ids: number[], solidRequestContext?: any): Promise<{
        message: string;
        recoveredIds: number[];
    }>;
    getFieldMetadataRecursively(pathParts: string[], fields: FieldMetadata[]): any;
    getUserKeyFieldNameForModel(modelSingularName: string): Promise<string>;
    publishRecord(id: number, solidRequestContext?: any): Promise<T>;
    unpublishRecord(id: number, solidRequestContext?: any): Promise<T>;
    private getDatasourceDefaultEntityManager;
}
//# sourceMappingURL=crud.service.d.ts.map