@chaoslabs/ai-sdk 0.0.1 → 0.0.2

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.
package/dist/schemas.d.ts CHANGED
@@ -1,547 +1,794 @@
1
- import { z } from "zod";
2
- export declare const ChaosConfigSchema: z.ZodObject<{
3
- apiKey: z.ZodString;
4
- baseUrl: z.ZodOptional<z.ZodString>;
5
- timeout: z.ZodOptional<z.ZodNumber>;
6
- }, z.core.$strip>;
7
- export declare const InputItemSchema: z.ZodObject<{
8
- type: z.ZodLiteral<"message">;
9
- role: z.ZodEnum<{
10
- user: "user";
11
- system: "system";
12
- }>;
1
+ import { z } from 'zod';
2
+ export declare const MarkdownBlockSchema: z.ZodObject<{
13
3
  content: z.ZodString;
14
4
  }, z.core.$strip>;
15
- export declare const RequestMetadataSchema: z.ZodObject<{
16
- user_id: z.ZodString;
17
- session_id: z.ZodString;
18
- wallet_id: z.ZodOptional<z.ZodString>;
19
- }, z.core.$strip>;
20
- export declare const CreateResponseParamsSchema: z.ZodObject<{
21
- model: z.ZodString;
22
- input: z.ZodArray<z.ZodObject<{
23
- type: z.ZodLiteral<"message">;
24
- role: z.ZodEnum<{
25
- user: "user";
26
- system: "system";
27
- }>;
28
- content: z.ZodString;
29
- }, z.core.$strip>>;
30
- stream: z.ZodOptional<z.ZodBoolean>;
31
- metadata: z.ZodObject<{
32
- user_id: z.ZodString;
33
- session_id: z.ZodString;
34
- wallet_id: z.ZodOptional<z.ZodString>;
35
- }, z.core.$strip>;
5
+ export declare const TableColumnTypeSchema: z.ZodEnum<{
6
+ number: "number";
7
+ boolean: "boolean";
8
+ text: "text";
9
+ currency: "currency";
10
+ percentage: "percentage";
11
+ token: "token";
12
+ date: "date";
13
+ link: "link";
14
+ }>;
15
+ export declare const TableSortDirectionSchema: z.ZodEnum<{
16
+ asc: "asc";
17
+ desc: "desc";
18
+ }>;
19
+ export declare const TableColumnConfigSchema: z.ZodObject<{
20
+ type: z.ZodOptional<z.ZodEnum<{
21
+ number: "number";
22
+ boolean: "boolean";
23
+ text: "text";
24
+ currency: "currency";
25
+ percentage: "percentage";
26
+ token: "token";
27
+ date: "date";
28
+ link: "link";
29
+ }>>;
30
+ sortable: z.ZodOptional<z.ZodBoolean>;
31
+ align: z.ZodOptional<z.ZodEnum<{
32
+ left: "left";
33
+ center: "center";
34
+ right: "right";
35
+ }>>;
36
+ width: z.ZodOptional<z.ZodString>;
36
37
  }, z.core.$strip>;
37
- export declare const TableCellValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
38
38
  export declare const TableBlockSchema: z.ZodObject<{
39
- type: z.ZodLiteral<"table">;
39
+ blockType: z.ZodLiteral<"table">;
40
40
  title: z.ZodString;
41
41
  tableHeaders: z.ZodArray<z.ZodString>;
42
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
42
+ tableRows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
43
+ tableHeadersTypes: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
44
+ number: "number";
45
+ boolean: "boolean";
46
+ text: "text";
47
+ currency: "currency";
48
+ percentage: "percentage";
49
+ token: "token";
50
+ date: "date";
51
+ link: "link";
52
+ }>, z.ZodLiteral<"currency">, z.ZodLiteral<"percentage">]>>>>;
53
+ tableColumnConfigs: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
54
+ type: z.ZodOptional<z.ZodEnum<{
55
+ number: "number";
56
+ boolean: "boolean";
57
+ text: "text";
58
+ currency: "currency";
59
+ percentage: "percentage";
60
+ token: "token";
61
+ date: "date";
62
+ link: "link";
63
+ }>>;
64
+ sortable: z.ZodOptional<z.ZodBoolean>;
65
+ align: z.ZodOptional<z.ZodEnum<{
66
+ left: "left";
67
+ center: "center";
68
+ right: "right";
69
+ }>>;
70
+ width: z.ZodOptional<z.ZodString>;
71
+ }, z.core.$strip>>>>;
72
+ tableHeadersMetadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
73
+ type: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$loose>>>>;
75
+ sourceName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
76
+ defaultSortColumn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
77
+ defaultSortDirection: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
78
+ asc: "asc";
79
+ desc: "desc";
80
+ }>>>;
81
+ maxRows: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
82
+ searchable: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
83
+ exportable: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
84
+ tool_params: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
85
+ tool_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
43
86
  }, z.core.$strip>;
44
- export declare const MarkdownBlockSchema: z.ZodObject<{
45
- type: z.ZodLiteral<"markdown">;
46
- content: z.ZodString;
87
+ export declare const ChartDataPointSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
88
+ x: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
89
+ y: z.ZodNumber;
90
+ }, z.core.$strip>, z.ZodArray<z.ZodUnknown>]>;
91
+ export declare const ChartSeriesSchema: z.ZodObject<{
92
+ name: z.ZodString;
93
+ data: z.ZodArray<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
94
+ x: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
95
+ y: z.ZodNumber;
96
+ }, z.core.$strip>, z.ZodArray<z.ZodUnknown>]>>;
97
+ color: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strip>;
99
+ export declare const ChartSegmentSchema: z.ZodObject<{
100
+ label: z.ZodString;
101
+ value: z.ZodNumber;
102
+ color: z.ZodOptional<z.ZodString>;
103
+ }, z.core.$strip>;
104
+ export declare const ChartAxisSchema: z.ZodObject<{
105
+ title: z.ZodOptional<z.ZodString>;
106
+ min: z.ZodOptional<z.ZodNumber>;
107
+ max: z.ZodOptional<z.ZodNumber>;
108
+ type: z.ZodOptional<z.ZodString>;
109
+ }, z.core.$strip>;
110
+ export declare const ChartLegacyDataSchema: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
111
+ export declare const ChartBlockSchema: z.ZodObject<{
112
+ blockType: z.ZodLiteral<"chart">;
113
+ title: z.ZodString;
114
+ chartType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
115
+ pie: "pie";
116
+ donut: "donut";
117
+ line: "line";
118
+ area: "area";
119
+ bar: "bar";
120
+ timeseries: "timeseries";
121
+ }>>>;
122
+ series: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
123
+ name: z.ZodString;
124
+ data: z.ZodArray<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
125
+ x: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
126
+ y: z.ZodNumber;
127
+ }, z.core.$strip>, z.ZodArray<z.ZodUnknown>]>>;
128
+ color: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strip>>>>;
130
+ segments: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
131
+ label: z.ZodString;
132
+ value: z.ZodNumber;
133
+ color: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>>>>;
135
+ data: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>>>;
136
+ categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
137
+ xAxis: z.ZodNullable<z.ZodOptional<z.ZodObject<{
138
+ title: z.ZodOptional<z.ZodString>;
139
+ min: z.ZodOptional<z.ZodNumber>;
140
+ max: z.ZodOptional<z.ZodNumber>;
141
+ type: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strip>>>;
143
+ yAxis: z.ZodNullable<z.ZodOptional<z.ZodObject<{
144
+ title: z.ZodOptional<z.ZodString>;
145
+ min: z.ZodOptional<z.ZodNumber>;
146
+ max: z.ZodOptional<z.ZodNumber>;
147
+ type: z.ZodOptional<z.ZodString>;
148
+ }, z.core.$strip>>>;
149
+ isCurrency: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
150
+ sourceName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
151
+ timeframe: z.ZodNullable<z.ZodOptional<z.ZodString>>;
152
+ tool_params: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
153
+ tool_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
154
+ }, z.core.$strip>;
155
+ export declare const PrimitiveIconSchema: z.ZodObject<{
156
+ type: z.ZodString;
157
+ value: z.ZodString;
158
+ }, z.core.$strip>;
159
+ export declare const PrimitiveLineItemSchema: z.ZodObject<{
160
+ label: z.ZodString;
161
+ value: z.ZodString;
162
+ icon: z.ZodOptional<z.ZodObject<{
163
+ type: z.ZodString;
164
+ value: z.ZodString;
165
+ }, z.core.$strip>>;
47
166
  }, z.core.$strip>;
