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

easyenrollsdk

v0.3.3

Published

A JavaScript SDK implementing TPAStream's EasyEnrollment Platform

Readme

'Tpastream Logo'

JavaScript EasyEnrollment SDK

WARNING THIS REPO IS DEPRECATED

Go to the new repo here

Version

0.3.3

Philosophy

This SDK is designed to implement the EasyEnrollment platform into our clients own hosted web-portals. We want to make it fit as seemlessly as possible with the current experience of their sites; because of this, we have provided functionality to add callbacks to the end of each of the necessary flows and we are as unopinionated as possible about the styling of the SDK's flow.

In the spirit of creating a seemless process we will also be forgoing the verification of emails for users using easyenrollment. Instead, we will be relying on the implementers to provide valid emails, first names, and last names in order to create an association of information to a user.

Client Usage

We have decided that the best possible way to implement this SDK is a simple config pattern. A prospective user will communicate with us to recieve an SDK apiToken as well as employer system keys.

A mock implementation might look something like the following:

Using TPAStream as a CDN

    <script src="https://app.tpastream.com/static/js/sdk.js"></script>
    <script>
        window.TPAStream_EasyEnroll({
            el: '#react-hook', // This is where we nest all the pages for the form. You will pass in a selector.
            tenant: {
                systemKey: 'test',
                vendor: 'internal'
            },
            employer: {
                systemKey: 'some-system-key',
                vendor: 'internal',
                name: 'some-employer-name'
            },
            user: {
                firstName: 'Joe', 
                lastName: 'Sajor', 
                email: '[email protected]' // You're going to need to provide This
            },
            isDemo: false,
            apiToken: 'VeryLegitKey', // We'll provide this.
            realTimeVerification: true,
            doneChoosePayer: () => {},
            doneTermsOfService: () => {},
            doneCreatedForm: () => {},
            donePostCredentials: ({ params }) => {},
            doneRealTime: () => {},
            doneEasyEnroll: ({ employer, payer, tenant, policyHolder, user }) => {},
            donePopUp: () => {},
            handleFormErrors: (error, {response, request, config}) => {} // This is a callback which will basically act as a try catch for form issues
            userSchema: {} // This is advanced functionality for those who know react-jsonform-schema
        })
    </script>

As shown above the SDK is mounted by calling window.TPAStream_EasyEnroll({}) and passing in the desired parameters.

NPM package


// Install with NPM
npm i easyenrollsdk

import TPAStream_EasyEnroll from 'easyenrollsdk';

TPAStream_EasyEnroll({
  el: '#react-hook',
  isDemo: true
});

The SDK currently supports the following parameters:

  • el (This is where the SDK will render)
  • tenant
    • systemKey
    • vendor (This will usually be 'internal')
  • employer
    • systemKey
    • vendor (This will usually be 'internal')
    • name
  • user
    • firstName
    • lastName
    • email
    • memberSystemKey (This key is your own identifier for members in your system)
    • phoneNumber
    • dateOfBirth
  • apiToken
  • isDemo (This will let you set it up without worrying about a user)
  • realTimeVerification
  • userSchema (This is an object {} following react-jsonschema-form pattern for making ui:schema)
  • doneChoosePayer*
  • doneTermsOfService*
  • doneCreatedForm*
  • donePostCredentials*
    • params (All submitted params to our API)
  • doneRealTime*
  • donePopUp*
  • doneEasyEnroll* (Below are args passed into the func)
    • employer
    • payer
    • policyHolder
    • user
    • tenant
  • handleFormErrors*
    • error
    • error_parts
      • response
      • request
      • config

(Required parameters are Highlighted)

Function (() => {}) paramters are Starred*

Functionality

The SDK currently has the following flow:

  1. Mount Onto Page and Make initial request.
  2. From response data answer --> Do we have multiple payers?
    • Yes --> Proceed to Step 4
    • No --> Proceed to Step 3
  3. Render choose payer's page. Let user select payer to add their new credentials to.
  4. Render payer form.
    • This page will have Terms of Use, Acknowledgement, and any relevant form fields like Security Questions or DOB.
  5. Handle Realtime Validation
    • If Realtime validation is off proceed to Step 7
  6. Direct persons to re-enter credentials if they were found to be invalid or if valid proceed to Step 7
  7. Render finish form. Prompt if they would like to add more credentials.
    • If yes this will restart from Step 1

Here is what this flow looks like visually. Easy Enrollment Flow

Example Page

Here!

Package

Here!