import { IConfigData } from './data'; import { IConfigSection } from './section'; import { IConfigOptions } from '../../shared/interface/config'; import { Cache } from 'cache-manager'; import { ApiServiceBase } from '@elsikora/nestjs-crud-automator'; import { CryptoUtility } from '../../shared/utility'; import { DataSource } from 'typeorm'; import { IConfigDeleteOptions, IConfigGetListOptions, IConfigGetOptions, IConfigSetOptions } from './interface'; /** * Service for managing configuration data with caching support * Provides methods to retrieve configuration values with optional decryption * @see {@link https://elsikora.com/docs/nestjs-crud-config/core-concepts/config-service | Core Concepts - Config Service} * @see {@link https://elsikora.com/docs/nestjs-crud-config/api-reference/classes/crud-config-service | API Reference - CrudConfigService} */ export declare class CrudConfigService { private readonly sectionService; private readonly dataService; private readonly cacheManager; private readonly options?; private readonly dataSource?; private readonly cryptoUtility?; private readonly LOGGER; constructor(sectionService: ApiServiceBase, dataService: ApiServiceBase, cacheManager: Cache, options?: IConfigOptions | undefined, dataSource?: DataSource | undefined, cryptoUtility?: CryptoUtility | undefined); /** * Deletes a configuration value * @param {IConfigDeleteOptions} options Configuration options to identify the value to delete * @returns {Promise} Promise resolving when the configuration is deleted */ delete(options: IConfigDeleteOptions): Promise; /** * Retrieves configuration data based on the provided options * @param {IConfigGetOptions} options Configuration retrieval options * @returns {Promise} Promise resolving to the configuration data */ get(options: IConfigGetOptions): Promise; /** * Lists all configuration values in a section. * Supports caching and running within a TypeORM transaction. * @param {IConfigGetListOptions} options Options for listing configurations. * @returns {Promise>} Promise resolving to an array of configuration data. */ getList(options: IConfigGetListOptions): Promise>; /** * Sets a configuration value with optional encryption. * The specified section must already exist. * If a configuration with the same name and environment already exists, it will be updated. Otherwise, a new one will be created. * Owns the named crud-config-set Automator transaction when eventManager is omitted. * A provided eventManager must already belong to an active Automator owner. * @param {IConfigSetOptions} options Configuration set options * @returns {Promise} Promise resolving to the saved configuration data */ set(options: IConfigSetOptions): Promise; private getOrCreateSection; private runWithEventManager; private setWithEntityManager; }