Skip to content

Commit

Permalink
Update apps.connections.open API response type in SocketModeClient (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch authored May 19, 2021
1 parent 547d63f commit 80deced
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/socket-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"dependencies": {
"@slack/logger": "^3.0.0",
"@slack/web-api": "^6.0.0",
"@slack/web-api": "^6.2.3",
"@types/node": ">=12.0.0",
"@types/p-queue": "^2.3.2",
"@types/ws": "^7.2.5",
Expand Down
8 changes: 4 additions & 4 deletions packages/socket-mode/src/SocketModeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import WebSocket from 'ws'; // tslint:disable-line:import-name
import Finity, { StateMachine } from 'finity'; // tslint:disable-line:import-name
import {
WebClient,
WebAPICallResult,
AppsConnectionsOpenResponse,
WebAPICallError,
ErrorCode as APICallErrorCode,
addAppMetadata,
Expand Down Expand Up @@ -66,7 +66,7 @@ export class SocketModeClient extends EventEmitter {
.submachine(Finity.configure()
.initialState('authenticating')
.do(() => {
return this.webClient.apps.connections.open().then((result: WebAPICallResult) => {
return this.webClient.apps.connections.open().then((result: AppsConnectionsOpenResponse) => {
return result;
}).catch((error) => {
this.logger.error(error);
Expand Down Expand Up @@ -154,7 +154,7 @@ export class SocketModeClient extends EventEmitter {
.submachine(Finity.configure()
.initialState('authenticating')
.do(() => {
return this.webClient.apps.connections.open().then((result: WebAPICallResult) => {
return this.webClient.apps.connections.open().then((result: AppsConnectionsOpenResponse) => {
return result;
}).catch((error) => {
this.logger.error(error);
Expand Down Expand Up @@ -367,7 +367,7 @@ export class SocketModeClient extends EventEmitter {
* Begin an Socket Mode session. This method must be called before any messages can
* be sent or received.
*/
public start(): Promise<WebAPICallResult> {
public start(): Promise<AppsConnectionsOpenResponse> {
this.logger.debug('start()');

// delegate behavior to state machine
Expand Down

0 comments on commit 80deced

Please sign in to comment.