0.6.1 • Published 10 months ago

@cityssm/faster-report-exporter v0.6.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

FASTER Web Report Exporter

npm (scoped) DeepSource Maintainability

On demand exports of selected reports from the FASTER Web Fleet Management System.

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

npm install @cityssm/faster-report-exporter

Usage

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 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.

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 Parses select Excel and CSV reports from FASTER Web into usable data objects.

Even more open source projects related to FASTER Web

0.5.0

11 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.6.1

10 months ago

0.6.0

10 months ago

0.3.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago