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 🙏

© 2024 – Pkg Stats / Ryan Hefner

arsystem

v1.0.1

Published

The is an open source implementation of the BCM Remedy Action Request System version 9.1 as described in their publicly available documentation located here: https://docs.bmc.com/docs/ars91/en/developing-an-api-program-609071507.html. Since the ARSystem e

Downloads

1

Readme

BMC Remedy ARSystem

The is an open source implementation of the BCM Remedy Action Request System version 9.1 as described in their publicly available documentation located here: https://docs.bmc.com/docs/ars91/en/developing-an-api-program-609071507.html. Since the ARSystem environment can vary from company to company with the ability to create custom forms, I have opted to only implement basic functionality. However, this will provide a nice head start with ARSystem API development.

Usage

The examples are written in TypeScript:

import { ARSystemAPI, ARSystemError } from 'arsystem';

// The configuration. Please don't store passwords in code. This should all be loaded by a configuration file.
const arConfig = {
  api: {
    hostname: 'myarsystem.instance.somewhere.com',
    port: 9443,
    authString: 'myAuthString'
  },
  serviceAccount: {
    user: 'someServiceUser',
    password: 'someServicePassword'
  }
};

// Create an instance of the ARSystem API
const api = new ARSystemAPI(arConfig);

/**
 * Get a token and make a request. It's up to you and your application's requirements if it is
 * appropriate to use a service account or get tokens for each user interacting with the API. Also,
 * ARSystem tokens have an expiration time by default of 1 hour. It's also up to your design whether
 * you want to juggle tokens and expirations or if you just want to get a token, make a bunch of
 * requests and then release the token each time.
 *
 * Because of the one hour default, the easiest route is to use a service account so you always have
 * the credentials on hand to acquire new tokens. Then just acquire a token for a batch of requests
 * and release the token when the requests are compelte.
 */
api.getToken().then(async (token) => {
  const formName = 'WOI:WorkOrder';
  const query = `'Work Order ID' = "WO0000000123456"`;
  const fields = ['Summary', 'Work Order Type', 'Priority'];
  const method = 'get';
  await api
    .request(token, formName, method, { query, fields })
    .then((result) => {
      console.log(JSON.stringify(result, null, 2));
    })
    .catch((err: ARSystemError) => console.log(err.toString()));
  await api.releaseToken(token).then(() => console.log('Token released'));
});

/**
 * Example of getting a user specific token. This will return a token in the context of the given
 * username and password instead of the service account.
 */
api.getToken('username', 'password').then(async (token) => {
  const formName = 'WOI:WorkOrder';
  const query = `'Work Order ID' = "WO0000000123456"`;
  const fields = ['Summary', 'Work Order Type', 'Priority'];
  const method = 'get';
  await api
    .request(token, formName, method, { query, fields })
    .then((result) => {
      console.log(JSON.stringify(result, null, 2));
    })
    .catch((err: ARSystemError) => console.log(err.toString()));
  await api.releaseToken(token).then(() => console.log('Token released'));
});