Socket
Socket
Sign inDemoInstall

@servisbot/sb-sdk

Package Overview
Dependencies
43
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @servisbot/sb-sdk

An SDK to interact with ServisBOT


Version published
Weekly downloads
3.1K
decreased by-1.49%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

sb-sdk

An SDK for all your ServisBOT Needs

Goal

  • Lightweight SDK to interact with ServisBOTs AWS4 signed APIs across many clients including ** portal ** servisbot cli

Install

npm install --save @servisbot/sb-sdk

BREAKING CHANGES

From version 6.6.0 onwards - SB.Auth now requires two new parameters for working with lithium resources - lithiumHttpApiUrl and cognitoJwtToken 8.0.0 - Changes to AuthProfile contracts to move towards consistency with lithium

12.0.0 - Changes to a number of the metric requests - start and end are no longer epoch timestamps

  • queryUserInput
  • queryDAUMetrics
  • queryAPIMetrics
  • querySessionEventMetrics
  • QueryRestrictionGroupMetrics

15.0.0 - Drawbridge Removed

  • Remove Security Class
  • Remove create,join,leave,message functions from conversation

Getting Started

Auth

The Auth class requires Organization, Bullseye Url, Virtual Assistant URL, lithiumHttpApiUrl and Credentials for aws4 signed requests.

  1. A function that returns the credentials
  2. An object containing the credentials

To work with Lithium a cognito cognitoJwtToken is required, this is the token passed to cognito to get user pool details.

SDK clients also take a client name, to help identify where SDK requests are originating from - e.g. @servisbot/myClient@1.0.0.

As an object

const fetch = require('node-fetch') || window.fetch;
const SB = require('@servisbot/sb-sdk')(fetch, "@servisbot/myClient@1.0.0");

const auth = new SB.Auth({
  organization: '<Your Organization>',
  bullseyeUrl:'<ServisBOT bullseye url>',
  virtualAssistantUrl:'<ServisBOT virtual assistant url>',
  brocaUrl:'<ServisBOT broca url>',
  metrickyUrl:'<ServisBOT metricky url>',
  credentials:{
    accessKeyId: '<Access Key Id>',
    secretAccessKey: '<Secret Access Key>',
    sessionToken: '<Session Token>'
  }, 
  cognitoJwtToken: '<JWT Token>',
  timezone:'<Your local timezone (optional)>'
});

As a function, async supported

const fetch = require('node-fetch') || window.fetch;
const SB = require('@servisbot/sb-sdk')(fetch, "@servisbot/myClient@1.0.0");

const auth = new SB.Auth({
  organization: '<Your Organization>',
  bullseyeUrl:'<ServisBOT bullseye url>',
  credentials: () => async getYourCredentials(),
  cognitoJwtToken: '<JWT Token>'
});

Entities

Organization

AuthProfile

Bot

Worker

Endpoint

Conversation

EngagedConversation

Endpoint

Blueprint

APIConnector

RestrictionGroup

Secret

Goal

VirtualAssistant

User

SbApp

Project

Metric

Conversion

Intent

Job

MissedInput

Log

Slot

Content

ChatHistoryServer

IntentTraining

NLU

IntentTraining

AWS External Resources

Remote NLU

Pathway

Monitoring

Alarm

Email Template

Entity

Form

LargeLanguageModel

Subflow

CRM

FAQs

Last updated on 03 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc