Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ActionsBlock

ActionsBlock: { blockId?: string; elements: ActionsBlockElement[]; type: "actions" }

Type declaration

ActionsBlockElement

Attachment

Attachment: { actions: { confirm?: { dismissText?: string; okText?: string; text?: string; title?: string }; name?: string; options?: { text: string; value: string }[]; style?: string; text?: string; type?: string; value?: string }[]; attachmentType?: string; authorIcon?: string; authorLink?: string; authorName?: string; callbackId?: string; color?: string; fallback: string; fields?: { short: boolean; title: string; value: string }[]; footer?: string; footerIcon?: string; imageUrl?: string; pretext?: string; text?: string; thumbUrl?: string; title?: string; titleLink?: string; ts?: number }

Type declaration

  • actions: { confirm?: { dismissText?: string; okText?: string; text?: string; title?: string }; name?: string; options?: { text: string; value: string }[]; style?: string; text?: string; type?: string; value?: string }[]
  • Optional attachmentType?: string
  • Optional authorIcon?: string
  • Optional authorLink?: string
  • Optional authorName?: string
  • Optional callbackId?: string
  • Optional color?: string
  • fallback: string
  • Optional fields?: { short: boolean; title: string; value: string }[]
  • Optional footer?: string
  • Optional footerIcon?: string
  • Optional imageUrl?: string
  • Optional pretext?: string
  • Optional text?: string
  • Optional thumbUrl?: string
  • Optional title?: string
  • Optional titleLink?: string
  • Optional ts?: number

AvailableMethod

AvailableMethod: "api.test" | "apps.permissions.info" | "apps.permissions.request" | "auth.revoke" | "auth.test" | "bots.info" | "channels.archive" | "channels.create" | "channels.history" | "channels.info" | "channels.invite" | "channels.join" | "channels.kick" | "channels.leave" | "channels.list" | "channels.mark" | "channels.rename" | "channels.replies" | "channels.setPurpose" | "channels.setTopic" | "channels.unarchive" | "chat.delete" | "chat.meMessage" | "chat.postEphemeral" | "chat.postMessage" | "chat.getPermalink" | "chat.scheduleMessage" | "chat.deleteScheduledMessage" | "chat.scheduledMessages.list" | "chat.unfurl" | "chat.update" | "conversations.archive" | "conversations.close" | "conversations.create" | "conversations.history" | "conversations.info" | "conversations.invite" | "conversations.join" | "conversations.kick" | "conversations.leave" | "conversations.list" | "conversations.members" | "conversations.open" | "conversations.rename" | "conversations.replies" | "conversations.setPurpose" | "conversations.setTopic" | "conversations.unarchive" | "dnd.endDnd" | "dnd.endSnooze" | "dnd.info" | "dnd.setSnooze" | "dnd.teamInfo" | "emoji.list" | "files.comments.add" | "files.comments.delete" | "files.comments.edit" | "files.delete" | "files.info" | "files.list" | "files.revokePublicURL" | "files.sharedPublicURL" | "files.upload" | "groups.archive" | "groups.create" | "groups.createChild" | "groups.history" | "groups.info" | "groups.invite" | "groups.kick" | "groups.leave" | "groups.list" | "groups.mark" | "groups.open" | "groups.rename" | "groups.replies" | "groups.setPurpose" | "groups.setTopic" | "groups.unarchive" | "im.close" | "im.history" | "im.list" | "im.mark" | "im.open" | "im.replies" | "oauth.access" | "oauth.token" | "pins.add" | "pins.list" | "pins.remove" | "reactions.add" | "reactions.get" | "reactions.list" | "reactions.remove" | "reminders.add" | "reminders.complete" | "reminders.delete" | "reminders.info" | "reminders.list" | "rtm.connect" | "rtm.start" | "search.all" | "search.files" | "search.messages" | "stars.add" | "stars.list" | "stars.remove" | "team.accessLogs" | "team.billableInfo" | "team.info" | "team.integrationLogs" | "team.profile.get" | "usergroups.create" | "usergroups.disable" | "usergroups.enable" | "usergroups.list" | "usergroups.update" | "usergroups.users.list" | "usergroups.users.update" | "users.deletePhoto" | "users.getPresence" | "users.identity" | "users.info" | "users.list" | "users.setActive" | "users.setPhoto" | "users.setPresence" | "users.profile.get" | "users.profile.set" | "views.open" | "views.publish" | "views.update" | "views.push"

BlockElement

ButtonElement

ButtonElement: { actionId: string; confirm?: ConfirmObject; style?: "primary" | "danger"; text: PlainTextObject; type: "button"; url?: string; value?: string }

