slack-blocks-to-jsx 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,956 @@
1
+ type Element = ButtonElement | CheckboxesElement | DatePickerElement | DateTimePickerElement | EmailInputElement | ImageElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | NumberInputElement | OverflowMenuElement | PlainTextInputElement | RadioButtonsElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | TimePickerElement | UrlTextInputElement;
2
+ type ButtonElement = {
3
+ type: "button";
4
+ /**
5
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text text object} that defines the button's text. Can only be of ***type: plain_text***. ***text*** may truncate with ~30 characters. Maximum length for the ***text*** in this field is 75 characters.
6
+ */
7
+ text: TextObject<"plain_text">;
8
+ /**
9
+ * An identifier for this action. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_ids*** in the containing block. Maximum length for this field is 255 characters.
10
+ */
11
+ action_id?: string;
12
+ /**
13
+ * A URL to load in the user's browser when the button is clicked. Maximum length for this field is 3000 characters. If you're using ***url***, you'll still receive an {@link https://api.slack.com/interactivity/handling#payloads interaction payload} and will need to {@link https://api.slack.com/interactivity/handling#acknowledgment_response send an acknowledgement response}.
14
+ */
15
+ url?: string;
16
+ /**
17
+ * The value to send along with the {@link https://api.slack.com/interactivity/handling#payloads interaction payload}. Maximum length for this field is 2000 characters.
18
+ */
19
+ value?: string;
20
+ /**
21
+ * Decorates buttons with alternative visual color schemes. Use this option with restraint.
22
+ *
23
+ * ***primary*** gives buttons a green outline and text, ideal for affirmation or confirmation actions. ***primary*** should only be used for one button within a set.
24
+ *
25
+ * ***danger*** gives buttons a red outline and text, and should be used when the action is destructive. Use ***danger*** even more sparingly than ***primary***.
26
+ *
27
+ * If you don't include this field, the default button style will be used.
28
+ */
29
+ style?: Omit<Style, "confirm"> | undefined;
30
+ /**
31
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog after the button is clicked.
32
+ */
33
+ confirm?: ConfirmDialogObject;
34
+ /**
35
+ * A label for longer descriptive text about a button element. This label will be read out by screen readers instead of the button {@link https://api.slack.com/reference/block-kit/composition-objects#text text object}. Maximum length for this field is 75 characters.
36
+ */
37
+ accessibility_label?: string;
38
+ };
39
+ type CheckboxesElement = {
40
+ type: "checkboxes";
41
+ /**
42
+ * An identifier for the action triggered when the checkbox group is changed. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
43
+ */
44
+ action_id: string;
45
+ /**
46
+ * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects}. A maximum of 10 options are allowed.
47
+ */
48
+ options: OptionObject[];
49
+ /**
50
+ * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects} that exactly matches one or more of the options within options. These options will be selected when the checkbox group initially loads.
51
+ */
52
+ initial_options?: OptionObject[];
53
+ /**
54
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after clicking one of the checkboxes in this element.
55
+ */
56
+ confirm?: ConfirmDialogObject;
57
+ /**
58
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
59
+ */
60
+ focus_on_load?: boolean;
61
+ };
62
+ type DatePickerElement = {
63
+ type: "datepicker";
64
+ /**
65
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
66
+ */
67
+ action_id: string;
68
+ /**
69
+ * The initial date that is selected when the element is loaded. This should be in the format ***YYYY-MM-DD***.
70
+ */
71
+ initial_date?: string;
72
+ /**
73
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a date is selected.
74
+ */
75
+ confirm?: ConfirmDialogObject;
76
+ /**
77
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
78
+ */
79
+ focus_on_load?: boolean;
80
+ /**
81
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the datepicker. Maximum length for the text in this field is 150 characters.
82
+ */
83
+ placeholder?: TextObject<"plain_text">;
84
+ };
85
+ type DateTimePickerElement = {
86
+ type: "datetimepicker";
87
+ /**
88
+ * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
89
+ */
90
+ action_id: string;
91
+ /**
92
+ * The initial date and time that is selected when the element is loaded, represented as a UNUIX timestamp in seconds. This should be in the format of 10 digits, for example ***1628633820*** represents the date and time August 10th, 2021 at 03:17pm PST.
93
+ */
94
+ initial_date_time?: number;
95
+ /**
96
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a time is selected.
97
+ */
98
+ confirm?: ConfirmDialogObject;
99
+ /**
100
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
101
+ */
102
+ focus_on_load?: boolean;
103
+ };
104
+ type EmailInputElement = {
105
+ type: "email_text_input";
106
+ /**
107
+ * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
108
+ */
109
+ action_id: string;
110
+ /**
111
+ * The initial value in the email input when it is loaded.
112
+ */
113
+ initial_value?: string;
114
+ /**
115
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}.
116
+ */
117
+ dispatch_action_config?: DispatchActionConfigObject;
118
+ /**
119
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
120
+ */
121
+ focus_on_load?: boolean;
122
+ /**
123
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the email input. Maximum length for the text in this field is 150 characters.
124
+ */
125
+ placeholder?: TextObject<"plain_text">;
126
+ };
127
+ type ImageElement = {
128
+ type: "image";
129
+ /**
130
+ * The URL of the image to be displayed.
131
+ */
132
+ image_url: string;
133
+ /**
134
+ * A plain-text summary of the image. This should not contain any markup.
135
+ */
136
+ alt_text: string;
137
+ };
138
+ type MultiStaticSelectElement = {
139
+ type: "multi_static_select";
140
+ /**
141
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters.
142
+ */
143
+ action_id: string;
144
+ /**
145
+ * An array of {@link https://api.slack.com/reference/messaging/composition-objects#option option objects}. Maximum number of options is 100. If ***option_groups*** is specified, this field should not be.
146
+ */
147
+ options: OptionObject[];
148
+ /**
149
+ * An array of {@link https://api.slack.com/reference/messaging/composition-objects#option_group option group objects}. Maximum number of option groups is 100. If ***options*** is specified, this field should not be.
150
+ */
151
+ option_groups?: OptionGroupObject[];
152
+ /**
153
+ * An array of {@link https://api.slack.com/reference/messaging/composition-objects#option option objects} that exactly match one or more of the options within ***options*** or ***option_groups***. These options will be selected when the menu initially loads.
154
+ */
155
+ initial_options?: OptionObject[];
156
+ /**
157
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted.
158
+ */
159
+ confirm?: ConfirmDialogObject;
160
+ /**
161
+ * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1.
162
+ */
163
+ max_selected_items?: number;
164
+ /**
165
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
166
+ */
167
+ focus_on_load?: boolean;
168
+ /**
169
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
170
+ */
171
+ placeholder?: TextObject<"plain_text">;
172
+ };
173
+ type MultiExternalSelectElement = {
174
+ type: "multi_external_select";
175
+ /**
176
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters.
177
+ */
178
+ action_id: string;
179
+ /**
180
+ * When the typeahead field is used, a request will be sent on every character change. If you prefer fewer requests or more fully ideated queries, use the ***min_query_length*** attribute to tell Slack the fewest number of typed characters required before dispatch. The default value is ***3***.
181
+ */
182
+ min_query_length?: number;
183
+ /**
184
+ * An array of option objects that exactly match one or more of the options within options or option_groups. These options will be selected when the menu initially loads.
185
+ */
186
+ initial_options?: OptionObject[];
187
+ /**
188
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted.
189
+ */
190
+ confirm?: ConfirmDialogObject;
191
+ /**
192
+ * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1.
193
+ */
194
+ max_selected_items?: number;
195
+ /**
196
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
197
+ */
198
+ focus_on_load?: boolean;
199
+ /**
200
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
201
+ */
202
+ placeholder?: TextObject<"plain_text">;
203
+ };
204
+ type MultiUsersSelectElement = {
205
+ type: "multi_users_select";
206
+ /**
207
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters.
208
+ */
209
+ action_id: string;
210
+ /**
211
+ * An array of user IDs of any valid users to be pre-selected when the menu loads.
212
+ */
213
+ initial_users?: string[];
214
+ /**
215
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted.
216
+ */
217
+ confirm?: ConfirmDialogObject;
218
+ /**
219
+ * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1.
220
+ */
221
+ max_selected_items?: number;
222
+ /**
223
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
224
+ */
225
+ focus_on_load?: boolean;
226
+ /**
227
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
228
+ */
229
+ placeholder?: TextObject<"plain_text">;
230
+ };
231
+ type MultiConversationsSelectElement = {
232
+ type: "multi_conversations_select";
233
+ /**
234
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters.
235
+ */
236
+ action_id: string;
237
+ /**
238
+ * An array of one or more IDs of any valid conversations to be pre-selected when the menu loads. If ***default_to_current_conversation*** is also supplied, ***initial_conversations*** will be ignored.
239
+ */
240
+ initial_conversations?: string[];
241
+ /**
242
+ * Pre-populates the select menu with the conversation that the user was viewing when they opened the modal, if available. Default is ***false***.
243
+ */
244
+ default_to_current_conversation?: boolean;
245
+ /**
246
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted.
247
+ */
248
+ confirm?: ConfirmDialogObject;
249
+ /**
250
+ * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1.
251
+ */
252
+ max_selected_items?: number;
253
+ /**
254
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#filter_conversations filter object} that reduces the list of available conversations using the specified criteria.
255
+ */
256
+ filter?: FilterObject;
257
+ /**
258
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
259
+ */
260
+ focus_on_load?: boolean;
261
+ /**
262
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
263
+ */
264
+ placeholder?: TextObject<"plain_text">;
265
+ };
266
+ type MultiChannelsSelectElement = {
267
+ type: "multi_channels_select";
268
+ /**
269
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters.
270
+ */
271
+ action_id: string;
272
+ /**
273
+ * An array of one or more IDs of any valid public channel to be pre-selected when the menu loads.
274
+ */
275
+ initial_channels?: string[];
276
+ /**
277
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted.
278
+ */
279
+ confirm?: ConfirmDialogObject;
280
+ /**
281
+ * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1.
282
+ */
283
+ max_selected_items?: number;
284
+ /**
285
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
286
+ */
287
+ focus_on_load?: boolean;
288
+ /**
289
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
290
+ */
291
+ placeholder?: TextObject<"plain_text">;
292
+ };
293
+ type NumberInputElement = {
294
+ type: "number_input";
295
+ /**
296
+ * Decimal numbers are allowed if ***is_decimal_allowed*** = ***true***, set the value to false otherwise.
297
+ */
298
+ is_decimal_allowed: boolean;
299
+ /**
300
+ * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_ids*** in the containing block. Maximum length for this field is 255 characters.
301
+ */
302
+ action_id?: string;
303
+ /**
304
+ * The initial value in the plain-text input when it is loaded.
305
+ */
306
+ initial_value?: string;
307
+ /**
308
+ * The minimum value, cannot be greater than ***max_value***.
309
+ */
310
+ min_value?: string;
311
+ /**
312
+ * The maximum value, cannot be less than ***min_value***.
313
+ */
314
+ max_value?: string;
315
+ /**
316
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}.
317
+ */
318
+ dispatch_action_config?: DispatchActionConfigObject;
319
+ /**
320
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
321
+ */
322
+ focus_on_load?: boolean;
323
+ /**
324
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the number input. Maximum length for the text in this field is 150 characters.
325
+ */
326
+ placeholder?: TextObject<"plain_text">;
327
+ };
328
+ type OverflowMenuElement = {
329
+ type: "overflow";
330
+ /**
331
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
332
+ */
333
+ action_id: string;
334
+ /**
335
+ * An array of up to five {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects} to display in the menu.
336
+ */
337
+ options: OptionObject[];
338
+ /**
339
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
340
+ */
341
+ confirm?: ConfirmDialogObject;
342
+ };
343
+ type PlainTextInputElement = {
344
+ type: "plain_text_input";
345
+ /**
346
+ * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
347
+ */
348
+ action_id: string;
349
+ /**
350
+ * The initial value in the plain-text input when it is loaded.
351
+ */
352
+ initial_value?: string;
353
+ /**
354
+ * Indicates whether the input will be a single line (***false***) or a larger textarea (***true***). Defaults to ***false***
355
+ */
356
+ multiline?: boolean;
357
+ /**
358
+ * The minimum length of input that the user must provide. If the user provides less, they will receive an error. Maximum value is 3000.
359
+ */
360
+ min_length?: number;
361
+ /**
362
+ * The maximum length of input that the user can provide. If the user provides more, they will receive an error.
363
+ */
364
+ max_length?: number;
365
+ /**
366
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}.
367
+ */
368
+ dispatch_action_config?: DispatchActionConfigObject;
369
+ /**
370
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
371
+ */
372
+ focus_on_load?: boolean;
373
+ /**
374
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the plain-text input. Maximum length for the text in this field is 150 characters.
375
+ */
376
+ placeholder?: TextObject<"plain_text">;
377
+ };
378
+ type RadioButtonsElement = {
379
+ type: "radio_buttons";
380
+ /**
381
+ * An identifier for the action triggered when the radio button group is changed. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other action_ids in the containing block. Maximum length for this field is 255 characters.
382
+ */
383
+ action_id: string;
384
+ /**
385
+ * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects}. A maximum of 10 options are allowed.
386
+ */
387
+ options: OptionObject[];
388
+ /**
389
+ * An {@link https://api.slack.com/reference/messaging/composition-objects#option option object} that exactly matches one of the options within options. This option will be selected when the radio button group initially loads.
390
+ */
391
+ initial_option?: OptionObject;
392
+ /**
393
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after clicking one of the radio buttons in this element.
394
+ */
395
+ confirm?: ConfirmDialogObject;
396
+ /**
397
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
398
+ */
399
+ focus_on_load?: boolean;
400
+ };
401
+ type StaticSelectElement = {
402
+ type: "static_select";
403
+ /**
404
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
405
+ */
406
+ action_id: string;
407
+ /**
408
+ * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects}. Maximum number of options is 100. If option_groups is specified, this field should not be.
409
+ */
410
+ options: OptionObject[];
411
+ /**
412
+ * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option_group option group objects}. Maximum number of option groups is 100. If ***options*** is specified, this field should not be.
413
+ */
414
+ option_groups?: OptionGroupObject[];
415
+ /**
416
+ * A single option that exactly matches one of the options within {@link OptionObject options} or {@link OptionGroupObject option_groups}. This option will be selected when the menu initially loads.
417
+ */
418
+ initial_option?: OptionObject | OptionGroupObject;
419
+ /**
420
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
421
+ */
422
+ confirm?: ConfirmDialogObject;
423
+ /**
424
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
425
+ */
426
+ focus_on_load?: boolean;
427
+ /**
428
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
429
+ */
430
+ placeholder?: TextObject<"plain_text">;
431
+ };
432
+ type ExternalSelectElement = {
433
+ type: "external_select";
434
+ /**
435
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
436
+ */
437
+ action_id: string;
438
+ /**
439
+ * A single option that exactly matches one of the options within {@link OptionObject options} or {@link OptionGroupObject option_groups}. This option will be selected when the menu initially loads.
440
+ */
441
+ initial_option?: OptionObject | OptionGroupObject;
442
+ /**
443
+ * When the typeahead field is used, a request will be sent on every character change. If you prefer fewer requests or more fully ideated queries, use the ***min_query_length*** attribute to tell Slack the fewest number of typed characters required before dispatch. The default value is 3.
444
+ */
445
+ min_query_length?: number;
446
+ /**
447
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
448
+ */
449
+ confirm?: ConfirmDialogObject;
450
+ /**
451
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
452
+ */
453
+ focus_on_load?: boolean;
454
+ /**
455
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
456
+ */
457
+ placeholder?: TextObject<"plain_text">;
458
+ };
459
+ type UsersSelectElement = {
460
+ type: "users_select";
461
+ /**
462
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
463
+ */
464
+ action_id: string;
465
+ /**
466
+ * The user ID of any valid user to be pre-selected when the menu loads.
467
+ */
468
+ initial_user?: string;
469
+ /**
470
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
471
+ */
472
+ confirm?: ConfirmDialogObject;
473
+ /**
474
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
475
+ */
476
+ focus_on_load?: boolean;
477
+ /**
478
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
479
+ */
480
+ placeholder?: TextObject<"plain_text">;
481
+ };
482
+ type ConversationsSelectElement = {
483
+ type: "conversations_select";
484
+ /**
485
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
486
+ */
487
+ action_id: string;
488
+ /**
489
+ * The ID of any valid conversation to be pre-selected when the menu loads. If ***default_to_current_conversation*** is also supplied, ***initial_conversation*** will take precedence.
490
+ */
491
+ initial_conversation?: string;
492
+ /**
493
+ * Pre-populates the select menu with the conversation that the user was viewing when they opened the modal, if available. Default is ***false***.
494
+ */
495
+ default_to_current_conversation?: boolean;
496
+ /**
497
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
498
+ */
499
+ confirm?: ConfirmDialogObject;
500
+ /**
501
+ * This field only works with menus in {@link https://api.slack.com/reference/block-kit/blocks#input input blocks} in {@link https://api.slack.com/surfaces/modals modals}.
502
+
503
+ * When set to ***true***, the {@link https://api.slack.com/reference/interaction-payloads/views#view_submission view_submission payload} from the menu's parent view will contain a ***response_url***. This ***response_url*** can be used for {@link https://api.slack.com/interactivity/handling#message_responses message responses}. The target conversation for the message will be determined by the value of this select menu.
504
+ */
505
+ response_url_enabled?: boolean;
506
+ /**
507
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#filter_conversations filter object} that reduces the list of available conversations using the specified criteria.
508
+ */
509
+ filter?: FilterObject;
510
+ /**
511
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
512
+ */
513
+ focus_on_load?: boolean;
514
+ /**
515
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
516
+ */
517
+ placeholder?: TextObject<"plain_text">;
518
+ };
519
+ type ChannelsSelectElement = {
520
+ type: "channels_select";
521
+ /**
522
+ * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
523
+ */
524
+ action_id: string;
525
+ /**
526
+ * The ID of any valid public channel to be pre-selected when the menu loads.
527
+ */
528
+ initial_channel?: string;
529
+ /**
530
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
531
+ */
532
+ confirm?: ConfirmDialogObject;
533
+ /**
534
+ * This field only works with menus in {@link https://api.slack.com/reference/block-kit/blocks#input input blocks} in {@link https://api.slack.com/surfaces/modals modals}.
535
+
536
+ * When set to ***true***, the {@link https://api.slack.com/reference/interaction-payloads/views#view_submission view_submission payload} from the menu's parent view will contain a ***response_url***. This ***response_url*** can be used for {@link https://api.slack.com/interactivity/handling#message_responses message responses}. The target conversation for the message will be determined by the value of this select menu.
537
+ */
538
+ response_url_enabled?: boolean;
539
+ /**
540
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
541
+ */
542
+ focus_on_load?: boolean;
543
+ /**
544
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
545
+ */
546
+ placeholder?: TextObject<"plain_text">;
547
+ };
548
+ type TimePickerElement = {
549
+ type: "timepicker";
550
+ /**
551
+ * An identifier for the action triggered when a time is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
552
+ */
553
+ action_id: string;
554
+ /**
555
+ * The initial time that is selected when the element is loaded. This should be in the format ***HH:mm***, where ***HH*** is the 24-hour format of an hour (00 to 23) and ***mm*** is minutes with leading zeros (00 to 59), for example ***22:25*** for 10:25pm.
556
+ */
557
+ initial_time?: string;
558
+ /**
559
+ * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected.
560
+ */
561
+ confirm?: ConfirmDialogObject;
562
+ /**
563
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
564
+ */
565
+ focus_on_load?: boolean;
566
+ /**
567
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the timepicker. Maximum length for the text in this field is 150 characters.
568
+ */
569
+ placeholder?: TextObject<"plain_text">;
570
+ };
571
+ type UrlTextInputElement = {
572
+ type: "url_text_input";
573
+ /**
574
+ * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload {@link https://api.slack.com/surfaces/modals/using#handling-submissions to identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters.
575
+ */
576
+ action_id: string;
577
+ /**
578
+ * The initial value in the URL input when it is loaded.
579
+ */
580
+ initial_value?: string;
581
+ /**
582
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}.
583
+ */
584
+ dispatch_action_config?: DispatchActionConfigObject;
585
+ /**
586
+ * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***.
587
+ */
588
+ focus_on_load?: boolean;
589
+ /**
590
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the URL input. Maximum length for the text in this field is 150 characters.
591
+ */
592
+ placeholder?: TextObject<"plain_text">;
593
+ };
594
+
595
+ type TextObjectTextType = "plain_text" | "mrkdwn";
596
+ type Style = "primary" | "danger" | "confirm";
597
+ type ConfirmDialogObject = {
598
+ /**
599
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text***-only text object} that defines the dialog's title. Maximum length for this field is 100 characters.
600
+ */
601
+ title: TextObject<"plain_text">;
602
+ /**
603
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text text object} that defines the explanatory text that appears in the confirm dialog. Maximum length for the ***text*** in this field is 300 characters.
604
+ */
605
+ text: TextObject;
606
+ /**
607
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text***-only text object} to define the text of the button that confirms the action. Maximum length for the ***text*** in this field is 30 characters.
608
+ */
609
+ confirm: TextObject<"plain_text">;
610
+ deny: TextObject<"plain_text">;
611
+ /**
612
+ * Defines the color scheme applied to the confirm button. A value of danger will display the button with a red background on desktop, or red text on mobile. A value of primary will display the button with a green background on desktop, or blue text on mobile. If this field is not provided, the default value will be primary.
613
+ */
614
+ style?: Style;
615
+ };
616
+ type TextObject<T extends TextObjectTextType = TextObjectTextType> = {
617
+ /**
618
+ * The formatting to use for this text object. Can be one of ***plain_text*** or ***mrkdwn***.
619
+ */
620
+ type: T extends void ? TextObjectTextType : T;
621
+ /**
622
+ * The text for the block. This field accepts any of the standard {@link https://api.slack.com/reference/surfaces/formatting text formatting markup} when ***type*** is ***mrkdwn***. The maximum length is 3000 characters.
623
+ */
624
+ text: string;
625
+ /**
626
+ * Indicates whether emojis in a text field should be escaped into the colon emoji format. This field is only usable when ***type*** is ***plain_text***.
627
+ */
628
+ emoji?: boolean;
629
+ /**
630
+ * When set to ***false*** (as is default) URLs will be auto-converted into links, conversation names will be link-ified, and certain mentions will be {@link https://api.slack.com/reference/surfaces/formatting#automatic-parsing automatically parsed}. Using a value of ***true*** will skip any preprocessing of this nature, although you can still include {@link https://api.slack.com/reference/surfaces/formatting#advanced manual parsing strings}. This field is only usable when ***type*** is ***mrkdwn***
631
+ */
632
+ verbatim?: boolean;
633
+ };
634
+ type OptionObject = {
635
+ /**
636
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text object} that defines the text shown in the option on the menu. Overflow, select, and multi-select menus can only use ***plain_text*** objects, while radio buttons and checkboxes can use ***mrkdwn*** text objects. Maximum length for the ***text*** in this field is 75 characters.
637
+ */
638
+ text: TextObject;
639
+ /**
640
+ * A unique string value that will be passed to your app when this option is chosen. Maximum length for this field is 75 characters.
641
+ */
642
+ value: string;
643
+ /**
644
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text***-only text object} that defines a line of descriptive text shown below the ***text*** field beside the radio button. Maximum length for the ***text*** object within this field is 75 characters.
645
+ */
646
+ description?: TextObject<"plain_text">;
647
+ /**
648
+ * A URL to load in the user's browser when the option is clicked. **The url attribute is only available in** {@link https://api.slack.com/reference/block-kit/block-elements#overflow overflow menus}. Maximum length for this field is 3000 characters. If you're using ***url***, you'll still receive an {@link https://api.slack.com/interactivity/handling#payloads interaction payload} and will need to {@link https://api.slack.com/interactivity/handling#acknowledgment_response send an acknowledgement response}.
649
+ */
650
+ url?: string;
651
+ };
652
+ type OptionGroupObject = {
653
+ /**
654
+ * A {@link https://api.slack.com/reference/block-kit/composition-objects#text plain_text only text object} that defines the label shown above this group of options. Maximum length for the ***text*** in this field is 75 characters.
655
+ */
656
+ label: TextObject<"plain_text">;
657
+ /**
658
+ * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects} that belong to this specific group. Maximum of 100 items.
659
+ */
660
+ options: OptionObject[];
661
+ };
662
+ type DispatchActionConfigObject = {
663
+ /**
664
+ * An array of interaction types that you would like to receive a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload} for. Should be one or both of:
665
+
666
+ * ***on_enter_pressed*** — payload is dispatched when user presses the enter key while the input is in focus. Hint text will appear underneath the input explaining to the user to press enter to submit.
667
+
668
+ * ***on_character_entered*** — payload is dispatched when a character is entered (or removed) in the input.
669
+ */
670
+ trigger_actions_on?: string[];
671
+ };
672
+ type FilterObject = {
673
+ /**
674
+ * Indicates which type of conversations should be included in the list. When this field is provided, any conversations that do not match will be excluded
675
+
676
+ * You should provide an array of strings from the following options: ***im***, ***mpim***, ***private***, and ***public***. The array cannot be empty.
677
+ */
678
+ include?: string[];
679
+ /**
680
+ * Indicates whether to exclude external {@link https://api.slack.com/enterprise/shared-channels shared channels} from conversation lists. Defaults to ***false***.
681
+ */
682
+ exclude_external_shared_channels?: boolean;
683
+ /**
684
+ * Indicates whether to exclude bot users from conversation lists. Defaults to ***false***.
685
+ */
686
+ exclude_bot_users?: boolean;
687
+ };
688
+
689
+ type Block = ActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | SectionBlock | VideoBlock;
690
+ type ActionsBlock = {
691
+ /**
692
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
693
+ *
694
+ * A block that is used to hold interactive {@link https://api.slack.com/reference/messaging/block-elements elements}.
695
+ *
696
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q?cdn_fallback=1&force_cold_boot=1#%7B%22blocks%22:%5B%7B%22type%22:%22actions%22,%22block_id%22:%22actions1%22,%22elements%22:%5B%7B%22type%22:%22static_select%22,%22placeholder%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Which%20witch%20is%20the%20witchiest%20witch?%22%7D,%22action_id%22:%22select_2%22,%22options%22:%5B%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Matilda%22%7D,%22value%22:%22matilda%22%7D,%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Glinda%22%7D,%22value%22:%22glinda%22%7D,%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Granny%20Weatherwax%22%7D,%22value%22:%22grannyWeatherwax%22%7D,%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Hermione%22%7D,%22value%22:%22hermione%22%7D%5D%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Cancel%22%7D,%22value%22:%22cancel%22,%22action_id%22:%22button_1%22%7D%5D%7D%5D%7D View here}
697
+ */
698
+ type: "actions";
699
+ /**
700
+ * An array of interactive {@link https://api.slack.com/reference/messaging/block-elements elements objects} - {@link https://api.slack.com/reference/messaging/block-elements#button buttons}, {@link https://api.slack.com/reference/messaging/block-elements#select select menus}, {@link https://api.slack.com/reference/messaging/block-elements#overflow overflow menus}, or {@link https://api.slack.com/reference/messaging/block-elements#datepicker date pickers}. There is a maximum of 25 elements in each action block.
701
+ */
702
+ elements: Element[];
703
+ /**
704
+ * A string acting as a unique identifier for a block. If not specified, a ***block_id*** will be generated. You can use this ***block_id*** when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
705
+ */
706
+ block_id?: string;
707
+ };
708
+ type ContextBlock = {
709
+ /**
710
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
711
+ *
712
+ * Displays message context, which can include both images and text.
713
+ *
714
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22image%22,%22image_url%22:%22https://image.freepik.com/free-photo/red-drawing-pin_1156-445.jpg%22,%22alt_text%22:%22images%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22Location:%20*Dogpatch*%22%7D%5D%7D%5D%7D View here}
715
+ */
716
+ type: "context";
717
+ /**
718
+ * An array of {@link https://api.slack.com/reference/messaging/block-elements#image image elements} and {@link https://api.slack.com/reference/messaging/composition-objects#text text objects}. Maximum number of items is 10.
719
+ */
720
+ elements: (ImageElement | TextObject)[];
721
+ /**
722
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
723
+ */
724
+ block_id?: string;
725
+ };
726
+ type DividerBlock = {
727
+ /**
728
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
729
+ *
730
+ * A content divider, like an ***<hr>***, to split up different blocks inside of a message. The divider block is nice and neat, requiring only a ***type***.
731
+ *
732
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22divider%22,%22block_id%22:%22divider1%22%7D%5D%7D View here}
733
+ */
734
+ type: "divider";
735
+ /**
736
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
737
+ */
738
+ block_id?: string;
739
+ };
740
+ type FileBlock = {
741
+ /**
742
+ * Available in surfaces: **Messages**
743
+ *
744
+ * Displays a {@link https://api.slack.com/messaging/files/remote remote file}. You can't add this block to app surfaces directly, but it will show up when {@link https://api.slack.com/messaging/retrieving retrieving messages} that contain remote files.
745
+ *
746
+ * If you want to add remote files to messages, {@link https://api.slack.com/messaging/files/remote follow our guide}.
747
+ *
748
+ * Example: {@link https://api.slack.com/reference/block-kit/blocks#file_examples View here}
749
+ */
750
+ type: "file";
751
+ /**
752
+ * The external unique ID for this file.
753
+ */
754
+ external_id: string;
755
+ /**
756
+ * At the moment, **source*** will always be remote for a ***remote*** file.
757
+ */
758
+ source: "remote";
759
+ /**
760
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
761
+ */
762
+ block_id?: string;
763
+ };
764
+ type HeaderBlock = {
765
+ /**
766
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
767
+ *
768
+ * A ***header*** is a plain-text block that displays in a larger, bold font. Use it to delineate between different groups of content in your app's surfaces.
769
+ *
770
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22type%22:%22home%22,%22blocks%22:%5B%7B%22type%22:%22header%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Budget%20Performance%22%7D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22section%22,%22fields%22:%5B%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Current%20Quarter*%5CnBudget:%20$18,000%20(ends%20in%2053%20days)%5CnSpend:%20$4,289.70%5CnRemain:%20$13,710.30%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Top%20Expense%20Categories*%5Cn:airplane:%20Flights%20%C2%B7%2030%25%5Cn:taxi:%20Taxi%20/%20Uber%20/%20Lyft%20%C2%B7%2024%25%20%5Cn:knife_fork_plate:%20Client%20lunch%20/%20meetings%20%C2%B7%2018%25%22%7D%5D%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/placeholder.png%22,%22alt_text%22:%22placeholder%22%7D%5D%7D,%7B%22type%22:%22header%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Expenses%20Awaiting%20Your%20Approval%22%7D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22mrkdwn%22,%22text%22:%22Submitted%20by%22%7D,%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/profile_3.png%22,%22alt_text%22:%22Dwight%20Schrute%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Dwight%20Schrute*%22%7D%5D%7D,%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Team%20Lunch%20(Internal)*%5CnCost:%20*$85.50USD*%5CnDate:%20*10/16/2019*%5CnService%20Provider:%20*Honest%20Sandwiches*%20%20%5CnExpense%20no.%20*%3Cfakelink.toUrl.com%7C#1797PD%3E*%22%7D,%22accessory%22:%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/creditcard.png%22,%22alt_text%22:%22credit%20card%22%7D%7D,%7B%22type%22:%22actions%22,%22elements%22:%5B%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Approve%22,%22emoji%22:true%7D,%22style%22:%22primary%22,%22value%22:%22approve%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Decline%22,%22emoji%22:true%7D,%22style%22:%22danger%22,%22value%22:%22decline%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22View%20Details%22,%22emoji%22:true%7D,%22value%22:%22details%22%7D%5D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22mrkdwn%22,%22text%22:%22Submitted%20by%22%7D,%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/profile_2.png%22,%22alt_text%22:%22Pam%20Beasely%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Pam%20Beasely*%22%7D%5D%7D,%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Flights%20to%20New%20York*%5CnCost:%20*$520.78USD*%5CnDate:%20*10/18/2019*%5CnService%20Provider:%20*Delta%20Airways*%5CnExpense%20no.%20*%3Cfakelink.toUrl.com%7C#1803PD%3E*%22%7D,%22accessory%22:%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/plane.png%22,%22alt_text%22:%22plane%22%7D%7D,%7B%22type%22:%22actions%22,%22elements%22:%5B%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Approve%22,%22emoji%22:true%7D,%22style%22:%22primary%22,%22value%22:%22approve%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Decline%22,%22emoji%22:true%7D,%22style%22:%22danger%22,%22value%22:%22decline%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22View%20Details%22,%22emoji%22:true%7D,%22value%22:%22details%22%7D%5D%7D%5D%7D View here}
771
+ */
772
+ type: "header";
773
+ /**
774
+ * The text for the block, in the form of a {@link https://api.slack.com/reference/messaging/composition-objects#text **plain_text** text object}. Maximum length for the ***text*** in this field is 150 characters.
775
+ */
776
+ text: TextObject<"plain_text">;
777
+ /**
778
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
779
+ */
780
+ block_id?: string;
781
+ };
782
+ type ImageBlock = {
783
+ /**
784
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
785
+ *
786
+ * A simple image block, designed to make those cat photos really pop.
787
+ *
788
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22image%22,%22title%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Please%20enjoy%20this%20photo%20of%20a%20kitten%22%7D,%22block_id%22:%22image4%22,%22image_url%22:%22http://placekitten.com/500/500%22,%22alt_text%22:%22An%20incredibly%20cute%20kitten.%22%7D%5D%7D View here}
789
+ */
790
+ type: "image";
791
+ /**
792
+ * The URL of the image to be displayed. Maximum length for this field is 3000 characters.
793
+ */
794
+ image_url: string;
795
+ /** Width of image in pixels (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */
796
+ image_width?: number;
797
+ /** Height of image in pixels (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */
798
+ image_height?: number;
799
+ /** Size of image in bytes (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */
800
+ image_bytes?: number;
801
+ /** An optional flag indicating that this image is a piece of a larger image. (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */
802
+ is_animated?: boolean;
803
+ /** Fallback configuration for this image. (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */
804
+ fallback?: `${number}x${number}px image`;
805
+ /**
806
+ * A plain-text summary of the image. This should not contain any markup. Maximum length for this field is 2000 characters.
807
+ */
808
+ alt_text: string;
809
+ /**
810
+ * An optional title for the image in the form of a {@link https://api.slack.com/reference/messaging/composition-objects#text text object} that can only be of ***type: plain_text***. Maximum length for the ***text*** in this field is 2000 characters.
811
+ */
812
+ title?: TextObject<"plain_text">;
813
+ /**
814
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
815
+ */
816
+ block_id?: string;
817
+ };
818
+ type InputBlock = {
819
+ /**
820
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
821
+ *
822
+ * A block that collects information from users - it can hold a {@link https://api.slack.com/reference/block-kit/block-elements#input plain-text input element}, a {@link https://api.slack.com/reference/block-kit/block-elements#checkboxes checkbox element}, a {@link radio button element}, a {@link https://api.slack.com/reference/block-kit/block-elements#select select menu element}, a {@link https://api.slack.com/reference/block-kit/block-elements#multi_select multi-select menu element}, or a {@link https://api.slack.com/reference/block-kit/block-elements#datepicker datepicker}.
823
+ *
824
+ * Read our guides to collecting input {@link https://api.slack.com/surfaces/modals#gathering_input in modals} or {@link https://api.slack.com/surfaces/tabs/using#gathering_input in Home tabs} to learn how input blocks pass information to your app.
825
+ *
826
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22title%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Add%20info%20to%20feedback%22,%22emoji%22:true%7D,%22submit%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Save%22,%22emoji%22:true%7D,%22type%22:%22modal%22,%22blocks%22:%5B%7B%22type%22:%22input%22,%22element%22:%7B%22type%22:%22plain_text_input%22%7D,%22label%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Label%22,%22emoji%22:true%7D%7D%5D%7D View here}
827
+ */
828
+ type: "input";
829
+ /**
830
+ * A label that appears above an input element in the form of a text object that must have ***type*** of ***plain_text***. Maximum length for the ***text*** in this field is 2000 characters.
831
+ */
832
+ label: TextObject<"plain_text">;
833
+ /**
834
+ * A plain-text input element, a checkbox element, a radio button element, a select menu element, a multi-select menu element, or a datepicker.
835
+ */
836
+ element: PlainTextInputElement | CheckboxesElement | RadioButtonsElement | StaticSelectElement | MultiStaticSelectElement | DatePickerElement;
837
+ /**
838
+ * A boolean that indicates whether or not the use of elements in this block should dispatch a {@link https://api.slack.com/reference/interaction-payloads/block-actions ***block_actions*** payload}. Defaults to false.
839
+ */
840
+ dispatch_action?: boolean;
841
+ /**
842
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message or view and each iteration of a message or view. If a message or view is updated, use a new ***block_id***.
843
+ */
844
+ block_id?: string;
845
+ /**
846
+ * An optional hint that appears below an input element in a lighter grey. It must be a {@link https://api.slack.com/reference/messaging/composition-objects#text text object} with a ***type*** of ***plain_text***. Maximum length for the ***text*** in this field is 2000 characters.
847
+ */
848
+ hint?: TextObject<"plain_text">;
849
+ /**
850
+ * A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to ***false***.
851
+ */
852
+ optional?: boolean;
853
+ };
854
+ type SectionBlock = {
855
+ /**
856
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
857
+ *
858
+ * A ***section*** is one of the most flexible blocks available - it can be used as a simple text block, in combination with text fields, or side-by-side with any of the available {@link https://api.slack.com/reference/messaging/block-elements block elements}.
859
+ *
860
+ * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22section%22,%22text%22:%7B%22text%22:%22*Sally*%20has%20requested%20you%20set%20the%20deadline%20for%20the%20Nano%20launch%20project%22,%22type%22:%22mrkdwn%22%7D,%22accessory%22:%7B%22type%22:%22datepicker%22%7D%7D%5D%7D View here}
861
+ */
862
+ type: "section";
863
+ /**
864
+ * The text for the block, in the form of a {@link https://api.slack.com/reference/messaging/composition-objects#text text object}. Maximum length for the text in this field is 3000 characters. This field is not required if a valid array of fields objects is provided instead.
865
+ */
866
+ text?: TextObject;
867
+ /**
868
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. You can use this ***block_id*** when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
869
+ */
870
+ block_id?: string;
871
+ /**
872
+ * Required if no ***text*** is provided. An array of {@link https://api.slack.com/reference/messaging/composition-objects#text text objects}. Any text objects included with ***fields*** will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. Maximum length for the ***text*** in each item is 2000 characters. {@link https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%09%7B%0A%09%09%22type%22%3A%20%22section%22%2C%0A%09%09%22text%22%3A%20%7B%0A%09%09%09%22text%22%3A%20%22A%20message%20*with%20some%20bold%20text*%20and%20_some%20italicized%20text_.%22%2C%0A%09%09%09%22type%22%3A%20%22mrkdwn%22%0A%09%09%7D%2C%0A%09%09%22fields%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Priority*%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Type*%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%22text%22%3A%20%22High%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%22text%22%3A%20%22String%22%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%0A%5D Click here for an example}.
873
+ */
874
+ fields?: TextObject[];
875
+ /**
876
+ * One of the available {@link https://api.slack.com/reference/messaging/block-elements element objects}.
877
+ */
878
+ accessory?: Element;
879
+ };
880
+ type VideoBlock = {
881
+ /**
882
+ * Available in surfaces: **Modals**, **Messages**, **Home tabs**
883
+ *
884
+ * A ***video*** block is designed to embed videos in all app surfaces (e.g. link unfurls, messages, modals, App Home) — anywhere you can put blocks! To use the video block within your app, you must have the ***links.embed:write*** scope.
885
+ *
886
+ * Requirements
887
+ * - Video blocks can only be posted by apps; users are not allowed to post embedded videos directly from Block Kit Builder.
888
+ * - Your app must have the the ***links.embed:write*** scope for both user and bot tokens.
889
+ * - ***video_url*** has to be included in the {@link https://api.slack.com/reference/messaging/link-unfurling#configuring_domains unfurl domains} specified in your app.
890
+ * - ***video_url*** should be publicly accessible, unless the app relies on information received from the {@link https://api.slack.com/apis/connections/events-api Events API} payloads to make a decision on whether the viewer(s) of the content should have access. If so, the service could create a unique URL accessible only via Slack.
891
+ * - ***video_url*** must be compatible with an embeddable iFrame.
892
+ * - ***video_url*** must return a 2xx code OR 3xx with less than 5 redirects and an eventual 2xx.
893
+ * - ***video_url*** must not point to any Slack-related domain.
894
+ *
895
+ * Constraints
896
+ * - Embeddable video players only (audio-only permitted)
897
+ * - Navigation, scrolling and overlays are not allowed within the iFrame.
898
+ * - Interactivity (e.g. likes, comments, and reactions) are allowed within your player but shouldn't completely overlay or navigate away from the content being embedded. These interactions will be anonymous since no user data is transferred to the embedded view.
899
+ *
900
+ * The metadata received in the Block payload will be used to construct the description, provider, and title of the video in all clients. Developers have the flexibility to leave non-mandatory fields null and use other blocks to format this content.
901
+ *
902
+ * Example: {@link https://api.slack.com/reference/block-kit/blocks#video_examples View here}
903
+ */
904
+ type: "video";
905
+ /**
906
+ * A tooltip for the video. Required for accessibility
907
+ */
908
+ alt_text: string;
909
+ /**
910
+ * Author name to be displayed. Must be less than 50 characters.
911
+ */
912
+ author_name?: string;
913
+ /**
914
+ * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message and each iteration of a message. If a message is updated, use a new ***block_id***.
915
+ */
916
+ block_id?: string;
917
+ /**
918
+ * Description for video in plain text format.
919
+ */
920
+ description?: TextObject<"plain_text">;
921
+ /**
922
+ * Icon for the video provider - ex. Youtube icon
923
+ */
924
+ provider_icon_url?: string;
925
+ /**
926
+ * The originating application or domain of the video ex. Youtube
927
+ */
928
+ provider_name?: string;
929
+ /**
930
+ * Video title in plain text format. Must be less than 200 characters.
931
+ */
932
+ title: TextObject<"plain_text">;
933
+ /**
934
+ * Hyperlink for the title text. Must correspond to the non-embeddable URL for the video. Must go to an HTTPS URL.
935
+ */
936
+ title_url?: string;
937
+ /**
938
+ * The thumbnail image URL
939
+ */
940
+ thumbnail_url: string;
941
+ /**
942
+ * The URL to be embedded. Must match any existing {@link https://api.slack.com/reference/messaging/link-unfurling#configuring_domains unfurl domains} within the app and point to a HTTPS URL.
943
+ */
944
+ video_url: string;
945
+ };
946
+
947
+ type Props = {
948
+ theme?: "light" | "dark";
949
+ blocks: Block[];
950
+ logo: string;
951
+ name: string;
952
+ time?: Date;
953
+ };
954
+ declare const Message: (props: Props) => JSX.Element;
955
+
956
+ export { Message };