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

@rettersoft/rbs-sdk

v0.10.6

Published

Client sdk for retter business services

Downloads

63

Readme

Installation

npm install @rettersoft/rbs-sdk

Usage

RBS JS SDK can be used in two types of clients:

  1. User Apps: A user app can be any web app for different end user types like: end users, admin users, reporting users etc.
  2. Services: A service is a RBS service which sends actions to RBS Core service.

User initialization

Client can be initialized with a project id. Project ID can is a unique id of a project created in RBS developer console.

const rbs = RBS.getInstance({
  projectId: '{PROJECT_ID}'
})

Service initialization

const rbs = RBS.getInstance({
    projectId: request.projectId,
    developerId: 'rbs',
    serviceId: 'pm',
    secretKey: process.env.RBS_SECRET_KEY,
    region: RbsRegion.euWest1Beta,
}, true) // return new instance or cached instance

Developer Id: The id of the developer registered in RBS developer console.

Service Id: The id of the service this developer has registered in RBS developer console.

Secret Key: The secret key generated for this service in RBS developer console.

Rbs Url

Base RBS url for the SDK to connect to. For apps which live in RBS Cloud, this parameter should not be given.

const rbs = new RBS({
    projectId: "{PROJECT_ID}",
    rbsUrl: "https://core.rettermobile.com" // Default value
})

Example Action Call

let result = await rbs.send({
    action: 'rbs.someservice.request.SOME_ACTION',
    data: {
        "a": "1"
    }
})

Authenticate with custom token

let authResult = await rbs.authenticateWithCustomToken("{A_CUSTOM_TOKEN}")

Auth State Change Listener

rbs.authStatus.subscribe((event:RBSAuthChangedEvent) => {

})

Models:

export enum RBSAuthStatus {
    SIGNED_IN = "SIGNED_IN",
    SIGNED_IN_ANONYM = "SIGNED_IN_ANONYM",
    SIGNED_OUT = "SIGNED_OUT",
    AUTH_FAILED = "AUTH_FAILED"
}

export interface RBSAuthChangedEvent {
    authStatus: RBSAuthStatus
    identity?: string
    uid?: string
    message?: string
}