Interface EnrichmentData<EnrichmentContent, EnrichmentArguments>

interface EnrichmentData<
    EnrichmentContent extends MergeableRecord,
    EnrichmentArguments = undefined,
> {
    enrich: (
        e: FlowrSearchElement<ParentInformation>,
        data: PipelineOutput<
            Pipeline<IPipelineStep<PipelineStepName, (...args: any[]) => any>>,
        > & { dataflow: DataflowInformation; normalize: NormalizedAst },
        args: undefined | EnrichmentArguments,
    ) => EnrichmentContent;
    mapper: (c: EnrichmentContent) => FlowrSearchElement<ParentInformation>[];
}

Type Parameters

Properties

Properties

enrich: (
    e: FlowrSearchElement<ParentInformation>,
    data: PipelineOutput<
        Pipeline<IPipelineStep<PipelineStepName, (...args: any[]) => any>>,
    > & { dataflow: DataflowInformation; normalize: NormalizedAst },
    args: undefined | EnrichmentArguments,
) => EnrichmentContent

A function that is applied to each element of the search to enrich it with additional data.

The mapping function used by the Mapper.Enrichment mapper.