import * as xlsx from 'xlsx'; import type { NutrientResult } from '@modusjs/units'; import type { InputFile, SupportedFileType } from './json.js'; import ModusResult from '@oada/types/modus/v1/modus-result.js'; import type { LabConfig } from './labs/index.js'; import { labConfigsMap } from './labs/index.js'; export * as labs from './labs/index.js'; export declare const supportedFormats: string[]; export type SupportedFormats = 'generic'; export declare function parseWorkbook({ wb, str, arrbuf, base64, }: { wb?: xlsx.WorkBook; str?: string; arrbuf?: ArrayBuffer; base64?: string; }): xlsx.WorkBook; export declare function parse({ wb, str, arrbuf, base64, format, lab, labConfigs, allowOverrides, }: { wb?: xlsx.WorkBook; str?: string; arrbuf?: ArrayBuffer; base64?: string; format?: 'generic'; lab?: LabConfig | keyof typeof labConfigsMap.keys; labConfigs?: LabConfig[]; allowOverrides?: boolean; }): ModusResult[]; export declare function prep({ wb, str, arrbuf, base64, format, lab, labConfigs, }: { wb?: xlsx.WorkBook; str?: string; arrbuf?: ArrayBuffer; base64?: string; format?: 'generic'; lab?: LabConfig | keyof typeof labConfigsMap.keys; labConfigs?: LabConfig[]; }): WorkbookInfo; export declare function partitionSheets(wb: xlsx.WorkBook): { datasheets: DataSheet[]; metadatasheet: MetaDataSheet | undefined; }; type MetaDataSheet = { rows: any[]; sheetname: string; }; type DataSheet = { colnames: string[]; allrows: any[]; rows: any[]; sheetname: string; }; export declare function getOrAutodetectLab({ datasheets, allowImprovise, labConfigs: userLabConfigs, }: { datasheets: DataSheet[]; allowImprovise?: boolean; labConfigs?: LabConfig[]; }): LabConfig | undefined; export type WorkbookInfo = { datasheets: DataSheet[]; labConfig?: LabConfig; pointMeta?: Record; }; type ColumnHeader = { original: string; element: string; modusid?: string; units?: string; nutrientResult: NutrientResult; unitsOverride?: string; }; export declare function parseColumnHeaderName(original: string, labConfig?: LabConfig): ColumnHeader; export type ToCsvOpts = { ssurgo?: boolean; }; export declare function toCsv(input: ModusResult | ModusResult[], opts?: ToCsvOpts): { wb: xlsx.WorkBook; str: string; }; export declare function toCsvObject(input: ModusResult, separateMetadata?: boolean): any[]; export declare function toLabConfig(files: InputFile[] | InputFile, labConfigs?: LabConfig[]): Promise; export type LabConfigResult = { original_filename: string; original_type: SupportedFileType; labConfig?: LabConfig; }; export type FilenameArgs = { wbinfo: WorkbookInfo; index?: number; filename: string; type: SupportedFileType; }; export declare function fixModus(modus: ModusResult): ModusResult; export declare function fixDepthUnits(modus: ModusResult): ModusResult; export declare function setModusNRUnits(modus: ModusResult, units?: NutrientResult[]): ModusResult;