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

help-fem

Package Overview
Dependencies
Maintainers
5
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

help-fem - npm Package Compare versions

Comparing version 1.0.13 to 2.0.0

61

help-fem.js

@@ -15,6 +15,6 @@ ;(function() {

// ### socket.io-client
// The main driver for this client module, the Socket.io client provides an easy
// interface for talking to a Socket.io server.
var io = require('socket.io-client');
// ### femio-client
// The main driver for this client module, the femio-client provides an easy
// interface for talking to a FEMIO server.
var io = require('femio-client');

@@ -40,3 +40,3 @@ // ## HelpFem

// 2. `organizationId` || `namespace` :: `String` - The namespace you would like to
// connect to in your socket.io server. The option is aliased to `organizationId`
// connect to in your FEMIO server. The option is aliased to `organizationId`
// because Help.com namespaces are organization IDs.

@@ -71,3 +71,7 @@ // 3. `user` :: `Boolean` - Whether or not the client is a user or a customer.

// Set the `organizationId` and `namespace`.
this.organizationId = this.namespace = options.organizationId || options.namespace;
var org = options.organizationId || options.namespace;
if (org === 'start') {
org = undefined;
}
this.organizationId = this.namespace = org;

@@ -88,3 +92,3 @@ // Set the `role` of the client, defaulting to `'customer'`.

// Connect to the Socket.io server and store the socket information.
// Connect to the FEMIO server and store the socket information.
var transports = window.WebSocket && window.WebSocket.CLOSING === 2

@@ -94,6 +98,12 @@ ? ['websocket', 'polling']

this.socket = io.connect(this.uri + '/' + this.organizationId, {
transports: transports
this.socket = io(this.uri, {
transports: transports,
orgId: this.organizationId,
clientId: options.clientId || undefined
});
this.socket.on('error', function(err) {
console.error('socket err', err);
});
// Reply callback map for this client.

@@ -146,3 +156,3 @@ this.replyCallbacks = {};

// `generateCallback` is a helper function to properly generate a callback
// that works with Socket.io.
// that works with femio-client.
function generateCallback(event) {

@@ -199,3 +209,3 @@ var getRegisteredCallback;

// Register all the Socket.IO callbacks.
// Register all the femio-client callbacks.
for (var event in events) {

@@ -234,2 +244,3 @@ self.socket.on(event, generateCallback(event));

meta.type &&
meta.type !== 'connection' &&
(meta.type === 'error' || meta.result !== 'SUCCESS') ?

@@ -1408,2 +1419,26 @@ 'error'

);
},
dumpState: function(callback) {
this.parent._doSimpleEmit(
this.parent._emitSessionEvent,
{type: 'dumpState'},
{},
callback
);
},
chatAndAvailabilityDetails: function(callback) {
this.parent._doSimpleEmit(
this.parent._emitSessionEvent,
{type: 'chat-and-availability-details'},
{},
callback
);
},
renameCustomer: function(data, callback) {
this.parent._doSimpleEmit(
this.parent._emitSessionEvent,
{type: 'rename-customer'},
data,
callback
);
}

@@ -1495,3 +1530,3 @@ },

// #### Generic Emit
// This method can be called to send any kind of message through Socket.io without
// This method can be called to send any kind of message through femio-client without
// having to directly invoke the socket object.

@@ -1501,3 +1536,3 @@ emit: function(type, payload) {

this.socket.emit(type, payload);
this.socket.send(type, payload);
},

@@ -1504,0 +1539,0 @@ // #### Generate Meta

{
"name": "help-fem",
"version": "1.0.13",
"version": "2.0.0",
"description": "A Browserify/Node.js client module for the Help.com team's FEM.",

@@ -28,3 +28,3 @@ "main": "help-fem.js",

"dependencies": {
"socket.io-client": "1.3",
"femio-client": "git+ssh://git@github.com/helpdotcom/femio-client.git#v1.0.0",
"underscore": "^1.8.2",

@@ -31,0 +31,0 @@ "uuid": "^2.0.1"

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