UNPKG

6.32 kBTypeScriptView Raw
1import type { WebAPICallResult } from '../../WebClient';
2export type ViewsUpdateResponse = WebAPICallResult & {
3 error?: string;
4 needed?: string;
5 ok?: boolean;
6 provided?: string;
7 response_metadata?: ResponseMetadata;
8 view?: View;
9 warning?: string;
10};
11export interface ResponseMetadata {
12 messages?: string[];
13}
14export interface View {
15 app_id?: string;
16 app_installed_team_id?: string;
17 blocks?: Block[];
18 bot_id?: string;
19 callback_id?: string;
20 clear_on_close?: boolean;
21 close?: Close;
22 external_id?: string;
23 hash?: string;
24 id?: string;
25 notify_on_close?: boolean;
26 previous_view_id?: string;
27 private_metadata?: string;
28 root_view_id?: string;
29 state?: State;
30 submit?: Close;
31 submit_disabled?: boolean;
32 team_id?: string;
33 title?: Close;
34 type?: string;
35}
36export interface Block {
37 accessory?: Accessory;
38 alt_text?: string;
39 author_name?: string;
40 block_id?: string;
41 description?: Close;
42 dispatch_action?: boolean;
43 element?: PurpleElement;
44 elements?: StickyElement[];
45 fallback?: string;
46 fields?: Close[];
47 hint?: Close;
48 image_bytes?: number;
49 image_height?: number;
50 image_url?: string;
51 image_width?: number;
52 is_animated?: boolean;
53 label?: Close;
54 optional?: boolean;
55 provider_icon_url?: string;
56 provider_name?: string;
57 slack_file?: SlackFile;
58 text?: Close;
59 thumbnail_url?: string;
60 title?: Close;
61 title_url?: string;
62 type?: string;
63 video_url?: string;
64}
65export interface Accessory {
66 alt_text?: string;
67 fallback?: string;
68 image_bytes?: number;
69 image_height?: number;
70 image_url?: string;
71 image_width?: number;
72 slack_file?: SlackFile;
73 type?: string;
74}
75export interface SlackFile {
76 id?: string;
77 url?: string;
78}
79export interface Close {
80 emoji?: boolean;
81 text?: string;
82 type?: CloseType;
83 verbatim?: boolean;
84}
85export declare enum CloseType {
86 Empty = "",
87 Mrkdwn = "mrkdwn",
88 PlainText = "plain_text"
89}
90export interface PurpleElement {
91 accessibility_label?: string;
92 action_id?: string;
93 alt_text?: string;
94 confirm?: Confirm;
95 default_to_current_conversation?: boolean;
96 dispatch_action_config?: DispatchActionConfig;
97 fallback?: string;
98 filter?: Filter;
99 focus_on_load?: boolean;
100 image_bytes?: number;
101 image_height?: number;
102 image_url?: string;
103 image_width?: number;
104 initial_channel?: string;
105 initial_conversation?: string;
106 initial_date?: string;
107 initial_date_time?: number;
108 initial_option?: Option;
109 initial_time?: string;
110 initial_user?: string;
111 initial_value?: InitialValueClass | string;
112 max_length?: number;
113 min_length?: number;
114 min_query_length?: number;
115 multiline?: boolean;
116 option_groups?: OptionGroup[];
117 options?: Option[];
118 placeholder?: Close;
119 response_url_enabled?: boolean;
120 slack_file?: SlackFile;
121 style?: string;
122 text?: Close;
123 timezone?: string;
124 type?: string;
125 url?: string;
126 value?: string;
127}
128export interface Confirm {
129 confirm?: Close;
130 deny?: Close;
131 style?: string;
132 text?: Close;
133 title?: Close;
134}
135export interface DispatchActionConfig {
136 trigger_actions_on?: string[];
137}
138export interface Filter {
139 exclude_bot_users?: boolean;
140 exclude_external_shared_channels?: boolean;
141 include?: any[];
142}
143export interface Option {
144 description?: Close;
145 text?: Close;
146 url?: string;
147 value?: string;
148}
149export interface InitialValueClass {
150 block_id?: string;
151 elements?: InitialValueElement[];
152 type?: string;
153}
154export interface InitialValueElement {
155 border?: number;
156 elements?: FluffyElement[];
157 indent?: number;
158 offset?: number;
159 style?: string;
160 type?: string;
161}
162export interface FluffyElement {
163 border?: number;
164 elements?: TentacledElement[];
165 indent?: number;
166 offset?: number;
167 style?: string;
168 type?: string;
169}
170export interface TentacledElement {
171 channel_id?: string;
172 fallback?: string;
173 format?: string;
174 name?: string;
175 range?: string;
176 skin_tone?: number;
177 style?: Style;
178 team_id?: string;
179 text?: string;
180 timestamp?: number;
181 type?: ElementType;
182 unicode?: string;
183 unsafe?: boolean;
184 url?: string;
185 user_id?: string;
186 usergroup_id?: string;
187 value?: string;
188}
189export interface Style {
190 bold?: boolean;
191 client_highlight?: boolean;
192 code?: boolean;
193 highlight?: boolean;
194 italic?: boolean;
195 strike?: boolean;
196 unlink?: boolean;
197}
198export declare enum ElementType {
199 Broadcast = "broadcast",
200 Channel = "channel",
201 Color = "color",
202 Date = "date",
203 Emoji = "emoji",
204 Link = "link",
205 Team = "team",
206 Text = "text",
207 User = "user",
208 Usergroup = "usergroup"
209}
210export interface OptionGroup {
211 label?: Close;
212 options?: Option[];
213}
214export interface StickyElement {
215 accessibility_label?: string;
216 action_id?: string;
217 alt_text?: string;
218 confirm?: Confirm;
219 default_to_current_conversation?: boolean;
220 fallback?: string;
221 filter?: Filter;
222 focus_on_load?: boolean;
223 image_bytes?: number;
224 image_height?: number;
225 image_url?: string;
226 image_width?: number;
227 initial_channel?: string;
228 initial_channels?: string[];
229 initial_conversation?: string;
230 initial_conversations?: string[];
231 initial_date?: string;
232 initial_date_time?: number;
233 initial_option?: Option;
234 initial_options?: Option[];
235 initial_time?: string;
236 initial_user?: string;
237 initial_users?: string[];
238 max_selected_items?: number;
239 min_query_length?: number;
240 option_groups?: OptionGroup[];
241 options?: Option[];
242 placeholder?: Close;
243 response_url_enabled?: boolean;
244 slack_file?: SlackFile;
245 style?: string;
246 text?: Close;
247 timezone?: string;
248 type?: string;
249 url?: string;
250 value?: string;
251 workflow?: Workflow;
252}
253export interface Workflow {
254 trigger?: Trigger;
255}
256export interface Trigger {
257 customizable_input_parameters?: CustomizableInputParameter[];
258 url?: string;
259}
260export interface CustomizableInputParameter {
261 name?: string;
262 value?: string;
263}
264export type State = {};
265//# sourceMappingURL=ViewsUpdateResponse.d.ts.map
\No newline at end of file