@underdogai/mesh-event-schemas 0.1.0

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.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +62 -0
  3. package/dist/apppacks.d.ts +15652 -0
  4. package/dist/apppacks.d.ts.map +1 -0
  5. package/dist/apppacks.js +71 -0
  6. package/dist/apppacks.js.map +1 -0
  7. package/dist/blocks.d.ts +2320 -0
  8. package/dist/blocks.d.ts.map +1 -0
  9. package/dist/blocks.js +472 -0
  10. package/dist/blocks.js.map +1 -0
  11. package/dist/capabilities.d.ts +35 -0
  12. package/dist/capabilities.d.ts.map +1 -0
  13. package/dist/capabilities.js +37 -0
  14. package/dist/capabilities.js.map +1 -0
  15. package/dist/events.d.ts +4557 -0
  16. package/dist/events.d.ts.map +1 -0
  17. package/dist/events.js +571 -0
  18. package/dist/events.js.map +1 -0
  19. package/dist/index.d.ts +16 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +16 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/namespace.d.ts +56 -0
  24. package/dist/namespace.d.ts.map +1 -0
  25. package/dist/namespace.js +60 -0
  26. package/dist/namespace.js.map +1 -0
  27. package/dist/plugins.d.ts +131 -0
  28. package/dist/plugins.d.ts.map +1 -0
  29. package/dist/plugins.js +66 -0
  30. package/dist/plugins.js.map +1 -0
  31. package/dist/registry.d.ts +67 -0
  32. package/dist/registry.d.ts.map +1 -0
  33. package/dist/registry.js +212 -0
  34. package/dist/registry.js.map +1 -0
  35. package/dist/surfaces.d.ts +54323 -0
  36. package/dist/surfaces.d.ts.map +1 -0
  37. package/dist/surfaces.js +523 -0
  38. package/dist/surfaces.js.map +1 -0
  39. package/dist/templates.d.ts +390 -0
  40. package/dist/templates.d.ts.map +1 -0
  41. package/dist/templates.js +493 -0
  42. package/dist/templates.js.map +1 -0
  43. package/package.json +50 -0
  44. package/src/apppacks.ts +90 -0
  45. package/src/blocks.ts +544 -0
  46. package/src/capabilities.ts +58 -0
  47. package/src/events.ts +758 -0
  48. package/src/index.ts +15 -0
  49. package/src/namespace.ts +64 -0
  50. package/src/plugins.ts +118 -0
  51. package/src/registry.ts +261 -0
  52. package/src/surfaces.ts +610 -0
  53. package/src/templates.ts +736 -0
