@accounter/server
Version:
Accounter GraphQL server
18 lines (17 loc) • 1.05 kB
TypeScript
import { ReportData } from '../types/index.js';
/**
* Converts a SHAAM6111 report to a file with proper Windows-1255 encoding.
* @param report The report string or ReportData object to convert.
* @param fileName The name of the file to create.
* @param validate If true, validates the report before converting.
* @returns A File object containing the encoded report.
*/
export declare function convertReportToFile(report: string | ReportData, fileName?: string, validate?: boolean): File;
/**
* Reads a SHAAM6111 report from a file with proper Windows-1255 decoding.
* @param reportFile The file to read the report from.
* @param parseToObject If true, parses the report into a ReportData object; if false, returns the raw report string.
* @param validate If true, validates the report after decoding.
* @returns A Promise that resolves to either the raw report string or a parsed ReportData object.
*/
export declare function readReportFromFile(reportFile: File, parseToObject?: boolean, validate?: boolean): Promise<string | ReportData>;