48
- export declare const PrimitiveParamsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
49
167
  export declare const PrimitiveDisplaySchema: z.ZodObject<{
50
- headline: z.ZodString;
51
- amount: z.ZodOptional<z.ZodString>;
168
+ headline: z.ZodOptional<z.ZodString>;
52
169
  action_verb: z.ZodOptional<z.ZodString>;
53
- from_asset: z.ZodOptional<z.ZodString>;
54
- to_asset: z.ZodOptional<z.ZodString>;
55
- from_chain: z.ZodOptional<z.ZodString>;
56
- to_chain: z.ZodOptional<z.ZodString>;
57
- protocol: z.ZodOptional<z.ZodString>;
58
- leverage: z.ZodOptional<z.ZodString>;
59
- direction: z.ZodOptional<z.ZodString>;
60
- recipient: z.ZodOptional<z.ZodString>;
170
+ primary_icon: z.ZodOptional<z.ZodObject<{
171
+ type: z.ZodString;
172
+ value: z.ZodString;
173
+ }, z.core.$strip>>;
174
+ secondary_icon: z.ZodOptional<z.ZodObject<{
175
+ type: z.ZodString;
176
+ value: z.ZodString;
177
+ }, z.core.$strip>>;
178
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
179
+ label: z.ZodString;
180
+ value: z.ZodString;
181
+ icon: z.ZodOptional<z.ZodObject<{
182
+ type: z.ZodString;
183
+ value: z.ZodString;
184
+ }, z.core.$strip>>;
185
+ }, z.core.$strip>>>;
61
186
  }, z.core.$strip>;
62
187
  export declare const PrimitiveSchema: z.ZodObject<{
63
188
  primitive: z.ZodString;
64
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
189
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
190
  display: z.ZodOptional<z.ZodObject<{
66
- headline: z.ZodString;
67
- amount: z.ZodOptional<z.ZodString>;
191
+ headline: z.ZodOptional<z.ZodString>;
68
192
  action_verb: z.ZodOptional<z.ZodString>;
69
- from_asset: z.ZodOptional<z.ZodString>;
70
- to_asset: z.ZodOptional<z.ZodString>;
71
- from_chain: z.ZodOptional<z.ZodString>;
72
- to_chain: z.ZodOptional<z.ZodString>;
73
- protocol: z.ZodOptional<z.ZodString>;
74
- leverage: z.ZodOptional<z.ZodString>;
75
- direction: z.ZodOptional<z.ZodString>;
76
- recipient: z.ZodOptional<z.ZodString>;
193
+ primary_icon: z.ZodOptional<z.ZodObject<{
194
+ type: z.ZodString;
195
+ value: z.ZodString;
196
+ }, z.core.$strip>>;
197
+ secondary_icon: z.ZodOptional<z.ZodObject<{
198
+ type: z.ZodString;
199
+ value: z.ZodString;
200
+ }, z.core.$strip>>;
201
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
202
+ label: z.ZodString;
203
+ value: z.ZodString;
204
+ icon: z.ZodOptional<z.ZodObject<{
205
+ type: z.ZodString;
206
+ value: z.ZodString;
207
+ }, z.core.$strip>>;
208
+ }, z.core.$strip>>>;
77
209
  }, z.core.$strip>>;
78
210
  }, z.core.$strip>;
