@temboplus/reports-client
v0.1.0
Published
A frontend client for fetching and downloading TemboPlus reports from the reports generation service.
Downloads
137
Readme
@temboplus/reports-client
A frontend client for discovering and downloading reports from the TemboPlus reports service pdf-maker.
Features
- Browser downloads for PDF and Excel output.
- Server-friendly
fetchReport()API when you want to save or stream the file yourself.
Installation
npm install @temboplus/reports-clientUsage
import {
FileFormat,
ProjectType,
ReportManager,
ReportType,
} from "@temboplus/reports-client";
const reports = new ReportManager();
await reports.downloadReport({
token: "your-auth-token",
projectType: ProjectType.DASHBOARD,
reportType: ReportType.DISBURSEMENT_WALLET_TRANSACTION_HISTORY,
fileFormat: FileFormat.PDF,
query: {
startDate: "2026-03-01T00:00:00.000Z",
endDate: "2026-03-31T23:59:59.999Z",
},
});Notes
downloadReport()is for browser environments.fetchReport()works when you want to save or stream the response yourself.
Developer Commands
make help
make build
make publish-dry-run
make publish-public