@slack/socket-mode
Advanced tools
Comparing version 1.3.0-rc.1 to 1.3.0
@@ -38,8 +38,2 @@ import { EventEmitter } from 'eventemitter3'; | ||
/** | ||
* Start a Socket Mode session asynchronously. | ||
* It may take a few milliseconds before being connected. | ||
* This method must be called before any messages can be sent or received. | ||
*/ | ||
connect(): Promise<void>; | ||
/** | ||
* End a Socket Mode session. After this method is called no messages will be sent or received | ||
@@ -46,0 +40,0 @@ * unless you call start() again later. |
@@ -42,2 +42,3 @@ "use strict"; | ||
Event["ExplicitDisconnect"] = "explicit disconnect"; | ||
Event["UnableToSocketModeStart"] = "unable_to_socket_mode_start"; | ||
})(Event || (Event = {})); | ||
@@ -251,19 +252,2 @@ /** | ||
/** | ||
* Start a Socket Mode session asynchronously. | ||
* It may take a few milliseconds before being connected. | ||
* This method must be called before any messages can be sent or received. | ||
*/ | ||
connect() { | ||
return new Promise((resolve, reject) => { | ||
try { | ||
// The state machine handles all the WebSocket releated operations. | ||
this.stateMachine.handle(Event.Start); | ||
resolve(); | ||
} | ||
catch (e) { | ||
reject(e); | ||
} | ||
}); | ||
} | ||
/** | ||
* End a Socket Mode session. After this method is called no messages will be sent or received | ||
@@ -338,3 +322,3 @@ * unless you call start() again later. | ||
// Observe this event when the error which causes reconnecting or disconnecting is meaningful | ||
this.emit('unable_to_socket_mode_start', error); | ||
this.emit(Event.UnableToSocketModeStart, error); | ||
let isRecoverable = true; | ||
@@ -341,0 +325,0 @@ if (error.code === web_api_1.ErrorCode.PlatformError && |
{ | ||
"name": "@slack/socket-mode", | ||
"version": "1.3.0-rc.1", | ||
"version": "1.3.0", | ||
"description": "Official library for using the Slack Platform's Socket Mode API", | ||
@@ -5,0 +5,0 @@ "author": "Slack Technologies, LLC", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
82050
994