Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update apps.connections.open API response type in SocketModeClient #1234

Merged
merged 1 commit into from May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/socket-mode/package.json
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
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