79
- export declare const RisksSchema: z.ZodObject<{
80
- level: z.ZodEnum<{
81
- low: "low";
82
- medium: "medium";
83
- high: "high";
211
+ export declare const RawTransactionSchema: z.ZodObject<{
212
+ to: z.ZodOptional<z.ZodString>;
213
+ data: z.ZodOptional<z.ZodString>;
214
+ value: z.ZodOptional<z.ZodString>;
215
+ chainId: z.ZodOptional<z.ZodNumber>;
216
+ description: z.ZodOptional<z.ZodString>;
217
+ contractName: z.ZodOptional<z.ZodString>;
218
+ contractVerified: z.ZodOptional<z.ZodBoolean>;
219
+ protocolName: z.ZodOptional<z.ZodString>;
220
+ contractIcon: z.ZodOptional<z.ZodString>;
221
+ }, z.core.$strip>;
222
+ export declare const TransactionGroupSchema: z.ZodObject<{
223
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
224
+ to: z.ZodOptional<z.ZodString>;
225
+ data: z.ZodOptional<z.ZodString>;
226
+ value: z.ZodOptional<z.ZodString>;
227
+ chainId: z.ZodOptional<z.ZodNumber>;
228
+ description: z.ZodOptional<z.ZodString>;
229
+ contractName: z.ZodOptional<z.ZodString>;
230
+ contractVerified: z.ZodOptional<z.ZodBoolean>;
231
+ protocolName: z.ZodOptional<z.ZodString>;
232
+ contractIcon: z.ZodOptional<z.ZodString>;
233
+ }, z.core.$strip>>>;
234
+ requiresApproval: z.ZodOptional<z.ZodBoolean>;
235
+ verificationUnavailable: z.ZodOptional<z.ZodBoolean>;
236
+ }, z.core.$strip>;
237
+ export declare const RiskInfoItemSchema: z.ZodObject<{
238
+ id: z.ZodOptional<z.ZodString>;
239
+ severity: z.ZodOptional<z.ZodEnum<{
240
+ info: "info";
241
+ warning: "warning";
242
+ error: "error";
84
243
  critical: "critical";
85
- }>;
86
- warnings: z.ZodArray<z.ZodString>;
244
+ }>>;
245
+ title: z.ZodOptional<z.ZodString>;
246
+ message: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>;
248
+ export declare const RisksSchema: z.ZodObject<{
249
+ level: z.ZodOptional<z.ZodString>;
87
250
  blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
251
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
252
+ info: z.ZodOptional<z.ZodArray<z.ZodObject<{
253
+ id: z.ZodOptional<z.ZodString>;
254
+ severity: z.ZodOptional<z.ZodEnum<{
255
+ info: "info";
256
+ warning: "warning";
257
+ error: "error";
258
+ critical: "critical";
259
+ }>>;
260
+ title: z.ZodOptional<z.ZodString>;
261
+ message: z.ZodOptional<z.ZodString>;
262
+ }, z.core.$strip>>>;
88
263
  }, z.core.$strip>;
89
264
  export declare const TransactionActionBlockSchema: z.ZodObject<{
90
- type: z.ZodLiteral<"transaction_action">;
91
- title: z.ZodString;
92
- primitives: z.ZodArray<z.ZodObject<{
265
+ blockType: z.ZodLiteral<"transaction_action">;
266
+ value: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
267
+ sequence: z.ZodOptional<z.ZodBoolean>;
268
+ primitives: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
269
  primitive: z.ZodString;
94
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
270
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
95
271
  display: z.ZodOptional<z.ZodObject<{
96
- headline: z.ZodString;
97
- amount: z.ZodOptional<z.ZodString>;
272
+ headline: z.ZodOptional<z.ZodString>;
98
273
  action_verb: z.ZodOptional<z.ZodString>;
99
- from_asset: z.ZodOptional<z.ZodString>;
100
- to_asset: z.ZodOptional<z.ZodString>;
101
- from_chain: z.ZodOptional<z.ZodString>;
102
- to_chain: z.ZodOptional<z.ZodString>;
103
- protocol: z.ZodOptional<z.ZodString>;
104
- leverage: z.ZodOptional<z.ZodString>;
105
- direction: z.ZodOptional<z.ZodString>;
106
- recipient: z.ZodOptional<z.ZodString>;
274
+ primary_icon: z.ZodOptional<z.ZodObject<{
275
+ type: z.ZodString;
276
+ value: z.ZodString;
277
+ }, z.core.$strip>>;
278
+ secondary_icon: z.ZodOptional<z.ZodObject<{
279
+ type: z.ZodString;
280
+ value: z.ZodString;
281
+ }, z.core.$strip>>;
282
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
283
+ label: z.ZodString;
284
+ value: z.ZodString;
285
+ icon: z.ZodOptional<z.ZodObject<{
286
+ type: z.ZodString;
287
+ value: z.ZodString;
288
+ }, z.core.$strip>>;
289
+ }, z.core.$strip>>>;
107
290
  }, z.core.$strip>>;
108
- }, z.core.$strip>>;
291
+ }, z.core.$strip>>>;
292
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
293
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
294
+ to: z.ZodOptional<z.ZodString>;
295
+ data: z.ZodOptional<z.ZodString>;
296
+ value: z.ZodOptional<z.ZodString>;
297
+ chainId: z.ZodOptional<z.ZodNumber>;
298
+ description: z.ZodOptional<z.ZodString>;
299
+ contractName: z.ZodOptional<z.ZodString>;
300
+ contractVerified: z.ZodOptional<z.ZodBoolean>;
301
+ protocolName: z.ZodOptional<z.ZodString>;
302
+ contractIcon: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>>>;
304
+ requiresApproval: z.ZodOptional<z.ZodBoolean>;
305
+ verificationUnavailable: z.ZodOptional<z.ZodBoolean>;
306
+ }, z.core.$strip>>>;
307
+ needs_confirmation: z.ZodOptional<z.ZodBoolean>;
308
+ notes: z.ZodOptional<z.ZodString>;
109
309
  risks: z.ZodOptional<z.ZodObject<{
110
- level: z.ZodEnum<{
111
- low: "low";
112
- medium: "medium";
113
- high: "high";
114
- critical: "critical";
115
- }>;
116
- warnings: z.ZodArray<z.ZodString>;
310
+ level: z.ZodOptional<z.ZodString>;
117
311
  blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
312
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
313
+ info: z.ZodOptional<z.ZodArray<z.ZodObject<{
314
+ id: z.ZodOptional<z.ZodString>;
315
+ severity: z.ZodOptional<z.ZodEnum<{
316
+ info: "info";
317
+ warning: "warning";
318
+ error: "error";
319
+ critical: "critical";
320
+ }>>;
321
+ title: z.ZodOptional<z.ZodString>;
322
+ message: z.ZodOptional<z.ZodString>;
323
+ }, z.core.$strip>>>;
118
324
  }, z.core.$strip>>;
325
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
+ tool_params: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
327
+ tool_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
119
328
  }, z.core.$strip>;
120
329
  export declare const InteractiveOptionSchema: z.ZodObject<{
121
330
  id: z.ZodString;
122
331
  label: z.ZodString;
123
332
  description: z.ZodOptional<z.ZodString>;
333
+ value: z.ZodOptional<z.ZodUnknown>;
124
334
  }, z.core.$strip>;
125
- export declare const InteractiveCardBlockSchema: z.ZodObject<{
126
- type: z.ZodLiteral<"interactive_card">;
127
- title: z.ZodString;
128
- body: z.ZodOptional<z.ZodString>;
129
- style: z.ZodEnum<{
130
- options: "options";
131
- confirm_cancel: "confirm_cancel";
132
- }>;
335
+ export declare const InteractiveBlockSchema: z.ZodObject<{
336
+ blockType: z.ZodLiteral<"interactive">;
337
+ prompt: z.ZodOptional<z.ZodString>;
133
338
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
134
339
  id: z.ZodString;
135
340
  label: z.ZodString;
136
341
  description: z.ZodOptional<z.ZodString>;
342
+ value: z.ZodOptional<z.ZodUnknown>;
137
343
  }, z.core.$strip>>>;
344
+ allowCustom: z.ZodOptional<z.ZodBoolean>;
345
+ multiSelect: z.ZodOptional<z.ZodBoolean>;
138
346
  }, z.core.$strip>;
