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

jenkins-api-ts-typings

v0.8.7

Published

Jenkins JSON API TypeScript Typings

Readme

Build Status Tests License: MIT

Jenkins JSON API TypeScript Typings

NPM: https://www.npmjs.com/package/jenkins-api-ts-typings
Jenkins: https://www.andreistraut.info/jenkins/view/Jenkins%20TS%20Typings/

This library offers a set of classes to use when working with Jenkins JSON API. Jenkins Job, Build, Actions, Health Report, User, View, Changeset and Node / Computer are supported

Installation and usage

Install from NPM:

In your project's root folder:

npm install --save jenkins-api-ts-typings

In systemjs.config.js:

map: {
    'jenkins-api-ts-typings': 'npm:jenkins-api-ts-typings'
},
packages: {
    'jenkins-api-ts-typings': {
        main: './dist/jenkins-api-ts-typings.es6.js', 
        defaultExtension: 'js'
    }
}

Build from source:

In the project's root folder, after git clone:

npm install
npm run build-pkg

This generates in the /dist folder:

  • the full unpacked artifact (including the git revision built - gitinfo)
  • the library's packed artifact file (.tar.gz)

Run tests:

npm run test

Run tests with linting and coverage reporting:

npm run test:prod

This library is based on this excellent TS starter kit, so all commands/scripts described in there are also available for this library.

Usage

After installation, just import normally:

import { IJenkinsBuild } from 'jenkins-api-ts-typings';
import { JenkinsBuild } from 'jenkins-api-ts-typings';

For each class, you can feed it the corresponding Jenkins JSON response:

let jsonText = // some JSON string that Jenkins returns
let build: IJenkinsBuild = new JenkinsBuild();
build.fromJsonString(jsonText);

or, more simply, without using JSON.stringify (since version 0.3.0):

let json = // some JSON
let build: IJenkinsBuild = new JenkinsBuild();
build.fromJson(jsonText);

Features and limitations

  • Some of the types are not as of yet supported, and as such are defined as any within their containing objects: -- Job: actions, health report, property, queue item, scm, modules -- Build: actions, artifacts, maven artifacts, executor, culprits -- Changeset: paths -- Node: actions, executors, load statistics, monitor data, offline cause, one off executors Some of these properties will be implemented in the future. Also, if json data is found in the response, these values are set (while maintaining any type)
  • When calling fromJsonString(jsonData:string) on an object, the JSON string parameter value is also kept, and accessible later via getJsonData()
  • Sub objects (i.e. builds of a job, user of a changeset) are not automatically parsed from JSON, they need to be parsed separately and then set into their container
  • All array objects (including Array<any> types) are automatically initialized in the class contructors. All value objects (string, number, etc) remain as undefined until they are set:
let build:IJenkinsBuild = new JenkinsBuild();
build.url === undefined     // true
build.name === undefined    // true
build.actions === undefined // false
build.actions.length        // 0