@tightknitai/slack-block-kit-validator 0.1.0-alpha.1 → 0.1.7

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,1819 @@
1
+ /**
2
+ * JSON Schema (draft 2020-12) for Slack Block Kit payloads. Validates a top-level array of blocks. Individual block, element, and composition object schemas are exposed via $defs for re-use. Compiled from https://docs.slack.dev/reference/block-kit (fetched 2026-04-16). Surface restrictions (messages vs modals vs home) and payload-level rules (e.g. cumulative 12k char markdown limit, single-table-per-message) are documented in $defs descriptions but not enforced at the per-block level.
3
+ */
4
+ export type SlackBlockKitPayload = [Block, ...Block[]] | ModalView | HomeView;
5
+ /**
6
+ * Discriminated union of every Block Kit block type.
7
+ */
8
+ export type Block = ActionsBlock | AlertBlock | CardBlock | CarouselBlock | ContextActionsBlock | ContextBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | MarkdownBlock | PlanBlock | RichTextBlock | SectionBlock | TableBlock | TaskCardBlock | VideoBlock;
9
+ /**
10
+ * Elements allowed inside an actions block.
11
+ */
12
+ export type ActionsBlockElement = ButtonElement | CheckboxesElement | DatepickerElement | DatetimepickerElement | TimepickerElement | OverflowElement | RadioButtonsElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | WorkflowButtonElement;
13
+ /**
14
+ * An identifier for the interactive element. Should be unique among all action_ids used in a single view/message.
15
+ */
16
+ export type ActionId = string;
17
+ export type StaticSelectElement = {
18
+ type: "static_select";
19
+ action_id?: ActionId;
20
+ /**
21
+ * @minItems 1
22
+ * @maxItems 100
23
+ */
24
+ options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
25
+ /**
26
+ * @minItems 1
27
+ * @maxItems 100
28
+ */
29
+ option_groups?: [OptionGroupObject, ...OptionGroupObject[]];
30
+ initial_option?: OptionObjectPlainText;
31
+ confirm?: ConfirmObject;
32
+ focus_on_load?: boolean;
33
+ placeholder?: PlaceholderObject;
34
+ } & StaticSelectElement1 & {
35
+ type: "static_select";
36
+ action_id?: ActionId;
37
+ /**
38
+ * @minItems 1
39
+ * @maxItems 100
40
+ */
41
+ options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
42
+ /**
43
+ * @minItems 1
44
+ * @maxItems 100
45
+ */
46
+ option_groups?: [OptionGroupObject, ...OptionGroupObject[]];
47
+ initial_option?: OptionObjectPlainText;
48
+ confirm?: ConfirmObject;
49
+ focus_on_load?: boolean;
50
+ placeholder?: PlaceholderObject;
51
+ } & StaticSelectElement1 & {
52
+ type: "static_select";
53
+ action_id?: ActionId;
54
+ /**
55
+ * @minItems 1
56
+ * @maxItems 100
57
+ */
58
+ options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
59
+ /**
60
+ * @minItems 1
61
+ * @maxItems 100
62
+ */
63
+ option_groups?: [OptionGroupObject, ...OptionGroupObject[]];
64
+ initial_option?: OptionObjectPlainText;
65
+ confirm?: ConfirmObject;
66
+ focus_on_load?: boolean;
67
+ placeholder?: PlaceholderObject;
68
+ } & StaticSelectElement1;
69
+ export type StaticSelectElement1 = {
70
+ [k: string]: unknown | undefined;
71
+ } | {
72
+ [k: string]: unknown | undefined;
73
+ };
74
+ export type MultiStaticSelectElement = {
75
+ type: "multi_static_select";
76
+ action_id?: ActionId;
77
+ /**
78
+ * @minItems 1
79
+ * @maxItems 100
80
+ */
81
+ options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
82
+ /**
83
+ * @minItems 1
84
+ * @maxItems 100
85
+ */
86
+ option_groups?: [OptionGroupObject, ...OptionGroupObject[]];
87
+ /**
88
+ * @minItems 1
89
+ */
90
+ initial_options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
91
+ confirm?: ConfirmObject;
92
+ max_selected_items?: number;
93
+ focus_on_load?: boolean;
94
+ placeholder?: PlaceholderObject;
95
+ } & MultiStaticSelectElement1 & {
96
+ type: "multi_static_select";
97
+ action_id?: ActionId;
98
+ /**
99
+ * @minItems 1
100
+ * @maxItems 100
101
+ */
102
+ options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
103
+ /**
104
+ * @minItems 1
105
+ * @maxItems 100
106
+ */
107
+ option_groups?: [OptionGroupObject, ...OptionGroupObject[]];
108
+ /**
109
+ * @minItems 1
110
+ */
111
+ initial_options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
112
+ confirm?: ConfirmObject;
113
+ max_selected_items?: number;
114
+ focus_on_load?: boolean;
115
+ placeholder?: PlaceholderObject;
116
+ } & MultiStaticSelectElement1 & {
117
+ type: "multi_static_select";
118
+ action_id?: ActionId;
119
+ /**
120
+ * @minItems 1
121
+ * @maxItems 100
122
+ */
123
+ options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
124
+ /**
125
+ * @minItems 1
126
+ * @maxItems 100
127
+ */
128
+ option_groups?: [OptionGroupObject, ...OptionGroupObject[]];
129
+ /**
130
+ * @minItems 1
131
+ */
132
+ initial_options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
133
+ confirm?: ConfirmObject;
134
+ max_selected_items?: number;
135
+ focus_on_load?: boolean;
136
+ placeholder?: PlaceholderObject;
137
+ } & MultiStaticSelectElement1;
138
+ export type MultiStaticSelectElement1 = {
139
+ [k: string]: unknown | undefined;
140
+ } | {
141
+ [k: string]: unknown | undefined;
142
+ };
143
+ /**
144
+ * A unique identifier for a block. Should be unique within a single message or view.
145
+ */
146
+ export type BlockId = string;
147
+ /**
148
+ * A text object — either plain_text or mrkdwn.
149
+ */
150
+ export type TextObject = PlainTextObject | MrkdwnTextObject;
151
+ /**
152
+ * At least one of hero_image, title, actions, or body is required.
153
+ */
154
+ export type CardBlock = CardBlock1 & {
155
+ type: "card";
156
+ block_id?: BlockId;
157
+ hero_image?: ImageElement;
158
+ icon?: ImageElement;
159
+ title?: TextObject;
160
+ subtitle?: TextObject;
161
+ body?: TextObject;
162
+ /**
163
+ * @minItems 1
164
+ * @maxItems 2
165
+ */
166
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
167
+ } & CardBlock1 & {
168
+ type: "card";
169
+ block_id?: BlockId;
170
+ hero_image?: ImageElement;
171
+ icon?: ImageElement;
172
+ title?: TextObject;
173
+ subtitle?: TextObject;
174
+ body?: TextObject;
175
+ /**
176
+ * @minItems 1
177
+ * @maxItems 2
178
+ */
179
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
180
+ } & CardBlock1 & {
181
+ type: "card";
182
+ block_id?: BlockId;
183
+ hero_image?: ImageElement;
184
+ icon?: ImageElement;
185
+ title?: TextObject;
186
+ subtitle?: TextObject;
187
+ body?: TextObject;
188
+ /**
189
+ * @minItems 1
190
+ * @maxItems 2
191
+ */
192
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
193
+ } & CardBlock1 & {
194
+ type: "card";
195
+ block_id?: BlockId;
196
+ hero_image?: ImageElement;
197
+ icon?: ImageElement;
198
+ title?: TextObject;
199
+ subtitle?: TextObject;
200
+ body?: TextObject;
201
+ /**
202
+ * @minItems 1
203
+ * @maxItems 2
204
+ */
205
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
206
+ } & CardBlock1 & {
207
+ type: "card";
208
+ block_id?: BlockId;
209
+ hero_image?: ImageElement;
210
+ icon?: ImageElement;
211
+ title?: TextObject;
212
+ subtitle?: TextObject;
213
+ body?: TextObject;
214
+ /**
215
+ * @minItems 1
216
+ * @maxItems 2
217
+ */
218
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
219
+ } & CardBlock1 & {
220
+ type: "card";
221
+ block_id?: BlockId;
222
+ hero_image?: ImageElement;
223
+ icon?: ImageElement;
224
+ title?: TextObject;
225
+ subtitle?: TextObject;
226
+ body?: TextObject;
227
+ /**
228
+ * @minItems 1
229
+ * @maxItems 2
230
+ */
231
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
232
+ } & CardBlock1 & {
233
+ type: "card";
234
+ block_id?: BlockId;
235
+ hero_image?: ImageElement;
236
+ icon?: ImageElement;
237
+ title?: TextObject;
238
+ subtitle?: TextObject;
239
+ body?: TextObject;
240
+ /**
241
+ * @minItems 1
242
+ * @maxItems 2
243
+ */
244
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
245
+ } & CardBlock1 & {
246
+ type: "card";
247
+ block_id?: BlockId;
248
+ hero_image?: ImageElement;
249
+ icon?: ImageElement;
250
+ title?: TextObject;
251
+ subtitle?: TextObject;
252
+ body?: TextObject;
253
+ /**
254
+ * @minItems 1
255
+ * @maxItems 2
256
+ */
257
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
258
+ } & CardBlock1 & {
259
+ type: "card";
260
+ block_id?: BlockId;
261
+ hero_image?: ImageElement;
262
+ icon?: ImageElement;
263
+ title?: TextObject;
264
+ subtitle?: TextObject;
265
+ body?: TextObject;
266
+ /**
267
+ * @minItems 1
268
+ * @maxItems 2
269
+ */
270
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
271
+ } & CardBlock1 & {
272
+ type: "card";
273
+ block_id?: BlockId;
274
+ hero_image?: ImageElement;
275
+ icon?: ImageElement;
276
+ title?: TextObject;
277
+ subtitle?: TextObject;
278
+ body?: TextObject;
279
+ /**
280
+ * @minItems 1
281
+ * @maxItems 2
282
+ */
283
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
284
+ } & CardBlock1 & {
285
+ type: "card";
286
+ block_id?: BlockId;
287
+ hero_image?: ImageElement;
288
+ icon?: ImageElement;
289
+ title?: TextObject;
290
+ subtitle?: TextObject;
291
+ body?: TextObject;
292
+ /**
293
+ * @minItems 1
294
+ * @maxItems 2
295
+ */
296
+ actions?: [ButtonElement] | [ButtonElement, ButtonElement];
297
+ };
298
+ export type CardBlock1 = {
299
+ [k: string]: unknown | undefined;
300
+ } | {
301
+ [k: string]: unknown | undefined;
302
+ } | {
303
+ [k: string]: unknown | undefined;
304
+ } | {
305
+ [k: string]: unknown | undefined;
306
+ };
307
+ /**
308
+ * Must be used inside a section or context block. Either image_url or slack_file is required.
309
+ */
310
+ export type ImageElement = {
311
+ type: "image";
312
+ alt_text: string;
313
+ image_url?: string;
314
+ slack_file?: SlackFileObject;
315
+ } & ImageElement1 & {
316
+ type: "image";
317
+ alt_text: string;
318
+ image_url?: string;
319
+ slack_file?: SlackFileObject;
320
+ } & ImageElement1 & {
321
+ type: "image";
322
+ alt_text: string;
323
+ image_url?: string;
324
+ slack_file?: SlackFileObject;
325
+ } & ImageElement1 & {
326
+ type: "image";
327
+ alt_text: string;
328
+ image_url?: string;
329
+ slack_file?: SlackFileObject;
330
+ } & ImageElement1;
331
+ /**
332
+ * Reference to a Slack file. Exactly one of url or id must be provided. Supported file types: png, jpg, jpeg, gif.
333
+ */
334
+ export type SlackFileObject = {
335
+ url?: string;
336
+ id?: string;
337
+ } & SlackFileObject1 & {
338
+ url?: string;
339
+ id?: string;
340
+ } & SlackFileObject1;
341
+ export type SlackFileObject1 = {
342
+ [k: string]: unknown | undefined;
343
+ } | {
344
+ [k: string]: unknown | undefined;
345
+ };
346
+ export type ImageElement1 = {
347
+ [k: string]: unknown | undefined;
348
+ } | {
349
+ [k: string]: unknown | undefined;
350
+ };
351
+ /**
352
+ * Elements allowed inside a context_actions block.
353
+ */
354
+ export type ContextActionsBlockElement = FeedbackButtonsElement | IconButtonElement;
355
+ /**
356
+ * Elements allowed inside a context block.
357
+ */
358
+ export type ContextBlockElement = ImageElement | TextObject;
359
+ /**
360
+ * Either image_url or slack_file is required (not both).
361
+ */
362
+ export type ImageBlock = {
363
+ type: "image";
364
+ alt_text: string;
365
+ image_url?: string;
366
+ slack_file?: SlackFileObject;
367
+ title?: PlainTextObject;
368
+ block_id?: BlockId;
369
+ } & ImageBlock1;
370
+ export type ImageBlock1 = {
371
+ [k: string]: unknown | undefined;
372
+ } | {
373
+ [k: string]: unknown | undefined;
374
+ };
375
+ /**
376
+ * Elements that may appear as the element of an input block.
377
+ */
378
+ export type InputBlockElement = PlainTextInputElement | EmailInputElement | UrlInputElement | NumberInputElement | CheckboxesElement | RadioButtonsElement | DatepickerElement | DatetimepickerElement | TimepickerElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | RichTextInputElement | FileInputElement;
379
+ /**
380
+ * Any of the 4 rich-text container kinds usable inside a rich_text block's elements array.
381
+ */
382
+ export type RichTextContainerElement = RichTextSectionElement | RichTextListElement | RichTextPreformattedElement | RichTextQuoteElement;
383
+ /**
384
+ * Any of the 10 rich-text leaf element kinds.
385
+ */
386
+ export type RichTextLeaf = RichTextTextLeaf | RichTextLinkLeaf | RichTextUserLeaf | RichTextUsergroupLeaf | RichTextTeamLeaf | RichTextChannelLeaf | RichTextEmojiLeaf | RichTextBroadcastLeaf | RichTextColorLeaf | RichTextDateLeaf;
387
+ /**
388
+ * Must have text or fields (or both).
389
+ */
390
+ export type SectionBlock = SectionBlock1 & {
391
+ type: "section";
392
+ text?: TextObject;
393
+ block_id?: BlockId;
394
+ /**
395
+ * @minItems 1
396
+ * @maxItems 10
397
+ */
398
+ fields?: [TextObject] | [TextObject, TextObject] | [TextObject, TextObject, TextObject] | [TextObject, TextObject, TextObject, TextObject] | [TextObject, TextObject, TextObject, TextObject, TextObject] | [TextObject, TextObject, TextObject, TextObject, TextObject, TextObject] | [TextObject, TextObject, TextObject, TextObject, TextObject, TextObject, TextObject] | [TextObject, TextObject, TextObject, TextObject, TextObject, TextObject, TextObject, TextObject] | [TextObject, TextObject, TextObject, TextObject, TextObject, TextObject, TextObject, TextObject, TextObject] | [
399
+ TextObject,
400
+ TextObject,
401
+ TextObject,
402
+ TextObject,
403
+ TextObject,
404
+ TextObject,
405
+ TextObject,
406
+ TextObject,
407
+ TextObject,
408
+ TextObject
409
+ ];
410
+ accessory?: SectionAccessoryElement;
411
+ expand?: boolean;
412
+ };
413
+ export type SectionBlock1 = {
414
+ [k: string]: unknown | undefined;
415
+ } | {
416
+ [k: string]: unknown | undefined;
417
+ };
418
+ /**
419
+ * Elements that may appear as the accessory of a section block. datetimepicker is intentionally excluded — docs say it 'must be used inside the actions block or input block'.
420
+ */
421
+ export type SectionAccessoryElement = ButtonElement | CheckboxesElement | DatepickerElement | TimepickerElement | ImageElement | OverflowElement | RadioButtonsElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | WorkflowButtonElement;
422
+ /**
423
+ * A cell inside a table_block row. Either raw_text or rich_text.
424
+ */
425
+ export type TableCell = {
426
+ type: "raw_text";
427
+ text: string;
428
+ } | {
429
+ type: "rich_text";
430
+ /**
431
+ * Empty array is accepted by Slack (verified in Block Kit Builder 2026-04-16).
432
+ */
433
+ elements: RichTextContainerElement[];
434
+ };
435
+ /**
436
+ * Per-column settings inside table_block.column_settings. May be null to skip.
437
+ */
438
+ export type TableColumnSetting = null | {
439
+ align?: "left" | "center" | "right";
440
+ is_wrapped?: boolean;
441
+ };
442
+ export interface ActionsBlock {
443
+ type: "actions";
444
+ /**
445
+ * @minItems 1
446
+ * @maxItems 25
447
+ */
448
+ elements: [ActionsBlockElement, ...ActionsBlockElement[]];
449
+ block_id?: BlockId;
450
+ }
451
+ export interface ButtonElement {
452
+ type: "button";
453
+ text: PlainTextObject;
454
+ action_id?: ActionId;
455
+ url?: string;
456
+ value?: string;
457
+ style?: "primary" | "danger";
458
+ confirm?: ConfirmObject;
459
+ accessibility_label?: string;
460
+ }
461
+ export interface PlainTextObject {
462
+ type: "plain_text";
463
+ text: string;
464
+ emoji?: boolean;
465
+ }
466
+ export interface ConfirmObject {
467
+ title: PlainTextObject;
468
+ /**
469
+ * Per Slack docs examples, this field accepts plain_text OR mrkdwn. Prose on the docs page says plain_text, but the example payload uses mrkdwn.
470
+ */
471
+ text: PlainTextObject | MrkdwnTextObject;
472
+ confirm: PlainTextObject;
473
+ deny: PlainTextObject;
474
+ style?: "primary" | "danger";
475
+ }
476
+ export interface MrkdwnTextObject {
477
+ type: "mrkdwn";
478
+ text: string;
479
+ verbatim?: boolean;
480
+ }
481
+ export interface CheckboxesElement {
482
+ type: "checkboxes";
483
+ action_id?: ActionId;
484
+ /**
485
+ * @minItems 1
486
+ * @maxItems 10
487
+ */
488
+ options: [OptionObjectRadioOrCheckbox] | [OptionObjectRadioOrCheckbox, OptionObjectRadioOrCheckbox] | [OptionObjectRadioOrCheckbox, OptionObjectRadioOrCheckbox, OptionObjectRadioOrCheckbox] | [
489
+ OptionObjectRadioOrCheckbox,
490
+ OptionObjectRadioOrCheckbox,
491
+ OptionObjectRadioOrCheckbox,
492
+ OptionObjectRadioOrCheckbox
493
+ ] | [
494
+ OptionObjectRadioOrCheckbox,
495
+ OptionObjectRadioOrCheckbox,
496
+ OptionObjectRadioOrCheckbox,
497
+ OptionObjectRadioOrCheckbox,
498
+ OptionObjectRadioOrCheckbox
499
+ ] | [
500
+ OptionObjectRadioOrCheckbox,
501
+ OptionObjectRadioOrCheckbox,
502
+ OptionObjectRadioOrCheckbox,
503
+ OptionObjectRadioOrCheckbox,
504
+ OptionObjectRadioOrCheckbox,
505
+ OptionObjectRadioOrCheckbox
506
+ ] | [
507
+ OptionObjectRadioOrCheckbox,
508
+ OptionObjectRadioOrCheckbox,
509
+ OptionObjectRadioOrCheckbox,
510
+ OptionObjectRadioOrCheckbox,
511
+ OptionObjectRadioOrCheckbox,
512
+ OptionObjectRadioOrCheckbox,
513
+ OptionObjectRadioOrCheckbox
514
+ ] | [
515
+ OptionObjectRadioOrCheckbox,
516
+ OptionObjectRadioOrCheckbox,
517
+ OptionObjectRadioOrCheckbox,
518
+ OptionObjectRadioOrCheckbox,
519
+ OptionObjectRadioOrCheckbox,
520
+ OptionObjectRadioOrCheckbox,
521
+ OptionObjectRadioOrCheckbox,
522
+ OptionObjectRadioOrCheckbox
523
+ ] | [
524
+ OptionObjectRadioOrCheckbox,
525
+ OptionObjectRadioOrCheckbox,
526
+ OptionObjectRadioOrCheckbox,
527
+ OptionObjectRadioOrCheckbox,
528
+ OptionObjectRadioOrCheckbox,
529
+ OptionObjectRadioOrCheckbox,
530
+ OptionObjectRadioOrCheckbox,
531
+ OptionObjectRadioOrCheckbox,
532
+ OptionObjectRadioOrCheckbox
533
+ ] | [
534
+ OptionObjectRadioOrCheckbox,
535
+ OptionObjectRadioOrCheckbox,
536
+ OptionObjectRadioOrCheckbox,
537
+ OptionObjectRadioOrCheckbox,
538
+ OptionObjectRadioOrCheckbox,
539
+ OptionObjectRadioOrCheckbox,
540
+ OptionObjectRadioOrCheckbox,
541
+ OptionObjectRadioOrCheckbox,
542
+ OptionObjectRadioOrCheckbox,
543
+ OptionObjectRadioOrCheckbox
544
+ ];
545
+ /**
546
+ * @minItems 1
547
+ */
548
+ initial_options?: [OptionObjectRadioOrCheckbox, ...OptionObjectRadioOrCheckbox[]];
549
+ confirm?: ConfirmObject;
550
+ focus_on_load?: boolean;
551
+ }
552
+ /**
553
+ * Option object used in radio_buttons and checkboxes elements. text and description may be plain_text or mrkdwn.
554
+ */
555
+ export interface OptionObjectRadioOrCheckbox {
556
+ text: PlainTextObject | MrkdwnTextObject;
557
+ value: string;
558
+ description?: PlainTextObject | MrkdwnTextObject;
559
+ }
560
+ export interface DatepickerElement {
561
+ type: "datepicker";
562
+ action_id?: ActionId;
563
+ initial_date?: string;
564
+ confirm?: ConfirmObject;
565
+ focus_on_load?: boolean;
566
+ placeholder?: PlaceholderObject;
567
+ }
568
+ /**
569
+ * Reusable placeholder text object (plain_text only, max 150 chars).
570
+ */
571
+ export interface PlaceholderObject {
572
+ type: "plain_text";
573
+ text: string;
574
+ emoji?: boolean;
575
+ }
576
+ export interface DatetimepickerElement {
577
+ type: "datetimepicker";
578
+ action_id?: ActionId;
579
+ initial_date_time?: number;
580
+ confirm?: ConfirmObject;
581
+ focus_on_load?: boolean;
582
+ }
583
+ export interface TimepickerElement {
584
+ type: "timepicker";
585
+ action_id?: ActionId;
586
+ initial_time?: string;
587
+ confirm?: ConfirmObject;
588
+ focus_on_load?: boolean;
589
+ placeholder?: PlaceholderObject;
590
+ timezone?: string;
591
+ }
592
+ /**
593
+ * Must be used inside a section or actions block. Up to 5 options.
594
+ */
595
+ export interface OverflowElement {
596
+ type: "overflow";
597
+ action_id?: ActionId;
598
+ /**
599
+ * @minItems 1
600
+ * @maxItems 5
601
+ */
602
+ options: [OptionObjectOverflow] | [OptionObjectOverflow, OptionObjectOverflow] | [OptionObjectOverflow, OptionObjectOverflow, OptionObjectOverflow] | [OptionObjectOverflow, OptionObjectOverflow, OptionObjectOverflow, OptionObjectOverflow] | [OptionObjectOverflow, OptionObjectOverflow, OptionObjectOverflow, OptionObjectOverflow, OptionObjectOverflow];
603
+ confirm?: ConfirmObject;
604
+ }
605
+ /**
606
+ * Option object used in overflow menus. Adds optional url field.
607
+ */
608
+ export interface OptionObjectOverflow {
609
+ text: PlainTextObject;
610
+ value: string;
611
+ description?: PlainTextObject;
612
+ url?: string;
613
+ }
614
+ export interface RadioButtonsElement {
615
+ type: "radio_buttons";
616
+ action_id?: ActionId;
617
+ /**
618
+ * @minItems 1
619
+ * @maxItems 10
620
+ */
621
+ options: [OptionObjectRadioOrCheckbox] | [OptionObjectRadioOrCheckbox, OptionObjectRadioOrCheckbox] | [OptionObjectRadioOrCheckbox, OptionObjectRadioOrCheckbox, OptionObjectRadioOrCheckbox] | [
622
+ OptionObjectRadioOrCheckbox,
623
+ OptionObjectRadioOrCheckbox,
624
+ OptionObjectRadioOrCheckbox,
625
+ OptionObjectRadioOrCheckbox
626
+ ] | [
627
+ OptionObjectRadioOrCheckbox,
628
+ OptionObjectRadioOrCheckbox,
629
+ OptionObjectRadioOrCheckbox,
630
+ OptionObjectRadioOrCheckbox,
631
+ OptionObjectRadioOrCheckbox
632
+ ] | [
633
+ OptionObjectRadioOrCheckbox,
634
+ OptionObjectRadioOrCheckbox,
635
+ OptionObjectRadioOrCheckbox,
636
+ OptionObjectRadioOrCheckbox,
637
+ OptionObjectRadioOrCheckbox,
638
+ OptionObjectRadioOrCheckbox
639
+ ] | [
640
+ OptionObjectRadioOrCheckbox,
641
+ OptionObjectRadioOrCheckbox,
642
+ OptionObjectRadioOrCheckbox,
643
+ OptionObjectRadioOrCheckbox,
644
+ OptionObjectRadioOrCheckbox,
645
+ OptionObjectRadioOrCheckbox,
646
+ OptionObjectRadioOrCheckbox
647
+ ] | [
648
+ OptionObjectRadioOrCheckbox,
649
+ OptionObjectRadioOrCheckbox,
650
+ OptionObjectRadioOrCheckbox,
651
+ OptionObjectRadioOrCheckbox,
652
+ OptionObjectRadioOrCheckbox,
653
+ OptionObjectRadioOrCheckbox,
654
+ OptionObjectRadioOrCheckbox,
655
+ OptionObjectRadioOrCheckbox
656
+ ] | [
657
+ OptionObjectRadioOrCheckbox,
658
+ OptionObjectRadioOrCheckbox,
659
+ OptionObjectRadioOrCheckbox,
660
+ OptionObjectRadioOrCheckbox,
661
+ OptionObjectRadioOrCheckbox,
662
+ OptionObjectRadioOrCheckbox,
663
+ OptionObjectRadioOrCheckbox,
664
+ OptionObjectRadioOrCheckbox,
665
+ OptionObjectRadioOrCheckbox
666
+ ] | [
667
+ OptionObjectRadioOrCheckbox,
668
+ OptionObjectRadioOrCheckbox,
669
+ OptionObjectRadioOrCheckbox,
670
+ OptionObjectRadioOrCheckbox,
671
+ OptionObjectRadioOrCheckbox,
672
+ OptionObjectRadioOrCheckbox,
673
+ OptionObjectRadioOrCheckbox,
674
+ OptionObjectRadioOrCheckbox,
675
+ OptionObjectRadioOrCheckbox,
676
+ OptionObjectRadioOrCheckbox
677
+ ];
678
+ initial_option?: OptionObjectRadioOrCheckbox;
679
+ confirm?: ConfirmObject;
680
+ focus_on_load?: boolean;
681
+ }
682
+ /**
683
+ * Option object used in select / multi-select menus. text and description must be plain_text. url is not allowed here (overflow only).
684
+ */
685
+ export interface OptionObjectPlainText {
686
+ text: PlainTextObject;
687
+ value: string;
688
+ description?: PlainTextObject;
689
+ }
690
+ export interface OptionGroupObject {
691
+ label: PlainTextObject;
692
+ /**
693
+ * @minItems 1
694
+ * @maxItems 100
695
+ */
696
+ options: [OptionObjectPlainText, ...OptionObjectPlainText[]];
697
+ }
698
+ export interface ExternalSelectElement {
699
+ type: "external_select";
700
+ action_id?: ActionId;
701
+ initial_option?: OptionObjectPlainText;
702
+ min_query_length?: number;
703
+ confirm?: ConfirmObject;
704
+ focus_on_load?: boolean;
705
+ placeholder?: PlaceholderObject;
706
+ }
707
+ export interface UsersSelectElement {
708
+ type: "users_select";
709
+ action_id?: ActionId;
710
+ initial_user?: string;
711
+ confirm?: ConfirmObject;
712
+ focus_on_load?: boolean;
713
+ placeholder?: PlaceholderObject;
714
+ }
715
+ /**
716
+ * response_url_enabled is only valid when used inside an input block within a modal.
717
+ */
718
+ export interface ConversationsSelectElement {
719
+ type: "conversations_select";
720
+ action_id?: ActionId;
721
+ initial_conversation?: string;
722
+ default_to_current_conversation?: boolean;
723
+ confirm?: ConfirmObject;
724
+ response_url_enabled?: boolean;
725
+ filter?: ConversationFilterObject;
726
+ focus_on_load?: boolean;
727
+ placeholder?: PlaceholderObject;
728
+ }
729
+ /**
730
+ * Filter object for conversations_select / multi_conversations_select. At least one of include / exclude_external_shared_channels / exclude_bot_users must be present.
731
+ */
732
+ export interface ConversationFilterObject {
733
+ /**
734
+ * @minItems 1
735
+ */
736
+ include?: ["im" | "mpim" | "private" | "public", ...("im" | "mpim" | "private" | "public")[]];
737
+ exclude_external_shared_channels?: boolean;
738
+ exclude_bot_users?: boolean;
739
+ }
740
+ /**
741
+ * response_url_enabled is only valid when used inside an input block within a modal.
742
+ */
743
+ export interface ChannelsSelectElement {
744
+ type: "channels_select";
745
+ action_id?: ActionId;
746
+ initial_channel?: string;
747
+ confirm?: ConfirmObject;
748
+ response_url_enabled?: boolean;
749
+ focus_on_load?: boolean;
750
+ placeholder?: PlaceholderObject;
751
+ }
752
+ export interface MultiExternalSelectElement {
753
+ type: "multi_external_select";
754
+ action_id?: ActionId;
755
+ min_query_length?: number;
756
+ /**
757
+ * @minItems 1
758
+ */
759
+ initial_options?: [OptionObjectPlainText, ...OptionObjectPlainText[]];
760
+ confirm?: ConfirmObject;
761
+ max_selected_items?: number;
762
+ focus_on_load?: boolean;
763
+ placeholder?: PlaceholderObject;
764
+ }
765
+ export interface MultiUsersSelectElement {
766
+ type: "multi_users_select";
767
+ action_id?: ActionId;
768
+ /**
769
+ * @minItems 1
770
+ */
771
+ initial_users?: [string, ...string[]];
772
+ confirm?: ConfirmObject;
773
+ max_selected_items?: number;
774
+ focus_on_load?: boolean;
775
+ placeholder?: PlaceholderObject;
776
+ }
777
+ export interface MultiConversationsSelectElement {
778
+ type: "multi_conversations_select";
779
+ action_id?: ActionId;
780
+ /**
781
+ * @minItems 1
782
+ */
783
+ initial_conversations?: [string, ...string[]];
784
+ default_to_current_conversation?: boolean;
785
+ confirm?: ConfirmObject;
786
+ max_selected_items?: number;
787
+ filter?: ConversationFilterObject;
788
+ focus_on_load?: boolean;
789
+ placeholder?: PlaceholderObject;
790
+ }
791
+ export interface MultiChannelsSelectElement {
792
+ type: "multi_channels_select";
793
+ action_id?: ActionId;
794
+ /**
795
+ * @minItems 1
796
+ */
797
+ initial_channels?: [string, ...string[]];
798
+ confirm?: ConfirmObject;
799
+ max_selected_items?: number;
800
+ focus_on_load?: boolean;
801
+ placeholder?: PlaceholderObject;
802
+ }
803
+ export interface WorkflowButtonElement {
804
+ type: "workflow_button";
805
+ text: PlainTextObject;
806
+ workflow: WorkflowObject;
807
+ action_id: ActionId;
808
+ style?: "primary" | "danger";
809
+ accessibility_label?: string;
810
+ }
811
+ export interface WorkflowObject {
812
+ trigger: TriggerObject;
813
+ }
814
+ export interface TriggerObject {
815
+ url: string;
816
+ customizable_input_parameters?: {
817
+ name: string;
818
+ value: unknown;
819
+ }[];
820
+ }
821
+ export interface AlertBlock {
822
+ type: "alert";
823
+ text: TextObject;
824
+ level?: "default" | "info" | "warning" | "error" | "success";
825
+ block_id?: BlockId;
826
+ }
827
+ export interface CarouselBlock {
828
+ type: "carousel";
829
+ /**
830
+ * @minItems 1
831
+ * @maxItems 10
832
+ */
833
+ elements: [CardBlock] | [CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock] | [CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock, CardBlock];
834
+ block_id?: BlockId;
835
+ }
836
+ export interface ContextActionsBlock {
837
+ type: "context_actions";
838
+ /**
839
+ * @minItems 1
840
+ * @maxItems 5
841
+ */
842
+ elements: [ContextActionsBlockElement] | [ContextActionsBlockElement, ContextActionsBlockElement] | [ContextActionsBlockElement, ContextActionsBlockElement, ContextActionsBlockElement] | [ContextActionsBlockElement, ContextActionsBlockElement, ContextActionsBlockElement, ContextActionsBlockElement] | [
843
+ ContextActionsBlockElement,
844
+ ContextActionsBlockElement,
845
+ ContextActionsBlockElement,
846
+ ContextActionsBlockElement,
847
+ ContextActionsBlockElement
848
+ ];
849
+ block_id?: BlockId;
850
+ }
851
+ /**
852
+ * Must be used inside a context_actions block.
853
+ */
854
+ export interface FeedbackButtonsElement {
855
+ type: "feedback_buttons";
856
+ positive_button: FeedbackButtonSubobject;
857
+ negative_button: FeedbackButtonSubobject;
858
+ action_id?: ActionId;
859
+ }
860
+ export interface FeedbackButtonSubobject {
861
+ text: PlainTextObject;
862
+ value: string;
863
+ accessibility_label?: string;
864
+ }
865
+ /**
866
+ * Icon button — only valid inside a context_actions block.
867
+ */
868
+ export interface IconButtonElement {
869
+ type: "icon_button";
870
+ icon: "trash";
871
+ text: PlainTextObject;
872
+ action_id?: ActionId;
873
+ value?: string;
874
+ confirm?: ConfirmObject;
875
+ accessibility_label?: string;
876
+ visible_to_user_ids?: string[];
877
+ }
878
+ export interface ContextBlock {
879
+ type: "context";
880
+ /**
881
+ * @minItems 1
882
+ * @maxItems 10
883
+ */
884
+ elements: [ContextBlockElement] | [ContextBlockElement, ContextBlockElement] | [ContextBlockElement, ContextBlockElement, ContextBlockElement] | [ContextBlockElement, ContextBlockElement, ContextBlockElement, ContextBlockElement] | [ContextBlockElement, ContextBlockElement, ContextBlockElement, ContextBlockElement, ContextBlockElement] | [
885
+ ContextBlockElement,
886
+ ContextBlockElement,
887
+ ContextBlockElement,
888
+ ContextBlockElement,
889
+ ContextBlockElement,
890
+ ContextBlockElement
891
+ ] | [
892
+ ContextBlockElement,
893
+ ContextBlockElement,
894
+ ContextBlockElement,
895
+ ContextBlockElement,
896
+ ContextBlockElement,
897
+ ContextBlockElement,
898
+ ContextBlockElement
899
+ ] | [
900
+ ContextBlockElement,
901
+ ContextBlockElement,
902
+ ContextBlockElement,
903
+ ContextBlockElement,
904
+ ContextBlockElement,
905
+ ContextBlockElement,
906
+ ContextBlockElement,
907
+ ContextBlockElement
908
+ ] | [
909
+ ContextBlockElement,
910
+ ContextBlockElement,
911
+ ContextBlockElement,
912
+ ContextBlockElement,
913
+ ContextBlockElement,
914
+ ContextBlockElement,
915
+ ContextBlockElement,
916
+ ContextBlockElement,
917
+ ContextBlockElement
918
+ ] | [
919
+ ContextBlockElement,
920
+ ContextBlockElement,
921
+ ContextBlockElement,
922
+ ContextBlockElement,
923
+ ContextBlockElement,
924
+ ContextBlockElement,
925
+ ContextBlockElement,
926
+ ContextBlockElement,
927
+ ContextBlockElement,
928
+ ContextBlockElement
929
+ ];
930
+ block_id?: BlockId;
931
+ }
932
+ export interface DividerBlock {
933
+ type: "divider";
934
+ block_id?: BlockId;
935
+ }
936
+ /**
937
+ * Cannot be added to app surfaces directly; surfaces only when retrieving messages that contain remote files.
938
+ */
939
+ export interface FileBlock {
940
+ type: "file";
941
+ external_id: string;
942
+ source: "remote";
943
+ block_id?: BlockId;
944
+ }
945
+ export interface HeaderBlock {
946
+ type: "header";
947
+ text: PlainTextObject;
948
+ block_id?: BlockId;
949
+ level?: number;
950
+ }
951
+ /**
952
+ * If element is a file_input, dispatch_action must not be true.
953
+ */
954
+ export interface InputBlock {
955
+ type: "input";
956
+ label: PlainTextObject;
957
+ element: InputBlockElement;
958
+ dispatch_action?: boolean;
959
+ block_id?: BlockId;
960
+ hint?: PlainTextObject;
961
+ optional?: boolean;
962
+ }
963
+ /**
964
+ * Must be used inside an input block.
965
+ */
966
+ export interface PlainTextInputElement {
967
+ type: "plain_text_input";
968
+ action_id?: ActionId;
969
+ initial_value?: string;
970
+ multiline?: boolean;
971
+ min_length?: number;
972
+ max_length?: number;
973
+ dispatch_action_config?: DispatchActionConfigObject;
974
+ focus_on_load?: boolean;
975
+ placeholder?: PlaceholderObject;
976
+ }
977
+ export interface DispatchActionConfigObject {
978
+ /**
979
+ * @minItems 1
980
+ * @maxItems 2
981
+ */
982
+ trigger_actions_on: ["on_enter_pressed" | "on_character_entered"] | ["on_enter_pressed" | "on_character_entered", "on_enter_pressed" | "on_character_entered"];
983
+ }
984
+ /**
985
+ * Must be used inside an input block.
986
+ */
987
+ export interface EmailInputElement {
988
+ type: "email_text_input";
989
+ action_id?: ActionId;
990
+ initial_value?: string;
991
+ dispatch_action_config?: DispatchActionConfigObject;
992
+ focus_on_load?: boolean;
993
+ placeholder?: PlaceholderObject;
994
+ }
995
+ /**
996
+ * Must be used inside an input block.
997
+ */
998
+ export interface UrlInputElement {
999
+ type: "url_text_input";
1000
+ action_id?: ActionId;
1001
+ initial_value?: string;
1002
+ dispatch_action_config?: DispatchActionConfigObject;
1003
+ focus_on_load?: boolean;
1004
+ placeholder?: PlaceholderObject;
1005
+ }
1006
+ /**
1007
+ * Must be used inside an input block. min_value must not exceed max_value.
1008
+ */
1009
+ export interface NumberInputElement {
1010
+ type: "number_input";
1011
+ is_decimal_allowed: boolean;
1012
+ action_id?: ActionId;
1013
+ initial_value?: string;
1014
+ min_value?: string;
1015
+ max_value?: string;
1016
+ dispatch_action_config?: DispatchActionConfigObject;
1017
+ focus_on_load?: boolean;
1018
+ placeholder?: PlaceholderObject;
1019
+ }
1020
+ /**
1021
+ * Must be used inside an input block.
1022
+ */
1023
+ export interface RichTextInputElement {
1024
+ type: "rich_text_input";
1025
+ action_id: ActionId;
1026
+ initial_value?: RichTextBlock;
1027
+ dispatch_action_config?: DispatchActionConfigObject;
1028
+ focus_on_load?: boolean;
1029
+ placeholder?: PlaceholderObject;
1030
+ }
1031
+ export interface RichTextBlock {
1032
+ type: "rich_text";
1033
+ /**
1034
+ * Empty array is accepted by Slack (verified in Block Kit Builder 2026-04-16).
1035
+ */
1036
+ elements: RichTextContainerElement[];
1037
+ block_id?: BlockId;
1038
+ }
1039
+ export interface RichTextSectionElement {
1040
+ type: "rich_text_section";
1041
+ /**
1042
+ * Empty array is accepted by Slack (verified in Block Kit Builder 2026-04-16).
1043
+ */
1044
+ elements: RichTextLeaf[];
1045
+ }
1046
+ export interface RichTextTextLeaf {
1047
+ type: "text";
1048
+ text: string;
1049
+ style?: RichTextStyleObject;
1050
+ }
1051
+ /**
1052
+ * Style flags for rich-text leaf elements. Slack docs disagree on which flags are allowed per leaf type; this is the union of all flags documented.
1053
+ */
1054
+ export interface RichTextStyleObject {
1055
+ bold?: boolean;
1056
+ italic?: boolean;
1057
+ strike?: boolean;
1058
+ underline?: boolean;
1059
+ code?: boolean;
1060
+ highlight?: boolean;
1061
+ client_highlight?: boolean;
1062
+ unlink?: boolean;
1063
+ }
1064
+ export interface RichTextLinkLeaf {
1065
+ type: "link";
1066
+ url: string;
1067
+ text?: string;
1068
+ unsafe?: boolean;
1069
+ style?: RichTextStyleObject;
1070
+ }
1071
+ export interface RichTextUserLeaf {
1072
+ type: "user";
1073
+ user_id: string;
1074
+ style?: RichTextStyleObject;
1075
+ }
1076
+ export interface RichTextUsergroupLeaf {
1077
+ type: "usergroup";
1078
+ usergroup_id: string;
1079
+ style?: RichTextStyleObject;
1080
+ }
1081
+ /**
1082
+ * Whole-team mention (e.g. <!T12345>) — referenced by team_id.
1083
+ */
1084
+ export interface RichTextTeamLeaf {
1085
+ type: "team";
1086
+ team_id: string;
1087
+ style?: RichTextStyleObject;
1088
+ }
1089
+ export interface RichTextChannelLeaf {
1090
+ type: "channel";
1091
+ channel_id: string;
1092
+ style?: RichTextStyleObject;
1093
+ }
1094
+ /**
1095
+ * Slack's official docs (rich-text-block reference) only list type/name/unicode, but the API silently accepts a `style` object on emoji leaves. We allow it to match observed behavior.
1096
+ */
1097
+ export interface RichTextEmojiLeaf {
1098
+ type: "emoji";
1099
+ name: string;
1100
+ skin_tone?: number;
1101
+ unicode?: string;
1102
+ style?: RichTextStyleObject;
1103
+ }
1104
+ export interface RichTextBroadcastLeaf {
1105
+ type: "broadcast";
1106
+ range: "here" | "channel" | "everyone";
1107
+ style?: RichTextStyleObject;
1108
+ }
1109
+ export interface RichTextColorLeaf {
1110
+ type: "color";
1111
+ value: string;
1112
+ style?: RichTextStyleObject;
1113
+ }
1114
+ export interface RichTextDateLeaf {
1115
+ type: "date";
1116
+ timestamp: number;
1117
+ format: string;
1118
+ url?: string;
1119
+ fallback?: string;
1120
+ style?: RichTextStyleObject;
1121
+ }
1122
+ export interface RichTextListElement {
1123
+ type: "rich_text_list";
1124
+ style: "bullet" | "ordered";
1125
+ /**
1126
+ * @minItems 1
1127
+ */
1128
+ elements: [RichTextSectionElement, ...RichTextSectionElement[]];
1129
+ indent?: number;
1130
+ offset?: number;
1131
+ border?: 0 | 1;
1132
+ }
1133
+ export interface RichTextPreformattedElement {
1134
+ type: "rich_text_preformatted";
1135
+ /**
1136
+ * Empty array is accepted by Slack (verified in Block Kit Builder 2026-04-16).
1137
+ */
1138
+ elements: RichTextLeaf[];
1139
+ border?: 0 | 1;
1140
+ language?: string;
1141
+ }
1142
+ export interface RichTextQuoteElement {
1143
+ type: "rich_text_quote";
1144
+ /**
1145
+ * Empty array is accepted by Slack (verified in Block Kit Builder 2026-04-16).
1146
+ */
1147
+ elements: RichTextLeaf[];
1148
+ border?: 0 | 1;
1149
+ }
1150
+ /**
1151
+ * Must be used inside an input block in modals only. Requires files:read OAuth scope. 10MB per-file limit (not enforceable in JSON Schema).
1152
+ */
1153
+ export interface FileInputElement {
1154
+ type: "file_input";
1155
+ action_id?: ActionId;
1156
+ /**
1157
+ * @minItems 1
1158
+ */
1159
+ filetypes?: [string, ...string[]];
1160
+ max_files?: number;
1161
+ }
1162
+ /**
1163
+ * block_id is ignored on markdown blocks. Cumulative 12,000-char limit across all markdown blocks in one payload is a payload-level rule, not enforced here.
1164
+ */
1165
+ export interface MarkdownBlock {
1166
+ type: "markdown";
1167
+ text: string;
1168
+ block_id?: BlockId;
1169
+ }
1170
+ export interface PlanBlock {
1171
+ type: "plan";
1172
+ title: string | PlainTextObject;
1173
+ block_id?: BlockId;
1174
+ tasks?: TaskCardInlineObject[];
1175
+ }
1176
+ /**
1177
+ * A task card as it appears inline within a plan_block tasks array — the docs' example omits the type discriminator.
1178
+ */
1179
+ export interface TaskCardInlineObject {
1180
+ type?: "task_card";
1181
+ task_id: string;
1182
+ title: string;
1183
+ details?: RichTextBlock;
1184
+ output?: RichTextBlock;
1185
+ sources?: UrlSourceElement[];
1186
+ status?: "pending" | "in_progress" | "complete" | "error";
1187
+ block_id?: BlockId;
1188
+ }
1189
+ /**
1190
+ * URL source element — only valid inside a task_card block's sources array.
1191
+ */
1192
+ export interface UrlSourceElement {
1193
+ type: "url";
1194
+ url: string;
1195
+ text: string;
1196
+ }
1197
+ /**
1198
+ * One table per message (server-enforced via invalid_attachments / only_one_table_allowed). Up to 100 rows, up to 20 cells per row.
1199
+ */
1200
+ export interface TableBlock {
1201
+ type: "table";
1202
+ block_id?: BlockId;
1203
+ /**
1204
+ * @minItems 1
1205
+ * @maxItems 100
1206
+ */
1207
+ rows: [
1208
+ ([TableCell] | [TableCell, TableCell] | [TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [
1209
+ TableCell,
1210
+ TableCell,
1211
+ TableCell,
1212
+ TableCell,
1213
+ TableCell,
1214
+ TableCell,
1215
+ TableCell,
1216
+ TableCell,
1217
+ TableCell,
1218
+ TableCell,
1219
+ TableCell
1220
+ ] | [
1221
+ TableCell,
1222
+ TableCell,
1223
+ TableCell,
1224
+ TableCell,
1225
+ TableCell,
1226
+ TableCell,
1227
+ TableCell,
1228
+ TableCell,
1229
+ TableCell,
1230
+ TableCell,
1231
+ TableCell,
1232
+ TableCell
1233
+ ] | [
1234
+ TableCell,
1235
+ TableCell,
1236
+ TableCell,
1237
+ TableCell,
1238
+ TableCell,
1239
+ TableCell,
1240
+ TableCell,
1241
+ TableCell,
1242
+ TableCell,
1243
+ TableCell,
1244
+ TableCell,
1245
+ TableCell,
1246
+ TableCell
1247
+ ] | [
1248
+ TableCell,
1249
+ TableCell,
1250
+ TableCell,
1251
+ TableCell,
1252
+ TableCell,
1253
+ TableCell,
1254
+ TableCell,
1255
+ TableCell,
1256
+ TableCell,
1257
+ TableCell,
1258
+ TableCell,
1259
+ TableCell,
1260
+ TableCell,
1261
+ TableCell
1262
+ ] | [
1263
+ TableCell,
1264
+ TableCell,
1265
+ TableCell,
1266
+ TableCell,
1267
+ TableCell,
1268
+ TableCell,
1269
+ TableCell,
1270
+ TableCell,
1271
+ TableCell,
1272
+ TableCell,
1273
+ TableCell,
1274
+ TableCell,
1275
+ TableCell,
1276
+ TableCell,
1277
+ TableCell
1278
+ ] | [
1279
+ TableCell,
1280
+ TableCell,
1281
+ TableCell,
1282
+ TableCell,
1283
+ TableCell,
1284
+ TableCell,
1285
+ TableCell,
1286
+ TableCell,
1287
+ TableCell,
1288
+ TableCell,
1289
+ TableCell,
1290
+ TableCell,
1291
+ TableCell,
1292
+ TableCell,
1293
+ TableCell,
1294
+ TableCell
1295
+ ] | [
1296
+ TableCell,
1297
+ TableCell,
1298
+ TableCell,
1299
+ TableCell,
1300
+ TableCell,
1301
+ TableCell,
1302
+ TableCell,
1303
+ TableCell,
1304
+ TableCell,
1305
+ TableCell,
1306
+ TableCell,
1307
+ TableCell,
1308
+ TableCell,
1309
+ TableCell,
1310
+ TableCell,
1311
+ TableCell,
1312
+ TableCell
1313
+ ] | [
1314
+ TableCell,
1315
+ TableCell,
1316
+ TableCell,
1317
+ TableCell,
1318
+ TableCell,
1319
+ TableCell,
1320
+ TableCell,
1321
+ TableCell,
1322
+ TableCell,
1323
+ TableCell,
1324
+ TableCell,
1325
+ TableCell,
1326
+ TableCell,
1327
+ TableCell,
1328
+ TableCell,
1329
+ TableCell,
1330
+ TableCell,
1331
+ TableCell
1332
+ ] | [
1333
+ TableCell,
1334
+ TableCell,
1335
+ TableCell,
1336
+ TableCell,
1337
+ TableCell,
1338
+ TableCell,
1339
+ TableCell,
1340
+ TableCell,
1341
+ TableCell,
1342
+ TableCell,
1343
+ TableCell,
1344
+ TableCell,
1345
+ TableCell,
1346
+ TableCell,
1347
+ TableCell,
1348
+ TableCell,
1349
+ TableCell,
1350
+ TableCell,
1351
+ TableCell
1352
+ ] | [
1353
+ TableCell,
1354
+ TableCell,
1355
+ TableCell,
1356
+ TableCell,
1357
+ TableCell,
1358
+ TableCell,
1359
+ TableCell,
1360
+ TableCell,
1361
+ TableCell,
1362
+ TableCell,
1363
+ TableCell,
1364
+ TableCell,
1365
+ TableCell,
1366
+ TableCell,
1367
+ TableCell,
1368
+ TableCell,
1369
+ TableCell,
1370
+ TableCell,
1371
+ TableCell,
1372
+ TableCell
1373
+ ]),
1374
+ ...([TableCell] | [TableCell, TableCell] | [TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell, TableCell] | [
1375
+ TableCell,
1376
+ TableCell,
1377
+ TableCell,
1378
+ TableCell,
1379
+ TableCell,
1380
+ TableCell,
1381
+ TableCell,
1382
+ TableCell,
1383
+ TableCell,
1384
+ TableCell,
1385
+ TableCell
1386
+ ] | [
1387
+ TableCell,
1388
+ TableCell,
1389
+ TableCell,
1390
+ TableCell,
1391
+ TableCell,
1392
+ TableCell,
1393
+ TableCell,
1394
+ TableCell,
1395
+ TableCell,
1396
+ TableCell,
1397
+ TableCell,
1398
+ TableCell
1399
+ ] | [
1400
+ TableCell,
1401
+ TableCell,
1402
+ TableCell,
1403
+ TableCell,
1404
+ TableCell,
1405
+ TableCell,
1406
+ TableCell,
1407
+ TableCell,
1408
+ TableCell,
1409
+ TableCell,
1410
+ TableCell,
1411
+ TableCell,
1412
+ TableCell
1413
+ ] | [
1414
+ TableCell,
1415
+ TableCell,
1416
+ TableCell,
1417
+ TableCell,
1418
+ TableCell,
1419
+ TableCell,
1420
+ TableCell,
1421
+ TableCell,
1422
+ TableCell,
1423
+ TableCell,
1424
+ TableCell,
1425
+ TableCell,
1426
+ TableCell,
1427
+ TableCell
1428
+ ] | [
1429
+ TableCell,
1430
+ TableCell,
1431
+ TableCell,
1432
+ TableCell,
1433
+ TableCell,
1434
+ TableCell,
1435
+ TableCell,
1436
+ TableCell,
1437
+ TableCell,
1438
+ TableCell,
1439
+ TableCell,
1440
+ TableCell,
1441
+ TableCell,
1442
+ TableCell,
1443
+ TableCell
1444
+ ] | [
1445
+ TableCell,
1446
+ TableCell,
1447
+ TableCell,
1448
+ TableCell,
1449
+ TableCell,
1450
+ TableCell,
1451
+ TableCell,
1452
+ TableCell,
1453
+ TableCell,
1454
+ TableCell,
1455
+ TableCell,
1456
+ TableCell,
1457
+ TableCell,
1458
+ TableCell,
1459
+ TableCell,
1460
+ TableCell
1461
+ ] | [
1462
+ TableCell,
1463
+ TableCell,
1464
+ TableCell,
1465
+ TableCell,
1466
+ TableCell,
1467
+ TableCell,
1468
+ TableCell,
1469
+ TableCell,
1470
+ TableCell,
1471
+ TableCell,
1472
+ TableCell,
1473
+ TableCell,
1474
+ TableCell,
1475
+ TableCell,
1476
+ TableCell,
1477
+ TableCell,
1478
+ TableCell
1479
+ ] | [
1480
+ TableCell,
1481
+ TableCell,
1482
+ TableCell,
1483
+ TableCell,
1484
+ TableCell,
1485
+ TableCell,
1486
+ TableCell,
1487
+ TableCell,
1488
+ TableCell,
1489
+ TableCell,
1490
+ TableCell,
1491
+ TableCell,
1492
+ TableCell,
1493
+ TableCell,
1494
+ TableCell,
1495
+ TableCell,
1496
+ TableCell,
1497
+ TableCell
1498
+ ] | [
1499
+ TableCell,
1500
+ TableCell,
1501
+ TableCell,
1502
+ TableCell,
1503
+ TableCell,
1504
+ TableCell,
1505
+ TableCell,
1506
+ TableCell,
1507
+ TableCell,
1508
+ TableCell,
1509
+ TableCell,
1510
+ TableCell,
1511
+ TableCell,
1512
+ TableCell,
1513
+ TableCell,
1514
+ TableCell,
1515
+ TableCell,
1516
+ TableCell,
1517
+ TableCell
1518
+ ] | [
1519
+ TableCell,
1520
+ TableCell,
1521
+ TableCell,
1522
+ TableCell,
1523
+ TableCell,
1524
+ TableCell,
1525
+ TableCell,
1526
+ TableCell,
1527
+ TableCell,
1528
+ TableCell,
1529
+ TableCell,
1530
+ TableCell,
1531
+ TableCell,
1532
+ TableCell,
1533
+ TableCell,
1534
+ TableCell,
1535
+ TableCell,
1536
+ TableCell,
1537
+ TableCell,
1538
+ TableCell
1539
+ ])[]
1540
+ ];
1541
+ /**
1542
+ * @maxItems 20
1543
+ */
1544
+ column_settings?: [] | [TableColumnSetting] | [TableColumnSetting, TableColumnSetting] | [TableColumnSetting, TableColumnSetting, TableColumnSetting] | [TableColumnSetting, TableColumnSetting, TableColumnSetting, TableColumnSetting] | [TableColumnSetting, TableColumnSetting, TableColumnSetting, TableColumnSetting, TableColumnSetting] | [
1545
+ TableColumnSetting,
1546
+ TableColumnSetting,
1547
+ TableColumnSetting,
1548
+ TableColumnSetting,
1549
+ TableColumnSetting,
1550
+ TableColumnSetting
1551
+ ] | [
1552
+ TableColumnSetting,
1553
+ TableColumnSetting,
1554
+ TableColumnSetting,
1555
+ TableColumnSetting,
1556
+ TableColumnSetting,
1557
+ TableColumnSetting,
1558
+ TableColumnSetting
1559
+ ] | [
1560
+ TableColumnSetting,
1561
+ TableColumnSetting,
1562
+ TableColumnSetting,
1563
+ TableColumnSetting,
1564
+ TableColumnSetting,
1565
+ TableColumnSetting,
1566
+ TableColumnSetting,
1567
+ TableColumnSetting
1568
+ ] | [
1569
+ TableColumnSetting,
1570
+ TableColumnSetting,
1571
+ TableColumnSetting,
1572
+ TableColumnSetting,
1573
+ TableColumnSetting,
1574
+ TableColumnSetting,
1575
+ TableColumnSetting,
1576
+ TableColumnSetting,
1577
+ TableColumnSetting
1578
+ ] | [
1579
+ TableColumnSetting,
1580
+ TableColumnSetting,
1581
+ TableColumnSetting,
1582
+ TableColumnSetting,
1583
+ TableColumnSetting,
1584
+ TableColumnSetting,
1585
+ TableColumnSetting,
1586
+ TableColumnSetting,
1587
+ TableColumnSetting,
1588
+ TableColumnSetting
1589
+ ] | [
1590
+ TableColumnSetting,
1591
+ TableColumnSetting,
1592
+ TableColumnSetting,
1593
+ TableColumnSetting,
1594
+ TableColumnSetting,
1595
+ TableColumnSetting,
1596
+ TableColumnSetting,
1597
+ TableColumnSetting,
1598
+ TableColumnSetting,
1599
+ TableColumnSetting,
1600
+ TableColumnSetting
1601
+ ] | [
1602
+ TableColumnSetting,
1603
+ TableColumnSetting,
1604
+ TableColumnSetting,
1605
+ TableColumnSetting,
1606
+ TableColumnSetting,
1607
+ TableColumnSetting,
1608
+ TableColumnSetting,
1609
+ TableColumnSetting,
1610
+ TableColumnSetting,
1611
+ TableColumnSetting,
1612
+ TableColumnSetting,
1613
+ TableColumnSetting
1614
+ ] | [
1615
+ TableColumnSetting,
1616
+ TableColumnSetting,
1617
+ TableColumnSetting,
1618
+ TableColumnSetting,
1619
+ TableColumnSetting,
1620
+ TableColumnSetting,
1621
+ TableColumnSetting,
1622
+ TableColumnSetting,
1623
+ TableColumnSetting,
1624
+ TableColumnSetting,
1625
+ TableColumnSetting,
1626
+ TableColumnSetting,
1627
+ TableColumnSetting
1628
+ ] | [
1629
+ TableColumnSetting,
1630
+ TableColumnSetting,
1631
+ TableColumnSetting,
1632
+ TableColumnSetting,
1633
+ TableColumnSetting,
1634
+ TableColumnSetting,
1635
+ TableColumnSetting,
1636
+ TableColumnSetting,
1637
+ TableColumnSetting,
1638
+ TableColumnSetting,
1639
+ TableColumnSetting,
1640
+ TableColumnSetting,
1641
+ TableColumnSetting,
1642
+ TableColumnSetting
1643
+ ] | [
1644
+ TableColumnSetting,
1645
+ TableColumnSetting,
1646
+ TableColumnSetting,
1647
+ TableColumnSetting,
1648
+ TableColumnSetting,
1649
+ TableColumnSetting,
1650
+ TableColumnSetting,
1651
+ TableColumnSetting,
1652
+ TableColumnSetting,
1653
+ TableColumnSetting,
1654
+ TableColumnSetting,
1655
+ TableColumnSetting,
1656
+ TableColumnSetting,
1657
+ TableColumnSetting,
1658
+ TableColumnSetting
1659
+ ] | [
1660
+ TableColumnSetting,
1661
+ TableColumnSetting,
1662
+ TableColumnSetting,
1663
+ TableColumnSetting,
1664
+ TableColumnSetting,
1665
+ TableColumnSetting,
1666
+ TableColumnSetting,
1667
+ TableColumnSetting,
1668
+ TableColumnSetting,
1669
+ TableColumnSetting,
1670
+ TableColumnSetting,
1671
+ TableColumnSetting,
1672
+ TableColumnSetting,
1673
+ TableColumnSetting,
1674
+ TableColumnSetting,
1675
+ TableColumnSetting
1676
+ ] | [
1677
+ TableColumnSetting,
1678
+ TableColumnSetting,
1679
+ TableColumnSetting,
1680
+ TableColumnSetting,
1681
+ TableColumnSetting,
1682
+ TableColumnSetting,
1683
+ TableColumnSetting,
1684
+ TableColumnSetting,
1685
+ TableColumnSetting,
1686
+ TableColumnSetting,
1687
+ TableColumnSetting,
1688
+ TableColumnSetting,
1689
+ TableColumnSetting,
1690
+ TableColumnSetting,
1691
+ TableColumnSetting,
1692
+ TableColumnSetting,
1693
+ TableColumnSetting
1694
+ ] | [
1695
+ TableColumnSetting,
1696
+ TableColumnSetting,
1697
+ TableColumnSetting,
1698
+ TableColumnSetting,
1699
+ TableColumnSetting,
1700
+ TableColumnSetting,
1701
+ TableColumnSetting,
1702
+ TableColumnSetting,
1703
+ TableColumnSetting,
1704
+ TableColumnSetting,
1705
+ TableColumnSetting,
1706
+ TableColumnSetting,
1707
+ TableColumnSetting,
1708
+ TableColumnSetting,
1709
+ TableColumnSetting,
1710
+ TableColumnSetting,
1711
+ TableColumnSetting,
1712
+ TableColumnSetting
1713
+ ] | [
1714
+ TableColumnSetting,
1715
+ TableColumnSetting,
1716
+ TableColumnSetting,
1717
+ TableColumnSetting,
1718
+ TableColumnSetting,
1719
+ TableColumnSetting,
1720
+ TableColumnSetting,
1721
+ TableColumnSetting,
1722
+ TableColumnSetting,
1723
+ TableColumnSetting,
1724
+ TableColumnSetting,
1725
+ TableColumnSetting,
1726
+ TableColumnSetting,
1727
+ TableColumnSetting,
1728
+ TableColumnSetting,
1729
+ TableColumnSetting,
1730
+ TableColumnSetting,
1731
+ TableColumnSetting,
1732
+ TableColumnSetting
1733
+ ] | [
1734
+ TableColumnSetting,
1735
+ TableColumnSetting,
1736
+ TableColumnSetting,
1737
+ TableColumnSetting,
1738
+ TableColumnSetting,
1739
+ TableColumnSetting,
1740
+ TableColumnSetting,
1741
+ TableColumnSetting,
1742
+ TableColumnSetting,
1743
+ TableColumnSetting,
1744
+ TableColumnSetting,
1745
+ TableColumnSetting,
1746
+ TableColumnSetting,
1747
+ TableColumnSetting,
1748
+ TableColumnSetting,
1749
+ TableColumnSetting,
1750
+ TableColumnSetting,
1751
+ TableColumnSetting,
1752
+ TableColumnSetting,
1753
+ TableColumnSetting
1754
+ ];
1755
+ }
1756
+ /**
1757
+ * Standalone task_card block (also embeddable inline within plan_block).
1758
+ */
1759
+ export interface TaskCardBlock {
1760
+ type: "task_card";
1761
+ task_id: string;
1762
+ title: string;
1763
+ details?: RichTextBlock;
1764
+ output?: RichTextBlock;
1765
+ sources?: UrlSourceElement[];
1766
+ status?: "pending" | "in_progress" | "complete" | "error";
1767
+ block_id?: BlockId;
1768
+ }
1769
+ /**
1770
+ * Requires links.embed:write OAuth scope. video_url must be in app's unfurl domains, HTTPS, embeddable, return 2xx, not point to Slack-related domains.
1771
+ */
1772
+ export interface VideoBlock {
1773
+ type: "video";
1774
+ alt_text: string;
1775
+ title: PlainTextObject;
1776
+ thumbnail_url: string;
1777
+ video_url: string;
1778
+ author_name?: string;
1779
+ description?: PlainTextObject;
1780
+ provider_icon_url?: string;
1781
+ provider_name?: string;
1782
+ title_url?: string;
1783
+ block_id?: BlockId;
1784
+ }
1785
+ /**
1786
+ * Modal view surface (views.open / views.push / views.update payload). title/submit/close text capped at 24 chars. When blocks contain any input block, submit is required (per docs).
1787
+ */
1788
+ export interface ModalView {
1789
+ type: "modal";
1790
+ title: PlainTextObject;
1791
+ /**
1792
+ * @minItems 1
1793
+ * @maxItems 100
1794
+ */
1795
+ blocks: [Block, ...Block[]];
1796
+ close?: PlainTextObject;
1797
+ submit?: PlainTextObject;
1798
+ private_metadata?: string;
1799
+ callback_id?: string;
1800
+ clear_on_close?: boolean;
1801
+ notify_on_close?: boolean;
1802
+ external_id?: string;
1803
+ submit_disabled?: boolean;
1804
+ }
1805
+ /**
1806
+ * Home tab view surface (views.publish payload).
1807
+ */
1808
+ export interface HomeView {
1809
+ type: "home";
1810
+ /**
1811
+ * @minItems 1
1812
+ * @maxItems 100
1813
+ */
1814
+ blocks: [Block, ...Block[]];
1815
+ private_metadata?: string;
1816
+ callback_id?: string;
1817
+ external_id?: string;
1818
+ }
1819
+ //# sourceMappingURL=types.generated.d.ts.map