139
- export declare const TimeseriesDataPointSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
140
- export declare const TimeseriesSeriesSchema: z.ZodObject<{
141
- label: z.ZodString;
142
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
143
- }, z.core.$strip>;
144
- export declare const TimeseriesDataSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
145
- label: z.ZodString;
146
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
147
- }, z.core.$strip>>>;
148
- export declare const TimeseriesBlockSchema: z.ZodObject<{
149
- type: z.ZodLiteral<"timeseries">;
150
- title: z.ZodString;
151
- data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
152
- label: z.ZodString;
153
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
154
- }, z.core.$strip>>>;
155
- }, z.core.$strip>;
156
- export declare const PieChartBlockSchema: z.ZodObject<{
157
- type: z.ZodLiteral<"pie_chart">;
158
- title: z.ZodString;
159
- data: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
160
- }, z.core.$strip>;
161
- export declare const BlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
162
- type: z.ZodLiteral<"table">;
347
+ export declare function detectBlockType(raw: unknown): 'markdown' | 'table' | 'chart' | 'transaction_action' | 'interactive' | 'unknown';
348
+ export declare function parseRawBlock(raw: unknown): {
349
+ success: true;
350
+ data: unknown;
351
+ type: string;
352
+ } | {
353
+ success: false;
354
+ error: string;
355
+ };
356
+ export declare const BlockSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
357
+ content: z.ZodString;
358
+ }, z.core.$strip>, z.ZodTransform<{
359
+ content: string;
360
+ type: "markdown";
361
+ }, {
362
+ content: string;
363
+ }>>, z.ZodPipe<z.ZodObject<{
364
+ blockType: z.ZodLiteral<"table">;
163
365
  title: z.ZodString;
164
366
  tableHeaders: z.ZodArray<z.ZodString>;
165
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
166
- }, z.core.$strip>, z.ZodObject<{
167
- type: z.ZodLiteral<"markdown">;
168
- content: z.ZodString;
169
- }, z.core.$strip>, z.ZodObject<{
170
- type: z.ZodLiteral<"transaction_action">;
367
+ tableRows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
368
+ tableHeadersTypes: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
369
+ number: "number";
370
+ boolean: "boolean";
371
+ text: "text";
372
+ currency: "currency";
373
+ percentage: "percentage";
374
+ token: "token";
375
+ date: "date";
376
+ link: "link";
377
+ }>, z.ZodLiteral<"currency">, z.ZodLiteral<"percentage">]>>>>;
378
+ tableColumnConfigs: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
379
+ type: z.ZodOptional<z.ZodEnum<{
380
+ number: "number";
381
+ boolean: "boolean";
382
+ text: "text";
383
+ currency: "currency";
384
+ percentage: "percentage";
385
+ token: "token";
386
+ date: "date";
387
+ link: "link";
388
+ }>>;
389
+ sortable: z.ZodOptional<z.ZodBoolean>;
390
+ align: z.ZodOptional<z.ZodEnum<{
391
+ left: "left";
392
+ center: "center";
393
+ right: "right";
394
+ }>>;
395
+ width: z.ZodOptional<z.ZodString>;
396
+ }, z.core.$strip>>>>;
397
+ tableHeadersMetadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
398
+ type: z.ZodOptional<z.ZodString>;
399
+ }, z.core.$loose>>>>;
400
+ sourceName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
401
+ defaultSortColumn: z.ZodNullable<z.ZodOptional<z.ZodString>>;
402
+ defaultSortDirection: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
403
+ asc: "asc";
404
+ desc: "desc";
405
+ }>>>;
406
+ maxRows: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
407
+ searchable: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
408
+ exportable: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
409
+ tool_params: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
410
+ tool_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
411
+ }, z.core.$strip>, z.ZodTransform<{
412
+ blockType: "table";
413
+ title: string;
414
+ tableHeaders: string[];
415
+ tableRows: (string | number | boolean | null)[][];
416
+ tableHeadersTypes?: Record<string, "number" | "boolean" | "text" | "currency" | "percentage" | "token" | "date" | "link"> | null | undefined;
417
+ tableColumnConfigs?: Record<string, {
418
+ type?: "number" | "boolean" | "text" | "currency" | "percentage" | "token" | "date" | "link" | undefined;
419
+ sortable?: boolean | undefined;
420
+ align?: "left" | "center" | "right" | undefined;
421
+ width?: string | undefined;
422
+ }> | null | undefined;
423
+ tableHeadersMetadata?: Record<string, {
424
+ [x: string]: unknown;
425
+ type?: string | undefined;
426
+ }> | null | undefined;
427
+ sourceName?: string | null | undefined;
428
+ defaultSortColumn?: string | null | undefined;
429
+ defaultSortDirection?: "asc" | "desc" | null | undefined;
430
+ maxRows?: number | null | undefined;
431
+ searchable?: boolean | null | undefined;
432
+ exportable?: boolean | null | undefined;
433
+ tool_params?: unknown;
434
+ tool_name?: string | null | undefined;
435
+ type: "table";
436
+ }, {
437
+ blockType: "table";
438
+ title: string;
439
+ tableHeaders: string[];
440
+ tableRows: (string | number | boolean | null)[][];
441
+ tableHeadersTypes?: Record<string, "number" | "boolean" | "text" | "currency" | "percentage" | "token" | "date" | "link"> | null | undefined;
442
+ tableColumnConfigs?: Record<string, {
443
+ type?: "number" | "boolean" | "text" | "currency" | "percentage" | "token" | "date" | "link" | undefined;
444
+ sortable?: boolean | undefined;
445
+ align?: "left" | "center" | "right" | undefined;
446
+ width?: string | undefined;
447
+ }> | null | undefined;
448
+ tableHeadersMetadata?: Record<string, {
449
+ [x: string]: unknown;
450
+ type?: string | undefined;
451
+ }> | null | undefined;
452
+ sourceName?: string | null | undefined;
453
+ defaultSortColumn?: string | null | undefined;
454
+ defaultSortDirection?: "asc" | "desc" | null | undefined;
455
+ maxRows?: number | null | undefined;
456
+ searchable?: boolean | null | undefined;
457
+ exportable?: boolean | null | undefined;
458
+ tool_params?: unknown;
459
+ tool_name?: string | null | undefined;
460
+ }>>, z.ZodPipe<z.ZodObject<{
461
+ blockType: z.ZodLiteral<"chart">;
171
462
  title: z.ZodString;
172
- primitives: z.ZodArray<z.ZodObject<{
463
+ chartType: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
464
+ pie: "pie";
465
+ donut: "donut";
466
+ line: "line";
467
+ area: "area";
468
+ bar: "bar";
469
+ timeseries: "timeseries";
470
+ }>>>;
471
+ series: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
472
+ name: z.ZodString;
473
+ data: z.ZodArray<z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
474
+ x: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
475
+ y: z.ZodNumber;
476
+ }, z.core.$strip>, z.ZodArray<z.ZodUnknown>]>>;
477
+ color: z.ZodOptional<z.ZodString>;
478
+ }, z.core.$strip>>>>;
479
+ segments: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
480
+ label: z.ZodString;
481
+ value: z.ZodNumber;
482
+ color: z.ZodOptional<z.ZodString>;
483
+ }, z.core.$strip>>>>;
484
+ data: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>>>;
485
+ categories: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString>>>;
486
+ xAxis: z.ZodNullable<z.ZodOptional<z.ZodObject<{
487
+ title: z.ZodOptional<z.ZodString>;
488
+ min: z.ZodOptional<z.ZodNumber>;
489
+ max: z.ZodOptional<z.ZodNumber>;
490
+ type: z.ZodOptional<z.ZodString>;
491
+ }, z.core.$strip>>>;
492
+ yAxis: z.ZodNullable<z.ZodOptional<z.ZodObject<{
493
+ title: z.ZodOptional<z.ZodString>;
494
+ min: z.ZodOptional<z.ZodNumber>;
495
+ max: z.ZodOptional<z.ZodNumber>;
496
+ type: z.ZodOptional<z.ZodString>;
497
+ }, z.core.$strip>>>;
498
+ isCurrency: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
499
+ sourceName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
500
+ timeframe: z.ZodNullable<z.ZodOptional<z.ZodString>>;
501
+ tool_params: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
502
+ tool_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
503
+ }, z.core.$strip>, z.ZodTransform<{
504
+ blockType: "chart";
505
+ title: string;
506
+ chartType?: "pie" | "donut" | "line" | "area" | "bar" | "timeseries" | null | undefined;
507
+ series?: {
508
+ name: string;
509
+ data: ([number, number] | unknown[] | {
510
+ x: string | number;
511
+ y: number;
512
+ })[];
513
+ color?: string | undefined;
514
+ }[] | null | undefined;
515
+ segments?: {
516
+ label: string;
517
+ value: number;
518
+ color?: string | undefined;
519
+ }[] | null | undefined;
520
+ data?: [string, number][] | null | undefined;
521
+ categories?: string[] | null | undefined;
522
+ xAxis?: {
523
+ title?: string | undefined;
524
+ min?: number | undefined;
525
+ max?: number | undefined;
526
+ type?: string | undefined;
527
+ } | null | undefined;
528
+ yAxis?: {
529
+ title?: string | undefined;
530
+ min?: number | undefined;
531
+ max?: number | undefined;
532
+ type?: string | undefined;
533
+ } | null | undefined;
534
+ isCurrency?: boolean | null | undefined;
535
+ sourceName?: string | null | undefined;
536
+ timeframe?: string | null | undefined;
537
+ tool_params?: unknown;
538
+ tool_name?: string | null | undefined;
539
+ type: "chart";
540
+ }, {
541
+ blockType: "chart";
542
+ title: string;
543
+ chartType?: "pie" | "donut" | "line" | "area" | "bar" | "timeseries" | null | undefined;
544
+ series?: {
545
+ name: string;
546
+ data: ([number, number] | unknown[] | {
547
+ x: string | number;
548
+ y: number;
549
+ })[];
550
+ color?: string | undefined;
551
+ }[] | null | undefined;
552
+ segments?: {
553
+ label: string;
554
+ value: number;
555
+ color?: string | undefined;
556
+ }[] | null | undefined;
557
+ data?: [string, number][] | null | undefined;
558
+ categories?: string[] | null | undefined;
559
+ xAxis?: {
560
+ title?: string | undefined;
561
+ min?: number | undefined;
562
+ max?: number | undefined;
563
+ type?: string | undefined;
564
+ } | null | undefined;
565
+ yAxis?: {
566
+ title?: string | undefined;
567
+ min?: number | undefined;
568
+ max?: number | undefined;
569
+ type?: string | undefined;
570
+ } | null | undefined;
571
+ isCurrency?: boolean | null | undefined;
572
+ sourceName?: string | null | undefined;
573
+ timeframe?: string | null | undefined;
574
+ tool_params?: unknown;
575
+ tool_name?: string | null | undefined;
576
+ }>>, z.ZodPipe<z.ZodObject<{
577
+ blockType: z.ZodLiteral<"transaction_action">;
578
+ value: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
579
+ sequence: z.ZodOptional<z.ZodBoolean>;
580
+ primitives: z.ZodOptional<z.ZodArray<z.ZodObject<{
173
581
  primitive: z.ZodString;
174
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
582
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
175
583
  display: z.ZodOptional<z.ZodObject<{
176
- headline: z.ZodString;
177
- amount: z.ZodOptional<z.ZodString>;
584
+ headline: z.ZodOptional<z.ZodString>;
178
585
  action_verb: z.ZodOptional<z.ZodString>;
179
- from_asset: z.ZodOptional<z.ZodString>;
180
- to_asset: z.ZodOptional<z.ZodString>;
181
- from_chain: z.ZodOptional<z.ZodString>;
182
- to_chain: z.ZodOptional<z.ZodString>;
183
- protocol: z.ZodOptional<z.ZodString>;
184
- leverage: z.ZodOptional<z.ZodString>;
185
- direction: z.ZodOptional<z.ZodString>;
186
- recipient: z.ZodOptional<z.ZodString>;
586
+ primary_icon: z.ZodOptional<z.ZodObject<{
587
+ type: z.ZodString;
588
+ value: z.ZodString;
589
+ }, z.core.$strip>>;
590
+ secondary_icon: z.ZodOptional<z.ZodObject<{
591
+ type: z.ZodString;
592
+ value: z.ZodString;
593
+ }, z.core.$strip>>;
594
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
595
+ label: z.ZodString;
596
+ value: z.ZodString;
597
+ icon: z.ZodOptional<z.ZodObject<{
598
+ type: z.ZodString;
599
+ value: z.ZodString;
600
+ }, z.core.$strip>>;
601
+ }, z.core.$strip>>>;
187
602
  }, z.core.$strip>>;
188
- }, z.core.$strip>>;
603
+ }, z.core.$strip>>>;
604
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
605
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
606
+ to: z.ZodOptional<z.ZodString>;
607
+ data: z.ZodOptional<z.ZodString>;
608
+ value: z.ZodOptional<z.ZodString>;
609
+ chainId: z.ZodOptional<z.ZodNumber>;
610
+ description: z.ZodOptional<z.ZodString>;
611
+ contractName: z.ZodOptional<z.ZodString>;
612
+ contractVerified: z.ZodOptional<z.ZodBoolean>;
613
+ protocolName: z.ZodOptional<z.ZodString>;
614
+ contractIcon: z.ZodOptional<z.ZodString>;
615
+ }, z.core.$strip>>>;
616
+ requiresApproval: z.ZodOptional<z.ZodBoolean>;
617
+ verificationUnavailable: z.ZodOptional<z.ZodBoolean>;
618
+ }, z.core.$strip>>>;
619
+ needs_confirmation: z.ZodOptional<z.ZodBoolean>;
620
+ notes: z.ZodOptional<z.ZodString>;
189
621
  risks: z.ZodOptional<z.ZodObject<{
190
- level: z.ZodEnum<{
191
- low: "low";
192
- medium: "medium";
193
- high: "high";
194
- critical: "critical";
195
- }>;
196
- warnings: z.ZodArray<z.ZodString>;
622
+ level: z.ZodOptional<z.ZodString>;
197
623
  blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
624
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
625
+ info: z.ZodOptional<z.ZodArray<z.ZodObject<{
626
+ id: z.ZodOptional<z.ZodString>;
627
+ severity: z.ZodOptional<z.ZodEnum<{
628
+ info: "info";
629
+ warning: "warning";
630
+ error: "error";
631
+ critical: "critical";
632
+ }>>;
633
+ title: z.ZodOptional<z.ZodString>;
634
+ message: z.ZodOptional<z.ZodString>;
635
+ }, z.core.$strip>>>;
198
636
  }, z.core.$strip>>;