Type declaration

  • actionId: string
  • Optional confirm?: ConfirmObject
  • Optional style?: "primary" | "danger"
  • text: PlainTextObject
  • type: "button"
  • Optional url?: string
  • Optional value?: string

Channel

Channel: { id: string; members?: User[]; name: string }

Type declaration

  • id: string
  • Optional members?: User[]
  • name: string

ChannelsSelectElement

ChannelsSelectElement: { actionId: string; confirm?: ConfirmObject; initialChannel?: string; placeholder: PlainTextObject; type: "channels_select" }

Type declaration

ClientConfig

ClientConfig: { accessToken: string; onRequest?: OnRequestFunction; origin?: string }

Type declaration

  • accessToken: string
  • Optional onRequest?: OnRequestFunction
  • Optional origin?: string

CompositionObject

CompositionObject: TextObject | ConfirmObject | OptionObject

ConfirmObject

ConfirmObject: { confirm: PlainTextObject; deny: PlainTextObject; text: TextObject; title: PlainTextObject }

Type declaration

ContextBlock

ContextBlock: { blockId?: string; elements: ContextBlockElement[]; type: "context" }

Type declaration

ContextBlockElement

ContextBlockElement: TextObject | ImageElement

ConversationListOptions

ConversationListOptions: { cursor?: string; excludeArchived?: boolean; limit?: number; types?: string }

Type declaration

  • Optional cursor?: string
  • Optional excludeArchived?: boolean
  • Optional limit?: number
  • Optional types?: string

ConversationMembersOptions

ConversationMembersOptions: { cursor?: string; limit?: number }

Type declaration

  • Optional cursor?: string
  • Optional limit?: number

ConversationsSelectElement

ConversationsSelectElement: { actionId: string; confirm?: ConfirmObject; initialConversation?: string; placeholder: PlainTextObject; type: "conversations_select" }

Type declaration

  • actionId: string
  • Optional confirm?: ConfirmObject
  • Optional initialConversation?: string
  • placeholder: PlainTextObject
  • type: "conversations_select"

DatepickerElement

DatepickerElement: { actionId: string; confirm?: ConfirmObject; initialDate?: string; placeholder?: PlainTextObject; type: "datepicker" }

Type declaration

DeleteMessageOptions

DeleteMessageOptions: { asUser?: boolean; channel: string; ts: string }

Type declaration

  • Optional asUser?: boolean

    Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.

  • channel: string

    Channel containing the message to be deleted.

  • ts: string

    Timestamp of the message to be deleted.

DeleteScheduledMessageOptions

DeleteScheduledMessageOptions: { asUser?: boolean; channel: string; scheduledMessageId: string }

Type declaration

  • Optional asUser?: boolean

    Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.

  • channel: string

    The channel the scheduled message is posting to

  • scheduledMessageId: string

    scheduledMessageId returned from call to chat.scheduleMessage

DividerBlock

DividerBlock: { blockId?: string; type: "divider" }

Type declaration

  • Optional blockId?: string
  • type: "divider"

ExternalSelectElement

ExternalSelectElement: { actionId: string; confirm?: ConfirmObject; initialOption?: OptionObject; minQueryLength?: number; placeholder: PlainTextObject; type: "external_select" }

Type declaration

FileBlock

FileBlock: { blockId?: string; externalId: string; source: string; type: "file" }

Type declaration

  • Optional blockId?: string
  • externalId: string
  • source: string
  • type: "file"

GetInfoOptions

GetInfoOptions: { includeLocale?: boolean }

Type declaration

  • Optional includeLocale?: boolean

GetPermalinkOptions

GetPermalinkOptions: { channel: string; messageTs: string }

Type declaration

  • channel: string

    The ID of the conversation or channel containing the message

  • messageTs: string

    A message's ts value, uniquely identifying it within a channel

GetScheduledMessagesOptions

GetScheduledMessagesOptions: { channel?: string; cursor?: string; latest?: string; limit?: number; oldest?: string }

Type declaration

  • Optional channel?: string

    The channel of the scheduled messages

  • Optional cursor?: string

    For pagination purposes, this is the cursor value returned from a previous call to chat.scheduledmessages.list indicating where you want to start this call from.

  • Optional latest?: string

    A UNIX timestamp of the latest value in the time range

  • Optional limit?: number

    Maximum number of original entries to return.

  • Optional oldest?: string

    A UNIX timestamp of the oldest value in the time range

HomeBlock

HomeView

HomeView: { blocks: HomeBlock[]; type: "home" } & ViewCommon

ImageBlock

ImageBlock: { altText: string; blockId?: string; imageUrl: string; title?: PlainTextObject; type: "image" }

