import yaml from "yaml"; import { cleanMetadata, deleteMetadata, deletePluginDefaults, extractPluginDefault, flowHaveTasks, getAllCharts, getChartAtPosition, getMetadata, getVersionAtPosition, getTypeAtPosition as getTaskType, insertErrorInFlowable, localizeElementAtIndex, pairsToMap, parse, replaceIdAndNamespace, replacePluginDefaultsInDocument, sort, stringify, updateMetadata, extractFieldFromMaps } from "./FlowYamlUtils"; export type YamlElement = { key?: string; value: Record; parents: Record[]; range?: [number, number, number]; }; /** * @deprecated prefer using FlowYamlUtils directly for tree shaking */ export declare const YamlUtils: { stringify: typeof stringify; parse: typeof parse; pairsToMap: typeof pairsToMap; extractTask(source: string, taskId: string): string | undefined; _extractTask(yamlDoc: ReturnType, taskId: string, callback?: (element: yaml.YAMLMap) => void): yaml.Document | undefined; replaceTaskInDocument(source: string, taskId: string, newContent: string, block?: string, keyName?: string): string | undefined; sort: typeof sort; getAllCharts: typeof getAllCharts; getChartAtPosition: typeof getChartAtPosition; localizeElementAtIndex: typeof localizeElementAtIndex; getTaskType: typeof getTaskType; swapTasks(source: string, taskId1: string, taskId2: string): any; insertTask(source: string, taskId: string, newTask: string, insertPosition: "before" | "after", parentTaskId?: string): string; insertSection(sectionType: string, source: string, task: string): string; insertErrorInFlowable: typeof insertErrorInFlowable; /** * Delete an item in any section by matching it's id * @param source the full yaml source * @param section the yaml identifier of the section to delete from * @param id the id of the item to delete * @returns yaml (source) without the item */ deleteSection(source: string, section: string, id: string): string; deleteTask(source: string, taskId: string, section: string): string; getLastTask(source: string, parentTaskId?: string): string | undefined; checkTaskAlreadyExist(source: string, taskYaml: string): any; isParentChildrenRelation(source: string, task1: string, task2: string): boolean; replaceIdAndNamespace: typeof replaceIdAndNamespace; updateMetadata: typeof updateMetadata; cleanMetadata: typeof cleanMetadata; getMetadata: typeof getMetadata; deleteMetadata: typeof deleteMetadata; flowHaveTasks: typeof flowHaveTasks; extractPluginDefault: typeof extractPluginDefault; replacePluginDefaultsInDocument: typeof replacePluginDefaultsInDocument; deletePluginDefaults: typeof deletePluginDefaults; extractFieldFromMaps: typeof extractFieldFromMaps; getVersionAtPosition: typeof getVersionAtPosition; }; //# sourceMappingURL=YamlUtilsLegacy.d.ts.map