npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gmresearch/reports-client

v1.7.5

Published

Official TypeScript/JavaScript Client SDK for GMR Reports SaaS Engine

Readme

@gmresearch/reports-client

TypeScript client for the GMR Reports document rendering API. Renders PDF and XLSX from JasperReports (.jrxml), Eclipse BIRT and Crystal Reports templates.

Zero dependencies — it uses the runtime's own fetch, so there is nothing to audit and no transitive surface.

npm install @gmresearch/reports-client

Requires Node 18+ (or any runtime with a global fetch). Ships ES2022 with type declarations.

Getting a key

Sign up at gmrglobe.com for an API key. The Developer Free tier covers development, testing and evaluation; production use needs a subscription. You can try the API without signing up at sandbox.gmrglobe.com.

Usage

Everything renders through one call. Which report and which format are both arguments, so a new report type does not need a new method and asking for a workbook instead of a PDF is one field.

import { GmrReportsClient } from "@gmresearch/reports-client";

const client = new GmrReportsClient({
  apiKey: process.env.GMR_API_KEY!,
  baseUrl: "https://api.gmrglobe.com",
});

// A template you supply, with your own data
const pdf = await client.render({
  templateSource: jrxml,
  templateFormat: "jrxml",
  parameters: { title: "Invoice 4021" },
  data: [{ item: "Licence", amount: 1200 }],
});

Exactly one of type, templateName or templateSource identifies what to render; naming more than one is rejected rather than silently resolved.

The same report, either format

outputFormat defaults to "pdf":

const xlsx = await client.render({ type: "invoice", outputFormat: "xlsx" });

The result is an ArrayBuffer in both cases — write it, stream it, or hand it to a Blob.

What this deployment offers

const { types } = await client.listReportTypes();
// [{ type: "invoice", title: "Factura", outputFormats: ["pdf", "xlsx"] }, ...]

Read it rather than hard-coding a list: a deployment decides its own catalogue.

Other template dialects

templateFormat takes "jasper", "jrxml", "birt" or "crystal". Crystal means the XML report definition (.rpt.xml), not the binary .rpt — export it once from Crystal Designer.

Templates stored server-side

await client.uploadExternalTemplate("monthly-statement", jrxml);
const pdf = await client.render({ templateName: "monthly-statement", data: rows });

Consumption

const usage = await client.getTenantUsage(tenantId);
// { monthlyUsed: 412, monthlyQuota: 100000, ... }

A key reads its own tenant's usage; reading another's needs administrator credentials.

Deprecated

getInvoicePdf, getInvoiceExcel, renderDynamicPdf, renderBirtPdf, renderCrystalPdf and renderExternalPdf still work and delegate to render(). They encode the report and the format in the method name, which is why adding a report type used to mean adding methods. Prefer render().

Errors

A non-2xx response throws an Error carrying the status code and the server's message, so a failure tells you what the API said rather than only that something went wrong. A 429 means the plan's rate limit or monthly quota is spent — not that the service is down.

Licence

This client is licensed under the Apache License 2.0 and you may use, modify and redistribute it freely, including in open-source projects.

The GMR Reports rendering engine it talks to is commercial software under its own licence agreement. Installing this client grants you no rights in the engine.