199
- }, z.core.$strip>, z.ZodObject<{
200
- type: z.ZodLiteral<"interactive_card">;
201
- title: z.ZodString;
202
- body: z.ZodOptional<z.ZodString>;
203
- style: z.ZodEnum<{
204
- options: "options";
205
- confirm_cancel: "confirm_cancel";
206
- }>;
637
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
638
+ tool_params: z.ZodNullable<z.ZodOptional<z.ZodUnknown>>;
639
+ tool_name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
640
+ }, z.core.$strip>, z.ZodTransform<{
641
+ blockType: "transaction_action";
642
+ value?: Record<string, unknown> | undefined;
643
+ sequence?: boolean | undefined;
644
+ primitives?: {
645
+ primitive: string;
646
+ params?: Record<string, unknown> | undefined;
647
+ display?: {
648
+ headline?: string | undefined;
649
+ action_verb?: string | undefined;
650
+ primary_icon?: {
651
+ type: string;
652
+ value: string;
653
+ } | undefined;
654
+ secondary_icon?: {
655
+ type: string;
656
+ value: string;
657
+ } | undefined;
658
+ line_items?: {
659
+ label: string;
660
+ value: string;
661
+ icon?: {
662
+ type: string;
663
+ value: string;
664
+ } | undefined;
665
+ }[] | undefined;
666
+ } | undefined;
667
+ }[] | undefined;
668
+ transactions?: {
669
+ transactions?: {
670
+ to?: string | undefined;
671
+ data?: string | undefined;
672
+ value?: string | undefined;
673
+ chainId?: number | undefined;
674
+ description?: string | undefined;
675
+ contractName?: string | undefined;
676
+ contractVerified?: boolean | undefined;
677
+ protocolName?: string | undefined;
678
+ contractIcon?: string | undefined;
679
+ }[] | undefined;
680
+ requiresApproval?: boolean | undefined;
681
+ verificationUnavailable?: boolean | undefined;
682
+ }[] | undefined;
683
+ needs_confirmation?: boolean | undefined;
684
+ notes?: string | undefined;
685
+ risks?: {
686
+ level?: string | undefined;
687
+ blockers?: string[] | undefined;
688
+ warnings?: string[] | undefined;
689
+ info?: {
690
+ id?: string | undefined;
691
+ severity?: "info" | "warning" | "error" | "critical" | undefined;
692
+ title?: string | undefined;
693
+ message?: string | undefined;
694
+ }[] | undefined;
695
+ } | undefined;
696
+ metadata?: Record<string, unknown> | undefined;
697
+ tool_params?: unknown;
698
+ tool_name?: string | null | undefined;
699
+ type: "transaction_action";
700
+ }, {
701
+ blockType: "transaction_action";
702
+ value?: Record<string, unknown> | undefined;
703
+ sequence?: boolean | undefined;
704
+ primitives?: {
705
+ primitive: string;
706
+ params?: Record<string, unknown> | undefined;
707
+ display?: {
708
+ headline?: string | undefined;
709
+ action_verb?: string | undefined;
710
+ primary_icon?: {
711
+ type: string;
712
+ value: string;
713
+ } | undefined;
714
+ secondary_icon?: {
715
+ type: string;
716
+ value: string;
717
+ } | undefined;
718
+ line_items?: {
719
+ label: string;
720
+ value: string;
721
+ icon?: {
722
+ type: string;
723
+ value: string;
724
+ } | undefined;
725
+ }[] | undefined;
726
+ } | undefined;
727
+ }[] | undefined;
728
+ transactions?: {
729
+ transactions?: {
730
+ to?: string | undefined;
731
+ data?: string | undefined;
732
+ value?: string | undefined;
733
+ chainId?: number | undefined;
734
+ description?: string | undefined;
735
+ contractName?: string | undefined;
736
+ contractVerified?: boolean | undefined;
737
+ protocolName?: string | undefined;
738
+ contractIcon?: string | undefined;
739
+ }[] | undefined;
740
+ requiresApproval?: boolean | undefined;
741
+ verificationUnavailable?: boolean | undefined;
742
+ }[] | undefined;
743
+ needs_confirmation?: boolean | undefined;
744
+ notes?: string | undefined;
745
+ risks?: {
746
+ level?: string | undefined;
747
+ blockers?: string[] | undefined;
748
+ warnings?: string[] | undefined;
749
+ info?: {
750
+ id?: string | undefined;
751
+ severity?: "info" | "warning" | "error" | "critical" | undefined;
752
+ title?: string | undefined;
753
+ message?: string | undefined;
754
+ }[] | undefined;
755
+ } | undefined;
756
+ metadata?: Record<string, unknown> | undefined;
757
+ tool_params?: unknown;
758
+ tool_name?: string | null | undefined;
759
+ }>>, z.ZodPipe<z.ZodObject<{
760
+ blockType: z.ZodLiteral<"interactive">;
761
+ prompt: z.ZodOptional<z.ZodString>;
207
762
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
208
763
  id: z.ZodString;
209
764
  label: z.ZodString;
210
765
  description: z.ZodOptional<z.ZodString>;
766
+ value: z.ZodOptional<z.ZodUnknown>;
211
767
  }, z.core.$strip>>>;
