import { Logger } from "@vlocode/core"; import { VlocityDatapackSObject } from "@vlocode/vlocity"; import { DatapackExportDefinitionStore } from "./exportDefinitionStore"; export interface DatapackExpandResult { baseName: string; folder: string; objectType: string; sourceKey: string; parentKeys: string[]; files: Record; } /** * Represents a Datapack Expander that expand an exported datapack into a list of files that can be written to the file system or a zip archive. * The expander can be used to expand a single datapack or a list of datapacks. * * @usage * ```typescript * const expander = container.create(DatapackExpander); * const result = expander.expandDatapack(datapack); * * for (const [fileName, fileData] of Object.entries(result.files)) { * await fs.writeFile(fileName, fileData); * } * ``` */ export declare class DatapackExpander { /** * Configuration for the Datapack Exporter instance. */ readonly definitions: DatapackExportDefinitionStore; private readonly logger; private static datapackFileName; private fieldTypeExtension; private datapackStandardFields; constructor( /** * Configuration for the Datapack Exporter instance. */ definitions: DatapackExportDefinitionStore, logger: Logger); /** * Generate a datapack export for an object by the object id. * @param datapack The VlocityDatapackSObject to export. * @param context Optional context for the export. * @returns The DatapackExapndResult containing the exported datapack. */ expandDatapack(datapack: VlocityDatapackSObject, context?: { scope?: string; }): DatapackExpandResult; private collectParentKeys; private expandFieldArray; private evalPathFormat; private normalizeFileName; } //# sourceMappingURL=datapackExpander.d.ts.map