Skip to content

Commit

Permalink
Add Slack modal types
Browse files Browse the repository at this point in the history
  • Loading branch information
cdupuis committed Aug 6, 2020
1 parent db4cbd9 commit 8a29b79
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion lib/SlackMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ export interface Block {
| "file"
| "header"
| "image"
| "section";
| "section"
| "input";
block_id?: string;
}

Expand Down Expand Up @@ -457,3 +458,30 @@ export interface ChannelOptionElement extends Element {
confirm?: ConfirmObject;
response_url_enabled?: boolean;
}

export interface SlackModal {
type: "modal";
title: PlainTextElement;
blocks: Block[];
close?: PlainTextElement;
submit?: PlainTextElement;
private_metadata?: string;
callback_id?: string;
clear_on_close?: boolean;
notify_on_close?: boolean;
external_id?: boolean;
}

export interface InputBlock extends Block {
type: "input";
label: PlainTextElement;
element:
| PlainTextElement
| DatePickerElement
| StaticOptionElement
| UserOptionElement
| ConversationOptionElement
| ChannelOptionElement;
hint?: PlainTextElement;
optional?: boolean;
}

0 comments on commit 8a29b79

Please sign in to comment.