New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@matron/templates

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matron/templates

  • 0.16.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Jive Realtime Events SDK

Parse Realtime messages to feed a Call State Machine


  • Jive Realtime Events SDK

Getting started

Installation

npm install --save @jive/realtime-events

Example

import { ICallEventsAdapter, RealtimeManager, Call } from '@jive/realtime-events';

// Create an adapter to be attached to the State Machine Lifecycle
const adapter: ICallEventsAdapter = {
  startIncomingCall: (call: Call) => {
    console.log('Receiving Incoming Call');
  },
  startIncomingConversation: (call: Call) => {
    console.log('Answered to an incoming call');
  },
  timeoutIncomingCall: (call: Call) => {
    console.log('Does not answer to an incoming call');
  },
  startOutgoingCall: (call: Call) => {
    console.log('Executing an Outgoing call');
  },
  startOutgoingConversation: (call: Call) => {
    console.log('Recipient picked up the call');
  },
  timeoutOutgoingCall: (call: Call) => {
    console.log('Recipient has not picked up the call');
  },
  endConversation: (call: Call) => {
    console.log('The call is ended');
  }
};

// Create a manager by providing the user access token and the custom adapter
const manager = new RealtimeManager(accessToken, adapter);

// Start to listen to Realtime API, and keep-alive events
manager.start();

// Start to listen for a line events
const line = {
  id: '267c0d06-2ff2-4dcb-857b-2b7123467b84',
  number: '1234',
  name: 'Yann Renaudin',
  organizationId: '0127d974-f9f3-0704-2dee-000100420001'
};
manager.addSubscription(line);

Docs

1. State Machine

2. Realtime Manager

3. Adapters

FAQs

Package last updated on 27 Mar 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc