export interface ComputedFieldOptions { [key: string]: (item: any, index: number, allItems: any[]) => any; } /** * FlatFormatter - Advanced utility class with computed fields support and array slicing * Converts complex JSON objects into flat, readable text formats optimized for LLM consumption */ export declare class FlatFormatter { /** * Converts a JSON object to a flat format with optional computed fields */ static flatten(data: any, options: { format: 'sections' | 'numbered' | 'table' | 'separator'; itemPrefix?: string; itemSuffix?: string; indentLevel?: number; includeArrayIndices?: boolean; separator?: string; keyValueSeparator?: string; ignoreEmptyValues?: boolean; ignoredKeys?: string[]; customFormatters?: Record string>; entryTitleKey?: string; entryTitleAsPrefix?: boolean; entryTitleDefault?: string; computedFields?: ComputedFieldOptions; computedFieldsFirst?: boolean; indexOffset?: number; arraySliceStart?: number; arraySliceEnd?: number; }): string; /** * Converts a JSON object to sections format with markdown headers */ static toSections(data: any, options?: any): string; /** * Converts a JSON object to numbered list format */ static toNumberedList(data: any, options?: any): string; /** * Converts a JSON object to table-like format */ static toTable(data: any, options?: any): string; /** * Converts a JSON object to separator format */ static toSeparated(data: any, options?: any): string; /** * Convenience method for commonly used computed fields */ static withCommonComputedFields(data: any, options: any, includeIndex?: boolean, includePosition?: boolean, indexOffset?: number): string; /** * Convenience method for array slicing */ static sliceArray(data: any, start?: number, end?: number, options?: any): string; } /** * FormatConfigurator - Enables creating custom formatting configurations */ export declare class FormatConfigurator { private formatOptions; constructor(baseOptions?: any); withFormat(format: 'sections' | 'numbered' | 'table' | 'separator'): this; withItemPrefix(prefix: string): this; withItemSuffix(suffix: string): this; withIndentLevel(level: number): this; withSeparator(separator: string): this; withKeyValueSeparator(separator: string): this; ignoreEmptyValues(ignore: boolean): this; ignoreKeys(...keys: string[]): this; withCustomFormatter(key: string, formatter: (value: any) => string): this; withEntryTitleKey(key: string): this; withEntryTitleAsPrefix(asPrefix?: boolean): this; withEntryTitleDefault(defaultTitle: string): this; withComputedField(key: string, computeFn: (item: any, index: number, allItems: any[]) => any): this; withIndexField(key?: string, offset?: number): this; withPositionField(key?: string, offset?: number): this; computedFieldsFirst(first?: boolean): this; withIndexOffset(offset: number): this; withArraySlice(start?: number, end?: number): this; withArraySliceStart(start: number): this; withArraySliceEnd(end: number): this; build(): any; format(data: any): string; } //# sourceMappingURL=flat-formatter.service.d.ts.map