Class: SlackEventAdapter
An adapter for Slack's Events API.
Extends
unknown
Constructors
new SlackEventAdapter()
new SlackEventAdapter(signingSecret, __namedParameters): SlackEventAdapter
Parameters
• signingSecret: string
The token used to authenticate signed requests from Slack's Events API.
• __namedParameters: EventAdapterOptions
= {}
Returns
Overrides
EventEmitter.constructor
Defined in
packages/events-api/src/adapter.ts:47
Properties
includeBody
includeBody: boolean;
Whether to include the API event bodies in adapter event listeners.
Defined in
packages/events-api/src/adapter.ts:23
includeHeaders
includeHeaders: boolean;
Whether to include request headers in adapter event listeners.
Defined in
packages/events-api/src/adapter.ts:28
signingSecret
readonly signingSecret: string;
The token used to authenticate signed requests from Slack's Events API.
Defined in
packages/events-api/src/adapter.ts:18
waitForResponse
waitForResponse: boolean;
When true
prevents the adapter from responding by itself and leaves that up to listeners.
Defined in
packages/events-api/src/adapter.ts:33
Methods
createServer()
createServer(): Promise<Server>
Creates an HTTP server to listen for event payloads.
Returns
Promise
<Server
>
Defined in
packages/events-api/src/adapter.ts:76
expressMiddleware()
expressMiddleware(): RequestHandler
Returns a middleware-compatible adapter.
Returns
RequestHandler
Defined in
packages/events-api/src/adapter.ts:120
requestListener()
requestListener(): RequestListener
Creates a request listener.
Returns
RequestListener
Defined in
packages/events-api/src/adapter.ts:130
start()
start(port): Promise<Server>
Starts a server on the specified port.
Parameters
• port: number
The port number to listen on.
Returns
Promise
<Server
>
The server from the built-in http
module.
Defined in
packages/events-api/src/adapter.ts:87
stop()
stop(): Promise<void>
Stops the server started by SlackEventAdapter.start.
Returns
Promise
<void
>