@@ -0,0 +1,4557 @@
1
+ /**
2
+ * org.corp.* 커스텀 이벤트 content 스키마 + 빌더.
3
+ *
4
+ * 모든 content는 버전 필드 `v`를 가진다(스키마 진화 대비). 와이어로 나가는/들어오는
5
+ * 모든 형태의 단일 진실 공급원이며, appservice·bridge·client가 공통으로 import 한다.
6
+ */
7
+ import { z } from "zod";
8
+ import { type Tone } from "./blocks.js";
9
+ import { EventType, UI_CONTENT_KEY } from "./namespace.js";
10
+ export declare const SCHEMA_VERSION: 1;
11
+ export declare const CardStateSchema: z.ZodEnum<["open", "submitted", "cancelled", "expired"]>;
12
+ export type CardState = z.infer<typeof CardStateSchema>;
13
+ export declare const UiCardContentSchema: z.ZodObject<{
14
+ v: z.ZodDefault<z.ZodLiteral<1>>;
15
+ /** 이 카드 인스턴스의 안정적 ID. 액션 회신·편집이 이 값으로 카드를 가리킨다. */
16
+ card_id: z.ZodString;
17
+ title: z.ZodOptional<z.ZodString>;
18
+ blocks: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
19
+ type: z.ZodLiteral<"text">;
20
+ text: z.ZodString;
21
+ markdown: z.ZodOptional<z.ZodBoolean>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "text";
24
+ text: string;
25
+ markdown?: boolean | undefined;
26
+ }, {
27
+ type: "text";
28
+ text: string;
29
+ markdown?: boolean | undefined;
30
+ }>, z.ZodObject<{
31
+ type: z.ZodLiteral<"heading">;
32
+ text: z.ZodString;
33
+ level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ type: "heading";
36
+ text: string;
37
+ level?: 1 | 2 | 3 | undefined;
38
+ }, {
39
+ type: "heading";
40
+ text: string;
41
+ level?: 1 | 2 | 3 | undefined;
42
+ }>, z.ZodObject<{
43
+ type: z.ZodLiteral<"divider">;
44
+ }, "strip", z.ZodTypeAny, {
45
+ type: "divider";
46
+ }, {
47
+ type: "divider";
48
+ }>, z.ZodObject<{
49
+ type: z.ZodLiteral<"fields">;
50
+ items: z.ZodArray<z.ZodObject<{
51
+ label: z.ZodString;
52
+ value: z.ZodString;
53
+ short: z.ZodOptional<z.ZodBoolean>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ value: string;
56
+ label: string;
57
+ short?: boolean | undefined;
58
+ }, {
59
+ value: string;
60
+ label: string;
61
+ short?: boolean | undefined;
62
+ }>, "many">;
63
+ }, "strip", z.ZodTypeAny, {
64
+ type: "fields";
65
+ items: {
66
+ value: string;
67
+ label: string;
68
+ short?: boolean | undefined;
69
+ }[];
70
+ }, {
71
+ type: "fields";
72
+ items: {
73
+ value: string;
74
+ label: string;
75
+ short?: boolean | undefined;
76
+ }[];
77
+ }>, z.ZodObject<{
78
+ type: z.ZodLiteral<"image">;
79
+ url: z.ZodOptional<z.ZodString>;
80
+ mxc: z.ZodOptional<z.ZodString>;
81
+ alt: z.ZodOptional<z.ZodString>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ type: "image";
84
+ url?: string | undefined;
85
+ mxc?: string | undefined;
86
+ alt?: string | undefined;
87
+ }, {
88
+ type: "image";
89
+ url?: string | undefined;
90
+ mxc?: string | undefined;
91
+ alt?: string | undefined;
92
+ }>, z.ZodObject<{
93
+ type: z.ZodLiteral<"context">;
94
+ elements: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
95
+ icon: z.ZodString;
96
+ }, "strip", z.ZodTypeAny, {
97
+ icon: string;
98
+ }, {
99
+ icon: string;
100
+ }>, z.ZodObject<{
101
+ mxc: z.ZodString;
102
+ }, "strip", z.ZodTypeAny, {
103
+ mxc: string;
104
+ }, {
105
+ mxc: string;
106
+ }>]>, "many">;
107
+ }, "strip", z.ZodTypeAny, {
108
+ type: "context";
109
+ elements: (string | {
110
+ icon: string;
111
+ } | {
112
+ mxc: string;
113
+ })[];
114
+ }, {
115
+ type: "context";
116
+ elements: (string | {
117
+ icon: string;
118
+ } | {
119
+ mxc: string;
120
+ })[];
121
+ }>, z.ZodObject<{
122
+ type: z.ZodLiteral<"badge">;
123
+ text: z.ZodString;
124
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ type: "badge";
127
+ text: string;
128
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
129
+ }, {
130
+ type: "badge";
131
+ text: string;
132
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
133
+ }>, z.ZodObject<{
134
+ type: z.ZodLiteral<"table">;
135
+ columns: z.ZodArray<z.ZodString, "many">;
136
+ rows: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
137
+ }, "strip", z.ZodTypeAny, {
138
+ type: "table";
139
+ columns: string[];
140
+ rows: string[][];
141
+ }, {
142
+ type: "table";
143
+ columns: string[];
144
+ rows: string[][];
145
+ }>, z.ZodObject<{
146
+ type: z.ZodLiteral<"progress">;
147
+ value: z.ZodOptional<z.ZodNumber>;
148
+ label: z.ZodOptional<z.ZodString>;
149
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ type: "progress";
152
+ value?: number | undefined;
153
+ label?: string | undefined;
154
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
155
+ }, {
156
+ type: "progress";
157
+ value?: number | undefined;
158
+ label?: string | undefined;
159
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
160
+ }>, z.ZodObject<{
161
+ type: z.ZodLiteral<"steps">;
162
+ items: z.ZodArray<z.ZodObject<{
163
+ label: z.ZodString;
164
+ status: z.ZodOptional<z.ZodEnum<["done", "active", "todo", "error"]>>;
165
+ note: z.ZodOptional<z.ZodString>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ label: string;
168
+ status?: "done" | "active" | "todo" | "error" | undefined;
169
+ note?: string | undefined;
170
+ }, {
171
+ label: string;
172
+ status?: "done" | "active" | "todo" | "error" | undefined;
173
+ note?: string | undefined;
174
+ }>, "many">;
175
+ }, "strip", z.ZodTypeAny, {
176
+ type: "steps";
177
+ items: {
178
+ label: string;
179
+ status?: "done" | "active" | "todo" | "error" | undefined;
180
+ note?: string | undefined;
181
+ }[];
182
+ }, {
183
+ type: "steps";
184
+ items: {
185
+ label: string;
186
+ status?: "done" | "active" | "todo" | "error" | undefined;
187
+ note?: string | undefined;
188
+ }[];
189
+ }>, z.ZodObject<{
190
+ type: z.ZodLiteral<"metric">;
191
+ label: z.ZodString;
192
+ value: z.ZodString;
193
+ target: z.ZodOptional<z.ZodString>;
194
+ delta: z.ZodOptional<z.ZodString>;
195
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ value: string;
198
+ type: "metric";
199
+ label: string;
200
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
201
+ target?: string | undefined;
202
+ delta?: string | undefined;
203
+ }, {
204
+ value: string;
205
+ type: "metric";
206
+ label: string;
207
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
208
+ target?: string | undefined;
209
+ delta?: string | undefined;
210
+ }>, z.ZodObject<{
211
+ type: z.ZodLiteral<"chart">;
212
+ variant: z.ZodEnum<["sparkline", "bar", "line", "donut"]>;
213
+ data: z.ZodArray<z.ZodObject<{
214
+ label: z.ZodOptional<z.ZodString>;
215
+ value: z.ZodNumber;
216
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ value: number;
219
+ label?: string | undefined;
220
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
221
+ }, {
222
+ value: number;
223
+ label?: string | undefined;
224
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
225
+ }>, "many">;
226
+ caption: z.ZodOptional<z.ZodString>;
227
+ max: z.ZodOptional<z.ZodNumber>;
228
+ unit: z.ZodOptional<z.ZodString>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ type: "chart";
231
+ variant: "sparkline" | "bar" | "line" | "donut";
232
+ data: {
233
+ value: number;
234
+ label?: string | undefined;
235
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
236
+ }[];
237
+ max?: number | undefined;
238
+ unit?: string | undefined;
239
+ caption?: string | undefined;
240
+ }, {
241
+ type: "chart";
242
+ variant: "sparkline" | "bar" | "line" | "donut";
243
+ data: {
244
+ value: number;
245
+ label?: string | undefined;
246
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
247
+ }[];
248
+ max?: number | undefined;
249
+ unit?: string | undefined;
250
+ caption?: string | undefined;
251
+ }>, z.ZodObject<{
252
+ type: z.ZodLiteral<"avatar">;
253
+ name: z.ZodString;
254
+ initials: z.ZodOptional<z.ZodString>;
255
+ color: z.ZodOptional<z.ZodString>;
256
+ src: z.ZodOptional<z.ZodString>;
257
+ subtitle: z.ZodOptional<z.ZodString>;
258
+ status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ type: "avatar";
261
+ name: string;
262
+ status?: "online" | "away" | "busy" | "offline" | undefined;
263
+ initials?: string | undefined;
264
+ color?: string | undefined;
265
+ src?: string | undefined;
266
+ subtitle?: string | undefined;
267
+ }, {
268
+ type: "avatar";
269
+ name: string;
270
+ status?: "online" | "away" | "busy" | "offline" | undefined;
271
+ initials?: string | undefined;
272
+ color?: string | undefined;
273
+ src?: string | undefined;
274
+ subtitle?: string | undefined;
275
+ }>, z.ZodObject<{
276
+ type: z.ZodLiteral<"avatarGroup">;
277
+ people: z.ZodArray<z.ZodObject<{
278
+ name: z.ZodString;
279
+ initials: z.ZodOptional<z.ZodString>;
280
+ color: z.ZodOptional<z.ZodString>;
281
+ src: z.ZodOptional<z.ZodString>;
282
+ }, "strip", z.ZodTypeAny, {
283
+ name: string;
284
+ initials?: string | undefined;
285
+ color?: string | undefined;
286
+ src?: string | undefined;
287
+ }, {
288
+ name: string;
289
+ initials?: string | undefined;
290
+ color?: string | undefined;
291
+ src?: string | undefined;
292
+ }>, "many">;
293
+ max: z.ZodOptional<z.ZodNumber>;
294
+ label: z.ZodOptional<z.ZodString>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ type: "avatarGroup";
297
+ people: {
298
+ name: string;
299
+ initials?: string | undefined;
300
+ color?: string | undefined;
301
+ src?: string | undefined;
302
+ }[];
303
+ label?: string | undefined;
304
+ max?: number | undefined;
305
+ }, {
306
+ type: "avatarGroup";
307
+ people: {
308
+ name: string;
309
+ initials?: string | undefined;
310
+ color?: string | undefined;
311
+ src?: string | undefined;
312
+ }[];
313
+ label?: string | undefined;
314
+ max?: number | undefined;
315
+ }>, z.ZodObject<{
316
+ type: z.ZodLiteral<"gauge">;
317
+ value: z.ZodNumber;
318
+ max: z.ZodOptional<z.ZodNumber>;
319
+ min: z.ZodOptional<z.ZodNumber>;
320
+ label: z.ZodOptional<z.ZodString>;
321
+ unit: z.ZodOptional<z.ZodString>;
322
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ value: number;
325
+ type: "gauge";
326
+ label?: string | undefined;
327
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
328
+ min?: number | undefined;
329
+ max?: number | undefined;
330
+ unit?: string | undefined;
331
+ }, {
332
+ value: number;
333
+ type: "gauge";
334
+ label?: string | undefined;
335
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
336
+ min?: number | undefined;
337
+ max?: number | undefined;
338
+ unit?: string | undefined;
339
+ }>, z.ZodObject<{
340
+ type: z.ZodLiteral<"rating">;
341
+ value: z.ZodNumber;
342
+ max: z.ZodOptional<z.ZodNumber>;
343
+ label: z.ZodOptional<z.ZodString>;
344
+ symbol: z.ZodOptional<z.ZodEnum<["star", "dot"]>>;
345
+ }, "strip", z.ZodTypeAny, {
346
+ value: number;
347
+ type: "rating";
348
+ symbol?: "star" | "dot" | undefined;
349
+ label?: string | undefined;
350
+ max?: number | undefined;
351
+ }, {
352
+ value: number;
353
+ type: "rating";
354
+ symbol?: "star" | "dot" | undefined;
355
+ label?: string | undefined;
356
+ max?: number | undefined;
357
+ }>, z.ZodObject<{
358
+ type: z.ZodLiteral<"callout">;
359
+ text: z.ZodString;
360
+ title: z.ZodOptional<z.ZodString>;
361
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
362
+ icon: z.ZodOptional<z.ZodString>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ type: "callout";
365
+ text: string;
366
+ title?: string | undefined;
367
+ icon?: string | undefined;
368
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
369
+ }, {
370
+ type: "callout";
371
+ text: string;
372
+ title?: string | undefined;
373
+ icon?: string | undefined;
374
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
375
+ }>, z.ZodObject<{
376
+ type: z.ZodLiteral<"entityRef">;
377
+ label: z.ZodString;
378
+ entity: z.ZodOptional<z.ZodString>;
379
+ url: z.ZodOptional<z.ZodString>;
380
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ type: "entityRef";
383
+ label: string;
384
+ url?: string | undefined;
385
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
386
+ entity?: string | undefined;
387
+ }, {
388
+ type: "entityRef";
389
+ label: string;
390
+ url?: string | undefined;
391
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
392
+ entity?: string | undefined;
393
+ }>, z.ZodObject<{
394
+ type: z.ZodLiteral<"kanban">;
395
+ columns: z.ZodArray<z.ZodObject<{
396
+ id: z.ZodString;
397
+ title: z.ZodString;
398
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
399
+ cards: z.ZodArray<z.ZodObject<{
400
+ id: z.ZodString;
401
+ title: z.ZodString;
402
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
403
+ meta: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
404
+ badge: z.ZodOptional<z.ZodObject<{
405
+ label: z.ZodString;
406
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
407
+ }, "strip", z.ZodTypeAny, {
408
+ label: string;
409
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
410
+ }, {
411
+ label: string;
412
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
413
+ }>>;
414
+ }, "strip", z.ZodTypeAny, {
415
+ title: string;
416
+ id: string;
417
+ badge?: {
418
+ label: string;
419
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
420
+ } | undefined;
421
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
422
+ meta?: string[] | undefined;
423
+ }, {
424
+ title: string;
425
+ id: string;
426
+ badge?: {
427
+ label: string;
428
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
429
+ } | undefined;
430
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
431
+ meta?: string[] | undefined;
432
+ }>, "many">;
433
+ }, "strip", z.ZodTypeAny, {
434
+ title: string;
435
+ id: string;
436
+ cards: {
437
+ title: string;
438
+ id: string;
439
+ badge?: {
440
+ label: string;
441
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
442
+ } | undefined;
443
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
444
+ meta?: string[] | undefined;
445
+ }[];
446
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
447
+ }, {
448
+ title: string;
449
+ id: string;
450
+ cards: {
451
+ title: string;
452
+ id: string;
453
+ badge?: {
454
+ label: string;
455
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
456
+ } | undefined;
457
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
458
+ meta?: string[] | undefined;
459
+ }[];
460
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
461
+ }>, "many">;
462
+ caption: z.ZodOptional<z.ZodString>;
463
+ }, "strip", z.ZodTypeAny, {
464
+ type: "kanban";
465
+ columns: {
466
+ title: string;
467
+ id: string;
468
+ cards: {
469
+ title: string;
470
+ id: string;
471
+ badge?: {
472
+ label: string;
473
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
474
+ } | undefined;
475
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
476
+ meta?: string[] | undefined;
477
+ }[];
478
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
479
+ }[];
480
+ caption?: string | undefined;
481
+ }, {
482
+ type: "kanban";
483
+ columns: {
484
+ title: string;
485
+ id: string;
486
+ cards: {
487
+ title: string;
488
+ id: string;
489
+ badge?: {
490
+ label: string;
491
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
492
+ } | undefined;
493
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
494
+ meta?: string[] | undefined;
495
+ }[];
496
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
497
+ }[];
498
+ caption?: string | undefined;
499
+ }>, z.ZodObject<{
500
+ type: z.ZodLiteral<"countdown">;
501
+ target: z.ZodString;
502
+ label: z.ZodOptional<z.ZodString>;
503
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
504
+ expiredText: z.ZodOptional<z.ZodString>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ type: "countdown";
507
+ target: string;
508
+ label?: string | undefined;
509
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
510
+ expiredText?: string | undefined;
511
+ }, {
512
+ type: "countdown";
513
+ target: string;
514
+ label?: string | undefined;
515
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
516
+ expiredText?: string | undefined;
517
+ }>, z.ZodObject<{
518
+ type: z.ZodLiteral<"code">;
519
+ code: z.ZodString;
520
+ language: z.ZodOptional<z.ZodString>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ code: string;
523
+ type: "code";
524
+ language?: string | undefined;
525
+ }, {
526
+ code: string;
527
+ type: "code";
528
+ language?: string | undefined;
529
+ }>, z.ZodObject<{
530
+ type: z.ZodLiteral<"diff">;
531
+ filename: z.ZodOptional<z.ZodString>;
532
+ patch: z.ZodString;
533
+ additions: z.ZodOptional<z.ZodNumber>;
534
+ deletions: z.ZodOptional<z.ZodNumber>;
535
+ }, "strip", z.ZodTypeAny, {
536
+ type: "diff";
537
+ patch: string;
538
+ filename?: string | undefined;
539
+ additions?: number | undefined;
540
+ deletions?: number | undefined;
541
+ }, {
542
+ type: "diff";
543
+ patch: string;
544
+ filename?: string | undefined;
545
+ additions?: number | undefined;
546
+ deletions?: number | undefined;
547
+ }>, z.ZodObject<{
548
+ type: z.ZodLiteral<"file">;
549
+ name: z.ZodString;
550
+ size: z.ZodOptional<z.ZodNumber>;
551
+ mime: z.ZodOptional<z.ZodString>;
552
+ url: z.ZodOptional<z.ZodString>;
553
+ mxc: z.ZodOptional<z.ZodString>;
554
+ caption: z.ZodOptional<z.ZodString>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ type: "file";
557
+ name: string;
558
+ url?: string | undefined;
559
+ mxc?: string | undefined;
560
+ size?: number | undefined;
561
+ mime?: string | undefined;
562
+ caption?: string | undefined;
563
+ }, {
564
+ type: "file";
565
+ name: string;
566
+ url?: string | undefined;
567
+ mxc?: string | undefined;
568
+ size?: number | undefined;
569
+ mime?: string | undefined;
570
+ caption?: string | undefined;
571
+ }>, z.ZodObject<{
572
+ type: z.ZodLiteral<"collapsible">;
573
+ title: z.ZodString;
574
+ open: z.ZodOptional<z.ZodBoolean>;
575
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
576
+ blocks: z.ZodArray<z.ZodLazy<z.ZodTypeAny>, "many">;
577
+ }, "strip", z.ZodTypeAny, {
578
+ type: "collapsible";
579
+ title: string;
580
+ blocks: any[];
581
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
582
+ open?: boolean | undefined;
583
+ }, {
584
+ type: "collapsible";
585
+ title: string;
586
+ blocks: any[];
587
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
588
+ open?: boolean | undefined;
589
+ }>, z.ZodObject<{
590
+ type: z.ZodLiteral<"widget">;
591
+ url: z.ZodString;
592
+ name: z.ZodOptional<z.ZodString>;
593
+ widget_id: z.ZodOptional<z.ZodString>;
594
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
595
+ height: z.ZodOptional<z.ZodNumber>;
596
+ }, "strip", z.ZodTypeAny, {
597
+ type: "widget";
598
+ url: string;
599
+ name?: string | undefined;
600
+ widget_id?: string | undefined;
601
+ capabilities?: string[] | undefined;
602
+ height?: number | undefined;
603
+ }, {
604
+ type: "widget";
605
+ url: string;
606
+ name?: string | undefined;
607
+ widget_id?: string | undefined;
608
+ capabilities?: string[] | undefined;
609
+ height?: number | undefined;
610
+ }>, z.ZodObject<{
611
+ type: z.ZodLiteral<"input">;
612
+ name: z.ZodString;
613
+ input: z.ZodOptional<z.ZodEnum<["text", "textarea", "number", "date", "datetime", "time"]>>;
614
+ label: z.ZodOptional<z.ZodString>;
615
+ placeholder: z.ZodOptional<z.ZodString>;
616
+ required: z.ZodOptional<z.ZodBoolean>;
617
+ value: z.ZodOptional<z.ZodString>;
618
+ }, "strip", z.ZodTypeAny, {
619
+ type: "input";
620
+ name: string;
621
+ value?: string | undefined;
622
+ label?: string | undefined;
623
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
624
+ placeholder?: string | undefined;
625
+ required?: boolean | undefined;
626
+ }, {
627
+ type: "input";
628
+ name: string;
629
+ value?: string | undefined;
630
+ label?: string | undefined;
631
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
632
+ placeholder?: string | undefined;
633
+ required?: boolean | undefined;
634
+ }>, z.ZodObject<{
635
+ type: z.ZodLiteral<"toggle">;
636
+ name: z.ZodString;
637
+ label: z.ZodString;
638
+ checked: z.ZodOptional<z.ZodBoolean>;
639
+ onText: z.ZodOptional<z.ZodString>;
640
+ offText: z.ZodOptional<z.ZodString>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ type: "toggle";
643
+ label: string;
644
+ name: string;
645
+ checked?: boolean | undefined;
646
+ onText?: string | undefined;
647
+ offText?: string | undefined;
648
+ }, {
649
+ type: "toggle";
650
+ label: string;
651
+ name: string;
652
+ checked?: boolean | undefined;
653
+ onText?: string | undefined;
654
+ offText?: string | undefined;
655
+ }>, z.ZodObject<{
656
+ type: z.ZodLiteral<"slider">;
657
+ name: z.ZodString;
658
+ label: z.ZodOptional<z.ZodString>;
659
+ min: z.ZodOptional<z.ZodNumber>;
660
+ max: z.ZodOptional<z.ZodNumber>;
661
+ step: z.ZodOptional<z.ZodNumber>;
662
+ value: z.ZodOptional<z.ZodNumber>;
663
+ unit: z.ZodOptional<z.ZodString>;
664
+ }, "strip", z.ZodTypeAny, {
665
+ type: "slider";
666
+ name: string;
667
+ value?: number | undefined;
668
+ label?: string | undefined;
669
+ min?: number | undefined;
670
+ max?: number | undefined;
671
+ step?: number | undefined;
672
+ unit?: string | undefined;
673
+ }, {
674
+ type: "slider";
675
+ name: string;
676
+ value?: number | undefined;
677
+ label?: string | undefined;
678
+ min?: number | undefined;
679
+ max?: number | undefined;
680
+ step?: number | undefined;
681
+ unit?: string | undefined;
682
+ }>, z.ZodObject<{
683
+ type: z.ZodLiteral<"radio">;
684
+ name: z.ZodString;
685
+ label: z.ZodOptional<z.ZodString>;
686
+ options: z.ZodArray<z.ZodObject<{
687
+ value: z.ZodString;
688
+ label: z.ZodString;
689
+ }, "strip", z.ZodTypeAny, {
690
+ value: string;
691
+ label: string;
692
+ }, {
693
+ value: string;
694
+ label: string;
695
+ }>, "many">;
696
+ value: z.ZodOptional<z.ZodString>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ options: {
699
+ value: string;
700
+ label: string;
701
+ }[];
702
+ type: "radio";
703
+ name: string;
704
+ value?: string | undefined;
705
+ label?: string | undefined;
706
+ }, {
707
+ options: {
708
+ value: string;
709
+ label: string;
710
+ }[];
711
+ type: "radio";
712
+ name: string;
713
+ value?: string | undefined;
714
+ label?: string | undefined;
715
+ }>, z.ZodObject<{
716
+ type: z.ZodLiteral<"select">;
717
+ name: z.ZodString;
718
+ label: z.ZodOptional<z.ZodString>;
719
+ placeholder: z.ZodOptional<z.ZodString>;
720
+ options: z.ZodArray<z.ZodObject<{
721
+ value: z.ZodString;
722
+ label: z.ZodString;
723
+ }, "strip", z.ZodTypeAny, {
724
+ value: string;
725
+ label: string;
726
+ }, {
727
+ value: string;
728
+ label: string;
729
+ }>, "many">;
730
+ value: z.ZodOptional<z.ZodString>;
731
+ multi: z.ZodOptional<z.ZodBoolean>;
732
+ }, "strip", z.ZodTypeAny, {
733
+ options: {
734
+ value: string;
735
+ label: string;
736
+ }[];
737
+ type: "select";
738
+ name: string;
739
+ value?: string | undefined;
740
+ label?: string | undefined;
741
+ placeholder?: string | undefined;
742
+ multi?: boolean | undefined;
743
+ }, {
744
+ options: {
745
+ value: string;
746
+ label: string;
747
+ }[];
748
+ type: "select";
749
+ name: string;
750
+ value?: string | undefined;
751
+ label?: string | undefined;
752
+ placeholder?: string | undefined;
753
+ multi?: boolean | undefined;
754
+ }>, z.ZodObject<{
755
+ type: z.ZodLiteral<"checkbox">;
756
+ name: z.ZodString;
757
+ label: z.ZodString;
758
+ checked: z.ZodOptional<z.ZodBoolean>;
759
+ }, "strip", z.ZodTypeAny, {
760
+ type: "checkbox";
761
+ label: string;
762
+ name: string;
763
+ checked?: boolean | undefined;
764
+ }, {
765
+ type: "checkbox";
766
+ label: string;
767
+ name: string;
768
+ checked?: boolean | undefined;
769
+ }>, z.ZodObject<{
770
+ type: z.ZodLiteral<"button">;
771
+ action_id: z.ZodString;
772
+ text: z.ZodString;
773
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
774
+ value: z.ZodOptional<z.ZodString>;
775
+ confirm: z.ZodOptional<z.ZodObject<{
776
+ title: z.ZodString;
777
+ text: z.ZodString;
778
+ ok: z.ZodOptional<z.ZodString>;
779
+ cancel: z.ZodOptional<z.ZodString>;
780
+ }, "strip", z.ZodTypeAny, {
781
+ title: string;
782
+ text: string;
783
+ ok?: string | undefined;
784
+ cancel?: string | undefined;
785
+ }, {
786
+ title: string;
787
+ text: string;
788
+ ok?: string | undefined;
789
+ cancel?: string | undefined;
790
+ }>>;
791
+ disabled: z.ZodOptional<z.ZodBoolean>;
792
+ }, "strip", z.ZodTypeAny, {
793
+ type: "button";
794
+ text: string;
795
+ action_id: string;
796
+ value?: string | undefined;
797
+ style?: "danger" | "default" | "primary" | undefined;
798
+ confirm?: {
799
+ title: string;
800
+ text: string;
801
+ ok?: string | undefined;
802
+ cancel?: string | undefined;
803
+ } | undefined;
804
+ disabled?: boolean | undefined;
805
+ }, {
806
+ type: "button";
807
+ text: string;
808
+ action_id: string;
809
+ value?: string | undefined;
810
+ style?: "danger" | "default" | "primary" | undefined;
811
+ confirm?: {
812
+ title: string;
813
+ text: string;
814
+ ok?: string | undefined;
815
+ cancel?: string | undefined;
816
+ } | undefined;
817
+ disabled?: boolean | undefined;
818
+ }>, z.ZodObject<{
819
+ type: z.ZodLiteral<"linkButton">;
820
+ text: z.ZodString;
821
+ url: z.ZodString;
822
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
823
+ external: z.ZodOptional<z.ZodBoolean>;
824
+ }, "strip", z.ZodTypeAny, {
825
+ type: "linkButton";
826
+ text: string;
827
+ url: string;
828
+ style?: "danger" | "default" | "primary" | undefined;
829
+ external?: boolean | undefined;
830
+ }, {
831
+ type: "linkButton";
832
+ text: string;
833
+ url: string;
834
+ style?: "danger" | "default" | "primary" | undefined;
835
+ external?: boolean | undefined;
836
+ }>, z.ZodObject<{
837
+ type: z.ZodLiteral<"actions">;
838
+ elements: z.ZodArray<z.ZodUnion<[z.ZodObject<{
839
+ type: z.ZodLiteral<"button">;
840
+ action_id: z.ZodString;
841
+ text: z.ZodString;
842
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
843
+ value: z.ZodOptional<z.ZodString>;
844
+ confirm: z.ZodOptional<z.ZodObject<{
845
+ title: z.ZodString;
846
+ text: z.ZodString;
847
+ ok: z.ZodOptional<z.ZodString>;
848
+ cancel: z.ZodOptional<z.ZodString>;
849
+ }, "strip", z.ZodTypeAny, {
850
+ title: string;
851
+ text: string;
852
+ ok?: string | undefined;
853
+ cancel?: string | undefined;
854
+ }, {
855
+ title: string;
856
+ text: string;
857
+ ok?: string | undefined;
858
+ cancel?: string | undefined;
859
+ }>>;
860
+ disabled: z.ZodOptional<z.ZodBoolean>;
861
+ }, "strip", z.ZodTypeAny, {
862
+ type: "button";
863
+ text: string;
864
+ action_id: string;
865
+ value?: string | undefined;
866
+ style?: "danger" | "default" | "primary" | undefined;
867
+ confirm?: {
868
+ title: string;
869
+ text: string;
870
+ ok?: string | undefined;
871
+ cancel?: string | undefined;
872
+ } | undefined;
873
+ disabled?: boolean | undefined;
874
+ }, {
875
+ type: "button";
876
+ text: string;
877
+ action_id: string;
878
+ value?: string | undefined;
879
+ style?: "danger" | "default" | "primary" | undefined;
880
+ confirm?: {
881
+ title: string;
882
+ text: string;
883
+ ok?: string | undefined;
884
+ cancel?: string | undefined;
885
+ } | undefined;
886
+ disabled?: boolean | undefined;
887
+ }>, z.ZodObject<{
888
+ type: z.ZodLiteral<"linkButton">;
889
+ text: z.ZodString;
890
+ url: z.ZodString;
891
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
892
+ external: z.ZodOptional<z.ZodBoolean>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ type: "linkButton";
895
+ text: string;
896
+ url: string;
897
+ style?: "danger" | "default" | "primary" | undefined;
898
+ external?: boolean | undefined;
899
+ }, {
900
+ type: "linkButton";
901
+ text: string;
902
+ url: string;
903
+ style?: "danger" | "default" | "primary" | undefined;
904
+ external?: boolean | undefined;
905
+ }>]>, "many">;
906
+ }, "strip", z.ZodTypeAny, {
907
+ type: "actions";
908
+ elements: ({
909
+ type: "button";
910
+ text: string;
911
+ action_id: string;
912
+ value?: string | undefined;
913
+ style?: "danger" | "default" | "primary" | undefined;
914
+ confirm?: {
915
+ title: string;
916
+ text: string;
917
+ ok?: string | undefined;
918
+ cancel?: string | undefined;
919
+ } | undefined;
920
+ disabled?: boolean | undefined;
921
+ } | {
922
+ type: "linkButton";
923
+ text: string;
924
+ url: string;
925
+ style?: "danger" | "default" | "primary" | undefined;
926
+ external?: boolean | undefined;
927
+ })[];
928
+ }, {
929
+ type: "actions";
930
+ elements: ({
931
+ type: "button";
932
+ text: string;
933
+ action_id: string;
934
+ value?: string | undefined;
935
+ style?: "danger" | "default" | "primary" | undefined;
936
+ confirm?: {
937
+ title: string;
938
+ text: string;
939
+ ok?: string | undefined;
940
+ cancel?: string | undefined;
941
+ } | undefined;
942
+ disabled?: boolean | undefined;
943
+ } | {
944
+ type: "linkButton";
945
+ text: string;
946
+ url: string;
947
+ style?: "danger" | "default" | "primary" | undefined;
948
+ external?: boolean | undefined;
949
+ })[];
950
+ }>, z.ZodObject<{
951
+ type: z.ZodLiteral<"overflow">;
952
+ label: z.ZodOptional<z.ZodString>;
953
+ items: z.ZodArray<z.ZodObject<{
954
+ action_id: z.ZodString;
955
+ text: z.ZodString;
956
+ value: z.ZodOptional<z.ZodString>;
957
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
958
+ confirm: z.ZodOptional<z.ZodObject<{
959
+ title: z.ZodString;
960
+ text: z.ZodString;
961
+ ok: z.ZodOptional<z.ZodString>;
962
+ cancel: z.ZodOptional<z.ZodString>;
963
+ }, "strip", z.ZodTypeAny, {
964
+ title: string;
965
+ text: string;
966
+ ok?: string | undefined;
967
+ cancel?: string | undefined;
968
+ }, {
969
+ title: string;
970
+ text: string;
971
+ ok?: string | undefined;
972
+ cancel?: string | undefined;
973
+ }>>;
974
+ disabled: z.ZodOptional<z.ZodBoolean>;
975
+ }, "strip", z.ZodTypeAny, {
976
+ text: string;
977
+ action_id: string;
978
+ value?: string | undefined;
979
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
980
+ confirm?: {
981
+ title: string;
982
+ text: string;
983
+ ok?: string | undefined;
984
+ cancel?: string | undefined;
985
+ } | undefined;
986
+ disabled?: boolean | undefined;
987
+ }, {
988
+ text: string;
989
+ action_id: string;
990
+ value?: string | undefined;
991
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
992
+ confirm?: {
993
+ title: string;
994
+ text: string;
995
+ ok?: string | undefined;
996
+ cancel?: string | undefined;
997
+ } | undefined;
998
+ disabled?: boolean | undefined;
999
+ }>, "many">;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ type: "overflow";
1002
+ items: {
1003
+ text: string;
1004
+ action_id: string;
1005
+ value?: string | undefined;
1006
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1007
+ confirm?: {
1008
+ title: string;
1009
+ text: string;
1010
+ ok?: string | undefined;
1011
+ cancel?: string | undefined;
1012
+ } | undefined;
1013
+ disabled?: boolean | undefined;
1014
+ }[];
1015
+ label?: string | undefined;
1016
+ }, {
1017
+ type: "overflow";
1018
+ items: {
1019
+ text: string;
1020
+ action_id: string;
1021
+ value?: string | undefined;
1022
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1023
+ confirm?: {
1024
+ title: string;
1025
+ text: string;
1026
+ ok?: string | undefined;
1027
+ cancel?: string | undefined;
1028
+ } | undefined;
1029
+ disabled?: boolean | undefined;
1030
+ }[];
1031
+ label?: string | undefined;
1032
+ }>]>, "many">>;
1033
+ /**
1034
+ * 멀티스텝(마법사) 폼. 설정하면 클라이언트가 단계 네비게이션(이전/다음)을 그리고,
1035
+ * 모든 단계의 입력을 한 번에 모아 최종 제출한다. blocks 와 함께 쓰면 blocks 가 먼저 렌더된다.
1036
+ */
1037
+ steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
1038
+ title: z.ZodOptional<z.ZodString>;
1039
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1040
+ type: z.ZodLiteral<"text">;
1041
+ text: z.ZodString;
1042
+ markdown: z.ZodOptional<z.ZodBoolean>;
1043
+ }, "strip", z.ZodTypeAny, {
1044
+ type: "text";
1045
+ text: string;
1046
+ markdown?: boolean | undefined;
1047
+ }, {
1048
+ type: "text";
1049
+ text: string;
1050
+ markdown?: boolean | undefined;
1051
+ }>, z.ZodObject<{
1052
+ type: z.ZodLiteral<"heading">;
1053
+ text: z.ZodString;
1054
+ level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
1055
+ }, "strip", z.ZodTypeAny, {
1056
+ type: "heading";
1057
+ text: string;
1058
+ level?: 1 | 2 | 3 | undefined;
1059
+ }, {
1060
+ type: "heading";
1061
+ text: string;
1062
+ level?: 1 | 2 | 3 | undefined;
1063
+ }>, z.ZodObject<{
1064
+ type: z.ZodLiteral<"divider">;
1065
+ }, "strip", z.ZodTypeAny, {
1066
+ type: "divider";
1067
+ }, {
1068
+ type: "divider";
1069
+ }>, z.ZodObject<{
1070
+ type: z.ZodLiteral<"fields">;
1071
+ items: z.ZodArray<z.ZodObject<{
1072
+ label: z.ZodString;
1073
+ value: z.ZodString;
1074
+ short: z.ZodOptional<z.ZodBoolean>;
1075
+ }, "strip", z.ZodTypeAny, {
1076
+ value: string;
1077
+ label: string;
1078
+ short?: boolean | undefined;
1079
+ }, {
1080
+ value: string;
1081
+ label: string;
1082
+ short?: boolean | undefined;
1083
+ }>, "many">;
1084
+ }, "strip", z.ZodTypeAny, {
1085
+ type: "fields";
1086
+ items: {
1087
+ value: string;
1088
+ label: string;
1089
+ short?: boolean | undefined;
1090
+ }[];
1091
+ }, {
1092
+ type: "fields";
1093
+ items: {
1094
+ value: string;
1095
+ label: string;
1096
+ short?: boolean | undefined;
1097
+ }[];
1098
+ }>, z.ZodObject<{
1099
+ type: z.ZodLiteral<"image">;
1100
+ url: z.ZodOptional<z.ZodString>;
1101
+ mxc: z.ZodOptional<z.ZodString>;
1102
+ alt: z.ZodOptional<z.ZodString>;
1103
+ }, "strip", z.ZodTypeAny, {
1104
+ type: "image";
1105
+ url?: string | undefined;
1106
+ mxc?: string | undefined;
1107
+ alt?: string | undefined;
1108
+ }, {
1109
+ type: "image";
1110
+ url?: string | undefined;
1111
+ mxc?: string | undefined;
1112
+ alt?: string | undefined;
1113
+ }>, z.ZodObject<{
1114
+ type: z.ZodLiteral<"context">;
1115
+ elements: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1116
+ icon: z.ZodString;
1117
+ }, "strip", z.ZodTypeAny, {
1118
+ icon: string;
1119
+ }, {
1120
+ icon: string;
1121
+ }>, z.ZodObject<{
1122
+ mxc: z.ZodString;
1123
+ }, "strip", z.ZodTypeAny, {
1124
+ mxc: string;
1125
+ }, {
1126
+ mxc: string;
1127
+ }>]>, "many">;
1128
+ }, "strip", z.ZodTypeAny, {
1129
+ type: "context";
1130
+ elements: (string | {
1131
+ icon: string;
1132
+ } | {
1133
+ mxc: string;
1134
+ })[];
1135
+ }, {
1136
+ type: "context";
1137
+ elements: (string | {
1138
+ icon: string;
1139
+ } | {
1140
+ mxc: string;
1141
+ })[];
1142
+ }>, z.ZodObject<{
1143
+ type: z.ZodLiteral<"badge">;
1144
+ text: z.ZodString;
1145
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1146
+ }, "strip", z.ZodTypeAny, {
1147
+ type: "badge";
1148
+ text: string;
1149
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1150
+ }, {
1151
+ type: "badge";
1152
+ text: string;
1153
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1154
+ }>, z.ZodObject<{
1155
+ type: z.ZodLiteral<"table">;
1156
+ columns: z.ZodArray<z.ZodString, "many">;
1157
+ rows: z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">;
1158
+ }, "strip", z.ZodTypeAny, {
1159
+ type: "table";
1160
+ columns: string[];
1161
+ rows: string[][];
1162
+ }, {
1163
+ type: "table";
1164
+ columns: string[];
1165
+ rows: string[][];
1166
+ }>, z.ZodObject<{
1167
+ type: z.ZodLiteral<"progress">;
1168
+ value: z.ZodOptional<z.ZodNumber>;
1169
+ label: z.ZodOptional<z.ZodString>;
1170
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1171
+ }, "strip", z.ZodTypeAny, {
1172
+ type: "progress";
1173
+ value?: number | undefined;
1174
+ label?: string | undefined;
1175
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1176
+ }, {
1177
+ type: "progress";
1178
+ value?: number | undefined;
1179
+ label?: string | undefined;
1180
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1181
+ }>, z.ZodObject<{
1182
+ type: z.ZodLiteral<"steps">;
1183
+ items: z.ZodArray<z.ZodObject<{
1184
+ label: z.ZodString;
1185
+ status: z.ZodOptional<z.ZodEnum<["done", "active", "todo", "error"]>>;
1186
+ note: z.ZodOptional<z.ZodString>;
1187
+ }, "strip", z.ZodTypeAny, {
1188
+ label: string;
1189
+ status?: "done" | "active" | "todo" | "error" | undefined;
1190
+ note?: string | undefined;
1191
+ }, {
1192
+ label: string;
1193
+ status?: "done" | "active" | "todo" | "error" | undefined;
1194
+ note?: string | undefined;
1195
+ }>, "many">;
1196
+ }, "strip", z.ZodTypeAny, {
1197
+ type: "steps";
1198
+ items: {
1199
+ label: string;
1200
+ status?: "done" | "active" | "todo" | "error" | undefined;
1201
+ note?: string | undefined;
1202
+ }[];
1203
+ }, {
1204
+ type: "steps";
1205
+ items: {
1206
+ label: string;
1207
+ status?: "done" | "active" | "todo" | "error" | undefined;
1208
+ note?: string | undefined;
1209
+ }[];
1210
+ }>, z.ZodObject<{
1211
+ type: z.ZodLiteral<"metric">;
1212
+ label: z.ZodString;
1213
+ value: z.ZodString;
1214
+ target: z.ZodOptional<z.ZodString>;
1215
+ delta: z.ZodOptional<z.ZodString>;
1216
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1217
+ }, "strip", z.ZodTypeAny, {
1218
+ value: string;
1219
+ type: "metric";
1220
+ label: string;
1221
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1222
+ target?: string | undefined;
1223
+ delta?: string | undefined;
1224
+ }, {
1225
+ value: string;
1226
+ type: "metric";
1227
+ label: string;
1228
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1229
+ target?: string | undefined;
1230
+ delta?: string | undefined;
1231
+ }>, z.ZodObject<{
1232
+ type: z.ZodLiteral<"chart">;
1233
+ variant: z.ZodEnum<["sparkline", "bar", "line", "donut"]>;
1234
+ data: z.ZodArray<z.ZodObject<{
1235
+ label: z.ZodOptional<z.ZodString>;
1236
+ value: z.ZodNumber;
1237
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1238
+ }, "strip", z.ZodTypeAny, {
1239
+ value: number;
1240
+ label?: string | undefined;
1241
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1242
+ }, {
1243
+ value: number;
1244
+ label?: string | undefined;
1245
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1246
+ }>, "many">;
1247
+ caption: z.ZodOptional<z.ZodString>;
1248
+ max: z.ZodOptional<z.ZodNumber>;
1249
+ unit: z.ZodOptional<z.ZodString>;
1250
+ }, "strip", z.ZodTypeAny, {
1251
+ type: "chart";
1252
+ variant: "sparkline" | "bar" | "line" | "donut";
1253
+ data: {
1254
+ value: number;
1255
+ label?: string | undefined;
1256
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1257
+ }[];
1258
+ max?: number | undefined;
1259
+ unit?: string | undefined;
1260
+ caption?: string | undefined;
1261
+ }, {
1262
+ type: "chart";
1263
+ variant: "sparkline" | "bar" | "line" | "donut";
1264
+ data: {
1265
+ value: number;
1266
+ label?: string | undefined;
1267
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1268
+ }[];
1269
+ max?: number | undefined;
1270
+ unit?: string | undefined;
1271
+ caption?: string | undefined;
1272
+ }>, z.ZodObject<{
1273
+ type: z.ZodLiteral<"avatar">;
1274
+ name: z.ZodString;
1275
+ initials: z.ZodOptional<z.ZodString>;
1276
+ color: z.ZodOptional<z.ZodString>;
1277
+ src: z.ZodOptional<z.ZodString>;
1278
+ subtitle: z.ZodOptional<z.ZodString>;
1279
+ status: z.ZodOptional<z.ZodEnum<["online", "away", "busy", "offline"]>>;
1280
+ }, "strip", z.ZodTypeAny, {
1281
+ type: "avatar";
1282
+ name: string;
1283
+ status?: "online" | "away" | "busy" | "offline" | undefined;
1284
+ initials?: string | undefined;
1285
+ color?: string | undefined;
1286
+ src?: string | undefined;
1287
+ subtitle?: string | undefined;
1288
+ }, {
1289
+ type: "avatar";
1290
+ name: string;
1291
+ status?: "online" | "away" | "busy" | "offline" | undefined;
1292
+ initials?: string | undefined;
1293
+ color?: string | undefined;
1294
+ src?: string | undefined;
1295
+ subtitle?: string | undefined;
1296
+ }>, z.ZodObject<{
1297
+ type: z.ZodLiteral<"avatarGroup">;
1298
+ people: z.ZodArray<z.ZodObject<{
1299
+ name: z.ZodString;
1300
+ initials: z.ZodOptional<z.ZodString>;
1301
+ color: z.ZodOptional<z.ZodString>;
1302
+ src: z.ZodOptional<z.ZodString>;
1303
+ }, "strip", z.ZodTypeAny, {
1304
+ name: string;
1305
+ initials?: string | undefined;
1306
+ color?: string | undefined;
1307
+ src?: string | undefined;
1308
+ }, {
1309
+ name: string;
1310
+ initials?: string | undefined;
1311
+ color?: string | undefined;
1312
+ src?: string | undefined;
1313
+ }>, "many">;
1314
+ max: z.ZodOptional<z.ZodNumber>;
1315
+ label: z.ZodOptional<z.ZodString>;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ type: "avatarGroup";
1318
+ people: {
1319
+ name: string;
1320
+ initials?: string | undefined;
1321
+ color?: string | undefined;
1322
+ src?: string | undefined;
1323
+ }[];
1324
+ label?: string | undefined;
1325
+ max?: number | undefined;
1326
+ }, {
1327
+ type: "avatarGroup";
1328
+ people: {
1329
+ name: string;
1330
+ initials?: string | undefined;
1331
+ color?: string | undefined;
1332
+ src?: string | undefined;
1333
+ }[];
1334
+ label?: string | undefined;
1335
+ max?: number | undefined;
1336
+ }>, z.ZodObject<{
1337
+ type: z.ZodLiteral<"gauge">;
1338
+ value: z.ZodNumber;
1339
+ max: z.ZodOptional<z.ZodNumber>;
1340
+ min: z.ZodOptional<z.ZodNumber>;
1341
+ label: z.ZodOptional<z.ZodString>;
1342
+ unit: z.ZodOptional<z.ZodString>;
1343
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1344
+ }, "strip", z.ZodTypeAny, {
1345
+ value: number;
1346
+ type: "gauge";
1347
+ label?: string | undefined;
1348
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1349
+ min?: number | undefined;
1350
+ max?: number | undefined;
1351
+ unit?: string | undefined;
1352
+ }, {
1353
+ value: number;
1354
+ type: "gauge";
1355
+ label?: string | undefined;
1356
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1357
+ min?: number | undefined;
1358
+ max?: number | undefined;
1359
+ unit?: string | undefined;
1360
+ }>, z.ZodObject<{
1361
+ type: z.ZodLiteral<"rating">;
1362
+ value: z.ZodNumber;
1363
+ max: z.ZodOptional<z.ZodNumber>;
1364
+ label: z.ZodOptional<z.ZodString>;
1365
+ symbol: z.ZodOptional<z.ZodEnum<["star", "dot"]>>;
1366
+ }, "strip", z.ZodTypeAny, {
1367
+ value: number;
1368
+ type: "rating";
1369
+ symbol?: "star" | "dot" | undefined;
1370
+ label?: string | undefined;
1371
+ max?: number | undefined;
1372
+ }, {
1373
+ value: number;
1374
+ type: "rating";
1375
+ symbol?: "star" | "dot" | undefined;
1376
+ label?: string | undefined;
1377
+ max?: number | undefined;
1378
+ }>, z.ZodObject<{
1379
+ type: z.ZodLiteral<"callout">;
1380
+ text: z.ZodString;
1381
+ title: z.ZodOptional<z.ZodString>;
1382
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1383
+ icon: z.ZodOptional<z.ZodString>;
1384
+ }, "strip", z.ZodTypeAny, {
1385
+ type: "callout";
1386
+ text: string;
1387
+ title?: string | undefined;
1388
+ icon?: string | undefined;
1389
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1390
+ }, {
1391
+ type: "callout";
1392
+ text: string;
1393
+ title?: string | undefined;
1394
+ icon?: string | undefined;
1395
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1396
+ }>, z.ZodObject<{
1397
+ type: z.ZodLiteral<"entityRef">;
1398
+ label: z.ZodString;
1399
+ entity: z.ZodOptional<z.ZodString>;
1400
+ url: z.ZodOptional<z.ZodString>;
1401
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1402
+ }, "strip", z.ZodTypeAny, {
1403
+ type: "entityRef";
1404
+ label: string;
1405
+ url?: string | undefined;
1406
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1407
+ entity?: string | undefined;
1408
+ }, {
1409
+ type: "entityRef";
1410
+ label: string;
1411
+ url?: string | undefined;
1412
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1413
+ entity?: string | undefined;
1414
+ }>, z.ZodObject<{
1415
+ type: z.ZodLiteral<"kanban">;
1416
+ columns: z.ZodArray<z.ZodObject<{
1417
+ id: z.ZodString;
1418
+ title: z.ZodString;
1419
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1420
+ cards: z.ZodArray<z.ZodObject<{
1421
+ id: z.ZodString;
1422
+ title: z.ZodString;
1423
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1424
+ meta: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1425
+ badge: z.ZodOptional<z.ZodObject<{
1426
+ label: z.ZodString;
1427
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1428
+ }, "strip", z.ZodTypeAny, {
1429
+ label: string;
1430
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1431
+ }, {
1432
+ label: string;
1433
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1434
+ }>>;
1435
+ }, "strip", z.ZodTypeAny, {
1436
+ title: string;
1437
+ id: string;
1438
+ badge?: {
1439
+ label: string;
1440
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1441
+ } | undefined;
1442
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1443
+ meta?: string[] | undefined;
1444
+ }, {
1445
+ title: string;
1446
+ id: string;
1447
+ badge?: {
1448
+ label: string;
1449
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1450
+ } | undefined;
1451
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1452
+ meta?: string[] | undefined;
1453
+ }>, "many">;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ title: string;
1456
+ id: string;
1457
+ cards: {
1458
+ title: string;
1459
+ id: string;
1460
+ badge?: {
1461
+ label: string;
1462
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1463
+ } | undefined;
1464
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1465
+ meta?: string[] | undefined;
1466
+ }[];
1467
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1468
+ }, {
1469
+ title: string;
1470
+ id: string;
1471
+ cards: {
1472
+ title: string;
1473
+ id: string;
1474
+ badge?: {
1475
+ label: string;
1476
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1477
+ } | undefined;
1478
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1479
+ meta?: string[] | undefined;
1480
+ }[];
1481
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1482
+ }>, "many">;
1483
+ caption: z.ZodOptional<z.ZodString>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ type: "kanban";
1486
+ columns: {
1487
+ title: string;
1488
+ id: string;
1489
+ cards: {
1490
+ title: string;
1491
+ id: string;
1492
+ badge?: {
1493
+ label: string;
1494
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1495
+ } | undefined;
1496
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1497
+ meta?: string[] | undefined;
1498
+ }[];
1499
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1500
+ }[];
1501
+ caption?: string | undefined;
1502
+ }, {
1503
+ type: "kanban";
1504
+ columns: {
1505
+ title: string;
1506
+ id: string;
1507
+ cards: {
1508
+ title: string;
1509
+ id: string;
1510
+ badge?: {
1511
+ label: string;
1512
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1513
+ } | undefined;
1514
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1515
+ meta?: string[] | undefined;
1516
+ }[];
1517
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1518
+ }[];
1519
+ caption?: string | undefined;
1520
+ }>, z.ZodObject<{
1521
+ type: z.ZodLiteral<"countdown">;
1522
+ target: z.ZodString;
1523
+ label: z.ZodOptional<z.ZodString>;
1524
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1525
+ expiredText: z.ZodOptional<z.ZodString>;
1526
+ }, "strip", z.ZodTypeAny, {
1527
+ type: "countdown";
1528
+ target: string;
1529
+ label?: string | undefined;
1530
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1531
+ expiredText?: string | undefined;
1532
+ }, {
1533
+ type: "countdown";
1534
+ target: string;
1535
+ label?: string | undefined;
1536
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1537
+ expiredText?: string | undefined;
1538
+ }>, z.ZodObject<{
1539
+ type: z.ZodLiteral<"code">;
1540
+ code: z.ZodString;
1541
+ language: z.ZodOptional<z.ZodString>;
1542
+ }, "strip", z.ZodTypeAny, {
1543
+ code: string;
1544
+ type: "code";
1545
+ language?: string | undefined;
1546
+ }, {
1547
+ code: string;
1548
+ type: "code";
1549
+ language?: string | undefined;
1550
+ }>, z.ZodObject<{
1551
+ type: z.ZodLiteral<"diff">;
1552
+ filename: z.ZodOptional<z.ZodString>;
1553
+ patch: z.ZodString;
1554
+ additions: z.ZodOptional<z.ZodNumber>;
1555
+ deletions: z.ZodOptional<z.ZodNumber>;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ type: "diff";
1558
+ patch: string;
1559
+ filename?: string | undefined;
1560
+ additions?: number | undefined;
1561
+ deletions?: number | undefined;
1562
+ }, {
1563
+ type: "diff";
1564
+ patch: string;
1565
+ filename?: string | undefined;
1566
+ additions?: number | undefined;
1567
+ deletions?: number | undefined;
1568
+ }>, z.ZodObject<{
1569
+ type: z.ZodLiteral<"file">;
1570
+ name: z.ZodString;
1571
+ size: z.ZodOptional<z.ZodNumber>;
1572
+ mime: z.ZodOptional<z.ZodString>;
1573
+ url: z.ZodOptional<z.ZodString>;
1574
+ mxc: z.ZodOptional<z.ZodString>;
1575
+ caption: z.ZodOptional<z.ZodString>;
1576
+ }, "strip", z.ZodTypeAny, {
1577
+ type: "file";
1578
+ name: string;
1579
+ url?: string | undefined;
1580
+ mxc?: string | undefined;
1581
+ size?: number | undefined;
1582
+ mime?: string | undefined;
1583
+ caption?: string | undefined;
1584
+ }, {
1585
+ type: "file";
1586
+ name: string;
1587
+ url?: string | undefined;
1588
+ mxc?: string | undefined;
1589
+ size?: number | undefined;
1590
+ mime?: string | undefined;
1591
+ caption?: string | undefined;
1592
+ }>, z.ZodObject<{
1593
+ type: z.ZodLiteral<"collapsible">;
1594
+ title: z.ZodString;
1595
+ open: z.ZodOptional<z.ZodBoolean>;
1596
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1597
+ blocks: z.ZodArray<z.ZodLazy<z.ZodTypeAny>, "many">;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ type: "collapsible";
1600
+ title: string;
1601
+ blocks: any[];
1602
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1603
+ open?: boolean | undefined;
1604
+ }, {
1605
+ type: "collapsible";
1606
+ title: string;
1607
+ blocks: any[];
1608
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
1609
+ open?: boolean | undefined;
1610
+ }>, z.ZodObject<{
1611
+ type: z.ZodLiteral<"widget">;
1612
+ url: z.ZodString;
1613
+ name: z.ZodOptional<z.ZodString>;
1614
+ widget_id: z.ZodOptional<z.ZodString>;
1615
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1616
+ height: z.ZodOptional<z.ZodNumber>;
1617
+ }, "strip", z.ZodTypeAny, {
1618
+ type: "widget";
1619
+ url: string;
1620
+ name?: string | undefined;
1621
+ widget_id?: string | undefined;
1622
+ capabilities?: string[] | undefined;
1623
+ height?: number | undefined;
1624
+ }, {
1625
+ type: "widget";
1626
+ url: string;
1627
+ name?: string | undefined;
1628
+ widget_id?: string | undefined;
1629
+ capabilities?: string[] | undefined;
1630
+ height?: number | undefined;
1631
+ }>, z.ZodObject<{
1632
+ type: z.ZodLiteral<"input">;
1633
+ name: z.ZodString;
1634
+ input: z.ZodOptional<z.ZodEnum<["text", "textarea", "number", "date", "datetime", "time"]>>;
1635
+ label: z.ZodOptional<z.ZodString>;
1636
+ placeholder: z.ZodOptional<z.ZodString>;
1637
+ required: z.ZodOptional<z.ZodBoolean>;
1638
+ value: z.ZodOptional<z.ZodString>;
1639
+ }, "strip", z.ZodTypeAny, {
1640
+ type: "input";
1641
+ name: string;
1642
+ value?: string | undefined;
1643
+ label?: string | undefined;
1644
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
1645
+ placeholder?: string | undefined;
1646
+ required?: boolean | undefined;
1647
+ }, {
1648
+ type: "input";
1649
+ name: string;
1650
+ value?: string | undefined;
1651
+ label?: string | undefined;
1652
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
1653
+ placeholder?: string | undefined;
1654
+ required?: boolean | undefined;
1655
+ }>, z.ZodObject<{
1656
+ type: z.ZodLiteral<"toggle">;
1657
+ name: z.ZodString;
1658
+ label: z.ZodString;
1659
+ checked: z.ZodOptional<z.ZodBoolean>;
1660
+ onText: z.ZodOptional<z.ZodString>;
1661
+ offText: z.ZodOptional<z.ZodString>;
1662
+ }, "strip", z.ZodTypeAny, {
1663
+ type: "toggle";
1664
+ label: string;
1665
+ name: string;
1666
+ checked?: boolean | undefined;
1667
+ onText?: string | undefined;
1668
+ offText?: string | undefined;
1669
+ }, {
1670
+ type: "toggle";
1671
+ label: string;
1672
+ name: string;
1673
+ checked?: boolean | undefined;
1674
+ onText?: string | undefined;
1675
+ offText?: string | undefined;
1676
+ }>, z.ZodObject<{
1677
+ type: z.ZodLiteral<"slider">;
1678
+ name: z.ZodString;
1679
+ label: z.ZodOptional<z.ZodString>;
1680
+ min: z.ZodOptional<z.ZodNumber>;
1681
+ max: z.ZodOptional<z.ZodNumber>;
1682
+ step: z.ZodOptional<z.ZodNumber>;
1683
+ value: z.ZodOptional<z.ZodNumber>;
1684
+ unit: z.ZodOptional<z.ZodString>;
1685
+ }, "strip", z.ZodTypeAny, {
1686
+ type: "slider";
1687
+ name: string;
1688
+ value?: number | undefined;
1689
+ label?: string | undefined;
1690
+ min?: number | undefined;
1691
+ max?: number | undefined;
1692
+ step?: number | undefined;
1693
+ unit?: string | undefined;
1694
+ }, {
1695
+ type: "slider";
1696
+ name: string;
1697
+ value?: number | undefined;
1698
+ label?: string | undefined;
1699
+ min?: number | undefined;
1700
+ max?: number | undefined;
1701
+ step?: number | undefined;
1702
+ unit?: string | undefined;
1703
+ }>, z.ZodObject<{
1704
+ type: z.ZodLiteral<"radio">;
1705
+ name: z.ZodString;
1706
+ label: z.ZodOptional<z.ZodString>;
1707
+ options: z.ZodArray<z.ZodObject<{
1708
+ value: z.ZodString;
1709
+ label: z.ZodString;
1710
+ }, "strip", z.ZodTypeAny, {
1711
+ value: string;
1712
+ label: string;
1713
+ }, {
1714
+ value: string;
1715
+ label: string;
1716
+ }>, "many">;
1717
+ value: z.ZodOptional<z.ZodString>;
1718
+ }, "strip", z.ZodTypeAny, {
1719
+ options: {
1720
+ value: string;
1721
+ label: string;
1722
+ }[];
1723
+ type: "radio";
1724
+ name: string;
1725
+ value?: string | undefined;
1726
+ label?: string | undefined;
1727
+ }, {
1728
+ options: {
1729
+ value: string;
1730
+ label: string;
1731
+ }[];
1732
+ type: "radio";
1733
+ name: string;
1734
+ value?: string | undefined;
1735
+ label?: string | undefined;
1736
+ }>, z.ZodObject<{
1737
+ type: z.ZodLiteral<"select">;
1738
+ name: z.ZodString;
1739
+ label: z.ZodOptional<z.ZodString>;
1740
+ placeholder: z.ZodOptional<z.ZodString>;
1741
+ options: z.ZodArray<z.ZodObject<{
1742
+ value: z.ZodString;
1743
+ label: z.ZodString;
1744
+ }, "strip", z.ZodTypeAny, {
1745
+ value: string;
1746
+ label: string;
1747
+ }, {
1748
+ value: string;
1749
+ label: string;
1750
+ }>, "many">;
1751
+ value: z.ZodOptional<z.ZodString>;
1752
+ multi: z.ZodOptional<z.ZodBoolean>;
1753
+ }, "strip", z.ZodTypeAny, {
1754
+ options: {
1755
+ value: string;
1756
+ label: string;
1757
+ }[];
1758
+ type: "select";
1759
+ name: string;
1760
+ value?: string | undefined;
1761
+ label?: string | undefined;
1762
+ placeholder?: string | undefined;
1763
+ multi?: boolean | undefined;
1764
+ }, {
1765
+ options: {
1766
+ value: string;
1767
+ label: string;
1768
+ }[];
1769
+ type: "select";
1770
+ name: string;
1771
+ value?: string | undefined;
1772
+ label?: string | undefined;
1773
+ placeholder?: string | undefined;
1774
+ multi?: boolean | undefined;
1775
+ }>, z.ZodObject<{
1776
+ type: z.ZodLiteral<"checkbox">;
1777
+ name: z.ZodString;
1778
+ label: z.ZodString;
1779
+ checked: z.ZodOptional<z.ZodBoolean>;
1780
+ }, "strip", z.ZodTypeAny, {
1781
+ type: "checkbox";
1782
+ label: string;
1783
+ name: string;
1784
+ checked?: boolean | undefined;
1785
+ }, {
1786
+ type: "checkbox";
1787
+ label: string;
1788
+ name: string;
1789
+ checked?: boolean | undefined;
1790
+ }>, z.ZodObject<{
1791
+ type: z.ZodLiteral<"button">;
1792
+ action_id: z.ZodString;
1793
+ text: z.ZodString;
1794
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
1795
+ value: z.ZodOptional<z.ZodString>;
1796
+ confirm: z.ZodOptional<z.ZodObject<{
1797
+ title: z.ZodString;
1798
+ text: z.ZodString;
1799
+ ok: z.ZodOptional<z.ZodString>;
1800
+ cancel: z.ZodOptional<z.ZodString>;
1801
+ }, "strip", z.ZodTypeAny, {
1802
+ title: string;
1803
+ text: string;
1804
+ ok?: string | undefined;
1805
+ cancel?: string | undefined;
1806
+ }, {
1807
+ title: string;
1808
+ text: string;
1809
+ ok?: string | undefined;
1810
+ cancel?: string | undefined;
1811
+ }>>;
1812
+ disabled: z.ZodOptional<z.ZodBoolean>;
1813
+ }, "strip", z.ZodTypeAny, {
1814
+ type: "button";
1815
+ text: string;
1816
+ action_id: string;
1817
+ value?: string | undefined;
1818
+ style?: "danger" | "default" | "primary" | undefined;
1819
+ confirm?: {
1820
+ title: string;
1821
+ text: string;
1822
+ ok?: string | undefined;
1823
+ cancel?: string | undefined;
1824
+ } | undefined;
1825
+ disabled?: boolean | undefined;
1826
+ }, {
1827
+ type: "button";
1828
+ text: string;
1829
+ action_id: string;
1830
+ value?: string | undefined;
1831
+ style?: "danger" | "default" | "primary" | undefined;
1832
+ confirm?: {
1833
+ title: string;
1834
+ text: string;
1835
+ ok?: string | undefined;
1836
+ cancel?: string | undefined;
1837
+ } | undefined;
1838
+ disabled?: boolean | undefined;
1839
+ }>, z.ZodObject<{
1840
+ type: z.ZodLiteral<"linkButton">;
1841
+ text: z.ZodString;
1842
+ url: z.ZodString;
1843
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
1844
+ external: z.ZodOptional<z.ZodBoolean>;
1845
+ }, "strip", z.ZodTypeAny, {
1846
+ type: "linkButton";
1847
+ text: string;
1848
+ url: string;
1849
+ style?: "danger" | "default" | "primary" | undefined;
1850
+ external?: boolean | undefined;
1851
+ }, {
1852
+ type: "linkButton";
1853
+ text: string;
1854
+ url: string;
1855
+ style?: "danger" | "default" | "primary" | undefined;
1856
+ external?: boolean | undefined;
1857
+ }>, z.ZodObject<{
1858
+ type: z.ZodLiteral<"actions">;
1859
+ elements: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1860
+ type: z.ZodLiteral<"button">;
1861
+ action_id: z.ZodString;
1862
+ text: z.ZodString;
1863
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
1864
+ value: z.ZodOptional<z.ZodString>;
1865
+ confirm: z.ZodOptional<z.ZodObject<{
1866
+ title: z.ZodString;
1867
+ text: z.ZodString;
1868
+ ok: z.ZodOptional<z.ZodString>;
1869
+ cancel: z.ZodOptional<z.ZodString>;
1870
+ }, "strip", z.ZodTypeAny, {
1871
+ title: string;
1872
+ text: string;
1873
+ ok?: string | undefined;
1874
+ cancel?: string | undefined;
1875
+ }, {
1876
+ title: string;
1877
+ text: string;
1878
+ ok?: string | undefined;
1879
+ cancel?: string | undefined;
1880
+ }>>;
1881
+ disabled: z.ZodOptional<z.ZodBoolean>;
1882
+ }, "strip", z.ZodTypeAny, {
1883
+ type: "button";
1884
+ text: string;
1885
+ action_id: string;
1886
+ value?: string | undefined;
1887
+ style?: "danger" | "default" | "primary" | undefined;
1888
+ confirm?: {
1889
+ title: string;
1890
+ text: string;
1891
+ ok?: string | undefined;
1892
+ cancel?: string | undefined;
1893
+ } | undefined;
1894
+ disabled?: boolean | undefined;
1895
+ }, {
1896
+ type: "button";
1897
+ text: string;
1898
+ action_id: string;
1899
+ value?: string | undefined;
1900
+ style?: "danger" | "default" | "primary" | undefined;
1901
+ confirm?: {
1902
+ title: string;
1903
+ text: string;
1904
+ ok?: string | undefined;
1905
+ cancel?: string | undefined;
1906
+ } | undefined;
1907
+ disabled?: boolean | undefined;
1908
+ }>, z.ZodObject<{
1909
+ type: z.ZodLiteral<"linkButton">;
1910
+ text: z.ZodString;
1911
+ url: z.ZodString;
1912
+ style: z.ZodOptional<z.ZodEnum<["default", "primary", "danger"]>>;
1913
+ external: z.ZodOptional<z.ZodBoolean>;
1914
+ }, "strip", z.ZodTypeAny, {
1915
+ type: "linkButton";
1916
+ text: string;
1917
+ url: string;
1918
+ style?: "danger" | "default" | "primary" | undefined;
1919
+ external?: boolean | undefined;
1920
+ }, {
1921
+ type: "linkButton";
1922
+ text: string;
1923
+ url: string;
1924
+ style?: "danger" | "default" | "primary" | undefined;
1925
+ external?: boolean | undefined;
1926
+ }>]>, "many">;
1927
+ }, "strip", z.ZodTypeAny, {
1928
+ type: "actions";
1929
+ elements: ({
1930
+ type: "button";
1931
+ text: string;
1932
+ action_id: string;
1933
+ value?: string | undefined;
1934
+ style?: "danger" | "default" | "primary" | undefined;
1935
+ confirm?: {
1936
+ title: string;
1937
+ text: string;
1938
+ ok?: string | undefined;
1939
+ cancel?: string | undefined;
1940
+ } | undefined;
1941
+ disabled?: boolean | undefined;
1942
+ } | {
1943
+ type: "linkButton";
1944
+ text: string;
1945
+ url: string;
1946
+ style?: "danger" | "default" | "primary" | undefined;
1947
+ external?: boolean | undefined;
1948
+ })[];
1949
+ }, {
1950
+ type: "actions";
1951
+ elements: ({
1952
+ type: "button";
1953
+ text: string;
1954
+ action_id: string;
1955
+ value?: string | undefined;
1956
+ style?: "danger" | "default" | "primary" | undefined;
1957
+ confirm?: {
1958
+ title: string;
1959
+ text: string;
1960
+ ok?: string | undefined;
1961
+ cancel?: string | undefined;
1962
+ } | undefined;
1963
+ disabled?: boolean | undefined;
1964
+ } | {
1965
+ type: "linkButton";
1966
+ text: string;
1967
+ url: string;
1968
+ style?: "danger" | "default" | "primary" | undefined;
1969
+ external?: boolean | undefined;
1970
+ })[];
1971
+ }>, z.ZodObject<{
1972
+ type: z.ZodLiteral<"overflow">;
1973
+ label: z.ZodOptional<z.ZodString>;
1974
+ items: z.ZodArray<z.ZodObject<{
1975
+ action_id: z.ZodString;
1976
+ text: z.ZodString;
1977
+ value: z.ZodOptional<z.ZodString>;
1978
+ tone: z.ZodOptional<z.ZodEnum<["neutral", "success", "warning", "danger", "info"]>>;
1979
+ confirm: z.ZodOptional<z.ZodObject<{
1980
+ title: z.ZodString;
1981
+ text: z.ZodString;
1982
+ ok: z.ZodOptional<z.ZodString>;
1983
+ cancel: z.ZodOptional<z.ZodString>;
1984
+ }, "strip", z.ZodTypeAny, {
1985
+ title: string;
1986
+ text: string;
1987
+ ok?: string | undefined;
1988
+ cancel?: string | undefined;
1989
+ }, {
1990
+ title: string;
1991
+ text: string;
1992
+ ok?: string | undefined;
1993
+ cancel?: string | undefined;
1994
+ }>>;
1995
+ disabled: z.ZodOptional<z.ZodBoolean>;
1996
+ }, "strip", z.ZodTypeAny, {
1997
+ text: string;
1998
+ action_id: string;
1999
+ value?: string | undefined;
2000
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2001
+ confirm?: {
2002
+ title: string;
2003
+ text: string;
2004
+ ok?: string | undefined;
2005
+ cancel?: string | undefined;
2006
+ } | undefined;
2007
+ disabled?: boolean | undefined;
2008
+ }, {
2009
+ text: string;
2010
+ action_id: string;
2011
+ value?: string | undefined;
2012
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2013
+ confirm?: {
2014
+ title: string;
2015
+ text: string;
2016
+ ok?: string | undefined;
2017
+ cancel?: string | undefined;
2018
+ } | undefined;
2019
+ disabled?: boolean | undefined;
2020
+ }>, "many">;
2021
+ }, "strip", z.ZodTypeAny, {
2022
+ type: "overflow";
2023
+ items: {
2024
+ text: string;
2025
+ action_id: string;
2026
+ value?: string | undefined;
2027
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2028
+ confirm?: {
2029
+ title: string;
2030
+ text: string;
2031
+ ok?: string | undefined;
2032
+ cancel?: string | undefined;
2033
+ } | undefined;
2034
+ disabled?: boolean | undefined;
2035
+ }[];
2036
+ label?: string | undefined;
2037
+ }, {
2038
+ type: "overflow";
2039
+ items: {
2040
+ text: string;
2041
+ action_id: string;
2042
+ value?: string | undefined;
2043
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2044
+ confirm?: {
2045
+ title: string;
2046
+ text: string;
2047
+ ok?: string | undefined;
2048
+ cancel?: string | undefined;
2049
+ } | undefined;
2050
+ disabled?: boolean | undefined;
2051
+ }[];
2052
+ label?: string | undefined;
2053
+ }>]>, "many">;
2054
+ }, "strip", z.ZodTypeAny, {
2055
+ blocks: ({
2056
+ type: "text";
2057
+ text: string;
2058
+ markdown?: boolean | undefined;
2059
+ } | {
2060
+ type: "heading";
2061
+ text: string;
2062
+ level?: 1 | 2 | 3 | undefined;
2063
+ } | {
2064
+ type: "divider";
2065
+ } | {
2066
+ type: "fields";
2067
+ items: {
2068
+ value: string;
2069
+ label: string;
2070
+ short?: boolean | undefined;
2071
+ }[];
2072
+ } | {
2073
+ type: "image";
2074
+ url?: string | undefined;
2075
+ mxc?: string | undefined;
2076
+ alt?: string | undefined;
2077
+ } | {
2078
+ type: "context";
2079
+ elements: (string | {
2080
+ icon: string;
2081
+ } | {
2082
+ mxc: string;
2083
+ })[];
2084
+ } | {
2085
+ type: "badge";
2086
+ text: string;
2087
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2088
+ } | {
2089
+ type: "table";
2090
+ columns: string[];
2091
+ rows: string[][];
2092
+ } | {
2093
+ type: "input";
2094
+ name: string;
2095
+ value?: string | undefined;
2096
+ label?: string | undefined;
2097
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
2098
+ placeholder?: string | undefined;
2099
+ required?: boolean | undefined;
2100
+ } | {
2101
+ type: "toggle";
2102
+ label: string;
2103
+ name: string;
2104
+ checked?: boolean | undefined;
2105
+ onText?: string | undefined;
2106
+ offText?: string | undefined;
2107
+ } | {
2108
+ type: "slider";
2109
+ name: string;
2110
+ value?: number | undefined;
2111
+ label?: string | undefined;
2112
+ min?: number | undefined;
2113
+ max?: number | undefined;
2114
+ step?: number | undefined;
2115
+ unit?: string | undefined;
2116
+ } | {
2117
+ options: {
2118
+ value: string;
2119
+ label: string;
2120
+ }[];
2121
+ type: "radio";
2122
+ name: string;
2123
+ value?: string | undefined;
2124
+ label?: string | undefined;
2125
+ } | {
2126
+ options: {
2127
+ value: string;
2128
+ label: string;
2129
+ }[];
2130
+ type: "select";
2131
+ name: string;
2132
+ value?: string | undefined;
2133
+ label?: string | undefined;
2134
+ placeholder?: string | undefined;
2135
+ multi?: boolean | undefined;
2136
+ } | {
2137
+ type: "checkbox";
2138
+ label: string;
2139
+ name: string;
2140
+ checked?: boolean | undefined;
2141
+ } | {
2142
+ type: "button";
2143
+ text: string;
2144
+ action_id: string;
2145
+ value?: string | undefined;
2146
+ style?: "danger" | "default" | "primary" | undefined;
2147
+ confirm?: {
2148
+ title: string;
2149
+ text: string;
2150
+ ok?: string | undefined;
2151
+ cancel?: string | undefined;
2152
+ } | undefined;
2153
+ disabled?: boolean | undefined;
2154
+ } | {
2155
+ type: "linkButton";
2156
+ text: string;
2157
+ url: string;
2158
+ style?: "danger" | "default" | "primary" | undefined;
2159
+ external?: boolean | undefined;
2160
+ } | {
2161
+ type: "actions";
2162
+ elements: ({
2163
+ type: "button";
2164
+ text: string;
2165
+ action_id: string;
2166
+ value?: string | undefined;
2167
+ style?: "danger" | "default" | "primary" | undefined;
2168
+ confirm?: {
2169
+ title: string;
2170
+ text: string;
2171
+ ok?: string | undefined;
2172
+ cancel?: string | undefined;
2173
+ } | undefined;
2174
+ disabled?: boolean | undefined;
2175
+ } | {
2176
+ type: "linkButton";
2177
+ text: string;
2178
+ url: string;
2179
+ style?: "danger" | "default" | "primary" | undefined;
2180
+ external?: boolean | undefined;
2181
+ })[];
2182
+ } | {
2183
+ type: "overflow";
2184
+ items: {
2185
+ text: string;
2186
+ action_id: string;
2187
+ value?: string | undefined;
2188
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2189
+ confirm?: {
2190
+ title: string;
2191
+ text: string;
2192
+ ok?: string | undefined;
2193
+ cancel?: string | undefined;
2194
+ } | undefined;
2195
+ disabled?: boolean | undefined;
2196
+ }[];
2197
+ label?: string | undefined;
2198
+ } | {
2199
+ type: "progress";
2200
+ value?: number | undefined;
2201
+ label?: string | undefined;
2202
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2203
+ } | {
2204
+ type: "steps";
2205
+ items: {
2206
+ label: string;
2207
+ status?: "done" | "active" | "todo" | "error" | undefined;
2208
+ note?: string | undefined;
2209
+ }[];
2210
+ } | {
2211
+ code: string;
2212
+ type: "code";
2213
+ language?: string | undefined;
2214
+ } | {
2215
+ type: "diff";
2216
+ patch: string;
2217
+ filename?: string | undefined;
2218
+ additions?: number | undefined;
2219
+ deletions?: number | undefined;
2220
+ } | {
2221
+ type: "file";
2222
+ name: string;
2223
+ url?: string | undefined;
2224
+ mxc?: string | undefined;
2225
+ size?: number | undefined;
2226
+ mime?: string | undefined;
2227
+ caption?: string | undefined;
2228
+ } | {
2229
+ value: string;
2230
+ type: "metric";
2231
+ label: string;
2232
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2233
+ target?: string | undefined;
2234
+ delta?: string | undefined;
2235
+ } | {
2236
+ type: "chart";
2237
+ variant: "sparkline" | "bar" | "line" | "donut";
2238
+ data: {
2239
+ value: number;
2240
+ label?: string | undefined;
2241
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2242
+ }[];
2243
+ max?: number | undefined;
2244
+ unit?: string | undefined;
2245
+ caption?: string | undefined;
2246
+ } | {
2247
+ type: "avatar";
2248
+ name: string;
2249
+ status?: "online" | "away" | "busy" | "offline" | undefined;
2250
+ initials?: string | undefined;
2251
+ color?: string | undefined;
2252
+ src?: string | undefined;
2253
+ subtitle?: string | undefined;
2254
+ } | {
2255
+ type: "avatarGroup";
2256
+ people: {
2257
+ name: string;
2258
+ initials?: string | undefined;
2259
+ color?: string | undefined;
2260
+ src?: string | undefined;
2261
+ }[];
2262
+ label?: string | undefined;
2263
+ max?: number | undefined;
2264
+ } | {
2265
+ value: number;
2266
+ type: "gauge";
2267
+ label?: string | undefined;
2268
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2269
+ min?: number | undefined;
2270
+ max?: number | undefined;
2271
+ unit?: string | undefined;
2272
+ } | {
2273
+ value: number;
2274
+ type: "rating";
2275
+ symbol?: "star" | "dot" | undefined;
2276
+ label?: string | undefined;
2277
+ max?: number | undefined;
2278
+ } | {
2279
+ type: "callout";
2280
+ text: string;
2281
+ title?: string | undefined;
2282
+ icon?: string | undefined;
2283
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2284
+ } | {
2285
+ type: "entityRef";
2286
+ label: string;
2287
+ url?: string | undefined;
2288
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2289
+ entity?: string | undefined;
2290
+ } | {
2291
+ type: "kanban";
2292
+ columns: {
2293
+ title: string;
2294
+ id: string;
2295
+ cards: {
2296
+ title: string;
2297
+ id: string;
2298
+ badge?: {
2299
+ label: string;
2300
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2301
+ } | undefined;
2302
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2303
+ meta?: string[] | undefined;
2304
+ }[];
2305
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2306
+ }[];
2307
+ caption?: string | undefined;
2308
+ } | {
2309
+ type: "countdown";
2310
+ target: string;
2311
+ label?: string | undefined;
2312
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2313
+ expiredText?: string | undefined;
2314
+ } | {
2315
+ type: "collapsible";
2316
+ title: string;
2317
+ blocks: any[];
2318
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2319
+ open?: boolean | undefined;
2320
+ } | {
2321
+ type: "widget";
2322
+ url: string;
2323
+ name?: string | undefined;
2324
+ widget_id?: string | undefined;
2325
+ capabilities?: string[] | undefined;
2326
+ height?: number | undefined;
2327
+ })[];
2328
+ title?: string | undefined;
2329
+ }, {
2330
+ blocks: ({
2331
+ type: "text";
2332
+ text: string;
2333
+ markdown?: boolean | undefined;
2334
+ } | {
2335
+ type: "heading";
2336
+ text: string;
2337
+ level?: 1 | 2 | 3 | undefined;
2338
+ } | {
2339
+ type: "divider";
2340
+ } | {
2341
+ type: "fields";
2342
+ items: {
2343
+ value: string;
2344
+ label: string;
2345
+ short?: boolean | undefined;
2346
+ }[];
2347
+ } | {
2348
+ type: "image";
2349
+ url?: string | undefined;
2350
+ mxc?: string | undefined;
2351
+ alt?: string | undefined;
2352
+ } | {
2353
+ type: "context";
2354
+ elements: (string | {
2355
+ icon: string;
2356
+ } | {
2357
+ mxc: string;
2358
+ })[];
2359
+ } | {
2360
+ type: "badge";
2361
+ text: string;
2362
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2363
+ } | {
2364
+ type: "table";
2365
+ columns: string[];
2366
+ rows: string[][];
2367
+ } | {
2368
+ type: "input";
2369
+ name: string;
2370
+ value?: string | undefined;
2371
+ label?: string | undefined;
2372
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
2373
+ placeholder?: string | undefined;
2374
+ required?: boolean | undefined;
2375
+ } | {
2376
+ type: "toggle";
2377
+ label: string;
2378
+ name: string;
2379
+ checked?: boolean | undefined;
2380
+ onText?: string | undefined;
2381
+ offText?: string | undefined;
2382
+ } | {
2383
+ type: "slider";
2384
+ name: string;
2385
+ value?: number | undefined;
2386
+ label?: string | undefined;
2387
+ min?: number | undefined;
2388
+ max?: number | undefined;
2389
+ step?: number | undefined;
2390
+ unit?: string | undefined;
2391
+ } | {
2392
+ options: {
2393
+ value: string;
2394
+ label: string;
2395
+ }[];
2396
+ type: "radio";
2397
+ name: string;
2398
+ value?: string | undefined;
2399
+ label?: string | undefined;
2400
+ } | {
2401
+ options: {
2402
+ value: string;
2403
+ label: string;
2404
+ }[];
2405
+ type: "select";
2406
+ name: string;
2407
+ value?: string | undefined;
2408
+ label?: string | undefined;
2409
+ placeholder?: string | undefined;
2410
+ multi?: boolean | undefined;
2411
+ } | {
2412
+ type: "checkbox";
2413
+ label: string;
2414
+ name: string;
2415
+ checked?: boolean | undefined;
2416
+ } | {
2417
+ type: "button";
2418
+ text: string;
2419
+ action_id: string;
2420
+ value?: string | undefined;
2421
+ style?: "danger" | "default" | "primary" | undefined;
2422
+ confirm?: {
2423
+ title: string;
2424
+ text: string;
2425
+ ok?: string | undefined;
2426
+ cancel?: string | undefined;
2427
+ } | undefined;
2428
+ disabled?: boolean | undefined;
2429
+ } | {
2430
+ type: "linkButton";
2431
+ text: string;
2432
+ url: string;
2433
+ style?: "danger" | "default" | "primary" | undefined;
2434
+ external?: boolean | undefined;
2435
+ } | {
2436
+ type: "actions";
2437
+ elements: ({
2438
+ type: "button";
2439
+ text: string;
2440
+ action_id: string;
2441
+ value?: string | undefined;
2442
+ style?: "danger" | "default" | "primary" | undefined;
2443
+ confirm?: {
2444
+ title: string;
2445
+ text: string;
2446
+ ok?: string | undefined;
2447
+ cancel?: string | undefined;
2448
+ } | undefined;
2449
+ disabled?: boolean | undefined;
2450
+ } | {
2451
+ type: "linkButton";
2452
+ text: string;
2453
+ url: string;
2454
+ style?: "danger" | "default" | "primary" | undefined;
2455
+ external?: boolean | undefined;
2456
+ })[];
2457
+ } | {
2458
+ type: "overflow";
2459
+ items: {
2460
+ text: string;
2461
+ action_id: string;
2462
+ value?: string | undefined;
2463
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2464
+ confirm?: {
2465
+ title: string;
2466
+ text: string;
2467
+ ok?: string | undefined;
2468
+ cancel?: string | undefined;
2469
+ } | undefined;
2470
+ disabled?: boolean | undefined;
2471
+ }[];
2472
+ label?: string | undefined;
2473
+ } | {
2474
+ type: "progress";
2475
+ value?: number | undefined;
2476
+ label?: string | undefined;
2477
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2478
+ } | {
2479
+ type: "steps";
2480
+ items: {
2481
+ label: string;
2482
+ status?: "done" | "active" | "todo" | "error" | undefined;
2483
+ note?: string | undefined;
2484
+ }[];
2485
+ } | {
2486
+ code: string;
2487
+ type: "code";
2488
+ language?: string | undefined;
2489
+ } | {
2490
+ type: "diff";
2491
+ patch: string;
2492
+ filename?: string | undefined;
2493
+ additions?: number | undefined;
2494
+ deletions?: number | undefined;
2495
+ } | {
2496
+ type: "file";
2497
+ name: string;
2498
+ url?: string | undefined;
2499
+ mxc?: string | undefined;
2500
+ size?: number | undefined;
2501
+ mime?: string | undefined;
2502
+ caption?: string | undefined;
2503
+ } | {
2504
+ value: string;
2505
+ type: "metric";
2506
+ label: string;
2507
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2508
+ target?: string | undefined;
2509
+ delta?: string | undefined;
2510
+ } | {
2511
+ type: "chart";
2512
+ variant: "sparkline" | "bar" | "line" | "donut";
2513
+ data: {
2514
+ value: number;
2515
+ label?: string | undefined;
2516
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2517
+ }[];
2518
+ max?: number | undefined;
2519
+ unit?: string | undefined;
2520
+ caption?: string | undefined;
2521
+ } | {
2522
+ type: "avatar";
2523
+ name: string;
2524
+ status?: "online" | "away" | "busy" | "offline" | undefined;
2525
+ initials?: string | undefined;
2526
+ color?: string | undefined;
2527
+ src?: string | undefined;
2528
+ subtitle?: string | undefined;
2529
+ } | {
2530
+ type: "avatarGroup";
2531
+ people: {
2532
+ name: string;
2533
+ initials?: string | undefined;
2534
+ color?: string | undefined;
2535
+ src?: string | undefined;
2536
+ }[];
2537
+ label?: string | undefined;
2538
+ max?: number | undefined;
2539
+ } | {
2540
+ value: number;
2541
+ type: "gauge";
2542
+ label?: string | undefined;
2543
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2544
+ min?: number | undefined;
2545
+ max?: number | undefined;
2546
+ unit?: string | undefined;
2547
+ } | {
2548
+ value: number;
2549
+ type: "rating";
2550
+ symbol?: "star" | "dot" | undefined;
2551
+ label?: string | undefined;
2552
+ max?: number | undefined;
2553
+ } | {
2554
+ type: "callout";
2555
+ text: string;
2556
+ title?: string | undefined;
2557
+ icon?: string | undefined;
2558
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2559
+ } | {
2560
+ type: "entityRef";
2561
+ label: string;
2562
+ url?: string | undefined;
2563
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2564
+ entity?: string | undefined;
2565
+ } | {
2566
+ type: "kanban";
2567
+ columns: {
2568
+ title: string;
2569
+ id: string;
2570
+ cards: {
2571
+ title: string;
2572
+ id: string;
2573
+ badge?: {
2574
+ label: string;
2575
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2576
+ } | undefined;
2577
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2578
+ meta?: string[] | undefined;
2579
+ }[];
2580
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2581
+ }[];
2582
+ caption?: string | undefined;
2583
+ } | {
2584
+ type: "countdown";
2585
+ target: string;
2586
+ label?: string | undefined;
2587
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2588
+ expiredText?: string | undefined;
2589
+ } | {
2590
+ type: "collapsible";
2591
+ title: string;
2592
+ blocks: any[];
2593
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2594
+ open?: boolean | undefined;
2595
+ } | {
2596
+ type: "widget";
2597
+ url: string;
2598
+ name?: string | undefined;
2599
+ widget_id?: string | undefined;
2600
+ capabilities?: string[] | undefined;
2601
+ height?: number | undefined;
2602
+ })[];
2603
+ title?: string | undefined;
2604
+ }>, "many">>;
2605
+ /** 지원하지 않는 클라이언트를 위한 평문 degrade 텍스트 (필수). */
2606
+ fallback: z.ZodString;
2607
+ state: z.ZodOptional<z.ZodEnum<["open", "submitted", "cancelled", "expired"]>>;
2608
+ /** 카드가 응답하는 원본 이벤트(예: 사용자 명령) id */
2609
+ request_event_id: z.ZodOptional<z.ZodString>;
2610
+ context: z.ZodOptional<z.ZodObject<{
2611
+ agent: z.ZodOptional<z.ZodString>;
2612
+ entity: z.ZodOptional<z.ZodObject<{
2613
+ type: z.ZodString;
2614
+ id: z.ZodString;
2615
+ }, "strip", z.ZodTypeAny, {
2616
+ type: string;
2617
+ id: string;
2618
+ }, {
2619
+ type: string;
2620
+ id: string;
2621
+ }>>;
2622
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
2623
+ agent: z.ZodOptional<z.ZodString>;
2624
+ entity: z.ZodOptional<z.ZodObject<{
2625
+ type: z.ZodString;
2626
+ id: z.ZodString;
2627
+ }, "strip", z.ZodTypeAny, {
2628
+ type: string;
2629
+ id: string;
2630
+ }, {
2631
+ type: string;
2632
+ id: string;
2633
+ }>>;
2634
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
2635
+ agent: z.ZodOptional<z.ZodString>;
2636
+ entity: z.ZodOptional<z.ZodObject<{
2637
+ type: z.ZodString;
2638
+ id: z.ZodString;
2639
+ }, "strip", z.ZodTypeAny, {
2640
+ type: string;
2641
+ id: string;
2642
+ }, {
2643
+ type: string;
2644
+ id: string;
2645
+ }>>;
2646
+ }, z.ZodUnknown, "strip">>>;
2647
+ /** epoch ms. 지나면 클라이언트가 입력을 비활성화한다. */
2648
+ expires_at: z.ZodOptional<z.ZodNumber>;
2649
+ }, "strip", z.ZodTypeAny, {
2650
+ blocks: ({
2651
+ type: "text";
2652
+ text: string;
2653
+ markdown?: boolean | undefined;
2654
+ } | {
2655
+ type: "heading";
2656
+ text: string;
2657
+ level?: 1 | 2 | 3 | undefined;
2658
+ } | {
2659
+ type: "divider";
2660
+ } | {
2661
+ type: "fields";
2662
+ items: {
2663
+ value: string;
2664
+ label: string;
2665
+ short?: boolean | undefined;
2666
+ }[];
2667
+ } | {
2668
+ type: "image";
2669
+ url?: string | undefined;
2670
+ mxc?: string | undefined;
2671
+ alt?: string | undefined;
2672
+ } | {
2673
+ type: "context";
2674
+ elements: (string | {
2675
+ icon: string;
2676
+ } | {
2677
+ mxc: string;
2678
+ })[];
2679
+ } | {
2680
+ type: "badge";
2681
+ text: string;
2682
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2683
+ } | {
2684
+ type: "table";
2685
+ columns: string[];
2686
+ rows: string[][];
2687
+ } | {
2688
+ type: "input";
2689
+ name: string;
2690
+ value?: string | undefined;
2691
+ label?: string | undefined;
2692
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
2693
+ placeholder?: string | undefined;
2694
+ required?: boolean | undefined;
2695
+ } | {
2696
+ type: "toggle";
2697
+ label: string;
2698
+ name: string;
2699
+ checked?: boolean | undefined;
2700
+ onText?: string | undefined;
2701
+ offText?: string | undefined;
2702
+ } | {
2703
+ type: "slider";
2704
+ name: string;
2705
+ value?: number | undefined;
2706
+ label?: string | undefined;
2707
+ min?: number | undefined;
2708
+ max?: number | undefined;
2709
+ step?: number | undefined;
2710
+ unit?: string | undefined;
2711
+ } | {
2712
+ options: {
2713
+ value: string;
2714
+ label: string;
2715
+ }[];
2716
+ type: "radio";
2717
+ name: string;
2718
+ value?: string | undefined;
2719
+ label?: string | undefined;
2720
+ } | {
2721
+ options: {
2722
+ value: string;
2723
+ label: string;
2724
+ }[];
2725
+ type: "select";
2726
+ name: string;
2727
+ value?: string | undefined;
2728
+ label?: string | undefined;
2729
+ placeholder?: string | undefined;
2730
+ multi?: boolean | undefined;
2731
+ } | {
2732
+ type: "checkbox";
2733
+ label: string;
2734
+ name: string;
2735
+ checked?: boolean | undefined;
2736
+ } | {
2737
+ type: "button";
2738
+ text: string;
2739
+ action_id: string;
2740
+ value?: string | undefined;
2741
+ style?: "danger" | "default" | "primary" | undefined;
2742
+ confirm?: {
2743
+ title: string;
2744
+ text: string;
2745
+ ok?: string | undefined;
2746
+ cancel?: string | undefined;
2747
+ } | undefined;
2748
+ disabled?: boolean | undefined;
2749
+ } | {
2750
+ type: "linkButton";
2751
+ text: string;
2752
+ url: string;
2753
+ style?: "danger" | "default" | "primary" | undefined;
2754
+ external?: boolean | undefined;
2755
+ } | {
2756
+ type: "actions";
2757
+ elements: ({
2758
+ type: "button";
2759
+ text: string;
2760
+ action_id: string;
2761
+ value?: string | undefined;
2762
+ style?: "danger" | "default" | "primary" | undefined;
2763
+ confirm?: {
2764
+ title: string;
2765
+ text: string;
2766
+ ok?: string | undefined;
2767
+ cancel?: string | undefined;
2768
+ } | undefined;
2769
+ disabled?: boolean | undefined;
2770
+ } | {
2771
+ type: "linkButton";
2772
+ text: string;
2773
+ url: string;
2774
+ style?: "danger" | "default" | "primary" | undefined;
2775
+ external?: boolean | undefined;
2776
+ })[];
2777
+ } | {
2778
+ type: "overflow";
2779
+ items: {
2780
+ text: string;
2781
+ action_id: string;
2782
+ value?: string | undefined;
2783
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2784
+ confirm?: {
2785
+ title: string;
2786
+ text: string;
2787
+ ok?: string | undefined;
2788
+ cancel?: string | undefined;
2789
+ } | undefined;
2790
+ disabled?: boolean | undefined;
2791
+ }[];
2792
+ label?: string | undefined;
2793
+ } | {
2794
+ type: "progress";
2795
+ value?: number | undefined;
2796
+ label?: string | undefined;
2797
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2798
+ } | {
2799
+ type: "steps";
2800
+ items: {
2801
+ label: string;
2802
+ status?: "done" | "active" | "todo" | "error" | undefined;
2803
+ note?: string | undefined;
2804
+ }[];
2805
+ } | {
2806
+ code: string;
2807
+ type: "code";
2808
+ language?: string | undefined;
2809
+ } | {
2810
+ type: "diff";
2811
+ patch: string;
2812
+ filename?: string | undefined;
2813
+ additions?: number | undefined;
2814
+ deletions?: number | undefined;
2815
+ } | {
2816
+ type: "file";
2817
+ name: string;
2818
+ url?: string | undefined;
2819
+ mxc?: string | undefined;
2820
+ size?: number | undefined;
2821
+ mime?: string | undefined;
2822
+ caption?: string | undefined;
2823
+ } | {
2824
+ value: string;
2825
+ type: "metric";
2826
+ label: string;
2827
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2828
+ target?: string | undefined;
2829
+ delta?: string | undefined;
2830
+ } | {
2831
+ type: "chart";
2832
+ variant: "sparkline" | "bar" | "line" | "donut";
2833
+ data: {
2834
+ value: number;
2835
+ label?: string | undefined;
2836
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2837
+ }[];
2838
+ max?: number | undefined;
2839
+ unit?: string | undefined;
2840
+ caption?: string | undefined;
2841
+ } | {
2842
+ type: "avatar";
2843
+ name: string;
2844
+ status?: "online" | "away" | "busy" | "offline" | undefined;
2845
+ initials?: string | undefined;
2846
+ color?: string | undefined;
2847
+ src?: string | undefined;
2848
+ subtitle?: string | undefined;
2849
+ } | {
2850
+ type: "avatarGroup";
2851
+ people: {
2852
+ name: string;
2853
+ initials?: string | undefined;
2854
+ color?: string | undefined;
2855
+ src?: string | undefined;
2856
+ }[];
2857
+ label?: string | undefined;
2858
+ max?: number | undefined;
2859
+ } | {
2860
+ value: number;
2861
+ type: "gauge";
2862
+ label?: string | undefined;
2863
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2864
+ min?: number | undefined;
2865
+ max?: number | undefined;
2866
+ unit?: string | undefined;
2867
+ } | {
2868
+ value: number;
2869
+ type: "rating";
2870
+ symbol?: "star" | "dot" | undefined;
2871
+ label?: string | undefined;
2872
+ max?: number | undefined;
2873
+ } | {
2874
+ type: "callout";
2875
+ text: string;
2876
+ title?: string | undefined;
2877
+ icon?: string | undefined;
2878
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2879
+ } | {
2880
+ type: "entityRef";
2881
+ label: string;
2882
+ url?: string | undefined;
2883
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2884
+ entity?: string | undefined;
2885
+ } | {
2886
+ type: "kanban";
2887
+ columns: {
2888
+ title: string;
2889
+ id: string;
2890
+ cards: {
2891
+ title: string;
2892
+ id: string;
2893
+ badge?: {
2894
+ label: string;
2895
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2896
+ } | undefined;
2897
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2898
+ meta?: string[] | undefined;
2899
+ }[];
2900
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2901
+ }[];
2902
+ caption?: string | undefined;
2903
+ } | {
2904
+ type: "countdown";
2905
+ target: string;
2906
+ label?: string | undefined;
2907
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2908
+ expiredText?: string | undefined;
2909
+ } | {
2910
+ type: "collapsible";
2911
+ title: string;
2912
+ blocks: any[];
2913
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2914
+ open?: boolean | undefined;
2915
+ } | {
2916
+ type: "widget";
2917
+ url: string;
2918
+ name?: string | undefined;
2919
+ widget_id?: string | undefined;
2920
+ capabilities?: string[] | undefined;
2921
+ height?: number | undefined;
2922
+ })[];
2923
+ v: 1;
2924
+ card_id: string;
2925
+ fallback: string;
2926
+ title?: string | undefined;
2927
+ context?: z.objectOutputType<{
2928
+ agent: z.ZodOptional<z.ZodString>;
2929
+ entity: z.ZodOptional<z.ZodObject<{
2930
+ type: z.ZodString;
2931
+ id: z.ZodString;
2932
+ }, "strip", z.ZodTypeAny, {
2933
+ type: string;
2934
+ id: string;
2935
+ }, {
2936
+ type: string;
2937
+ id: string;
2938
+ }>>;
2939
+ }, z.ZodUnknown, "strip"> | undefined;
2940
+ steps?: {
2941
+ blocks: ({
2942
+ type: "text";
2943
+ text: string;
2944
+ markdown?: boolean | undefined;
2945
+ } | {
2946
+ type: "heading";
2947
+ text: string;
2948
+ level?: 1 | 2 | 3 | undefined;
2949
+ } | {
2950
+ type: "divider";
2951
+ } | {
2952
+ type: "fields";
2953
+ items: {
2954
+ value: string;
2955
+ label: string;
2956
+ short?: boolean | undefined;
2957
+ }[];
2958
+ } | {
2959
+ type: "image";
2960
+ url?: string | undefined;
2961
+ mxc?: string | undefined;
2962
+ alt?: string | undefined;
2963
+ } | {
2964
+ type: "context";
2965
+ elements: (string | {
2966
+ icon: string;
2967
+ } | {
2968
+ mxc: string;
2969
+ })[];
2970
+ } | {
2971
+ type: "badge";
2972
+ text: string;
2973
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
2974
+ } | {
2975
+ type: "table";
2976
+ columns: string[];
2977
+ rows: string[][];
2978
+ } | {
2979
+ type: "input";
2980
+ name: string;
2981
+ value?: string | undefined;
2982
+ label?: string | undefined;
2983
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
2984
+ placeholder?: string | undefined;
2985
+ required?: boolean | undefined;
2986
+ } | {
2987
+ type: "toggle";
2988
+ label: string;
2989
+ name: string;
2990
+ checked?: boolean | undefined;
2991
+ onText?: string | undefined;
2992
+ offText?: string | undefined;
2993
+ } | {
2994
+ type: "slider";
2995
+ name: string;
2996
+ value?: number | undefined;
2997
+ label?: string | undefined;
2998
+ min?: number | undefined;
2999
+ max?: number | undefined;
3000
+ step?: number | undefined;
3001
+ unit?: string | undefined;
3002
+ } | {
3003
+ options: {
3004
+ value: string;
3005
+ label: string;
3006
+ }[];
3007
+ type: "radio";
3008
+ name: string;
3009
+ value?: string | undefined;
3010
+ label?: string | undefined;
3011
+ } | {
3012
+ options: {
3013
+ value: string;
3014
+ label: string;
3015
+ }[];
3016
+ type: "select";
3017
+ name: string;
3018
+ value?: string | undefined;
3019
+ label?: string | undefined;
3020
+ placeholder?: string | undefined;
3021
+ multi?: boolean | undefined;
3022
+ } | {
3023
+ type: "checkbox";
3024
+ label: string;
3025
+ name: string;
3026
+ checked?: boolean | undefined;
3027
+ } | {
3028
+ type: "button";
3029
+ text: string;
3030
+ action_id: string;
3031
+ value?: string | undefined;
3032
+ style?: "danger" | "default" | "primary" | undefined;
3033
+ confirm?: {
3034
+ title: string;
3035
+ text: string;
3036
+ ok?: string | undefined;
3037
+ cancel?: string | undefined;
3038
+ } | undefined;
3039
+ disabled?: boolean | undefined;
3040
+ } | {
3041
+ type: "linkButton";
3042
+ text: string;
3043
+ url: string;
3044
+ style?: "danger" | "default" | "primary" | undefined;
3045
+ external?: boolean | undefined;
3046
+ } | {
3047
+ type: "actions";
3048
+ elements: ({
3049
+ type: "button";
3050
+ text: string;
3051
+ action_id: string;
3052
+ value?: string | undefined;
3053
+ style?: "danger" | "default" | "primary" | undefined;
3054
+ confirm?: {
3055
+ title: string;
3056
+ text: string;
3057
+ ok?: string | undefined;
3058
+ cancel?: string | undefined;
3059
+ } | undefined;
3060
+ disabled?: boolean | undefined;
3061
+ } | {
3062
+ type: "linkButton";
3063
+ text: string;
3064
+ url: string;
3065
+ style?: "danger" | "default" | "primary" | undefined;
3066
+ external?: boolean | undefined;
3067
+ })[];
3068
+ } | {
3069
+ type: "overflow";
3070
+ items: {
3071
+ text: string;
3072
+ action_id: string;
3073
+ value?: string | undefined;
3074
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3075
+ confirm?: {
3076
+ title: string;
3077
+ text: string;
3078
+ ok?: string | undefined;
3079
+ cancel?: string | undefined;
3080
+ } | undefined;
3081
+ disabled?: boolean | undefined;
3082
+ }[];
3083
+ label?: string | undefined;
3084
+ } | {
3085
+ type: "progress";
3086
+ value?: number | undefined;
3087
+ label?: string | undefined;
3088
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3089
+ } | {
3090
+ type: "steps";
3091
+ items: {
3092
+ label: string;
3093
+ status?: "done" | "active" | "todo" | "error" | undefined;
3094
+ note?: string | undefined;
3095
+ }[];
3096
+ } | {
3097
+ code: string;
3098
+ type: "code";
3099
+ language?: string | undefined;
3100
+ } | {
3101
+ type: "diff";
3102
+ patch: string;
3103
+ filename?: string | undefined;
3104
+ additions?: number | undefined;
3105
+ deletions?: number | undefined;
3106
+ } | {
3107
+ type: "file";
3108
+ name: string;
3109
+ url?: string | undefined;
3110
+ mxc?: string | undefined;
3111
+ size?: number | undefined;
3112
+ mime?: string | undefined;
3113
+ caption?: string | undefined;
3114
+ } | {
3115
+ value: string;
3116
+ type: "metric";
3117
+ label: string;
3118
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3119
+ target?: string | undefined;
3120
+ delta?: string | undefined;
3121
+ } | {
3122
+ type: "chart";
3123
+ variant: "sparkline" | "bar" | "line" | "donut";
3124
+ data: {
3125
+ value: number;
3126
+ label?: string | undefined;
3127
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3128
+ }[];
3129
+ max?: number | undefined;
3130
+ unit?: string | undefined;
3131
+ caption?: string | undefined;
3132
+ } | {
3133
+ type: "avatar";
3134
+ name: string;
3135
+ status?: "online" | "away" | "busy" | "offline" | undefined;
3136
+ initials?: string | undefined;
3137
+ color?: string | undefined;
3138
+ src?: string | undefined;
3139
+ subtitle?: string | undefined;
3140
+ } | {
3141
+ type: "avatarGroup";
3142
+ people: {
3143
+ name: string;
3144
+ initials?: string | undefined;
3145
+ color?: string | undefined;
3146
+ src?: string | undefined;
3147
+ }[];
3148
+ label?: string | undefined;
3149
+ max?: number | undefined;
3150
+ } | {
3151
+ value: number;
3152
+ type: "gauge";
3153
+ label?: string | undefined;
3154
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3155
+ min?: number | undefined;
3156
+ max?: number | undefined;
3157
+ unit?: string | undefined;
3158
+ } | {
3159
+ value: number;
3160
+ type: "rating";
3161
+ symbol?: "star" | "dot" | undefined;
3162
+ label?: string | undefined;
3163
+ max?: number | undefined;
3164
+ } | {
3165
+ type: "callout";
3166
+ text: string;
3167
+ title?: string | undefined;
3168
+ icon?: string | undefined;
3169
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3170
+ } | {
3171
+ type: "entityRef";
3172
+ label: string;
3173
+ url?: string | undefined;
3174
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3175
+ entity?: string | undefined;
3176
+ } | {
3177
+ type: "kanban";
3178
+ columns: {
3179
+ title: string;
3180
+ id: string;
3181
+ cards: {
3182
+ title: string;
3183
+ id: string;
3184
+ badge?: {
3185
+ label: string;
3186
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3187
+ } | undefined;
3188
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3189
+ meta?: string[] | undefined;
3190
+ }[];
3191
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3192
+ }[];
3193
+ caption?: string | undefined;
3194
+ } | {
3195
+ type: "countdown";
3196
+ target: string;
3197
+ label?: string | undefined;
3198
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3199
+ expiredText?: string | undefined;
3200
+ } | {
3201
+ type: "collapsible";
3202
+ title: string;
3203
+ blocks: any[];
3204
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3205
+ open?: boolean | undefined;
3206
+ } | {
3207
+ type: "widget";
3208
+ url: string;
3209
+ name?: string | undefined;
3210
+ widget_id?: string | undefined;
3211
+ capabilities?: string[] | undefined;
3212
+ height?: number | undefined;
3213
+ })[];
3214
+ title?: string | undefined;
3215
+ }[] | undefined;
3216
+ state?: "open" | "submitted" | "cancelled" | "expired" | undefined;
3217
+ request_event_id?: string | undefined;
3218
+ expires_at?: number | undefined;
3219
+ }, {
3220
+ card_id: string;
3221
+ fallback: string;
3222
+ title?: string | undefined;
3223
+ context?: z.objectInputType<{
3224
+ agent: z.ZodOptional<z.ZodString>;
3225
+ entity: z.ZodOptional<z.ZodObject<{
3226
+ type: z.ZodString;
3227
+ id: z.ZodString;
3228
+ }, "strip", z.ZodTypeAny, {
3229
+ type: string;
3230
+ id: string;
3231
+ }, {
3232
+ type: string;
3233
+ id: string;
3234
+ }>>;
3235
+ }, z.ZodUnknown, "strip"> | undefined;
3236
+ steps?: {
3237
+ blocks: ({
3238
+ type: "text";
3239
+ text: string;
3240
+ markdown?: boolean | undefined;
3241
+ } | {
3242
+ type: "heading";
3243
+ text: string;
3244
+ level?: 1 | 2 | 3 | undefined;
3245
+ } | {
3246
+ type: "divider";
3247
+ } | {
3248
+ type: "fields";
3249
+ items: {
3250
+ value: string;
3251
+ label: string;
3252
+ short?: boolean | undefined;
3253
+ }[];
3254
+ } | {
3255
+ type: "image";
3256
+ url?: string | undefined;
3257
+ mxc?: string | undefined;
3258
+ alt?: string | undefined;
3259
+ } | {
3260
+ type: "context";
3261
+ elements: (string | {
3262
+ icon: string;
3263
+ } | {
3264
+ mxc: string;
3265
+ })[];
3266
+ } | {
3267
+ type: "badge";
3268
+ text: string;
3269
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3270
+ } | {
3271
+ type: "table";
3272
+ columns: string[];
3273
+ rows: string[][];
3274
+ } | {
3275
+ type: "input";
3276
+ name: string;
3277
+ value?: string | undefined;
3278
+ label?: string | undefined;
3279
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
3280
+ placeholder?: string | undefined;
3281
+ required?: boolean | undefined;
3282
+ } | {
3283
+ type: "toggle";
3284
+ label: string;
3285
+ name: string;
3286
+ checked?: boolean | undefined;
3287
+ onText?: string | undefined;
3288
+ offText?: string | undefined;
3289
+ } | {
3290
+ type: "slider";
3291
+ name: string;
3292
+ value?: number | undefined;
3293
+ label?: string | undefined;
3294
+ min?: number | undefined;
3295
+ max?: number | undefined;
3296
+ step?: number | undefined;
3297
+ unit?: string | undefined;
3298
+ } | {
3299
+ options: {
3300
+ value: string;
3301
+ label: string;
3302
+ }[];
3303
+ type: "radio";
3304
+ name: string;
3305
+ value?: string | undefined;
3306
+ label?: string | undefined;
3307
+ } | {
3308
+ options: {
3309
+ value: string;
3310
+ label: string;
3311
+ }[];
3312
+ type: "select";
3313
+ name: string;
3314
+ value?: string | undefined;
3315
+ label?: string | undefined;
3316
+ placeholder?: string | undefined;
3317
+ multi?: boolean | undefined;
3318
+ } | {
3319
+ type: "checkbox";
3320
+ label: string;
3321
+ name: string;
3322
+ checked?: boolean | undefined;
3323
+ } | {
3324
+ type: "button";
3325
+ text: string;
3326
+ action_id: string;
3327
+ value?: string | undefined;
3328
+ style?: "danger" | "default" | "primary" | undefined;
3329
+ confirm?: {
3330
+ title: string;
3331
+ text: string;
3332
+ ok?: string | undefined;
3333
+ cancel?: string | undefined;
3334
+ } | undefined;
3335
+ disabled?: boolean | undefined;
3336
+ } | {
3337
+ type: "linkButton";
3338
+ text: string;
3339
+ url: string;
3340
+ style?: "danger" | "default" | "primary" | undefined;
3341
+ external?: boolean | undefined;
3342
+ } | {
3343
+ type: "actions";
3344
+ elements: ({
3345
+ type: "button";
3346
+ text: string;
3347
+ action_id: string;
3348
+ value?: string | undefined;
3349
+ style?: "danger" | "default" | "primary" | undefined;
3350
+ confirm?: {
3351
+ title: string;
3352
+ text: string;
3353
+ ok?: string | undefined;
3354
+ cancel?: string | undefined;
3355
+ } | undefined;
3356
+ disabled?: boolean | undefined;
3357
+ } | {
3358
+ type: "linkButton";
3359
+ text: string;
3360
+ url: string;
3361
+ style?: "danger" | "default" | "primary" | undefined;
3362
+ external?: boolean | undefined;
3363
+ })[];
3364
+ } | {
3365
+ type: "overflow";
3366
+ items: {
3367
+ text: string;
3368
+ action_id: string;
3369
+ value?: string | undefined;
3370
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3371
+ confirm?: {
3372
+ title: string;
3373
+ text: string;
3374
+ ok?: string | undefined;
3375
+ cancel?: string | undefined;
3376
+ } | undefined;
3377
+ disabled?: boolean | undefined;
3378
+ }[];
3379
+ label?: string | undefined;
3380
+ } | {
3381
+ type: "progress";
3382
+ value?: number | undefined;
3383
+ label?: string | undefined;
3384
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3385
+ } | {
3386
+ type: "steps";
3387
+ items: {
3388
+ label: string;
3389
+ status?: "done" | "active" | "todo" | "error" | undefined;
3390
+ note?: string | undefined;
3391
+ }[];
3392
+ } | {
3393
+ code: string;
3394
+ type: "code";
3395
+ language?: string | undefined;
3396
+ } | {
3397
+ type: "diff";
3398
+ patch: string;
3399
+ filename?: string | undefined;
3400
+ additions?: number | undefined;
3401
+ deletions?: number | undefined;
3402
+ } | {
3403
+ type: "file";
3404
+ name: string;
3405
+ url?: string | undefined;
3406
+ mxc?: string | undefined;
3407
+ size?: number | undefined;
3408
+ mime?: string | undefined;
3409
+ caption?: string | undefined;
3410
+ } | {
3411
+ value: string;
3412
+ type: "metric";
3413
+ label: string;
3414
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3415
+ target?: string | undefined;
3416
+ delta?: string | undefined;
3417
+ } | {
3418
+ type: "chart";
3419
+ variant: "sparkline" | "bar" | "line" | "donut";
3420
+ data: {
3421
+ value: number;
3422
+ label?: string | undefined;
3423
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3424
+ }[];
3425
+ max?: number | undefined;
3426
+ unit?: string | undefined;
3427
+ caption?: string | undefined;
3428
+ } | {
3429
+ type: "avatar";
3430
+ name: string;
3431
+ status?: "online" | "away" | "busy" | "offline" | undefined;
3432
+ initials?: string | undefined;
3433
+ color?: string | undefined;
3434
+ src?: string | undefined;
3435
+ subtitle?: string | undefined;
3436
+ } | {
3437
+ type: "avatarGroup";
3438
+ people: {
3439
+ name: string;
3440
+ initials?: string | undefined;
3441
+ color?: string | undefined;
3442
+ src?: string | undefined;
3443
+ }[];
3444
+ label?: string | undefined;
3445
+ max?: number | undefined;
3446
+ } | {
3447
+ value: number;
3448
+ type: "gauge";
3449
+ label?: string | undefined;
3450
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3451
+ min?: number | undefined;
3452
+ max?: number | undefined;
3453
+ unit?: string | undefined;
3454
+ } | {
3455
+ value: number;
3456
+ type: "rating";
3457
+ symbol?: "star" | "dot" | undefined;
3458
+ label?: string | undefined;
3459
+ max?: number | undefined;
3460
+ } | {
3461
+ type: "callout";
3462
+ text: string;
3463
+ title?: string | undefined;
3464
+ icon?: string | undefined;
3465
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3466
+ } | {
3467
+ type: "entityRef";
3468
+ label: string;
3469
+ url?: string | undefined;
3470
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3471
+ entity?: string | undefined;
3472
+ } | {
3473
+ type: "kanban";
3474
+ columns: {
3475
+ title: string;
3476
+ id: string;
3477
+ cards: {
3478
+ title: string;
3479
+ id: string;
3480
+ badge?: {
3481
+ label: string;
3482
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3483
+ } | undefined;
3484
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3485
+ meta?: string[] | undefined;
3486
+ }[];
3487
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3488
+ }[];
3489
+ caption?: string | undefined;
3490
+ } | {
3491
+ type: "countdown";
3492
+ target: string;
3493
+ label?: string | undefined;
3494
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3495
+ expiredText?: string | undefined;
3496
+ } | {
3497
+ type: "collapsible";
3498
+ title: string;
3499
+ blocks: any[];
3500
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3501
+ open?: boolean | undefined;
3502
+ } | {
3503
+ type: "widget";
3504
+ url: string;
3505
+ name?: string | undefined;
3506
+ widget_id?: string | undefined;
3507
+ capabilities?: string[] | undefined;
3508
+ height?: number | undefined;
3509
+ })[];
3510
+ title?: string | undefined;
3511
+ }[] | undefined;
3512
+ blocks?: ({
3513
+ type: "text";
3514
+ text: string;
3515
+ markdown?: boolean | undefined;
3516
+ } | {
3517
+ type: "heading";
3518
+ text: string;
3519
+ level?: 1 | 2 | 3 | undefined;
3520
+ } | {
3521
+ type: "divider";
3522
+ } | {
3523
+ type: "fields";
3524
+ items: {
3525
+ value: string;
3526
+ label: string;
3527
+ short?: boolean | undefined;
3528
+ }[];
3529
+ } | {
3530
+ type: "image";
3531
+ url?: string | undefined;
3532
+ mxc?: string | undefined;
3533
+ alt?: string | undefined;
3534
+ } | {
3535
+ type: "context";
3536
+ elements: (string | {
3537
+ icon: string;
3538
+ } | {
3539
+ mxc: string;
3540
+ })[];
3541
+ } | {
3542
+ type: "badge";
3543
+ text: string;
3544
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3545
+ } | {
3546
+ type: "table";
3547
+ columns: string[];
3548
+ rows: string[][];
3549
+ } | {
3550
+ type: "input";
3551
+ name: string;
3552
+ value?: string | undefined;
3553
+ label?: string | undefined;
3554
+ input?: "number" | "text" | "date" | "textarea" | "datetime" | "time" | undefined;
3555
+ placeholder?: string | undefined;
3556
+ required?: boolean | undefined;
3557
+ } | {
3558
+ type: "toggle";
3559
+ label: string;
3560
+ name: string;
3561
+ checked?: boolean | undefined;
3562
+ onText?: string | undefined;
3563
+ offText?: string | undefined;
3564
+ } | {
3565
+ type: "slider";
3566
+ name: string;
3567
+ value?: number | undefined;
3568
+ label?: string | undefined;
3569
+ min?: number | undefined;
3570
+ max?: number | undefined;
3571
+ step?: number | undefined;
3572
+ unit?: string | undefined;
3573
+ } | {
3574
+ options: {
3575
+ value: string;
3576
+ label: string;
3577
+ }[];
3578
+ type: "radio";
3579
+ name: string;
3580
+ value?: string | undefined;
3581
+ label?: string | undefined;
3582
+ } | {
3583
+ options: {
3584
+ value: string;
3585
+ label: string;
3586
+ }[];
3587
+ type: "select";
3588
+ name: string;
3589
+ value?: string | undefined;
3590
+ label?: string | undefined;
3591
+ placeholder?: string | undefined;
3592
+ multi?: boolean | undefined;
3593
+ } | {
3594
+ type: "checkbox";
3595
+ label: string;
3596
+ name: string;
3597
+ checked?: boolean | undefined;
3598
+ } | {
3599
+ type: "button";
3600
+ text: string;
3601
+ action_id: string;
3602
+ value?: string | undefined;
3603
+ style?: "danger" | "default" | "primary" | undefined;
3604
+ confirm?: {
3605
+ title: string;
3606
+ text: string;
3607
+ ok?: string | undefined;
3608
+ cancel?: string | undefined;
3609
+ } | undefined;
3610
+ disabled?: boolean | undefined;
3611
+ } | {
3612
+ type: "linkButton";
3613
+ text: string;
3614
+ url: string;
3615
+ style?: "danger" | "default" | "primary" | undefined;
3616
+ external?: boolean | undefined;
3617
+ } | {
3618
+ type: "actions";
3619
+ elements: ({
3620
+ type: "button";
3621
+ text: string;
3622
+ action_id: string;
3623
+ value?: string | undefined;
3624
+ style?: "danger" | "default" | "primary" | undefined;
3625
+ confirm?: {
3626
+ title: string;
3627
+ text: string;
3628
+ ok?: string | undefined;
3629
+ cancel?: string | undefined;
3630
+ } | undefined;
3631
+ disabled?: boolean | undefined;
3632
+ } | {
3633
+ type: "linkButton";
3634
+ text: string;
3635
+ url: string;
3636
+ style?: "danger" | "default" | "primary" | undefined;
3637
+ external?: boolean | undefined;
3638
+ })[];
3639
+ } | {
3640
+ type: "overflow";
3641
+ items: {
3642
+ text: string;
3643
+ action_id: string;
3644
+ value?: string | undefined;
3645
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3646
+ confirm?: {
3647
+ title: string;
3648
+ text: string;
3649
+ ok?: string | undefined;
3650
+ cancel?: string | undefined;
3651
+ } | undefined;
3652
+ disabled?: boolean | undefined;
3653
+ }[];
3654
+ label?: string | undefined;
3655
+ } | {
3656
+ type: "progress";
3657
+ value?: number | undefined;
3658
+ label?: string | undefined;
3659
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3660
+ } | {
3661
+ type: "steps";
3662
+ items: {
3663
+ label: string;
3664
+ status?: "done" | "active" | "todo" | "error" | undefined;
3665
+ note?: string | undefined;
3666
+ }[];
3667
+ } | {
3668
+ code: string;
3669
+ type: "code";
3670
+ language?: string | undefined;
3671
+ } | {
3672
+ type: "diff";
3673
+ patch: string;
3674
+ filename?: string | undefined;
3675
+ additions?: number | undefined;
3676
+ deletions?: number | undefined;
3677
+ } | {
3678
+ type: "file";
3679
+ name: string;
3680
+ url?: string | undefined;
3681
+ mxc?: string | undefined;
3682
+ size?: number | undefined;
3683
+ mime?: string | undefined;
3684
+ caption?: string | undefined;
3685
+ } | {
3686
+ value: string;
3687
+ type: "metric";
3688
+ label: string;
3689
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3690
+ target?: string | undefined;
3691
+ delta?: string | undefined;
3692
+ } | {
3693
+ type: "chart";
3694
+ variant: "sparkline" | "bar" | "line" | "donut";
3695
+ data: {
3696
+ value: number;
3697
+ label?: string | undefined;
3698
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3699
+ }[];
3700
+ max?: number | undefined;
3701
+ unit?: string | undefined;
3702
+ caption?: string | undefined;
3703
+ } | {
3704
+ type: "avatar";
3705
+ name: string;
3706
+ status?: "online" | "away" | "busy" | "offline" | undefined;
3707
+ initials?: string | undefined;
3708
+ color?: string | undefined;
3709
+ src?: string | undefined;
3710
+ subtitle?: string | undefined;
3711
+ } | {
3712
+ type: "avatarGroup";
3713
+ people: {
3714
+ name: string;
3715
+ initials?: string | undefined;
3716
+ color?: string | undefined;
3717
+ src?: string | undefined;
3718
+ }[];
3719
+ label?: string | undefined;
3720
+ max?: number | undefined;
3721
+ } | {
3722
+ value: number;
3723
+ type: "gauge";
3724
+ label?: string | undefined;
3725
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3726
+ min?: number | undefined;
3727
+ max?: number | undefined;
3728
+ unit?: string | undefined;
3729
+ } | {
3730
+ value: number;
3731
+ type: "rating";
3732
+ symbol?: "star" | "dot" | undefined;
3733
+ label?: string | undefined;
3734
+ max?: number | undefined;
3735
+ } | {
3736
+ type: "callout";
3737
+ text: string;
3738
+ title?: string | undefined;
3739
+ icon?: string | undefined;
3740
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3741
+ } | {
3742
+ type: "entityRef";
3743
+ label: string;
3744
+ url?: string | undefined;
3745
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3746
+ entity?: string | undefined;
3747
+ } | {
3748
+ type: "kanban";
3749
+ columns: {
3750
+ title: string;
3751
+ id: string;
3752
+ cards: {
3753
+ title: string;
3754
+ id: string;
3755
+ badge?: {
3756
+ label: string;
3757
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3758
+ } | undefined;
3759
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3760
+ meta?: string[] | undefined;
3761
+ }[];
3762
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3763
+ }[];
3764
+ caption?: string | undefined;
3765
+ } | {
3766
+ type: "countdown";
3767
+ target: string;
3768
+ label?: string | undefined;
3769
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3770
+ expiredText?: string | undefined;
3771
+ } | {
3772
+ type: "collapsible";
3773
+ title: string;
3774
+ blocks: any[];
3775
+ tone?: "neutral" | "success" | "warning" | "danger" | "info" | undefined;
3776
+ open?: boolean | undefined;
3777
+ } | {
3778
+ type: "widget";
3779
+ url: string;
3780
+ name?: string | undefined;
3781
+ widget_id?: string | undefined;
3782
+ capabilities?: string[] | undefined;
3783
+ height?: number | undefined;
3784
+ })[] | undefined;
3785
+ v?: 1 | undefined;
3786
+ state?: "open" | "submitted" | "cancelled" | "expired" | undefined;
3787
+ request_event_id?: string | undefined;
3788
+ expires_at?: number | undefined;
3789
+ }>;
3790
+ export type UiCardContent = z.infer<typeof UiCardContentSchema>;
3791
+ export declare const UiActionContentSchema: z.ZodObject<{
3792
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3793
+ card_id: z.ZodString;
3794
+ /** 어떤 컨트롤이 트리거했는지 (버튼의 action_id 등) */
3795
+ action_id: z.ZodString;
3796
+ action_type: z.ZodEnum<["button", "submit", "select", "cancel"]>;
3797
+ /** 폼 입력 수집 결과 (input/select/checkbox name → value) */
3798
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3799
+ /** 어떤 버튼의 value였는지 (선택) */
3800
+ value: z.ZodOptional<z.ZodString>;
3801
+ "m.relates_to": z.ZodOptional<z.ZodObject<{
3802
+ rel_type: z.ZodLiteral<"m.reference">;
3803
+ event_id: z.ZodString;
3804
+ }, "strip", z.ZodTypeAny, {
3805
+ rel_type: "m.reference";
3806
+ event_id: string;
3807
+ }, {
3808
+ rel_type: "m.reference";
3809
+ event_id: string;
3810
+ }>>;
3811
+ }, "strip", z.ZodTypeAny, {
3812
+ action_id: string;
3813
+ v: 1;
3814
+ card_id: string;
3815
+ action_type: "cancel" | "select" | "button" | "submit";
3816
+ value?: string | undefined;
3817
+ values?: Record<string, unknown> | undefined;
3818
+ "m.relates_to"?: {
3819
+ rel_type: "m.reference";
3820
+ event_id: string;
3821
+ } | undefined;
3822
+ }, {
3823
+ action_id: string;
3824
+ card_id: string;
3825
+ action_type: "cancel" | "select" | "button" | "submit";
3826
+ value?: string | undefined;
3827
+ values?: Record<string, unknown> | undefined;
3828
+ v?: 1 | undefined;
3829
+ "m.relates_to"?: {
3830
+ rel_type: "m.reference";
3831
+ event_id: string;
3832
+ } | undefined;
3833
+ }>;
3834
+ export type UiActionContent = z.infer<typeof UiActionContentSchema>;
3835
+ export declare const CommandContentSchema: z.ZodObject<{
3836
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3837
+ /** 의도 식별자 (예: "invoice.approve") */
3838
+ intent: z.ZodString;
3839
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3840
+ /** 원문 텍스트 (자연어 명령을 함께 보존) */
3841
+ text: z.ZodOptional<z.ZodString>;
3842
+ }, "strip", z.ZodTypeAny, {
3843
+ v: 1;
3844
+ intent: string;
3845
+ text?: string | undefined;
3846
+ args?: Record<string, unknown> | undefined;
3847
+ }, {
3848
+ intent: string;
3849
+ text?: string | undefined;
3850
+ v?: 1 | undefined;
3851
+ args?: Record<string, unknown> | undefined;
3852
+ }>;
3853
+ export type CommandContent = z.infer<typeof CommandContentSchema>;
3854
+ export declare const ErpEventContentSchema: z.ZodObject<{
3855
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3856
+ entity: z.ZodString;
3857
+ entity_id: z.ZodString;
3858
+ verb: z.ZodString;
3859
+ status: z.ZodOptional<z.ZodString>;
3860
+ source: z.ZodString;
3861
+ /** ERP 원본으로 가는 딥링크 — 권위 데이터는 복제하지 않고 참조만 한다(원장 원칙). */
3862
+ link: z.ZodOptional<z.ZodString>;
3863
+ occurred_at: z.ZodNumber;
3864
+ /** 표시에 필요한 최소 필드만. 권위 데이터의 복제가 아니라 스냅샷. */
3865
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3866
+ }, "strip", z.ZodTypeAny, {
3867
+ entity: string;
3868
+ v: 1;
3869
+ entity_id: string;
3870
+ verb: string;
3871
+ source: string;
3872
+ occurred_at: number;
3873
+ status?: string | undefined;
3874
+ fields?: Record<string, unknown> | undefined;
3875
+ link?: string | undefined;
3876
+ }, {
3877
+ entity: string;
3878
+ entity_id: string;
3879
+ verb: string;
3880
+ source: string;
3881
+ occurred_at: number;
3882
+ status?: string | undefined;
3883
+ fields?: Record<string, unknown> | undefined;
3884
+ v?: 1 | undefined;
3885
+ link?: string | undefined;
3886
+ }>;
3887
+ export type ErpEventContent = z.infer<typeof ErpEventContentSchema>;
3888
+ export declare const AgentCapabilityContentSchema: z.ZodObject<{
3889
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3890
+ display_name: z.ZodOptional<z.ZodString>;
3891
+ mcp_servers: z.ZodArray<z.ZodString, "many">;
3892
+ /** "invoice:read", "invoice:approve" 같은 역량 스코프 */
3893
+ scopes: z.ZodArray<z.ZodString, "many">;
3894
+ /** 이 에이전트가 행사할 수 있는 최대 power level */
3895
+ max_power_level: z.ZodNumber;
3896
+ }, "strip", z.ZodTypeAny, {
3897
+ v: 1;
3898
+ mcp_servers: string[];
3899
+ scopes: string[];
3900
+ max_power_level: number;
3901
+ display_name?: string | undefined;
3902
+ }, {
3903
+ mcp_servers: string[];
3904
+ scopes: string[];
3905
+ max_power_level: number;
3906
+ v?: 1 | undefined;
3907
+ display_name?: string | undefined;
3908
+ }>;
3909
+ export type AgentCapabilityContent = z.infer<typeof AgentCapabilityContentSchema>;
3910
+ export declare const WorkflowStateContentSchema: z.ZodObject<{
3911
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3912
+ status: z.ZodString;
3913
+ entity: z.ZodOptional<z.ZodObject<{
3914
+ type: z.ZodString;
3915
+ id: z.ZodString;
3916
+ }, "strip", z.ZodTypeAny, {
3917
+ type: string;
3918
+ id: string;
3919
+ }, {
3920
+ type: string;
3921
+ id: string;
3922
+ }>>;
3923
+ updated_by: z.ZodOptional<z.ZodString>;
3924
+ updated_at: z.ZodOptional<z.ZodNumber>;
3925
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3926
+ }, "strip", z.ZodTypeAny, {
3927
+ status: string;
3928
+ v: 1;
3929
+ data?: Record<string, unknown> | undefined;
3930
+ entity?: {
3931
+ type: string;
3932
+ id: string;
3933
+ } | undefined;
3934
+ updated_by?: string | undefined;
3935
+ updated_at?: number | undefined;
3936
+ }, {
3937
+ status: string;
3938
+ data?: Record<string, unknown> | undefined;
3939
+ entity?: {
3940
+ type: string;
3941
+ id: string;
3942
+ } | undefined;
3943
+ v?: 1 | undefined;
3944
+ updated_by?: string | undefined;
3945
+ updated_at?: number | undefined;
3946
+ }>;
3947
+ export type WorkflowStateContent = z.infer<typeof WorkflowStateContentSchema>;
3948
+ export declare const RoomBindingContentSchema: z.ZodObject<{
3949
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3950
+ /** 렌더할 App Pack 의 도메인 키 (AppPack.app / PluginManifest.app 과 일치). */
3951
+ app: z.ZodString;
3952
+ /** 이 룸이 다루는 엔티티 타입 (예: "lead", "repo"). */
3953
+ entity_type: z.ZodString;
3954
+ /** 엔티티 인스턴스 ID (권위 데이터 조회 키 — 값 자체는 복제하지 않는다). */
3955
+ entity_id: z.ZodString;
3956
+ }, "strip", z.ZodTypeAny, {
3957
+ v: 1;
3958
+ entity_id: string;
3959
+ app: string;
3960
+ entity_type: string;
3961
+ }, {
3962
+ entity_id: string;
3963
+ app: string;
3964
+ entity_type: string;
3965
+ v?: 1 | undefined;
3966
+ }>;
3967
+ export type RoomBindingContent = z.infer<typeof RoomBindingContentSchema>;
3968
+ export declare const SpaceAppsContentSchema: z.ZodObject<{
3969
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3970
+ /** 이 Space 가 제공하는 App Pack 도메인 키들. */
3971
+ apps: z.ZodArray<z.ZodString, "many">;
3972
+ }, "strip", z.ZodTypeAny, {
3973
+ v: 1;
3974
+ apps: string[];
3975
+ }, {
3976
+ apps: string[];
3977
+ v?: 1 | undefined;
3978
+ }>;
3979
+ export type SpaceAppsContent = z.infer<typeof SpaceAppsContentSchema>;
3980
+ /** Space 앱 목록 content 를 만든다(org.corp.space.apps, state_key=""). */
3981
+ export declare function buildSpaceApps(spaceApps: Omit<SpaceAppsContent, "v"> & {
3982
+ v?: typeof SCHEMA_VERSION;
3983
+ }): SpaceAppsContent;
3984
+ export declare const RoomAppsContentSchema: z.ZodObject<{
3985
+ v: z.ZodDefault<z.ZodLiteral<1>>;
3986
+ /** 이 룸이 탭으로 노출하는 App Pack 도메인 키들(표시 순서). */
3987
+ apps: z.ZodArray<z.ZodString, "many">;
3988
+ }, "strip", z.ZodTypeAny, {
3989
+ v: 1;
3990
+ apps: string[];
3991
+ }, {
3992
+ apps: string[];
3993
+ v?: 1 | undefined;
3994
+ }>;
3995
+ export type RoomAppsContent = z.infer<typeof RoomAppsContentSchema>;
3996
+ /** 룸 앱 목록 content 를 만든다(org.corp.room.apps, state_key=""). */
3997
+ export declare function buildRoomApps(roomApps: Omit<RoomAppsContent, "v"> & {
3998
+ v?: typeof SCHEMA_VERSION;
3999
+ }): RoomAppsContent;
4000
+ export declare const EntitySnapshotContentSchema: z.ZodObject<{
4001
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4002
+ /** 이 스냅샷이 다루는 엔티티 타입 (room.binding.entity_type 과 일치). */
4003
+ entity_type: z.ZodString;
4004
+ /** 엔티티 인스턴스 ID (room.binding.entity_id 과 일치). */
4005
+ entity_id: z.ZodString;
4006
+ /** {{path}} 바인딩으로 해석되는 표시 필드(평면 문자열 맵). 권위 데이터 아님 — 표시 투영. */
4007
+ fields: z.ZodRecord<z.ZodString, z.ZodString>;
4008
+ }, "strip", z.ZodTypeAny, {
4009
+ fields: Record<string, string>;
4010
+ v: 1;
4011
+ entity_id: string;
4012
+ entity_type: string;
4013
+ }, {
4014
+ fields: Record<string, string>;
4015
+ entity_id: string;
4016
+ entity_type: string;
4017
+ v?: 1 | undefined;
4018
+ }>;
4019
+ export type EntitySnapshotContent = z.infer<typeof EntitySnapshotContentSchema>;
4020
+ /** 엔티티 표시 스냅샷 content 를 만든다(org.corp.entity.snapshot, state_key=""). */
4021
+ export declare function buildEntitySnapshot(snapshot: Omit<EntitySnapshotContent, "v"> & {
4022
+ v?: typeof SCHEMA_VERSION;
4023
+ }): EntitySnapshotContent;
4024
+ export declare const ApprovalRequestContentSchema: z.ZodObject<{
4025
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4026
+ /** 이 승인 라이프사이클의 안정적 ID. decision 이 이 값으로 요청을 가리킨다. */
4027
+ request_id: z.ZodString;
4028
+ /** 승인 대상 엔티티(예: invoice INV-1042). 권위 데이터 재조회 키 — 값은 복제하지 않는다. */
4029
+ entity: z.ZodOptional<z.ZodObject<{
4030
+ type: z.ZodString;
4031
+ id: z.ZodString;
4032
+ }, "strip", z.ZodTypeAny, {
4033
+ type: string;
4034
+ id: string;
4035
+ }, {
4036
+ type: string;
4037
+ id: string;
4038
+ }>>;
4039
+ /** 표시용 요약 필드(금액·기한 등) — 권위 데이터 복제가 아니라 스냅샷. */
4040
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4041
+ /** 순차 승인자(MXID 또는 표시명) 목록 — 순서대로 결재한다. */
4042
+ approvers: z.ZodArray<z.ZodString, "many">;
4043
+ /** 통과에 필요한 최소 승인 수(미지정 시 approvers 전원). */
4044
+ min_approvals: z.ZodOptional<z.ZodNumber>;
4045
+ }, "strip", z.ZodTypeAny, {
4046
+ fields: Record<string, unknown>;
4047
+ v: 1;
4048
+ request_id: string;
4049
+ approvers: string[];
4050
+ entity?: {
4051
+ type: string;
4052
+ id: string;
4053
+ } | undefined;
4054
+ min_approvals?: number | undefined;
4055
+ }, {
4056
+ fields: Record<string, unknown>;
4057
+ request_id: string;
4058
+ approvers: string[];
4059
+ entity?: {
4060
+ type: string;
4061
+ id: string;
4062
+ } | undefined;
4063
+ v?: 1 | undefined;
4064
+ min_approvals?: number | undefined;
4065
+ }>;
4066
+ export type ApprovalRequestContent = z.infer<typeof ApprovalRequestContentSchema>;
4067
+ export declare const ApprovalDecisionContentSchema: z.ZodObject<{
4068
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4069
+ /** 어떤 승인 요청에 대한 결정인지 (ApprovalRequest.request_id). */
4070
+ request_id: z.ZodString;
4071
+ /** 결정한 승인자(MXID 또는 표시명). */
4072
+ approver: z.ZodString;
4073
+ decision: z.ZodEnum<["approve", "reject"]>;
4074
+ note: z.ZodOptional<z.ZodString>;
4075
+ /** 원본 승인 요청 이벤트를 참조(m.reference). */
4076
+ "m.relates_to": z.ZodOptional<z.ZodObject<{
4077
+ rel_type: z.ZodLiteral<"m.reference">;
4078
+ event_id: z.ZodString;
4079
+ }, "strip", z.ZodTypeAny, {
4080
+ rel_type: "m.reference";
4081
+ event_id: string;
4082
+ }, {
4083
+ rel_type: "m.reference";
4084
+ event_id: string;
4085
+ }>>;
4086
+ }, "strip", z.ZodTypeAny, {
4087
+ v: 1;
4088
+ request_id: string;
4089
+ approver: string;
4090
+ decision: "approve" | "reject";
4091
+ note?: string | undefined;
4092
+ "m.relates_to"?: {
4093
+ rel_type: "m.reference";
4094
+ event_id: string;
4095
+ } | undefined;
4096
+ }, {
4097
+ request_id: string;
4098
+ approver: string;
4099
+ decision: "approve" | "reject";
4100
+ note?: string | undefined;
4101
+ v?: 1 | undefined;
4102
+ "m.relates_to"?: {
4103
+ rel_type: "m.reference";
4104
+ event_id: string;
4105
+ } | undefined;
4106
+ }>;
4107
+ export type ApprovalDecisionContent = z.infer<typeof ApprovalDecisionContentSchema>;
4108
+ /** 에이전트 런 단계의 상태. queued(대기) → active(진행) → done(완료) / error(실패). */
4109
+ export declare const AgentStepStatusSchema: z.ZodEnum<["queued", "active", "done", "error"]>;
4110
+ export type AgentStepStatus = z.infer<typeof AgentStepStatusSchema>;
4111
+ /** plan 안의 한 단계 — 안정적 id(step 이벤트가 이 값으로 단계를 가리킨다) + 라벨 + 상태. */
4112
+ export declare const AgentPlanStepSchema: z.ZodObject<{
4113
+ /** 단계의 안정적 ID — AgentStep.step_id 가 이 값을 가리킨다. */
4114
+ id: z.ZodString;
4115
+ label: z.ZodString;
4116
+ /** 미지정 시 queued(아직 시작 안 함). */
4117
+ status: z.ZodDefault<z.ZodEnum<["queued", "active", "done", "error"]>>;
4118
+ note: z.ZodOptional<z.ZodString>;
4119
+ }, "strip", z.ZodTypeAny, {
4120
+ status: "done" | "active" | "error" | "queued";
4121
+ label: string;
4122
+ id: string;
4123
+ note?: string | undefined;
4124
+ }, {
4125
+ label: string;
4126
+ id: string;
4127
+ status?: "done" | "active" | "error" | "queued" | undefined;
4128
+ note?: string | undefined;
4129
+ }>;
4130
+ export type AgentPlanStep = z.infer<typeof AgentPlanStepSchema>;
4131
+ export declare const AgentPlanContentSchema: z.ZodObject<{
4132
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4133
+ /** 이 에이전트 런의 안정적 ID. step 이 이 값으로 런을 가리킨다. */
4134
+ run_id: z.ZodString;
4135
+ title: z.ZodOptional<z.ZodString>;
4136
+ /** 실행 에이전트(MXID 또는 표시명). */
4137
+ agent: z.ZodOptional<z.ZodString>;
4138
+ /** 런의 단계 골격(최소 1개). */
4139
+ steps: z.ZodArray<z.ZodObject<{
4140
+ /** 단계의 안정적 ID — AgentStep.step_id 가 이 값을 가리킨다. */
4141
+ id: z.ZodString;
4142
+ label: z.ZodString;
4143
+ /** 미지정 시 queued(아직 시작 안 함). */
4144
+ status: z.ZodDefault<z.ZodEnum<["queued", "active", "done", "error"]>>;
4145
+ note: z.ZodOptional<z.ZodString>;
4146
+ }, "strip", z.ZodTypeAny, {
4147
+ status: "done" | "active" | "error" | "queued";
4148
+ label: string;
4149
+ id: string;
4150
+ note?: string | undefined;
4151
+ }, {
4152
+ label: string;
4153
+ id: string;
4154
+ status?: "done" | "active" | "error" | "queued" | undefined;
4155
+ note?: string | undefined;
4156
+ }>, "many">;
4157
+ /** 전체 공정률 0~100(생략 시 클라가 done/total 로 산출). */
4158
+ progress: z.ZodOptional<z.ZodNumber>;
4159
+ }, "strip", z.ZodTypeAny, {
4160
+ steps: {
4161
+ status: "done" | "active" | "error" | "queued";
4162
+ label: string;
4163
+ id: string;
4164
+ note?: string | undefined;
4165
+ }[];
4166
+ v: 1;
4167
+ run_id: string;
4168
+ title?: string | undefined;
4169
+ progress?: number | undefined;
4170
+ agent?: string | undefined;
4171
+ }, {
4172
+ steps: {
4173
+ label: string;
4174
+ id: string;
4175
+ status?: "done" | "active" | "error" | "queued" | undefined;
4176
+ note?: string | undefined;
4177
+ }[];
4178
+ run_id: string;
4179
+ title?: string | undefined;
4180
+ progress?: number | undefined;
4181
+ v?: 1 | undefined;
4182
+ agent?: string | undefined;
4183
+ }>;
4184
+ export type AgentPlanContent = z.infer<typeof AgentPlanContentSchema>;
4185
+ export declare const AgentStepContentSchema: z.ZodObject<{
4186
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4187
+ /** 어떤 런에 대한 단계 갱신인지 (AgentPlan.run_id). */
4188
+ run_id: z.ZodString;
4189
+ /** 어떤 단계인지 (AgentPlanStep.id). */
4190
+ step_id: z.ZodString;
4191
+ status: z.ZodEnum<["queued", "active", "done", "error"]>;
4192
+ note: z.ZodOptional<z.ZodString>;
4193
+ /** 이 단계의 부분 공정률 0~100(예: active 단계의 진행). */
4194
+ progress: z.ZodOptional<z.ZodNumber>;
4195
+ /** 원본 plan 이벤트를 참조(m.reference). */
4196
+ "m.relates_to": z.ZodOptional<z.ZodObject<{
4197
+ rel_type: z.ZodLiteral<"m.reference">;
4198
+ event_id: z.ZodString;
4199
+ }, "strip", z.ZodTypeAny, {
4200
+ rel_type: "m.reference";
4201
+ event_id: string;
4202
+ }, {
4203
+ rel_type: "m.reference";
4204
+ event_id: string;
4205
+ }>>;
4206
+ }, "strip", z.ZodTypeAny, {
4207
+ status: "done" | "active" | "error" | "queued";
4208
+ v: 1;
4209
+ run_id: string;
4210
+ step_id: string;
4211
+ progress?: number | undefined;
4212
+ note?: string | undefined;
4213
+ "m.relates_to"?: {
4214
+ rel_type: "m.reference";
4215
+ event_id: string;
4216
+ } | undefined;
4217
+ }, {
4218
+ status: "done" | "active" | "error" | "queued";
4219
+ run_id: string;
4220
+ step_id: string;
4221
+ progress?: number | undefined;
4222
+ note?: string | undefined;
4223
+ v?: 1 | undefined;
4224
+ "m.relates_to"?: {
4225
+ rel_type: "m.reference";
4226
+ event_id: string;
4227
+ } | undefined;
4228
+ }>;
4229
+ export type AgentStepContent = z.infer<typeof AgentStepContentSchema>;
4230
+ /** 작업항목의 라이프사이클 상태. todo → in_progress → done. blocked(막힘)·cancelled(취소)는 분기. */
4231
+ export declare const TaskStatusSchema: z.ZodEnum<["todo", "in_progress", "blocked", "done", "cancelled"]>;
4232
+ export type TaskStatus = z.infer<typeof TaskStatusSchema>;
4233
+ export declare const TaskCreateContentSchema: z.ZodObject<{
4234
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4235
+ /** 이 작업의 안정적 ID. update 가 이 값으로 작업을 가리킨다. */
4236
+ task_id: z.ZodString;
4237
+ title: z.ZodString;
4238
+ /** 생성 시 상태(미지정 시 todo — 아직 시작 안 함). */
4239
+ status: z.ZodDefault<z.ZodEnum<["todo", "in_progress", "blocked", "done", "cancelled"]>>;
4240
+ /** 담당자(MXID/표시명) 목록 — "배정"은 update.assignees 로 교체한다(상태가 아니라 필드). */
4241
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4242
+ /** 이 작업이 다루는 엔티티(권위 데이터 재조회 키 — 값은 복제하지 않는다). */
4243
+ entity: z.ZodOptional<z.ZodObject<{
4244
+ type: z.ZodString;
4245
+ id: z.ZodString;
4246
+ }, "strip", z.ZodTypeAny, {
4247
+ type: string;
4248
+ id: string;
4249
+ }, {
4250
+ type: string;
4251
+ id: string;
4252
+ }>>;
4253
+ }, "strip", z.ZodTypeAny, {
4254
+ status: "done" | "todo" | "cancelled" | "in_progress" | "blocked";
4255
+ title: string;
4256
+ v: 1;
4257
+ task_id: string;
4258
+ entity?: {
4259
+ type: string;
4260
+ id: string;
4261
+ } | undefined;
4262
+ assignees?: string[] | undefined;
4263
+ }, {
4264
+ title: string;
4265
+ task_id: string;
4266
+ status?: "done" | "todo" | "cancelled" | "in_progress" | "blocked" | undefined;
4267
+ entity?: {
4268
+ type: string;
4269
+ id: string;
4270
+ } | undefined;
4271
+ v?: 1 | undefined;
4272
+ assignees?: string[] | undefined;
4273
+ }>;
4274
+ export type TaskCreateContent = z.infer<typeof TaskCreateContentSchema>;
4275
+ export declare const TaskUpdateContentSchema: z.ZodObject<{
4276
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4277
+ /** 어떤 작업을 갱신하는지 (TaskCreate.task_id). */
4278
+ task_id: z.ZodString;
4279
+ /** 새 상태(바뀌었을 때만). */
4280
+ status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "blocked", "done", "cancelled"]>>;
4281
+ /** 재배정(담당자 집합 교체). */
4282
+ assignees: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4283
+ /** 이 작업 한 건의 부분 공정률 0~100(장기 작업의 스트리밍 진행). 카드 전체 %는 summarizeTasks 가 파생. */
4284
+ progress: z.ZodOptional<z.ZodNumber>;
4285
+ /** 전이 사유/메모. */
4286
+ note: z.ZodOptional<z.ZodString>;
4287
+ /** 원본 create 이벤트를 참조(m.reference). */
4288
+ "m.relates_to": z.ZodOptional<z.ZodObject<{
4289
+ rel_type: z.ZodLiteral<"m.reference">;
4290
+ event_id: z.ZodString;
4291
+ }, "strip", z.ZodTypeAny, {
4292
+ rel_type: "m.reference";
4293
+ event_id: string;
4294
+ }, {
4295
+ rel_type: "m.reference";
4296
+ event_id: string;
4297
+ }>>;
4298
+ }, "strip", z.ZodTypeAny, {
4299
+ v: 1;
4300
+ task_id: string;
4301
+ status?: "done" | "todo" | "cancelled" | "in_progress" | "blocked" | undefined;
4302
+ progress?: number | undefined;
4303
+ note?: string | undefined;
4304
+ "m.relates_to"?: {
4305
+ rel_type: "m.reference";
4306
+ event_id: string;
4307
+ } | undefined;
4308
+ assignees?: string[] | undefined;
4309
+ }, {
4310
+ task_id: string;
4311
+ status?: "done" | "todo" | "cancelled" | "in_progress" | "blocked" | undefined;
4312
+ progress?: number | undefined;
4313
+ note?: string | undefined;
4314
+ v?: 1 | undefined;
4315
+ "m.relates_to"?: {
4316
+ rel_type: "m.reference";
4317
+ event_id: string;
4318
+ } | undefined;
4319
+ assignees?: string[] | undefined;
4320
+ }>;
4321
+ export type TaskUpdateContent = z.infer<typeof TaskUpdateContentSchema>;
4322
+ /** summarizeTasks 가 돌려주는 작업 1건(최신값 병합·렌더 준비). */
4323
+ export interface TaskSummaryItem {
4324
+ task_id: string;
4325
+ title: string;
4326
+ status: TaskStatus;
4327
+ assignees?: string[];
4328
+ progress?: number;
4329
+ note?: string;
4330
+ }
4331
+ /** 작업 집합의 진척 요약(공정률·카운트). taskList 템플릿 등 진척 카드가 이 데이터로 렌더한다. */
4332
+ export interface TaskSummary {
4333
+ total: number;
4334
+ /** 최신 상태가 done 인 작업 수. */
4335
+ done: number;
4336
+ /** 진행 중(todo|in_progress|blocked — done/cancelled 아님). */
4337
+ active: number;
4338
+ cancelled: number;
4339
+ /** 전체 공정률 = round(done / (total - cancelled) * 100). 분모 0이면 0(0 나눗셈 방지). */
4340
+ percent: number;
4341
+ byStatus: Record<TaskStatus, number>;
4342
+ /** 최신값으로 병합된 작업 목록(렌더 준비). */
4343
+ tasks: TaskSummaryItem[];
4344
+ }
4345
+ /**
4346
+ * task.create + task.update 이벤트 스트림에서 진척 요약을 파생한다(데이터 우선).
4347
+ * create 로 작업 집합을 세우고, update 를 주어진(타임라인) 순서대로 폴드해 최신값이 이기게 한다
4348
+ * — 갤러리 applyStep 병합(에이전트 단계)을 작업 단위로 일반화. multiApproval(approved/required)·
4349
+ * checklist(done/total) 의 0/N 산출과 동형. cancelled 는 분모에서 빼 진행 바를 끌어내리지 않는다.
4350
+ * 코어(events.ts)에 두어 P2-4(라이브 m.replace 재파생)·P2-5(텔레메트리)가 템플릿 잠금 없이 재사용한다.
4351
+ */
4352
+ export declare function summarizeTasks(creates: TaskCreateContent[], updates: TaskUpdateContent[]): TaskSummary;
4353
+ export declare const A2aRequestContentSchema: z.ZodObject<{
4354
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4355
+ request_id: z.ZodString;
4356
+ from_agent: z.ZodString;
4357
+ to_agent: z.ZodString;
4358
+ /** 위임 의도. 예: "invoice.second_approval" */
4359
+ intent: z.ZodString;
4360
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4361
+ reason: z.ZodOptional<z.ZodString>;
4362
+ }, "strip", z.ZodTypeAny, {
4363
+ v: 1;
4364
+ intent: string;
4365
+ request_id: string;
4366
+ from_agent: string;
4367
+ to_agent: string;
4368
+ payload?: Record<string, unknown> | undefined;
4369
+ reason?: string | undefined;
4370
+ }, {
4371
+ intent: string;
4372
+ request_id: string;
4373
+ from_agent: string;
4374
+ to_agent: string;
4375
+ v?: 1 | undefined;
4376
+ payload?: Record<string, unknown> | undefined;
4377
+ reason?: string | undefined;
4378
+ }>;
4379
+ export type A2aRequestContent = z.infer<typeof A2aRequestContentSchema>;
4380
+ export declare const A2aResultContentSchema: z.ZodObject<{
4381
+ v: z.ZodDefault<z.ZodLiteral<1>>;
4382
+ request_id: z.ZodString;
4383
+ from_agent: z.ZodString;
4384
+ to_agent: z.ZodString;
4385
+ status: z.ZodEnum<["approved", "rejected", "completed", "error"]>;
4386
+ result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4387
+ note: z.ZodOptional<z.ZodString>;
4388
+ "m.relates_to": z.ZodOptional<z.ZodObject<{
4389
+ rel_type: z.ZodLiteral<"m.reference">;
4390
+ event_id: z.ZodString;
4391
+ }, "strip", z.ZodTypeAny, {
4392
+ rel_type: "m.reference";
4393
+ event_id: string;
4394
+ }, {
4395
+ rel_type: "m.reference";
4396
+ event_id: string;
4397
+ }>>;
4398
+ }, "strip", z.ZodTypeAny, {
4399
+ status: "error" | "approved" | "rejected" | "completed";
4400
+ v: 1;
4401
+ request_id: string;
4402
+ from_agent: string;
4403
+ to_agent: string;
4404
+ note?: string | undefined;
4405
+ "m.relates_to"?: {
4406
+ rel_type: "m.reference";
4407
+ event_id: string;
4408
+ } | undefined;
4409
+ result?: Record<string, unknown> | undefined;
4410
+ }, {
4411
+ status: "error" | "approved" | "rejected" | "completed";
4412
+ request_id: string;
4413
+ from_agent: string;
4414
+ to_agent: string;
4415
+ note?: string | undefined;
4416
+ v?: 1 | undefined;
4417
+ "m.relates_to"?: {
4418
+ rel_type: "m.reference";
4419
+ event_id: string;
4420
+ } | undefined;
4421
+ result?: Record<string, unknown> | undefined;
4422
+ }>;
4423
+ export type A2aResultContent = z.infer<typeof A2aResultContentSchema>;
4424
+ /** UI 카드를 담은 m.room.message content. 미지원 클라는 body로, 우리 클라는 [UI_CONTENT_KEY]로 렌더. */
4425
+ export type UiMessageContent = {
4426
+ msgtype: "m.text";
4427
+ body: string;
4428
+ format?: "org.matrix.custom.html";
4429
+ formatted_body?: string;
4430
+ [UI_CONTENT_KEY]: UiCardContent;
4431
+ };
4432
+ /** 전용 이벤트 타입(org.corp.ui.card)으로 보낼 content를 만든다. */
4433
+ export declare function buildUiCardContent(card: Omit<UiCardContent, "v"> & {
4434
+ v?: typeof SCHEMA_VERSION;
4435
+ }): UiCardContent;
4436
+ /**
4437
+ * m.room.message 안에 UI 카드를 끼워 보낼 content를 만든다 (권장 기본 경로).
4438
+ * Element/Cinny 등 미지원 클라는 fallback 텍스트를 보고, 우리 클라는 카드를 렌더한다.
4439
+ */
4440
+ export declare function buildUiMessageContent(card: Omit<UiCardContent, "v"> & {
4441
+ v?: typeof SCHEMA_VERSION;
4442
+ }): UiMessageContent;
4443
+ /**
4444
+ * 기존 UI 카드를 m.replace 로 편집하는 m.room.message content를 만든다.
4445
+ * 진행률 갱신(progress 블록 스트리밍)이나 상태 전이(state: submitted 등)에 쓴다.
4446
+ * 미지원 클라는 m.new_content.body(평문)를 보고, 우리 클라는 m.new_content[UI_CONTENT_KEY]를 렌더한다.
4447
+ */
4448
+ export declare function buildUiMessageEdit(originalEventId: string, card: Omit<UiCardContent, "v"> & {
4449
+ v?: typeof SCHEMA_VERSION;
4450
+ }): UiMessageContent & {
4451
+ "m.relates_to": {
4452
+ rel_type: "m.replace";
4453
+ event_id: string;
4454
+ };
4455
+ "m.new_content": UiMessageContent;
4456
+ };
4457
+ /** 라이브 카드 부분 갱신 명세 — 바뀐 progress/steps/state/title 만 담는다. */
4458
+ export interface CardPatch {
4459
+ /** 첫 progress 블록 갱신 — 숫자면 value, 객체면 value/label/tone 부분 갱신. */
4460
+ progress?: number | {
4461
+ value?: number;
4462
+ label?: string;
4463
+ tone?: Tone;
4464
+ };
4465
+ /** 첫 steps 블록의 항목을 인덱스로 부분 갱신(작업/단계 진행). */
4466
+ steps?: {
4467
+ index: number;
4468
+ status?: "done" | "active" | "todo" | "error";
4469
+ note?: string;
4470
+ }[];
4471
+ /** 카드 상태(open→submitted 등) — 종료 시 클라가 입력/버튼 비활성. */
4472
+ state?: CardState;
4473
+ title?: string;
4474
+ /** 미지원 클라용 평문 fallback 갱신 — 라이브 편집 후 degrade 텍스트가 stale 하지 않게(선택). */
4475
+ fallback?: string;
4476
+ }
4477
+ /**
4478
+ * 기존 카드에 부분 갱신을 적용한 **새** 카드를 만든다(원본 불변). 첫 progress/steps 블록만 대상으로 하고,
4479
+ * 결과는 buildUiCardContent 로 재검증한다(범위 밖 값은 거부). 라이브 스트리밍 진행의 표준 갱신 단위.
4480
+ */
4481
+ export declare function applyCardPatch(card: UiCardContent, patch: CardPatch): UiCardContent;
4482
+ /**
4483
+ * 라이브 카드 갱신 m.replace 메시지를 만든다 = applyCardPatch + buildUiMessageEdit.
4484
+ * 에이전트가 "진행 60%·2번 단계 done" 처럼 부분 갱신만 넘기면 편집 이벤트가 완성된다.
4485
+ */
4486
+ export declare function buildCardEdit(originalEventId: string, card: UiCardContent, patch: CardPatch): ReturnType<typeof buildUiMessageEdit>;
4487
+ /** 룸↔도메인 바인딩 상태 이벤트 content를 만든다 (state_key = "" 로 발행). */
4488
+ export declare function buildRoomBinding(binding: Omit<RoomBindingContent, "v"> & {
4489
+ v?: typeof SCHEMA_VERSION;
4490
+ }): RoomBindingContent;
4491
+ /** 다단계 승인 요청 content를 만든다 (org.corp.approval.request). */
4492
+ export declare function buildApprovalRequest(req: Omit<ApprovalRequestContent, "v"> & {
4493
+ v?: typeof SCHEMA_VERSION;
4494
+ }): ApprovalRequestContent;
4495
+ /** 승인 결정(승인/반려) content를 만든다 (org.corp.approval.decision, 요청을 m.reference). */
4496
+ export declare function buildApprovalDecision(dec: Omit<ApprovalDecisionContent, "v"> & {
4497
+ v?: typeof SCHEMA_VERSION;
4498
+ }): ApprovalDecisionContent;
4499
+ /** approvalProgress 결과 — 요청 하나의 진행 상태 + '나'의 대기 여부. */
4500
+ export interface ApprovalProgress {
4501
+ /** 통과에 필요한 승인 수(min_approvals ?? approvers 전원). */
4502
+ required: number;
4503
+ /** 서로 다른 승인자의 approve 수(같은 승인자 중복 결정은 1회). */
4504
+ approvals: number;
4505
+ /** 요청이 종결됐는가 — 임계 도달(통과) 또는 reject 존재(반려는 라이프사이클 종결, 재요청=새 request). */
4506
+ resolved: boolean;
4507
+ /** '나'(self)의 결재가 남아 있는가 — 승인자 목록에 있고, 아직 결정 안 했고, 미종결. */
4508
+ pendingForSelf: boolean;
4509
+ }
4510
+ /**
4511
+ * approval.request + 그 request_id 의 decision 스트림에서 진행 상태를 파생한다(데이터 우선,
4512
+ * summarizeTasks 동형). 트리아지 표면(모바일 홈 '승인 대기' 카드 등)이 "내가 결재할 것"을
4513
+ * 골라내는 판정 — 표시용이며, 권한/유효성의 권위는 항상 서버(canPublish + appservice 재검증).
4514
+ * decisions 는 다른 request_id 가 섞여 있어도 되고(여기서 거른다), 같은 승인자의 중복 결정은
4515
+ * 첫 결정이 이긴다(결정 번복은 스코프 밖 — 스키마에 철회 이벤트가 없다).
4516
+ */
4517
+ export declare function approvalProgress(self: string, request: ApprovalRequestContent, decisions: ApprovalDecisionContent[]): ApprovalProgress;
4518
+ /** 에이전트 런 계획 content를 만든다 (org.corp.agent.plan — 런의 단계 골격). */
4519
+ export declare function buildAgentPlan(plan: Omit<AgentPlanContent, "v"> & {
4520
+ v?: typeof SCHEMA_VERSION;
4521
+ }): AgentPlanContent;
4522
+ /** 에이전트 런 단계 갱신 content를 만든다 (org.corp.agent.step, 런/단계를 가리킨다). */
4523
+ export declare function buildAgentStep(step: Omit<AgentStepContent, "v"> & {
4524
+ v?: typeof SCHEMA_VERSION;
4525
+ }): AgentStepContent;
4526
+ /**
4527
+ * 기존 agent.plan 이벤트를 m.replace 로 편집하는 content를 만든다 — 런이 진행되며 단계 상태/공정률을 갱신한다.
4528
+ * 전용 이벤트 타입(org.corp.agent.plan)도 buildUiMessageEdit 와 같은 m.replace+m.new_content 형태로 흘려,
4529
+ * 편집 인지 클라는 m.new_content 의 새 plan 을, 미인지 클라는 top-level content(=새 plan)를 본다.
4530
+ */
4531
+ export declare function buildAgentPlanEdit(originalEventId: string, plan: Omit<AgentPlanContent, "v"> & {
4532
+ v?: typeof SCHEMA_VERSION;
4533
+ }): AgentPlanContent & {
4534
+ "m.relates_to": {
4535
+ rel_type: "m.replace";
4536
+ event_id: string;
4537
+ };
4538
+ "m.new_content": AgentPlanContent;
4539
+ };
4540
+ /** 작업항목 생성 content를 만든다 (org.corp.task.create — 작업 라이프사이클의 루트).
4541
+ * status 는 스키마 기본값(todo)이 있어 입력에서 생략 가능하다. */
4542
+ export declare function buildTaskCreate(task: Omit<TaskCreateContent, "v" | "status"> & {
4543
+ v?: typeof SCHEMA_VERSION;
4544
+ status?: TaskStatus;
4545
+ }): TaskCreateContent;
4546
+ /** 작업항목 갱신 content를 만든다 (org.corp.task.update, 바뀐 필드만 — create 를 m.reference). */
4547
+ export declare function buildTaskUpdate(update: Omit<TaskUpdateContent, "v"> & {
4548
+ v?: typeof SCHEMA_VERSION;
4549
+ }): TaskUpdateContent;
4550
+ /** UI 액션 회신 content를 만든다. */
4551
+ export declare function buildUiActionContent(action: Omit<UiActionContent, "v"> & {
4552
+ v?: typeof SCHEMA_VERSION;
4553
+ }): UiActionContent;
4554
+ /** m.room.message content 또는 임의 객체에서 끼워진 UI 카드를 추출한다(있으면). */
4555
+ export declare function extractUiCard(content: unknown): UiCardContent | null;
4556
+ export { EventType, UI_CONTENT_KEY };
4557
+ //# sourceMappingURL=events.d.ts.map