type ValueType = 'enrichment' | 'function' | 'literal' | 'variable'; export interface DirectiveMetadata { _metadata?: { label?: string; type: ValueType; }; } export declare function isDirective(value: FieldValue): value is Directive; export interface LiteralDirective extends DirectiveMetadata { '@literal': PrimitiveValue | Record; } export declare function isLiteralDirective(value: FieldValue): value is LiteralDirective; export interface TemplateDirective extends DirectiveMetadata { '@template': string; } export declare function isTemplateDirective(value: FieldValue): value is TemplateDirective; export declare function getFieldValue(value: FieldValue): unknown; export interface PathDirective extends DirectiveMetadata { '@path': string; } export declare function isPathDirective(value: FieldValue): value is PathDirective; type RequireOnlyOne = { [K in Keys]-?: Partial, undefined>> & Required>; }[Keys] & Pick>; export interface IfDirective extends DirectiveMetadata { '@if': RequireOnlyOne<{ blank?: FieldValue; else?: FieldValue; exists?: FieldValue; then: FieldValue; }, 'blank' | 'exists'>; } export declare function isIfDirective(value: FieldValue): value is IfDirective; export interface ArrayPathDirective extends DirectiveMetadata { '@arrayPath': [Directive | string, { [key: string]: FieldValue; } | undefined] | [Directive | string]; } export declare function isArrayPathDirective(value: FieldValue): value is ArrayPathDirective; export interface CaseDirective extends DirectiveMetadata { '@case': { operator: string; value?: FieldValue; }; } export declare function isCaseDirective(value: FieldValue): value is CaseDirective; export interface ReplaceDirective extends DirectiveMetadata { '@replace': { global: PrimitiveValue; ignorecase: PrimitiveValue; pattern: string; replacement: string; pattern2: string; replacement2: string; value?: FieldValue; }; } export declare function isReplaceDirective(value: FieldValue): value is ReplaceDirective; export interface JSONDirective extends DirectiveMetadata { '@json': { value: FieldValue; mode: PrimitiveValue; }; } export declare function isJSONDirective(value: FieldValue): value is JSONDirective; export interface FlattenDirective extends DirectiveMetadata { '@flatten': { value: FieldValue; separator: string; }; } export declare function isFlattenDirective(value: FieldValue): value is FlattenDirective; export interface MergeDirective extends DirectiveMetadata { '@merge': { objects: { [key: string]: FieldValue; }[]; direction: 'left' | 'right'; }; } export declare function isMergeDirective(value: FieldValue): value is MergeDirective; export interface TransformDirective extends DirectiveMetadata { '@transform': { apply: FieldValue; mapping: FieldValue; }; } export declare function isTransformDirective(value: FieldValue): value is TransformDirective; export interface ExcludeWhenNullDirective extends DirectiveMetadata { '@excludeWhenNull': FieldValue; } export declare function isExcludeWhenNullDirective(value: FieldValue): value is ExcludeWhenNullDirective; export interface LiquidDirective extends DirectiveMetadata { '@liquid': string; } export declare function isLiquidDirective(value: FieldValue): value is LiquidDirective; export type Directive = ArrayPathDirective | CaseDirective | IfDirective | LiteralDirective | PathDirective | ReplaceDirective | TemplateDirective | JSONDirective | FlattenDirective | MergeDirective | TransformDirective | ExcludeWhenNullDirective | LiquidDirective; export type PrimitiveValue = boolean | number | string | null; export type FieldValue = Directive | PrimitiveValue | { [key: string]: FieldValue; } | FieldValue[] | undefined; export declare function getFieldValueKeys(value: FieldValue): string[]; export declare function getRawKeys(input: FieldValue): string[]; export declare function getTemplateKeys(input: string): string[]; export {};