Type declaration

  • altText: string
  • Optional blockId?: string
  • imageUrl: string
  • Optional title?: PlainTextObject
  • type: "image"

ImageElement

ImageElement: { altText: string; imageUrl: string; type: "image" }

Type declaration

  • altText: string
  • imageUrl: string
  • type: "image"

InputBlock

InputBlock: { blockId?: string; element: InputBlockElement; hint?: PlainTextObject; label: PlainTextObject; optional?: boolean; type: "input" }

Type declaration

InputBlockElement

MeMessageOptions

MeMessageOptions: { channel: string; text: string }

Type declaration

  • channel: string

    Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.

  • text: string

    Text of the message to send.

Message

Message: { attachments?: Attachment[] | string; blocks?: MessageBlock[] | string; text?: string }

Type declaration

MessageBlock

ModalBlock

ModalView

ModalView: { blocks: ModalBlock[]; clearOnClose?: boolean; close?: PlainTextObject; notifyOnClose?: boolean; submit?: PlainTextObject; title: PlainTextObject; type: "modal" } & ViewCommon

MrkdwnObject

MrkdwnObject: { text: string; type: "mrkdwn"; verbatim?: boolean }

Type declaration

  • text: string
  • type: "mrkdwn"
  • Optional verbatim?: boolean

MultiChannelsSelectElement

MultiChannelsSelectElement: { actionId: string; confirm?: ConfirmObject; initialChannels?: string[]; placeholder: PlainTextObject; type: "multi_channels_select" }

Type declaration

  • actionId: string
  • Optional confirm?: ConfirmObject
  • Optional initialChannels?: string[]
  • placeholder: PlainTextObject
  • type: "multi_channels_select"

MultiConversationsSelectElement

MultiConversationsSelectElement: { actionId: string; confirm?: ConfirmObject; initialConversations?: string[]; placeholder: PlainTextObject; type: "multi_conversations_select" }

Type declaration

  • actionId: string
  • Optional confirm?: ConfirmObject
  • Optional initialConversations?: string[]
  • placeholder: PlainTextObject
  • type: "multi_conversations_select"

MultiExternalSelectElement

MultiExternalSelectElement: { actionId: string; confirm?: ConfirmObject; initialOptions?: OptionObject[]; minQueryLength?: number; placeholder: PlainTextObject; type: "multi_external_select" }

Type declaration

MultiSelectElement

MultiStaticSelectElement

MultiStaticSelectElement: { actionId: string; confirm?: ConfirmObject; initialOptions?: OptionObject[]; optionGroups?: OptionGroupObject[]; options: OptionObject[]; placeholder: PlainTextObject; type: "multi_static_select" }

Type declaration

MultiUsersSelectElement

MultiUsersSelectElement: { actionId: string; confirm?: ConfirmObject; initialUsers?: string[]; placeholder: PlainTextObject; type: "multi_users_select" }

Type declaration

OAuthAPIResponse

OAuthAPIResponse: Record<string, any> & { ok: boolean }

OpenViewOptions

OpenViewOptions: { triggerId: string; view: View }

Type declaration

  • triggerId: string

    Exchange a trigger to post to the user.

  • view: View

    A view payload.

OptionGroupObject

OptionGroupObject: { label: PlainTextObject; options: OptionObject[] }

Type declaration

OptionObject

OptionObject: { text: PlainTextObject; url?: string; value: string }

Type declaration

OverflowElement

OverflowElement: { actionId: string; confirm?: ConfirmObject; options: OptionObject[]; type: "overflow" }

Type declaration

PlainTextInputElement

PlainTextInputElement: { actionId: string; initialValue: string; maxLength?: number; minLength?: number; multiline?: boolean; placeholder?: PlainTextObject; type: "plain_text_input" }

Type declaration

  • actionId: string
  • initialValue: string
  • Optional maxLength?: number
  • Optional minLength?: number
  • Optional multiline?: boolean
  • Optional placeholder?: PlainTextObject
  • type: "plain_text_input"

PlainTextObject

PlainTextObject: { emoji?: boolean; text: string; type: "plain_text" }

Type declaration

  • Optional emoji?: boolean
  • text: string
  • type: "plain_text"

PostEphemeralOptionalOptions

PostEphemeralOptionalOptions: { asUser?: boolean; attachments?: string | Attachment[]; linkNames?: boolean; parse?: "none" | "full" }

Type declaration

  • Optional asUser?: boolean

    Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.

  • Optional attachments?: string | Attachment[]

    A JSON-based array of structured attachments, presented as a URL-encoded string.

  • Optional linkNames?: boolean

    Find and link channel names and usernames.

  • Optional parse?: "none" | "full"

    Change how messages are treated. Defaults to none. See below.

