import { OnApplicationBootstrap } from '@nestjs/common';
import { ModuleMetadataHelperService } from '../helpers/module-metadata-helper.service';
import { SolidRegistry } from '../helpers/solid-registry';
import { FieldMetadataRepository } from '../repository/field-metadata.repository';
import { DataSource, Repository } from 'typeorm';
import { BasicFilterDto } from '../dtos/basic-filters.dto';
import { CreateFieldMetadataDto, MSSQLType, PSQLType } from '../dtos/create-field-metadata.dto';
import { SelectionDynamicQueryDto } from '../dtos/selection-dynamic-query.dto';
import { UpdateFieldMetaDataDto } from '../dtos/update-field-metadata.dto';
import { FieldMetadata } from '../entities/field-metadata.entity';
import { ModelMetadata } from '../entities/model-metadata.entity';
import { ISelectionProviderValues } from '../interfaces';
import { CrudHelperService } from './crud-helper.service';
import { ResolveS3UrlDto } from '../dtos/resolve-s3-url.dto';
import { MediaStorageProviderMetadataRepository } from '../repository/media-storage-provider-metadata.repository';
import { S3FileService } from './file';
export declare class FieldMetadataService implements OnApplicationBootstrap {
    private readonly fieldMetadataRepo;
    private readonly fileService;
    private readonly mediaStorageProviderMetadataRepository;
    private readonly dataSource;
    private readonly solidRegistry;
    private readonly crudHelperService;
    private readonly moduleMetadataHelperService;
    constructor(fieldMetadataRepo: FieldMetadataRepository, fileService: S3FileService, mediaStorageProviderMetadataRepository: MediaStorageProviderMetadataRepository, dataSource: DataSource, solidRegistry: SolidRegistry, crudHelperService: CrudHelperService, moduleMetadataHelperService: ModuleMetadataHelperService);
    private logger;
    onApplicationBootstrap(): void;
    loadAndRegisterComputedFieldsDetails(): Promise<void>;
    updateInverseField(field: FieldMetadata, fieldRepository: Repository<FieldMetadata>, modelRepository: Repository<ModelMetadata>): Promise<void>;
    private updateInverseFieldInDb;
    private getRelationModel;
    private saveInverseField;
    private validateForInverseField;
    find(basicFilterDto: BasicFilterDto): Promise<{
        meta: {
            totalRecords: number;
            currentPage: number;
            nextPage: number;
            prevPage: number;
            totalPages: number;
            perPage: number;
        };
        records: FieldMetadata[];
    }>;
    findMany(basicFilterDto: BasicFilterDto): Promise<{
        meta: {
            totalRecords: number;
            currentPage: number;
            nextPage: number;
            prevPage: number;
            totalPages: number;
            perPage: number;
        };
        records: FieldMetadata[];
    }>;
    findOne(id: any, query?: any): Promise<FieldMetadata>;
    findByNameAndModelName(modelSingularName: string, fieldName: string): Promise<FieldMetadata>;
    selectionStaticValues(modelSingularName: string, fieldName: string): Promise<ISelectionProviderValues[]>;
    convertToSelectionProviderValues(selectionStaticValues: string[]): ISelectionProviderValues[];
    create(createDto: CreateFieldMetadataDto): Promise<FieldMetadata>;
    delete(id: number): Promise<FieldMetadata>;
    findFieldDefaultMetaData(): Promise<{
        fieldTypes: {
            type: string;
            label: string;
            value: string;
            fieldType: string;
            ormTypes: {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | ({
                label: MSSQLType;
                description: string;
            } | {
                label: PSQLType;
                description: string;
            })[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[] | {
                label: PSQLType;
                description: string;
            }[];
            fields: string[];
        }[];
        encryptionTypes: {
            label: unknown;
            value: unknown;
        }[];
        ormType: {
            postgres: {
                int: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                bigint: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                decimal: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                shortText: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                longText: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                richText: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                json: {
                    ormTypes: ({
                        label: MSSQLType;
                        description: string;
                    } | {
                        label: PSQLType;
                        description: string;
                    })[];
                };
                boolean: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                date: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                datetime: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                time: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                relation: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                mediaSingle: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                mediaMultiple: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                email: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                password: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                selectionStatic: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                selectionDynamic: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                computed: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
                uuid: {
                    ormTypes: {
                        label: PSQLType;
                        description: string;
                    }[];
                };
            };
            mssql: {
                int: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                bigint: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                decimal: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                shortText: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                longText: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                richText: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                json: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                boolean: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                date: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                datetime: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                time: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                relation: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                mediaSingle: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                mediaMultiple: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                email: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                password: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                selectionStatic: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                selectionDynamic: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                computed: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
                uuid: {
                    ormTypes: {
                        label: MSSQLType;
                        description: string;
                    }[];
                };
            };
        };
        decryptWhenTypes: {
            label: unknown;
            value: unknown;
        }[];
        mediaTypes: {
            label: unknown;
            value: unknown;
        }[];
        relationTypes: {
            label: unknown;
            value: unknown;
        }[];
        selectionDynamicProviders: any[];
        computedProviders: any[];
        cascadeTypes: {
            label: unknown;
            value: unknown;
        }[];
        selectionValueTypes: {
            label: unknown;
            value: unknown;
        }[];
        computedFieldValueTypes: {
            label: unknown;
            value: unknown;
        }[];
        dataSourceType: string[];
        dataSource: {
            name: any;
            type: any;
        }[];
    }>;
    private getOrmFieldTypes;
    fetchCurrentFieldsBasedOnType(type: string): Promise<string[]>;
    private fetchCurrentFields;
    fetchAllDataSources(): Promise<void>;
    upsert(updateDto: UpdateFieldMetaDataDto): Promise<FieldMetadata>;
    getSelectionDynamicValues(query: SelectionDynamicQueryDto): Promise<readonly ISelectionProviderValues[]>;
    getSelectionDynamicValue(query: SelectionDynamicQueryDto): Promise<any>;
    private updateRelationInverseFieldInFile;
    createFieldConfig(field: FieldMetadata): Promise<Record<string, any>>;
    resolveS3Url(resolveS3UrlDto: ResolveS3UrlDto): Promise<{
        url: string;
    }>;
    private normalizeS3Key;
}
//# sourceMappingURL=field-metadata.service.d.ts.map