import { DataSource, EntityManager, Repository } from 'typeorm';
import { CreateModelMetadataDto } from '../dtos/create-model-metadata.dto';
import { ModelMetadata } from '../entities/model-metadata.entity';
import { ModuleMetadataHelperService } from '../helpers/module-metadata-helper.service';
import { FieldMetadataRepository } from '../repository/field-metadata.repository';
import { ModelMetadataRepository } from '../repository/model-metadata.repository';
import { BasicFilterDto } from '../dtos/basic-filters.dto';
import { UpdateModelMetaDataDto } from '../dtos/update-model-metadata.dto';
import { SchematicService } from '../helpers/schematic.service';
import { CommandService } from '../helpers/command.service';
import { CodeGenerationOptions } from '../interfaces';
import { CrudHelperService } from './crud-helper.service';
import { FieldMetadataService } from './field-metadata.service';
import { MediaStorageProviderMetadataService } from './media-storage-provider-metadata.service';
import { RoleMetadataService } from './role-metadata.service';
import { NavigationDto } from '../dtos/navigation.dto';
import { SolidIntrospectService } from './solid-introspect.service';
import { SolidTsMorphService } from './solid-ts-morph.service';
export declare class ModelMetadataService {
    private readonly modelMetadataRepo;
    private readonly fieldMetadataRepo;
    private readonly schematicService;
    private readonly commandService;
    private readonly dataSource;
    private readonly crudHelperService;
    private readonly mediaStorageProviderMetadataService;
    private readonly fieldMetadataService;
    private readonly roleService;
    private readonly moduleMetadataHelperService;
    readonly introspectService: SolidIntrospectService;
    private readonly solidTsMorphService;
    private logger;
    constructor(modelMetadataRepo: ModelMetadataRepository, fieldMetadataRepo: FieldMetadataRepository, schematicService: SchematicService, commandService: CommandService, dataSource: DataSource, crudHelperService: CrudHelperService, mediaStorageProviderMetadataService: MediaStorageProviderMetadataService, fieldMetadataService: FieldMetadataService, roleService: RoleMetadataService, moduleMetadataHelperService: ModuleMetadataHelperService, introspectService: SolidIntrospectService, solidTsMorphService: SolidTsMorphService);
    find(basicFilterDto: BasicFilterDto): Promise<{
        meta: {
            totalRecords: number;
            currentPage: number;
            nextPage: number;
            prevPage: number;
            totalPages: number;
            perPage: number;
        };
        records: ModelMetadata[];
    }>;
    findMany(basicFilterDto: BasicFilterDto): Promise<{
        meta: {
            totalRecords: number;
            currentPage: number;
            nextPage: number;
            prevPage: number;
            totalPages: number;
            perPage: number;
        };
        records: ModelMetadata[];
    }>;
    findOne(id: any, query?: any): Promise<ModelMetadata>;
    findOneBySingularName(singularName: string, relations?: {}): Promise<ModelMetadata>;
    findOneByUserKey(singularName: string, relations?: {}): Promise<ModelMetadata>;
    create(createDto: CreateModelMetadataDto): Promise<ModelMetadata>;
    private handleInverseRelationFieldsUpdates;
    update(id: number, updateModelMetaDataDto: UpdateModelMetaDataDto): Promise<void>;
    createInDB(manager: EntityManager, createDto: CreateModelMetadataDto): Promise<ModelMetadata>;
    createInFile(modelId: any, repo: Repository<ModelMetadata>): Promise<void>;
    updateInDb(manager: EntityManager, id: number, updateModelMetaDataDto: UpdateModelMetaDataDto): Promise<ModelMetadata>;
    updateInFile(modelId: any, repo: Repository<ModelMetadata>): Promise<void>;
    upsert(updateDto: UpdateModelMetaDataDto): Promise<ModelMetadata>;
    removeBySingularName(singularName: string): Promise<ModelMetadata>;
    deleteMany(ids: number[]): Promise<any>;
    remove(id: number): Promise<ModelMetadata>;
    cleanupOnDelete(modelEntityId: number): Promise<void>;
    generateCodeViaCtl(modelId: number): Promise<string>;
    handleGenerateCode(options: CodeGenerationOptions): Promise<any>;
    private generateCodeForInverseModels;
    generateVAMConfig(modelId: number): Promise<void>;
    private populateVAMConfigInFile;
    private populateVAMConfigInFileInternal;
    private populateVAMConfigInDb;
    generateCode(options: CodeGenerationOptions): Promise<{
        model: ModelMetadata;
        removeFieldCodeOuput: string;
        refreshModelCodeOutput: string;
    }>;
    generateRemoveFieldsCode(options: CodeGenerationOptions): Promise<string>;
    generateModelCode(options: CodeGenerationOptions): Promise<string>;
    private executeRefreshModelCommand;
    private executeRemoveFieldsCommand;
    updateUserKey(data: any): Promise<{
        message: string;
        success: boolean;
    }>;
    private getRelationInverseFields;
    navigation(navigationDto: NavigationDto): Promise<{
        prev: {
            recordId: any;
            offset: number;
            limit: number;
        };
        next: {
            recordId: any;
            offset: number;
            limit: number;
        };
        meta: {
            totalRecords: number;
            perPage: number;
            currentPage: number;
            totalPages: number;
            currentIndexInPage: number;
            currentIndexGlobal: number;
            hasPrev: boolean;
            hasNext: boolean;
            prevPage: number;
            nextPage: number;
        };
    }>;
}
//# sourceMappingURL=model-metadata.service.d.ts.map