0.0.34 • Published 6 months ago
@types/node-slack v0.0.34
Installation
npm install --save @types/node-slack
Summary
This package contains type definitions for node-slack (https://github.com/xoxco/node-slack).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-slack.
index.d.ts
// Type definitions for node-slack
// Project: https://github.com/xoxco/node-slack
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import request = require('request');
declare class Slack {
constructor(hookUrl: string, option?: Slack.Option);
send(message: Slack.Message): any; //TODO: Here comes deferred's promise as a return type
send(message: Slack.Message, callback: Slack.SendCallback): request.Request;
respond(query: Slack.Query): Slack.TextResponse;
respond(query: Slack.Query, callback: Slack.ResponseCallback): Slack.TextResponse;
}
declare namespace Slack {
interface Option {
proxy: string;
}
interface Message {
text: string;
channel?: string | undefined;
username?: string | undefined;
icon_emoji?: string | undefined;
attachments?: any[] | undefined;
unfurl_links?: boolean | undefined;
link_names?: number | undefined;
}
interface SendCallback {
(err: any, body: any): any;
}
interface Query {
token?: string | undefined;
team_id?: string | undefined;
channel_id?: string | undefined;
channel_name?: string | undefined;
timestamp?: number | undefined;
user_id?: string | undefined;
user_name?: string | undefined;
text: string;
}
interface TextResponse {
text: string;
}
interface ResponseCallback {
(err: any, query: Query): any;
}
}
export = Slack;
Additional Details
- Last updated: Thu, 08 Jul 2021 18:51:26 GMT
- Dependencies: @types/request
- Global values: none
Credits
These definitions were written by Qubo.
0.0.32
8 months ago
0.0.33
7 months ago
0.0.34
6 months ago
0.0.31
3 years ago
0.0.30
7 years ago
0.0.29
8 years ago
0.0.28
8 years ago
0.0.27-alpha
8 years ago
0.0.26-alpha
8 years ago
0.0.25-alpha
8 years ago
0.0.24-alpha
8 years ago
0.0.23-alpha
8 years ago
0.0.22-alpha
8 years ago
0.0.21-alpha
8 years ago
0.0.16-alpha
8 years ago
0.0.15-alpha
8 years ago