import { EnvExtensionOptions } from './env-extension-types'; import { ExtensionOptions } from './extension'; import { PathOsBased } from '../utils/path'; export declare type BaseExtensionOptions = { file?: string | null | undefined; }; declare type BaseArgs = { name: string; rawConfig: Record; options: ExtensionOptions | EnvExtensionOptions; }; export declare type BaseLoadArgsProps = BaseArgs & { consumerPath?: PathOsBased | null | undefined; scopePath?: PathOsBased | null | undefined; context?: Record | null | undefined; throws?: boolean; }; declare type BaseLoadFromFileArgsProps = BaseArgs & { filePath: string; rootDir?: string; throws?: boolean; }; declare type StaticProps = BaseArgs & { dynamicConfig: Record; filePath: string; rootDir?: string | null | undefined; schema?: Record | null | undefined; script?: Function; disabled: boolean; loaded: boolean; context?: Record | null | undefined; }; declare type InstanceSpecificProps = { api: Record; }; export declare type BaseExtensionProps = InstanceSpecificProps & StaticProps; export declare type BaseExtensionModel = { name: string; config: Record; }; export declare type InitOptions = { writeConfigFilesOnAction: boolean | null | undefined; }; export default class BaseExtension { name: string; loaded: boolean; initialized: boolean; disabled: boolean; filePath: string; rootDir: string; rawConfig: Record; schema: Record | null | undefined; options: Record; dynamicConfig: Record; context: Record | null | undefined; script: Function | null | undefined; _initOptions: InitOptions | null | undefined; api: any; constructor(extensionProps: BaseExtensionProps); get writeConfigFilesOnAction(): any; get initOptions(): Record | null | undefined; set initOptions(opts: Record | null | undefined); init(throws?: boolean): Promise; extendAPI(baseApi: Record, api: Record): void; toString(): string; toBitJsonObject(): { [x: string]: { rawConfig: Record; options: Record; }; }; toModelObject(): { name: string; config: Record; }; toObject(): Record; reload(scopePath: string, { throws }: Record): Promise; setExtensionPathInScope(scopePath: string): void; static transformStringToModelObject(name: string): BaseExtensionModel; static load({ name, rawConfig, options, consumerPath, scopePath, throws, context }: BaseLoadArgsProps): Promise; static loadFromModelObjectBase(modelObject: string | BaseExtensionModel): BaseExtensionProps; static loadFromFile({ name, filePath, rootDir, rawConfig, options, throws }: BaseLoadFromFileArgsProps): Promise; static loadDynamicConfig(extensionProps: StaticProps): Record | null | undefined; } export {};