https://github.com/cityssm/node-faster-report-exporter
On demand exports of selected reports from the FASTER Web Fleet Management System.
https://github.com/cityssm/node-faster-report-exporter
asset-management faster-web fleet-management fmis puppeteer
Last synced: 10 months ago
JSON representation
On demand exports of selected reports from the FASTER Web Fleet Management System.
- Host: GitHub
- URL: https://github.com/cityssm/node-faster-report-exporter
- Owner: cityssm
- License: mit
- Created: 2024-08-21T18:19:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T03:03:04.000Z (about 1 year ago)
- Last Synced: 2025-04-05T13:03:00.580Z (about 1 year ago)
- Topics: asset-management, faster-web, fleet-management, fmis, puppeteer
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@cityssm/faster-report-exporter
- Size: 514 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# FASTER Web Report Exporter
[](https://www.npmjs.com/package/@cityssm/faster-report-exporter)
[](https://app.deepsource.com/gh/cityssm/node-faster-report-exporter/)
**On demand exports of selected reports from the
[FASTER Web Fleet Management System](https://fasterasset.com/products/fleet-management-software/)**.
This module uses a headless Puppeteer browser to log into FASTER Web,
navigate to the appropriate report, and select the preferred export format.
Once downloaded, the module returns the path to the downloaded file.
## Installation
```sh
npm install @cityssm/faster-report-exporter
```
## Usage
```javascript
import { FasterReportExporter } from '@cityssm/faster-report-exporter'
const reportExporter = new FasterReportExporter(
fasterTenant,
fasterUserName,
fasterPassword
)
reportExporter.setDownloadFolderPath('C:\\Temp')
/*
* Part Orders
*/
const partOrderReport =
await reportExporter.exportPartOrderPrint(partOrderNumber)
console.log(partOrderReport)
// => "C:\Temp\70578b74-261c-499c-bdfe-1ca6c17967b1.pdf"
/*
* Work Orders
*/
const technicianReport =
await reportExporter.exportWorkOrderTechnicianPrint(workOrderNumber)
const customerReport =
await reportExporter.exportWorkOrderCustomerPrint(workOrderNumber)
/*
* Message Logger
*/
const messageLoggerReport = await reportExporter.exportMessageLogger(
startDate,
endDate
)
/*
* Scheduled Reports
*/
const scheduledReport = await reportExporter.exportScheduledReport(
scheduleName,
startDate,
endDate
)
```
### Enabling Debug Output
This package uses the [debug](https://www.npmjs.com/package/debug) package
for debugging output.
For convenience, the debug namespace used by this pacakge,
and full namespace enable string are exported.
Debug output can be enabled programmatically, as shown in the example below.
```javascript
import { DEBUG_ENABLE_NAMESPACES } from '@cityssm/faster-report-exporter/debug'
import Debug from 'debug'
Debug.enable(DEBUG_ENABLE_NAMESPACES)
```
Debugging output can also be enabled using environment variables,
decribed in the debug package documentation.
## More Code for FASTER Web
[FASTER Web Report Parser](https://github.com/cityssm/node-faster-report-parser)
Parses select Excel and CSV reports from FASTER Web into usable data objects.
[Even more open source projects related to FASTER Web](https://github.com/cityssm/faster-web-projects)