Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "spi/message/MessageClient"

Index

Type aliases

DataSource

DataSource: "static" | "users" | "channels" | "conversations" | "external"

RequiredMessageOptions

RequiredMessageOptions: Pick<MessageOptions, "id" | "thread"> & { id: string }

Functions

addressEvent

addressSlackChannels

  • Shortcut for creating a SlackDestination which addresses the given channels.

    Parameters

    • team: string

      Slack workspace ID to create Destination for.

    • Rest ...channels: string[]

      Slack channel names to send messages to.

    Returns SlackDestination

    MessageClient Destination to pass to send.

addressSlackChannelsFromContext

  • Shortcut for creating a SlackDestination which addresses the given channels in all Slack teams connected to the context.

    Parameters

    • ctx: HandlerContext

      Handler context as passed to the Handler handle method.

    • Rest ...channels: string[]

      Slack channel names to send messages to.

    Returns Promise<SlackDestination>

    MessageClient Destination to pass to send.

addressSlackUsers

  • Shortcut for creating a SlackDestination which addresses the given users.

    Parameters

    • team: string

      Slack workspace ID to create Destination for.

    • Rest ...users: string[]

      Slack user names to send message to.

    Returns SlackDestination

    MessageClient Destination to pass to send.

addressSlackUsersFromContext

  • Shortcut for creating a SlackDestination which addresses the given users in all Slack teams connected to the context.

    Parameters

    • ctx: HandlerContext

      Handler context as passed to the Handler handle method.

    • Rest ...users: string[]

      Slack user names to send message to.

    Returns Promise<SlackDestination>

    MessageClient Destination to pass to send.

addressWeb

buttonForCommand

chatButtonFrom

chatMenuFrom

commandName

  • commandName(command: any): string

isFileMessage

  • isFileMessage(object: any): object is SlackFileMessage

isSlackMessage

  • isSlackMessage(object: any): object is SlackMessage

menuForCommand

mergeParameters

  • mergeParameters(command: any, parameters: any): any
  • Merge the provided parameters into any parameters provided as command object instance variables.

    Parameters

    • command: any
    • parameters: any

    Returns any

Object literals

Const MessageMimeTypes

MessageMimeTypes: object

Valid MessageClient types.

APPLICATION_JSON

APPLICATION_JSON: string = "application/json"

PLAIN_TEXT

PLAIN_TEXT: string = "text/plain"

SLACK_FILE_JSON

SLACK_FILE_JSON: string = "application/x-atomist-slack-file+json"

SLACK_JSON

SLACK_JSON: string = "application/x-atomist-slack+json"

Generated using TypeDoc