2020-03-05 15:25:18 -08:00
|
|
|
export interface IAttachment {
|
|
|
|
fields: {
|
|
|
|
item?: object[];
|
|
|
|
};
|
|
|
|
}
|
2024-11-20 12:57:27 -08:00
|
|
|
|
|
|
|
// Used for SendAndWaitMessage
|
|
|
|
export interface TextBlock {
|
|
|
|
type: string;
|
|
|
|
text: string;
|
|
|
|
emoji?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface SectionBlock {
|
|
|
|
type: 'section';
|
|
|
|
text: TextBlock;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DividerBlock {
|
|
|
|
type: 'divider';
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ButtonElement {
|
|
|
|
type: 'button';
|
|
|
|
style?: 'primary';
|
|
|
|
text: TextBlock;
|
|
|
|
url: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ActionsBlock {
|
|
|
|
type: 'actions';
|
|
|
|
elements: ButtonElement[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface SendAndWaitMessageBody {
|
|
|
|
channel: string;
|
|
|
|
blocks: Array<DividerBlock | SectionBlock | ActionsBlock>;
|
|
|
|
}
|