212
- }, z.core.$strip>, z.ZodObject<{
213
- type: z.ZodLiteral<"timeseries">;
214
- title: z.ZodString;
215
- data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
216
- label: z.ZodString;
217
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
218
- }, z.core.$strip>>>;
219
- }, z.core.$strip>, z.ZodObject<{
220
- type: z.ZodLiteral<"pie_chart">;
221
- title: z.ZodString;
222
- data: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
223
- }, z.core.$strip>], "type">;
224
- export declare const OutputTextSchema: z.ZodObject<{
225
- type: z.ZodLiteral<"output_text">;
226
- text: z.ZodString;
227
- }, z.core.$strip>;
228
- export declare const ChaosBlockSchema: z.ZodObject<{
229
- type: z.ZodLiteral<"chaos.block">;
230
- block: z.ZodDiscriminatedUnion<[z.ZodObject<{
231
- type: z.ZodLiteral<"table">;
232
- title: z.ZodString;
233
- tableHeaders: z.ZodArray<z.ZodString>;
234
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
235
- }, z.core.$strip>, z.ZodObject<{
236
- type: z.ZodLiteral<"markdown">;
237
- content: z.ZodString;
238
- }, z.core.$strip>, z.ZodObject<{
239
- type: z.ZodLiteral<"transaction_action">;
240
- title: z.ZodString;
241
- primitives: z.ZodArray<z.ZodObject<{
242
- primitive: z.ZodString;
243
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
244
- display: z.ZodOptional<z.ZodObject<{
245
- headline: z.ZodString;
246
- amount: z.ZodOptional<z.ZodString>;
247
- action_verb: z.ZodOptional<z.ZodString>;
248
- from_asset: z.ZodOptional<z.ZodString>;
249
- to_asset: z.ZodOptional<z.ZodString>;
250
- from_chain: z.ZodOptional<z.ZodString>;
251
- to_chain: z.ZodOptional<z.ZodString>;
252
- protocol: z.ZodOptional<z.ZodString>;
253
- leverage: z.ZodOptional<z.ZodString>;
254
- direction: z.ZodOptional<z.ZodString>;
255
- recipient: z.ZodOptional<z.ZodString>;
256
- }, z.core.$strip>>;
257
- }, z.core.$strip>>;
258
- risks: z.ZodOptional<z.ZodObject<{
259
- level: z.ZodEnum<{
260
- low: "low";
261
- medium: "medium";
262
- high: "high";
263
- critical: "critical";
264
- }>;
265
- warnings: z.ZodArray<z.ZodString>;
266
- blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
- }, z.core.$strip>>;
268
- }, z.core.$strip>, z.ZodObject<{
269
- type: z.ZodLiteral<"interactive_card">;
270
- title: z.ZodString;
271
- body: z.ZodOptional<z.ZodString>;
272
- style: z.ZodEnum<{
273
- options: "options";
274
- confirm_cancel: "confirm_cancel";
275
- }>;
276
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
- id: z.ZodString;
278
- label: z.ZodString;
279
- description: z.ZodOptional<z.ZodString>;
280
- }, z.core.$strip>>>;
281
- }, z.core.$strip>, z.ZodObject<{
282
- type: z.ZodLiteral<"timeseries">;
283
- title: z.ZodString;
284
- data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
285
- label: z.ZodString;
286
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
287
- }, z.core.$strip>>>;
288
- }, z.core.$strip>, z.ZodObject<{
289
- type: z.ZodLiteral<"pie_chart">;
290
- title: z.ZodString;
291
- data: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
292
- }, z.core.$strip>], "type">;
293
- }, z.core.$strip>;
294
- export declare const ContentPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
295
- type: z.ZodLiteral<"output_text">;
296
- text: z.ZodString;
297
- }, z.core.$strip>, z.ZodObject<{
298
- type: z.ZodLiteral<"chaos.block">;
299
- block: z.ZodDiscriminatedUnion<[z.ZodObject<{
300
- type: z.ZodLiteral<"table">;
301
- title: z.ZodString;
302
- tableHeaders: z.ZodArray<z.ZodString>;
303
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
304
- }, z.core.$strip>, z.ZodObject<{
305
- type: z.ZodLiteral<"markdown">;
306
- content: z.ZodString;
307
- }, z.core.$strip>, z.ZodObject<{
308
- type: z.ZodLiteral<"transaction_action">;
309
- title: z.ZodString;
310
- primitives: z.ZodArray<z.ZodObject<{
311
- primitive: z.ZodString;
312
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
313
- display: z.ZodOptional<z.ZodObject<{
314
- headline: z.ZodString;
315
- amount: z.ZodOptional<z.ZodString>;
316
- action_verb: z.ZodOptional<z.ZodString>;
317
- from_asset: z.ZodOptional<z.ZodString>;
318
- to_asset: z.ZodOptional<z.ZodString>;
319
- from_chain: z.ZodOptional<z.ZodString>;
320
- to_chain: z.ZodOptional<z.ZodString>;
321
- protocol: z.ZodOptional<z.ZodString>;
322
- leverage: z.ZodOptional<z.ZodString>;
323
- direction: z.ZodOptional<z.ZodString>;
324
- recipient: z.ZodOptional<z.ZodString>;
325
- }, z.core.$strip>>;
326
- }, z.core.$strip>>;
327
- risks: z.ZodOptional<z.ZodObject<{
328
- level: z.ZodEnum<{
329
- low: "low";
330
- medium: "medium";
331
- high: "high";
332
- critical: "critical";
333
- }>;
334
- warnings: z.ZodArray<z.ZodString>;
335
- blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
336
- }, z.core.$strip>>;
337
- }, z.core.$strip>, z.ZodObject<{
338
- type: z.ZodLiteral<"interactive_card">;
339
- title: z.ZodString;
340
- body: z.ZodOptional<z.ZodString>;
341
- style: z.ZodEnum<{
342
- options: "options";
343
- confirm_cancel: "confirm_cancel";
344
- }>;
345
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
346
- id: z.ZodString;
347
- label: z.ZodString;
348
- description: z.ZodOptional<z.ZodString>;
349
- }, z.core.$strip>>>;
350
- }, z.core.$strip>, z.ZodObject<{
351
- type: z.ZodLiteral<"timeseries">;
352
- title: z.ZodString;
353
- data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
354
- label: z.ZodString;
355
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
356
- }, z.core.$strip>>>;
357
- }, z.core.$strip>, z.ZodObject<{
358
- type: z.ZodLiteral<"pie_chart">;
359
- title: z.ZodString;
360
- data: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
361
- }, z.core.$strip>], "type">;
362
- }, z.core.$strip>], "type">;
363
- export declare const OutputItemSchema: z.ZodObject<{
364
- type: z.ZodLiteral<"message">;
365
- role: z.ZodLiteral<"assistant">;
366
- content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
367
- type: z.ZodLiteral<"output_text">;
368
- text: z.ZodString;
369
- }, z.core.$strip>, z.ZodObject<{
370
- type: z.ZodLiteral<"chaos.block">;
371
- block: z.ZodDiscriminatedUnion<[z.ZodObject<{
372
- type: z.ZodLiteral<"table">;
373
- title: z.ZodString;
374
- tableHeaders: z.ZodArray<z.ZodString>;
375
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
376
- }, z.core.$strip>, z.ZodObject<{
377
- type: z.ZodLiteral<"markdown">;
378
- content: z.ZodString;
379
- }, z.core.$strip>, z.ZodObject<{
380
- type: z.ZodLiteral<"transaction_action">;
381
- title: z.ZodString;
382
- primitives: z.ZodArray<z.ZodObject<{
383
- primitive: z.ZodString;
384
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
385
- display: z.ZodOptional<z.ZodObject<{
386
- headline: z.ZodString;
387
- amount: z.ZodOptional<z.ZodString>;
388
- action_verb: z.ZodOptional<z.ZodString>;
389
- from_asset: z.ZodOptional<z.ZodString>;
390
- to_asset: z.ZodOptional<z.ZodString>;
391
- from_chain: z.ZodOptional<z.ZodString>;
392
- to_chain: z.ZodOptional<z.ZodString>;
393
- protocol: z.ZodOptional<z.ZodString>;
394
- leverage: z.ZodOptional<z.ZodString>;
395
- direction: z.ZodOptional<z.ZodString>;
396
- recipient: z.ZodOptional<z.ZodString>;
397
- }, z.core.$strip>>;
398
- }, z.core.$strip>>;
399
- risks: z.ZodOptional<z.ZodObject<{
400
- level: z.ZodEnum<{
401
- low: "low";
402
- medium: "medium";
403
- high: "high";
404
- critical: "critical";
405
- }>;
406
- warnings: z.ZodArray<z.ZodString>;
407
- blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
408
- }, z.core.$strip>>;
409
- }, z.core.$strip>, z.ZodObject<{
410
- type: z.ZodLiteral<"interactive_card">;
411
- title: z.ZodString;
412
- body: z.ZodOptional<z.ZodString>;
413
- style: z.ZodEnum<{
414
- options: "options";
415
- confirm_cancel: "confirm_cancel";
416
- }>;
417
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
418
- id: z.ZodString;
419
- label: z.ZodString;
420
- description: z.ZodOptional<z.ZodString>;
421
- }, z.core.$strip>>>;
422
- }, z.core.$strip>, z.ZodObject<{
423
- type: z.ZodLiteral<"timeseries">;
424
- title: z.ZodString;
425
- data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
426
- label: z.ZodString;
427
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
428
- }, z.core.$strip>>>;
429
- }, z.core.$strip>, z.ZodObject<{
430
- type: z.ZodLiteral<"pie_chart">;
431
- title: z.ZodString;
432
- data: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
433
- }, z.core.$strip>], "type">;
434
- }, z.core.$strip>], "type">>;
435
- }, z.core.$strip>;
436
- export declare const ResponseErrorSchema: z.ZodObject<{
437
- message: z.ZodString;
438
- type: z.ZodString;
439
- code: z.ZodString;
440
- }, z.core.$strip>;
441
- export declare const ResponseSchema: z.ZodObject<{
442
- id: z.ZodString;
443
- object: z.ZodLiteral<"response">;
444
- model: z.ZodString;
445
- status: z.ZodEnum<{
446
- completed: "completed";
447
- failed: "failed";
448
- }>;
449
- output: z.ZodArray<z.ZodObject<{
450
- type: z.ZodLiteral<"message">;
451
- role: z.ZodLiteral<"assistant">;
452
- content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
453
- type: z.ZodLiteral<"output_text">;
454
- text: z.ZodString;
455
- }, z.core.$strip>, z.ZodObject<{
456
- type: z.ZodLiteral<"chaos.block">;
457
- block: z.ZodDiscriminatedUnion<[z.ZodObject<{
458
- type: z.ZodLiteral<"table">;
459
- title: z.ZodString;
460
- tableHeaders: z.ZodArray<z.ZodString>;
461
- rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
462
- }, z.core.$strip>, z.ZodObject<{
463
- type: z.ZodLiteral<"markdown">;
464
- content: z.ZodString;
465
- }, z.core.$strip>, z.ZodObject<{
466
- type: z.ZodLiteral<"transaction_action">;
467
- title: z.ZodString;
468
- primitives: z.ZodArray<z.ZodObject<{
469
- primitive: z.ZodString;
470
- params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
471
- display: z.ZodOptional<z.ZodObject<{
472
- headline: z.ZodString;
473
- amount: z.ZodOptional<z.ZodString>;
474
- action_verb: z.ZodOptional<z.ZodString>;
475
- from_asset: z.ZodOptional<z.ZodString>;
476
- to_asset: z.ZodOptional<z.ZodString>;
477
- from_chain: z.ZodOptional<z.ZodString>;
478
- to_chain: z.ZodOptional<z.ZodString>;
479
- protocol: z.ZodOptional<z.ZodString>;
480
- leverage: z.ZodOptional<z.ZodString>;
481
- direction: z.ZodOptional<z.ZodString>;
482
- recipient: z.ZodOptional<z.ZodString>;
483
- }, z.core.$strip>>;
484
- }, z.core.$strip>>;
485
- risks: z.ZodOptional<z.ZodObject<{
486
- level: z.ZodEnum<{
487
- low: "low";
488
- medium: "medium";
489
- high: "high";
490
- critical: "critical";
491
- }>;
492
- warnings: z.ZodArray<z.ZodString>;
493
- blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
494
- }, z.core.$strip>>;
495
- }, z.core.$strip>, z.ZodObject<{
496
- type: z.ZodLiteral<"interactive_card">;
497
- title: z.ZodString;
498
- body: z.ZodOptional<z.ZodString>;
499
- style: z.ZodEnum<{
500
- options: "options";
501
- confirm_cancel: "confirm_cancel";
502
- }>;
503
- options: z.ZodOptional<z.ZodArray<z.ZodObject<{
504
- id: z.ZodString;
505
- label: z.ZodString;
506
- description: z.ZodOptional<z.ZodString>;
507
- }, z.core.$strip>>>;
508
- }, z.core.$strip>, z.ZodObject<{
509
- type: z.ZodLiteral<"timeseries">;
510
- title: z.ZodString;
511
- data: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
512
- label: z.ZodString;
513
- data: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
514
- }, z.core.$strip>>>;
515
- }, z.core.$strip>, z.ZodObject<{
516
- type: z.ZodLiteral<"pie_chart">;
517
- title: z.ZodString;
518
- data: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodNumber], null>>;
519
- }, z.core.$strip>], "type">;
520
- }, z.core.$strip>], "type">>;
521
- }, z.core.$strip>>;
522
- error: z.ZodOptional<z.ZodObject<{
523
- message: z.ZodString;
524
- type: z.ZodString;
525
- code: z.ZodString;
526
- }, z.core.$strip>>;
527
- }, z.core.$strip>;
528
- export type ChaosConfigInput = z.input<typeof ChaosConfigSchema>;
529
- export type CreateResponseParamsInput = z.input<typeof CreateResponseParamsSchema>;
530
- export type InputItemInput = z.input<typeof InputItemSchema>;
531
- export type RequestMetadataInput = z.input<typeof RequestMetadataSchema>;
532
- export type ResponseInput = z.input<typeof ResponseSchema>;
533
- export type OutputItemInput = z.input<typeof OutputItemSchema>;
534
- export type ContentPartInput = z.input<typeof ContentPartSchema>;
535
- export type OutputTextInput = z.input<typeof OutputTextSchema>;
536
- export type ChaosBlockInput = z.input<typeof ChaosBlockSchema>;
537
- export type BlockInput = z.input<typeof BlockSchema>;
538
- export type TableBlockInput = z.input<typeof TableBlockSchema>;
539
- export type MarkdownBlockInput = z.input<typeof MarkdownBlockSchema>;
540
- export type TransactionActionBlockInput = z.input<typeof TransactionActionBlockSchema>;
541
- export type PrimitiveInput = z.input<typeof PrimitiveSchema>;
542
- export type InteractiveCardBlockInput = z.input<typeof InteractiveCardBlockSchema>;
543
- export type InteractiveOptionInput = z.input<typeof InteractiveOptionSchema>;
544
- export type TimeseriesBlockInput = z.input<typeof TimeseriesBlockSchema>;
545
- export type PieChartBlockInput = z.input<typeof PieChartBlockSchema>;
546
- export type RisksInput = z.input<typeof RisksSchema>;
547
- export type ResponseErrorInput = z.input<typeof ResponseErrorSchema>;
768
+ allowCustom: z.ZodOptional<z.ZodBoolean>;
769
+ multiSelect: z.ZodOptional<z.ZodBoolean>;
770
+ }, z.core.$strip>, z.ZodTransform<{
771
+ blockType: "interactive";
772
+ prompt?: string | undefined;
773
+ options?: {
774
+ id: string;
775
+ label: string;
776
+ description?: string | undefined;
777
+ value?: unknown;
778
+ }[] | undefined;
779
+ allowCustom?: boolean | undefined;
780
+ multiSelect?: boolean | undefined;
781
+ type: "interactive";
782
+ }, {
783
+ blockType: "interactive";
784
+ prompt?: string | undefined;
785
+ options?: {
786
+ id: string;
787
+ label: string;
788
+ description?: string | undefined;
789
+ value?: unknown;
790
+ }[] | undefined;
791
+ allowCustom?: boolean | undefined;
792
+ multiSelect?: boolean | undefined;
793
+ }>>]>;
794
+ export type BlockParsed = z.infer<typeof BlockSchema>;