fox-block-builder
Version:
Maintainable code for loop slack-block-kit-like modal builder
40 lines (39 loc) • 1.24 kB
TypeScript
import { ModalRdo } from '../../plugin';
import { PluginModalAction } from '../enum/modal.enum';
export type TModalStateLabelInValue = {
key: string;
label: string;
value: string;
};
export type TModalValues = {
[blockId: string]: string | string[] | TModalStateLabelInValue | TModalStateLabelInValue[] | {
file: {
response: {
file_infos: {
id: string;
user_id: string;
create_at: number;
update_at: number;
delete_at: number;
name: string;
extension: string;
size: number;
mime_type: string;
width: number;
height: number;
has_preview_image: boolean;
clientId: string;
post_id?: string;
mini_preview?: string;
archived: boolean;
link?: string;
}[];
client_ids: string[];
};
};
} | undefined;
};
export type TPluginGetModalResponse = {
modal: ModalRdo;
action: PluginModalAction;
};