0.1.7 • Published 6 months ago

@types/slack-node v0.1.7

Weekly downloads
8,228
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/slack-node

Summary

This package contains type definitions for slack-node (https://github.com/clonn/slack-node-sdk).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slack-node.

index.d.ts

// Type definitions for slack-node v0.1
// Project: https://github.com/clonn/slack-node-sdk
// Definitions by: Joshua DeVinney <https://github.com/geoffreak>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import * as request from "request";

declare class Slack {
    token: string;
    domain: string;
    apiMode: boolean;
    url: string;
    timeout: number;
    maxAttempts: number;

    constructor(token?: string, domain?: string);
    composeUrl(): string;
    setWebhook(url: string): this;
    detectEmoji(emoji: string): { key: "icon_url" | "icon_emoji", val: string };
    webhook(options: Slack.WebhookOptions, callback: (err: any, response: Slack.WebhookResponse) => void): void;
    api(method: string, callback: (err: any, response: any) => void): this;
    api(method: string, options: any, callback: (err: any, response: any) => void): this;
}

declare namespace Slack {

    export interface WebhookOptions {
        icon_emoji?: string | undefined;
        response_type?: string | undefined;
        channel?: string | undefined;
        text?: string | undefined;
        username?: string | undefined;
        attachments?: any[] | undefined;
        link_names?: any;
    }

    export interface WebhookResponse {
        status: "fail" | "ok";
        statusCode: number;
        headers: any;
        response: any;
    }
}

export = Slack;

Additional Details

  • Last updated: Tue, 06 Jul 2021 16:34:56 GMT
  • Dependencies: @types/request
  • Global values: none

Credits

These definitions were written by Joshua DeVinney.

0.1.7

6 months ago

0.1.6

7 months ago

0.1.5

8 months ago

0.1.4

3 years ago

0.1.3

4 years ago

0.1.2

6 years ago

0.1.1

8 years ago