PostEphemeralOptions

PostEphemeralOptions: PostEphemeralOptionalOptions & Message & { channel: string; user: string }

PostMessageOptionalOptions

PostMessageOptionalOptions: { asUser?: boolean; attachments?: string | Attachment[]; iconEmoji?: string; iconUrl?: string; linkNames?: boolean; parse?: "none" | "full"; replyBroadcast?: boolean; threadTs?: string; unfurlLinks?: boolean; unfurlMedia?: boolean; username?: string }

Type declaration

  • Optional asUser?: boolean
  • Optional attachments?: string | Attachment[]
  • Optional iconEmoji?: string
  • Optional iconUrl?: string
  • Optional linkNames?: boolean
  • Optional parse?: "none" | "full"
  • Optional replyBroadcast?: boolean
  • Optional threadTs?: string
  • Optional unfurlLinks?: boolean
  • Optional unfurlMedia?: boolean
  • Optional username?: string

PostMessageOptions

PostMessageOptions: PostMessageOptionalOptions & Message & { channel: string }

PublishViewOptions

PublishViewOptions: { hash?: string; userId: string; view: View }

Type declaration

  • Optional hash?: string

    A string that represents view state to protect against possible race conditions.

  • userId: string

    id of the user you want publish a view to.

  • view: View

    A view payload.

PushViewOptions

PushViewOptions: { triggerId: string; view: View }

Type declaration

  • triggerId: string

    Exchange a trigger to post to the user.

  • view: View

    A view payload.

RadioButtonsElement

RadioButtonsElement: { actionId: string; confirm?: ConfirmObject; initialOption?: OptionObject; options: OptionObject[]; type: "radio_buttons" }

Type declaration

ScheduleMessageOptions

ScheduleMessageOptions: Message & { asUser?: boolean; attachments?: string | Attachment[]; channel: string; linkNames?: boolean; parse?: "none" | "full"; postAt?: string; replyBroadcast?: boolean; threadTs?: string; unfurlLinks?: boolean; unfurlMedia?: boolean }

SectionBlock

SectionBlock: { accessory?: BlockElement; blockId?: string; fields?: TextObject[]; text: TextObject; type: "section" }

Type declaration

SelectElement

SendMessageSuccessResponse

SendMessageSuccessResponse: "ok"

StaticSelectElement

StaticSelectElement: { actionId: string; confirm?: ConfirmObject; initialOption?: OptionObject; optionGroups?: OptionGroupObject[]; options: OptionObject[]; placeholder: PlainTextObject; type: "static_select" }

Type declaration

TextObject

UnfurlOptions

UnfurlOptions: { channel: string; ts: string; unfurls: Record<string, any>; userAuthMessage?: string; userAuthRequired?: boolean; userAuthUrl?: string }

Type declaration

  • channel: string

    Channel ID of the message

  • ts: string

    Timestamp of the message to add unfurl behavior to.

  • unfurls: Record<string, any>

    URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.

  • Optional userAuthMessage?: string

    Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior

  • Optional userAuthRequired?: boolean

    Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain

  • Optional userAuthUrl?: string

    Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.

UpdateMessageOptions

UpdateMessageOptions: Message & { asUser?: boolean; attachments?: string | Attachment[]; blocks?: any; channel: string; linkNames?: boolean; parse?: "none" | "full"; text?: string; ts: string }

UpdateViewOptions

UpdateViewOptions: { externalId?: string; hash?: string; view: View; viewId?: string }

Type declaration

  • Optional externalId?: string

    A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either viewId or externalId is required.

  • Optional hash?: string

    A string that represents view state to protect against possible race conditions.

  • view: View

    A view object.

  • Optional viewId?: string

    A unique identifier of the view to be updated. Either viewId or externalId is required.

UserInfoOptions

UserInfoOptions: { includeLocale?: boolean }

Type declaration

  • Optional includeLocale?: boolean

UserListOptions

UserListOptions: { cursor?: string; includeLocale?: boolean; limit?: number }

Type declaration

  • Optional cursor?: string
  • Optional includeLocale?: boolean
  • Optional limit?: number

UsersSelectElement

UsersSelectElement: { actionId: string; confirm?: ConfirmObject; initialUser?: string; placeholder: PlainTextObject; type: "users_select" }

Type declaration

View

ViewCommon

ViewCommon: { callbackId?: string; externalId?: string; privateMetadata?: string }

Type declaration

  • Optional callbackId?: string
  • Optional externalId?: string
  • Optional privateMetadata?: string

Generated using TypeDoc