fix(exports): stabilize published types and compatibility with updated dependencies

This commit is contained in:
2026-04-16 19:41:55 +00:00
parent cb6b3db15a
commit 40ffc2b355
25 changed files with 4539 additions and 5354 deletions
+9 -5
View File
@@ -534,6 +534,10 @@ export class SkrApi {
*/
private async generatePdfReports(exporter: SkrExport, options: IExportOptions): Promise<void> {
if (!this.reports) throw new Error('Reports not initialized');
const skrType = this.currentSKRType;
if (!skrType) {
throw new Error('API not initialized. Call initialize() first.');
}
const pdfOptions: IPdfReportOptions = {
companyName: options.companyInfo?.name || 'Unternehmen',
@@ -554,19 +558,19 @@ export class SkrApi {
const trialBalance = await this.reports.getTrialBalance({
dateFrom: options.dateFrom,
dateTo: options.dateTo,
skrType: this.currentSKRType
skrType,
});
const incomeStatement = await this.reports.getIncomeStatement({
dateFrom: options.dateFrom,
dateTo: options.dateTo,
skrType: this.currentSKRType
skrType,
});
const balanceSheet = await this.reports.getBalanceSheet({
dateFrom: options.dateFrom,
dateTo: options.dateTo,
skrType: this.currentSKRType
skrType,
});
// Generate PDFs
@@ -702,7 +706,7 @@ export class SkrApi {
const transaction = await this.postTransaction(transactions[i]);
results.push(transaction);
} catch (error) {
errors.push({ index: i, error: error.message });
errors.push({ index: i, error: error instanceof Error ? error.message : String(error) });
}
}
@@ -735,7 +739,7 @@ export class SkrApi {
const account = await this.createAccount(accounts[i]);
results.push(account);
} catch (error) {
errors.push({ index: i, error: error.message });
errors.push({ index: i, error: error instanceof Error ? error.message : String(error) });
}
}