import { Page } from 'puppeteer'; interface ExtraCol { colName: T; data: string; position?: number; } type GetColumnIndexType = (colName: T) => number; declare enum RowValidationPolicy { NONE = "NONE", NON_EMPTY = "NON_EMPTY", EXACT_MATCH = "EXACT_MATCH" } type GroupByOptions = { cols: string[]; handler?: (rows: string[][], getColumnIndex: GetColumnIndexType) => string[]; }; type ColParserFn = (value: string, formattedIndex: number, getColumnIndex: GetColumnIndexType) => string; type RowTransformFn = (row: string[], getColumnIndex: GetColumnIndexType) => void; type RowValidatorFn = (row: string[], getColumnIndex: GetColumnIndexType, rowIndex: number, rows: Readonly) => boolean; type ParserSettingsOptional = { temporaryColNames: string[]; extraCols: ExtraCol[]; withHeader: boolean; csvSeparator: string; newLine: string; rowValidationPolicy: RowValidationPolicy; groupBy: GroupByOptions; rowValidator: RowValidatorFn; rowTransform: RowTransformFn; asArray: boolean; rowValuesAsObject: boolean; rowValuesAsArray: boolean; colFilter: (elText: string[], index: number) => string; colParser: ColParserFn; optionalColNames: string[]; reverseTraversal: boolean; headerRowsSelector: string | null; headerRowsCellSelector: string; bodyRowsSelector: string; bodyRowsCellSelector: string; excludedColumns: (rows: string[][], getColumnIndex: GetColumnIndexType) => string[]; }; interface ParserSettings extends Partial { selector: string; readonly allowedColNames: Record; } type FullParserSettings = Required; type ExtraColsMapper = (row: string[], key: keyof ExtraCol) => string[]; interface MergeParserSettings { allowedColNames: FullParserSettings['allowedColNames']; extraCols: FullParserSettings['extraCols']; temporaryColNames: FullParserSettings['temporaryColNames']; } type OmitOrFalsy = Omit & { [key in K]?: undefined | false; }; declare const mergeParserSettings: (to: MergeParserSettings, from: MergeParserSettings, ignoredAllowedColumns?: string[]) => MergeParserSettings; declare class GeneralError extends Error { } declare class NoTablesFoundError extends GeneralError { } declare class InvalidSettingsError extends GeneralError { } declare class MissingRequiredColumnsError extends GeneralError { } declare class InvalidColumnError extends GeneralError { } declare function tableParser(page: Page, settings: Omit & { asArray: true; rowValuesAsArray?: false; rowValuesAsObject?: false; }): Promise; declare function tableParser(page: Page, settings: Omit & { asArray: true; rowValuesAsArray: true; rowValuesAsObject?: false; }): Promise; declare function tableParser(page: Page, settings: Omit & { asArray: boolean; rowValuesAsObject: true; rowValuesAsArray?: false; allowedColNames: Record; extraCols?: Array>; rowTransform?: RowTransformFn; rowValidator?: RowValidatorFn; temporaryColNames?: Array; }): Promise>>; declare function tableParser(page: Page, options: OmitOrFalsy): Promise; export { ColParserFn, ExtraCol, ExtraColsMapper, FullParserSettings, GeneralError, GetColumnIndexType, GroupByOptions, InvalidColumnError, InvalidSettingsError, MergeParserSettings, MissingRequiredColumnsError, NoTablesFoundError, OmitOrFalsy, ParserSettings, ParserSettingsOptional, RowTransformFn, RowValidationPolicy, RowValidatorFn, mergeParserSettings, tableParser };