UNPKG

maxun-core

Version:

Core package for Maxun, responsible for data extraction

25 lines (24 loc) 1.02 kB
import { Workflow, WorkflowFile, ParamType, SelectorArray } from './types/workflow'; /** * Class for static processing the workflow files/objects. */ export default class Preprocessor { static validateWorkflow(workflow: WorkflowFile): any; /** * Extracts parameter names from the workflow. * @param {WorkflowFile} workflow The given workflow * @returns {String[]} List of parameters' names. */ static getParams(workflow: WorkflowFile): string[]; /** * List all the selectors used in the given workflow (only literal "selector" * field in WHERE clauses so far) */ static extractSelectors(workflow: Workflow): SelectorArray; /** * Recursively crawl `object` and initializes params - replaces the `{$param : paramName}` objects * with the defined value. * @returns {Workflow} Copy of the given workflow, modified (the initial workflow is left untouched). */ static initWorkflow(workflow: Workflow, params?: ParamType): Workflow; }