Commit Graph

3 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
7a70195ac0 feat(sdk): add table accept header to report fetchers and refactor audit log hooks
- Add `accept: application/json+table` header to all SDK report table
  fetcher functions for proper table response negotiation
- Refactor audit log query hooks to use SDK fetch functions instead of
  manual API calls with qs.stringify
- Modernize useInfiniteQuery to object syntax with initialPageParam
- Replace deprecated keepPreviousData option with placeholderData import
- Uncomment AuditLogHeader, AuditLogLoadingBar, and AuditLogBody components

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 18:52:44 +02:00
Ahmed Bouhuolia
4a84d5996e wip 2026-05-27 17:37:39 +02:00
Ahmed Bouhuolia
d5ba54fe5e feat(sdk-ts): add JSON, CSV, XLSX, and PDF support to report functions
Add multi-format support to SDK-TS report functions:

- Add utility types: OpResponseBodyCsv, OpResponseBodyXlsx, OpResponseBodyPdf
- Create modular report structure in src/reports/ directory
- Implement 5 format functions for each of 18 reports:
  - Table format (existing): fetch*Table()
  - JSON format: fetch*Json()
  - CSV format: fetch*Csv() (returns Blob)
  - XLSX format: fetch*Xlsx() (returns Blob)
  - PDF format: fetch*Pdf() (returns Blob)

Reports with multi-format support:
1. Balance Sheet
2. Trial Balance Sheet
3. Profit/Loss Sheet
4. Cashflow Statement
5. General Ledger
6. Journal
7. Receivable Aging Summary
8. Payable Aging Summary
9. Customer Balance Summary
10. Vendor Balance Summary
11. Transactions By Customers
12. Transactions By Vendors
13. Transactions By Reference
14. Sales By Items
15. Purchases By Items
16. Inventory Valuation
17. Inventory Item Details
18. Sales Tax Liability Summary

Backward compatibility maintained via reports.ts re-export.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 05:56:16 +02:00