import type { Analysis } from "./analyzer"; import type { JsonEL } from "./node/el/jsonEL"; import type { VirtualLine } from "./parser/std/virtualLine"; import type { figPDFTypes } from "./renderer/common/docx/FigDataManager"; export declare const intypeChoices: readonly ["fromext", "lawtext", "xml", "json"]; export declare const outtypeChoices: readonly ["fromext", "lawtext", "xml", "json", "html", "htmlfragment", "docx"]; type ToSingleKeyObj = T extends unknown ? { [K in T]: V; } : never; export interface RunArgs { input: { elaws: string; } | ToSingleKeyObj, string>; outtypes: Exclude<(typeof outtypeChoices)[number], "fromext">[]; analyze: boolean; format: boolean; controlel: boolean; figpdf: (typeof figPDFTypes)[number]; } export declare const runHelp = "usage: lawtext.run()\n\nexample: lawtext.run({ input: {elaws:\"405AC0000000088\"}, outtypes: [\"lawtext\"] }).then(r => console.log(r.lawtext))\n\noptions:\n input: { elaws: string } | { lawtext: string } | { xml: string } | { json: string }\n # For `elaws` input, specify lawID or lawNum to be requested to e-LAWS API.\n outtypes: (\"lawtext\" | \"xml\" | \"json\" | \"html\" | \"htmlfragment\" | \"docx\")[]\n # Specify the output types.\n figpdf: \"srcText\" | \"embed\" | \"render\" | \"embedAndRender\" [default: \"embed\"]\n # (Only applicable for the combination of `elaws` input and `docx` output.)\n # Specify how to process embedded PDF files.\n analyze: boolean [default: false]\n # If true, conduct the analysis process.\n format: boolean [default: false]\n # If true, format the XML or JSON output.\n controlel: boolean [default: false]\n # If true, emit the control elements in XML or JSON output.\n"; export interface RunResult { virtuallines: VirtualLine[]; analysis: Analysis; docx: Uint8Array | Buffer; lawtext: string; xml: string; json: JsonEL; html: string; htmlfragment: string; } export declare const run: { (args: RunArgs): Promise>; help: string; }; export {};