/** * Copyright 2023 Kapeta Inc. * SPDX-License-Identifier: BUSL-1.1 */ import { EntityList } from '@kapeta/schemas'; import { StringMap } from './types'; export declare const SYSTEM_ID = "$plan"; type AnyMap = { [key: string]: any; }; interface MatchedIdentity { systemId: string; instanceId: string; } declare class ConfigManager { private _config; constructor(); _forSystem(systemId: string): any; setConfigForSystem(systemId: string, config: AnyMap): void; getConfigForSystem(systemId: string): AnyMap; getConfigForBlockInstance(systemId: string, instanceId: string, rewritePaths?: boolean): Promise; rewriteFilePaths(configSchema: EntityList, config: AnyMap, toBaseDir?: string): StringMap; setConfigForSection(systemId: string, sectionId: string, config: AnyMap): void; getFilesBaseDir(): string; private saveFile; setConfigForBlockInstance(systemId: string, instanceId: string, configEntityList: EntityList, config: AnyMap): Promise; getConfigForSection(systemId: string, sectionId: string): any; /** * Try to identify the plan and instance in a plan automatically based on the block reference * * It will: * 1. Go through all plans available in the assets * 2. Look through each plan and see if the plan is referencing the block * 3. If only 1 plan references the block - assume that as the system id * 4. If only 1 instance in 1 plan references the block - assume that as instance id * * In case multiple uses of the same block reference we will prompt to user to choose which instance they want to * use. * * @param blockRef block reference * @param [systemId] plan reference * @returns {Promise<{systemId:string,instanceId:string}>} */ resolveIdentity(blockRef: string, systemId?: string): Promise; verifyIdentity(blockRef: string, systemId: string, instanceId: string): Promise; } export declare const configManager: ConfigManager; export {};