@loopstack/api 0.13.0 → 0.14.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 (131) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/api/src/controllers/sse.controller.d.ts +15 -0
  3. package/dist/api/src/dtos/document-item.dto.d.ts +4 -4
  4. package/dist/api/src/dtos/document-item.dto.js +1 -1
  5. package/dist/api/src/dtos/document-item.dto.js.map +1 -1
  6. package/dist/api/src/dtos/document.dto.d.ts +2 -3
  7. package/dist/api/src/dtos/pipeline-item.dto.d.ts +2 -2
  8. package/dist/api/src/dtos/pipeline-item.dto.js.map +1 -1
  9. package/dist/api/src/dtos/pipeline.dto.d.ts +4 -2
  10. package/dist/api/src/dtos/pipeline.dto.js +16 -0
  11. package/dist/api/src/dtos/pipeline.dto.js.map +1 -1
  12. package/dist/api/src/dtos/workflow-item.dto.d.ts +2 -2
  13. package/dist/api/src/dtos/workflow-item.dto.js +2 -1
  14. package/dist/api/src/dtos/workflow-item.dto.js.map +1 -1
  15. package/dist/api/src/dtos/workflow.dto.d.ts +5 -4
  16. package/dist/api/src/dtos/workflow.dto.js +10 -1
  17. package/dist/api/src/dtos/workflow.dto.js.map +1 -1
  18. package/dist/api/src/index.d.ts +2 -0
  19. package/dist/api/src/index.js +2 -0
  20. package/dist/api/src/index.js.map +1 -1
  21. package/dist/api/src/interfaces/index.d.ts +3 -0
  22. package/dist/api/src/interfaces/index.js +20 -0
  23. package/dist/api/src/interfaces/index.js.map +1 -0
  24. package/dist/api/src/loopstack-api.module.d.ts +1 -1
  25. package/dist/api/src/loopstack-api.module.js +16 -15
  26. package/dist/api/src/loopstack-api.module.js.map +1 -1
  27. package/dist/api/src/services/dashboard.service.d.ts +4 -7
  28. package/dist/api/src/services/dashboard.service.js +11 -19
  29. package/dist/api/src/services/dashboard.service.js.map +1 -1
  30. package/dist/api/src/services/document-api.service.d.ts +2 -2
  31. package/dist/api/src/services/index.d.ts +1 -0
  32. package/dist/api/src/services/namespace-api.service.d.ts +2 -2
  33. package/dist/api/src/services/pipeline-api.service.d.ts +5 -5
  34. package/dist/api/src/services/pipeline-api.service.js +7 -7
  35. package/dist/api/src/services/pipeline-api.service.js.map +1 -1
  36. package/dist/api/src/services/processor-api.service.d.ts +2 -2
  37. package/dist/api/src/services/processor-api.service.js +2 -2
  38. package/dist/api/src/services/processor-api.service.js.map +1 -1
  39. package/dist/api/src/services/sse-event.service.d.ts +13 -0
  40. package/dist/api/src/services/user.service.d.ts +8 -0
  41. package/dist/api/src/services/workflow-api.service.d.ts +3 -3
  42. package/dist/api/src/services/workspace-api.service.d.ts +6 -6
  43. package/dist/controllers/config.controller.js +5 -3
  44. package/dist/controllers/config.controller.js.map +1 -1
  45. package/dist/core/src/persistence/services/pipeline.service.d.ts +2 -2
  46. package/dist/dtos/document-item.dto.d.ts +4 -4
  47. package/dist/dtos/document-item.dto.js +1 -1
  48. package/dist/dtos/document-item.dto.js.map +1 -1
  49. package/dist/dtos/document.dto.d.ts +2 -3
  50. package/dist/dtos/document.dto.js +1 -1
  51. package/dist/dtos/document.dto.js.map +1 -1
  52. package/dist/dtos/pipeline-config.dto.d.ts +5 -1
  53. package/dist/dtos/pipeline-config.dto.js +24 -0
  54. package/dist/dtos/pipeline-config.dto.js.map +1 -1
  55. package/dist/dtos/pipeline-create.dto.d.ts +2 -0
  56. package/dist/dtos/pipeline-create.dto.js +24 -0
  57. package/dist/dtos/pipeline-create.dto.js.map +1 -1
  58. package/dist/dtos/pipeline.dto.d.ts +3 -1
  59. package/dist/dtos/pipeline.dto.js +16 -0
  60. package/dist/dtos/pipeline.dto.js.map +1 -1
  61. package/dist/dtos/workflow.dto.d.ts +5 -4
  62. package/dist/dtos/workflow.dto.js +8 -0
  63. package/dist/dtos/workflow.dto.js.map +1 -1
  64. package/dist/interfaces/document-item.interface.d.ts +24 -0
  65. package/dist/interfaces/document-item.interface.js +3 -0
  66. package/dist/interfaces/document-item.interface.js.map +1 -0
  67. package/dist/interfaces/index.d.ts +1 -0
  68. package/dist/interfaces/index.js +1 -0
  69. package/dist/interfaces/index.js.map +1 -1
  70. package/dist/shared/src/interfaces/document-item.interface.d.ts +24 -0
  71. package/dist/shared/src/interfaces/document-item.interface.js +3 -0
  72. package/dist/shared/src/interfaces/document-item.interface.js.map +1 -0
  73. package/dist/shared/src/schemas/UIPropertiesSchema.d.ts +4 -0
  74. package/dist/shared/src/schemas/UIPropertiesSchema.js +10 -0
  75. package/dist/shared/src/schemas/UIPropertiesSchema.js.map +1 -0
  76. package/dist/shared/src/schemas/assignment.schema.d.ts +5 -0
  77. package/dist/shared/src/schemas/assignment.schema.js +21 -0
  78. package/dist/shared/src/schemas/assignment.schema.js.map +1 -0
  79. package/dist/shared/src/schemas/block.schema.d.ts +2 -0
  80. package/dist/shared/src/schemas/block.schema.js +6 -0
  81. package/dist/shared/src/schemas/block.schema.js.map +1 -0
  82. package/dist/shared/src/schemas/document.schema.d.ts +749 -0
  83. package/dist/shared/src/schemas/document.schema.js +92 -0
  84. package/dist/shared/src/schemas/document.schema.js.map +1 -0
  85. package/dist/shared/src/schemas/index.d.ts +16 -0
  86. package/dist/shared/src/schemas/index.js +33 -0
  87. package/dist/shared/src/schemas/index.js.map +1 -0
  88. package/dist/shared/src/schemas/json-schema.schema.d.ts +4 -0
  89. package/dist/shared/src/schemas/json-schema.schema.js +49 -0
  90. package/dist/shared/src/schemas/json-schema.schema.js.map +1 -0
  91. package/dist/shared/src/schemas/main.schema.d.ts +1001 -0
  92. package/dist/shared/src/schemas/main.schema.js +18 -0
  93. package/dist/shared/src/schemas/main.schema.js.map +1 -0
  94. package/dist/shared/src/schemas/pipeline.schema.d.ts +831 -0
  95. package/dist/shared/src/schemas/pipeline.schema.js +58 -0
  96. package/dist/shared/src/schemas/pipeline.schema.js.map +1 -0
  97. package/dist/shared/src/schemas/startup.schema.d.ts +639 -0
  98. package/dist/shared/src/schemas/startup.schema.js +48 -0
  99. package/dist/shared/src/schemas/startup.schema.js.map +1 -0
  100. package/dist/shared/src/schemas/template-expression.schema.d.ts +2 -0
  101. package/dist/shared/src/schemas/template-expression.schema.js +6 -0
  102. package/dist/shared/src/schemas/template-expression.schema.js.map +1 -0
  103. package/dist/shared/src/schemas/tool-call.schema.d.ts +18 -0
  104. package/dist/shared/src/schemas/tool-call.schema.js +12 -0
  105. package/dist/shared/src/schemas/tool-call.schema.js.map +1 -0
  106. package/dist/shared/src/schemas/tool-config.schema.d.ts +152 -0
  107. package/dist/shared/src/schemas/tool-config.schema.js +12 -0
  108. package/dist/shared/src/schemas/tool-config.schema.js.map +1 -0
  109. package/dist/shared/src/schemas/transition-payload.schema.d.ts +18 -0
  110. package/dist/shared/src/schemas/transition-payload.schema.js +11 -0
  111. package/dist/shared/src/schemas/transition-payload.schema.js.map +1 -0
  112. package/dist/shared/src/schemas/ui-form-element.schema.d.ts +90 -0
  113. package/dist/shared/src/schemas/ui-form-element.schema.js +39 -0
  114. package/dist/shared/src/schemas/ui-form-element.schema.js.map +1 -0
  115. package/dist/shared/src/schemas/ui-form.schema.d.ts +250 -0
  116. package/dist/shared/src/schemas/ui-form.schema.js +36 -0
  117. package/dist/shared/src/schemas/ui-form.schema.js.map +1 -0
  118. package/dist/shared/src/schemas/ui-properties-schema.d.ts +4 -0
  119. package/dist/shared/src/schemas/ui-properties-schema.js +10 -0
  120. package/dist/shared/src/schemas/ui-properties-schema.js.map +1 -0
  121. package/dist/shared/src/schemas/workflow-transition.schema.d.ts +49 -0
  122. package/dist/shared/src/schemas/workflow-transition.schema.js +18 -0
  123. package/dist/shared/src/schemas/workflow-transition.schema.js.map +1 -0
  124. package/dist/shared/src/schemas/workflow.schema.d.ts +390 -0
  125. package/dist/shared/src/schemas/workflow.schema.js +22 -0
  126. package/dist/shared/src/schemas/workflow.schema.js.map +1 -0
  127. package/dist/shared/src/schemas/workspace.schema.d.ts +15 -0
  128. package/dist/shared/src/schemas/workspace.schema.js +11 -0
  129. package/dist/shared/src/schemas/workspace.schema.js.map +1 -0
  130. package/dist/tsconfig.tsbuildinfo +1 -1
  131. package/package.json +4 -4
@@ -0,0 +1,749 @@
1
+ import { z } from 'zod';
2
+ export declare const MimeTypeSchema: z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>;
3
+ export type MimeType = z.infer<typeof MimeTypeSchema>;
4
+ export declare const DocumentConfigSchema: z.ZodObject<{
5
+ type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"document">>>;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ content: z.ZodOptional<z.ZodAny>;
8
+ ui: z.ZodOptional<z.ZodObject<{
9
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
10
+ transition: z.ZodString;
11
+ widget: z.ZodOptional<z.ZodString>;
12
+ enabledWhen: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
+ } & {
14
+ type: z.ZodLiteral<"button">;
15
+ options: z.ZodOptional<z.ZodObject<{
16
+ position: z.ZodOptional<z.ZodNumber>;
17
+ label: z.ZodOptional<z.ZodString>;
18
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ position?: number | undefined;
21
+ label?: string | undefined;
22
+ props?: Record<string, any> | undefined;
23
+ }, {
24
+ position?: number | undefined;
25
+ label?: string | undefined;
26
+ props?: Record<string, any> | undefined;
27
+ }>>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ transition: string;
30
+ type: "button";
31
+ widget?: string | undefined;
32
+ options?: {
33
+ position?: number | undefined;
34
+ label?: string | undefined;
35
+ props?: Record<string, any> | undefined;
36
+ } | undefined;
37
+ enabledWhen?: string[] | undefined;
38
+ }, {
39
+ transition: string;
40
+ type: "button";
41
+ widget?: string | undefined;
42
+ options?: {
43
+ position?: number | undefined;
44
+ label?: string | undefined;
45
+ props?: Record<string, any> | undefined;
46
+ } | undefined;
47
+ enabledWhen?: string[] | undefined;
48
+ }>, z.ZodObject<{
49
+ transition: z.ZodString;
50
+ widget: z.ZodOptional<z.ZodString>;
51
+ enabledWhen: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52
+ } & {
53
+ type: z.ZodLiteral<"custom">;
54
+ options: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ transition: string;
57
+ type: "custom";
58
+ widget?: string | undefined;
59
+ options?: {} | undefined;
60
+ enabledWhen?: string[] | undefined;
61
+ }, {
62
+ transition: string;
63
+ type: "custom";
64
+ widget?: string | undefined;
65
+ options?: {} | undefined;
66
+ enabledWhen?: string[] | undefined;
67
+ }>]>, "many">>;
68
+ parameters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ actions?: ({
71
+ transition: string;
72
+ type: "button";
73
+ widget?: string | undefined;
74
+ options?: {
75
+ position?: number | undefined;
76
+ label?: string | undefined;
77
+ props?: Record<string, any> | undefined;
78
+ } | undefined;
79
+ enabledWhen?: string[] | undefined;
80
+ } | {
81
+ transition: string;
82
+ type: "custom";
83
+ widget?: string | undefined;
84
+ options?: {} | undefined;
85
+ enabledWhen?: string[] | undefined;
86
+ })[] | undefined;
87
+ parameters?: any;
88
+ }, {
89
+ actions?: ({
90
+ transition: string;
91
+ type: "button";
92
+ widget?: string | undefined;
93
+ options?: {
94
+ position?: number | undefined;
95
+ label?: string | undefined;
96
+ props?: Record<string, any> | undefined;
97
+ } | undefined;
98
+ enabledWhen?: string[] | undefined;
99
+ } | {
100
+ transition: string;
101
+ type: "custom";
102
+ widget?: string | undefined;
103
+ options?: {} | undefined;
104
+ enabledWhen?: string[] | undefined;
105
+ })[] | undefined;
106
+ parameters?: any;
107
+ }>>;
108
+ tags: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
109
+ meta: z.ZodOptional<z.ZodObject<{
110
+ hidden: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
111
+ mimeType: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>, z.ZodString]>>;
112
+ invalidate: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
113
+ level: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"debug">, z.ZodLiteral<"info">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>>;
114
+ enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
115
+ hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
116
+ data: z.ZodOptional<z.ZodAny>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ hidden?: string | boolean | undefined;
119
+ mimeType?: string | undefined;
120
+ invalidate?: string | boolean | undefined;
121
+ level?: string | undefined;
122
+ enableAtPlaces?: string[] | undefined;
123
+ hideAtPlaces?: string[] | undefined;
124
+ data?: any;
125
+ }, {
126
+ hidden?: string | boolean | undefined;
127
+ mimeType?: string | undefined;
128
+ invalidate?: string | boolean | undefined;
129
+ level?: string | undefined;
130
+ enableAtPlaces?: string[] | undefined;
131
+ hideAtPlaces?: string[] | undefined;
132
+ data?: any;
133
+ }>>;
134
+ }, "strip", z.ZodTypeAny, {
135
+ type?: "document" | undefined;
136
+ description?: string | undefined;
137
+ ui?: {
138
+ actions?: ({
139
+ transition: string;
140
+ type: "button";
141
+ widget?: string | undefined;
142
+ options?: {
143
+ position?: number | undefined;
144
+ label?: string | undefined;
145
+ props?: Record<string, any> | undefined;
146
+ } | undefined;
147
+ enabledWhen?: string[] | undefined;
148
+ } | {
149
+ transition: string;
150
+ type: "custom";
151
+ widget?: string | undefined;
152
+ options?: {} | undefined;
153
+ enabledWhen?: string[] | undefined;
154
+ })[] | undefined;
155
+ parameters?: any;
156
+ } | undefined;
157
+ content?: any;
158
+ tags?: string | string[] | undefined;
159
+ meta?: {
160
+ hidden?: string | boolean | undefined;
161
+ mimeType?: string | undefined;
162
+ invalidate?: string | boolean | undefined;
163
+ level?: string | undefined;
164
+ enableAtPlaces?: string[] | undefined;
165
+ hideAtPlaces?: string[] | undefined;
166
+ data?: any;
167
+ } | undefined;
168
+ }, {
169
+ type?: "document" | undefined;
170
+ description?: string | undefined;
171
+ ui?: {
172
+ actions?: ({
173
+ transition: string;
174
+ type: "button";
175
+ widget?: string | undefined;
176
+ options?: {
177
+ position?: number | undefined;
178
+ label?: string | undefined;
179
+ props?: Record<string, any> | undefined;
180
+ } | undefined;
181
+ enabledWhen?: string[] | undefined;
182
+ } | {
183
+ transition: string;
184
+ type: "custom";
185
+ widget?: string | undefined;
186
+ options?: {} | undefined;
187
+ enabledWhen?: string[] | undefined;
188
+ })[] | undefined;
189
+ parameters?: any;
190
+ } | undefined;
191
+ content?: any;
192
+ tags?: string | string[] | undefined;
193
+ meta?: {
194
+ hidden?: string | boolean | undefined;
195
+ mimeType?: string | undefined;
196
+ invalidate?: string | boolean | undefined;
197
+ level?: string | undefined;
198
+ enableAtPlaces?: string[] | undefined;
199
+ hideAtPlaces?: string[] | undefined;
200
+ data?: any;
201
+ } | undefined;
202
+ }>;
203
+ export type DocumentConfigType = z.infer<typeof DocumentConfigSchema>;
204
+ export declare const DocumentSchema: z.ZodObject<{
205
+ type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"document">>>;
206
+ description: z.ZodOptional<z.ZodString>;
207
+ content: z.ZodOptional<z.ZodAny>;
208
+ ui: z.ZodOptional<z.ZodObject<{
209
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
210
+ transition: z.ZodString;
211
+ widget: z.ZodOptional<z.ZodString>;
212
+ enabledWhen: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
213
+ } & {
214
+ type: z.ZodLiteral<"button">;
215
+ options: z.ZodOptional<z.ZodObject<{
216
+ position: z.ZodOptional<z.ZodNumber>;
217
+ label: z.ZodOptional<z.ZodString>;
218
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ position?: number | undefined;
221
+ label?: string | undefined;
222
+ props?: Record<string, any> | undefined;
223
+ }, {
224
+ position?: number | undefined;
225
+ label?: string | undefined;
226
+ props?: Record<string, any> | undefined;
227
+ }>>;
228
+ }, "strip", z.ZodTypeAny, {
229
+ transition: string;
230
+ type: "button";
231
+ widget?: string | undefined;
232
+ options?: {
233
+ position?: number | undefined;
234
+ label?: string | undefined;
235
+ props?: Record<string, any> | undefined;
236
+ } | undefined;
237
+ enabledWhen?: string[] | undefined;
238
+ }, {
239
+ transition: string;
240
+ type: "button";
241
+ widget?: string | undefined;
242
+ options?: {
243
+ position?: number | undefined;
244
+ label?: string | undefined;
245
+ props?: Record<string, any> | undefined;
246
+ } | undefined;
247
+ enabledWhen?: string[] | undefined;
248
+ }>, z.ZodObject<{
249
+ transition: z.ZodString;
250
+ widget: z.ZodOptional<z.ZodString>;
251
+ enabledWhen: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
252
+ } & {
253
+ type: z.ZodLiteral<"custom">;
254
+ options: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ transition: string;
257
+ type: "custom";
258
+ widget?: string | undefined;
259
+ options?: {} | undefined;
260
+ enabledWhen?: string[] | undefined;
261
+ }, {
262
+ transition: string;
263
+ type: "custom";
264
+ widget?: string | undefined;
265
+ options?: {} | undefined;
266
+ enabledWhen?: string[] | undefined;
267
+ }>]>, "many">>;
268
+ parameters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ actions?: ({
271
+ transition: string;
272
+ type: "button";
273
+ widget?: string | undefined;
274
+ options?: {
275
+ position?: number | undefined;
276
+ label?: string | undefined;
277
+ props?: Record<string, any> | undefined;
278
+ } | undefined;
279
+ enabledWhen?: string[] | undefined;
280
+ } | {
281
+ transition: string;
282
+ type: "custom";
283
+ widget?: string | undefined;
284
+ options?: {} | undefined;
285
+ enabledWhen?: string[] | undefined;
286
+ })[] | undefined;
287
+ parameters?: any;
288
+ }, {
289
+ actions?: ({
290
+ transition: string;
291
+ type: "button";
292
+ widget?: string | undefined;
293
+ options?: {
294
+ position?: number | undefined;
295
+ label?: string | undefined;
296
+ props?: Record<string, any> | undefined;
297
+ } | undefined;
298
+ enabledWhen?: string[] | undefined;
299
+ } | {
300
+ transition: string;
301
+ type: "custom";
302
+ widget?: string | undefined;
303
+ options?: {} | undefined;
304
+ enabledWhen?: string[] | undefined;
305
+ })[] | undefined;
306
+ parameters?: any;
307
+ }>>;
308
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
309
+ meta: z.ZodOptional<z.ZodObject<{
310
+ hidden: z.ZodOptional<z.ZodBoolean>;
311
+ mimeType: z.ZodOptional<z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>>;
312
+ invalidate: z.ZodOptional<z.ZodBoolean>;
313
+ level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"debug">, z.ZodLiteral<"info">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>>;
314
+ enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
315
+ hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
316
+ data: z.ZodOptional<z.ZodAny>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ hidden?: boolean | undefined;
319
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
320
+ invalidate?: boolean | undefined;
321
+ level?: "debug" | "info" | "warning" | "error" | undefined;
322
+ enableAtPlaces?: string[] | undefined;
323
+ hideAtPlaces?: string[] | undefined;
324
+ data?: any;
325
+ }, {
326
+ hidden?: boolean | undefined;
327
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
328
+ invalidate?: boolean | undefined;
329
+ level?: "debug" | "info" | "warning" | "error" | undefined;
330
+ enableAtPlaces?: string[] | undefined;
331
+ hideAtPlaces?: string[] | undefined;
332
+ data?: any;
333
+ }>>;
334
+ }, "strip", z.ZodTypeAny, {
335
+ type?: "document" | undefined;
336
+ description?: string | undefined;
337
+ ui?: {
338
+ actions?: ({
339
+ transition: string;
340
+ type: "button";
341
+ widget?: string | undefined;
342
+ options?: {
343
+ position?: number | undefined;
344
+ label?: string | undefined;
345
+ props?: Record<string, any> | undefined;
346
+ } | undefined;
347
+ enabledWhen?: string[] | undefined;
348
+ } | {
349
+ transition: string;
350
+ type: "custom";
351
+ widget?: string | undefined;
352
+ options?: {} | undefined;
353
+ enabledWhen?: string[] | undefined;
354
+ })[] | undefined;
355
+ parameters?: any;
356
+ } | undefined;
357
+ content?: any;
358
+ tags?: string[] | undefined;
359
+ meta?: {
360
+ hidden?: boolean | undefined;
361
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
362
+ invalidate?: boolean | undefined;
363
+ level?: "debug" | "info" | "warning" | "error" | undefined;
364
+ enableAtPlaces?: string[] | undefined;
365
+ hideAtPlaces?: string[] | undefined;
366
+ data?: any;
367
+ } | undefined;
368
+ }, {
369
+ type?: "document" | undefined;
370
+ description?: string | undefined;
371
+ ui?: {
372
+ actions?: ({
373
+ transition: string;
374
+ type: "button";
375
+ widget?: string | undefined;
376
+ options?: {
377
+ position?: number | undefined;
378
+ label?: string | undefined;
379
+ props?: Record<string, any> | undefined;
380
+ } | undefined;
381
+ enabledWhen?: string[] | undefined;
382
+ } | {
383
+ transition: string;
384
+ type: "custom";
385
+ widget?: string | undefined;
386
+ options?: {} | undefined;
387
+ enabledWhen?: string[] | undefined;
388
+ })[] | undefined;
389
+ parameters?: any;
390
+ } | undefined;
391
+ content?: any;
392
+ tags?: string[] | undefined;
393
+ meta?: {
394
+ hidden?: boolean | undefined;
395
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
396
+ invalidate?: boolean | undefined;
397
+ level?: "debug" | "info" | "warning" | "error" | undefined;
398
+ enableAtPlaces?: string[] | undefined;
399
+ hideAtPlaces?: string[] | undefined;
400
+ data?: any;
401
+ } | undefined;
402
+ }>;
403
+ export type DocumentType = z.infer<typeof DocumentSchema>;
404
+ export declare const DocumentMessageContentSchema: z.ZodObject<{
405
+ role: z.ZodEnum<["user", "assistant", "system"]>;
406
+ content: z.ZodOptional<z.ZodString>;
407
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
408
+ id: z.ZodString;
409
+ type: z.ZodString;
410
+ function: z.ZodObject<{
411
+ name: z.ZodString;
412
+ arguments: z.ZodOptional<z.ZodString>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ name: string;
415
+ arguments?: string | undefined;
416
+ }, {
417
+ name: string;
418
+ arguments?: string | undefined;
419
+ }>;
420
+ }, "strip", z.ZodTypeAny, {
421
+ function: {
422
+ name: string;
423
+ arguments?: string | undefined;
424
+ };
425
+ type: string;
426
+ id: string;
427
+ }, {
428
+ function: {
429
+ name: string;
430
+ arguments?: string | undefined;
431
+ };
432
+ type: string;
433
+ id: string;
434
+ }>, "many">>;
435
+ animation: z.ZodOptional<z.ZodString>;
436
+ icon: z.ZodOptional<z.ZodString>;
437
+ }, "strip", z.ZodTypeAny, {
438
+ role: "user" | "assistant" | "system";
439
+ content?: string | undefined;
440
+ tool_calls?: {
441
+ function: {
442
+ name: string;
443
+ arguments?: string | undefined;
444
+ };
445
+ type: string;
446
+ id: string;
447
+ }[] | undefined;
448
+ animation?: string | undefined;
449
+ icon?: string | undefined;
450
+ }, {
451
+ role: "user" | "assistant" | "system";
452
+ content?: string | undefined;
453
+ tool_calls?: {
454
+ function: {
455
+ name: string;
456
+ arguments?: string | undefined;
457
+ };
458
+ type: string;
459
+ id: string;
460
+ }[] | undefined;
461
+ animation?: string | undefined;
462
+ icon?: string | undefined;
463
+ }>;
464
+ export declare const DocumentMessageSchema: z.ZodObject<{
465
+ type: z.ZodOptional<z.ZodDefault<z.ZodLiteral<"document">>>;
466
+ description: z.ZodOptional<z.ZodString>;
467
+ ui: z.ZodOptional<z.ZodObject<{
468
+ actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
469
+ transition: z.ZodString;
470
+ widget: z.ZodOptional<z.ZodString>;
471
+ enabledWhen: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
472
+ } & {
473
+ type: z.ZodLiteral<"button">;
474
+ options: z.ZodOptional<z.ZodObject<{
475
+ position: z.ZodOptional<z.ZodNumber>;
476
+ label: z.ZodOptional<z.ZodString>;
477
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
478
+ }, "strip", z.ZodTypeAny, {
479
+ position?: number | undefined;
480
+ label?: string | undefined;
481
+ props?: Record<string, any> | undefined;
482
+ }, {
483
+ position?: number | undefined;
484
+ label?: string | undefined;
485
+ props?: Record<string, any> | undefined;
486
+ }>>;
487
+ }, "strip", z.ZodTypeAny, {
488
+ transition: string;
489
+ type: "button";
490
+ widget?: string | undefined;
491
+ options?: {
492
+ position?: number | undefined;
493
+ label?: string | undefined;
494
+ props?: Record<string, any> | undefined;
495
+ } | undefined;
496
+ enabledWhen?: string[] | undefined;
497
+ }, {
498
+ transition: string;
499
+ type: "button";
500
+ widget?: string | undefined;
501
+ options?: {
502
+ position?: number | undefined;
503
+ label?: string | undefined;
504
+ props?: Record<string, any> | undefined;
505
+ } | undefined;
506
+ enabledWhen?: string[] | undefined;
507
+ }>, z.ZodObject<{
508
+ transition: z.ZodString;
509
+ widget: z.ZodOptional<z.ZodString>;
510
+ enabledWhen: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
511
+ } & {
512
+ type: z.ZodLiteral<"custom">;
513
+ options: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ transition: string;
516
+ type: "custom";
517
+ widget?: string | undefined;
518
+ options?: {} | undefined;
519
+ enabledWhen?: string[] | undefined;
520
+ }, {
521
+ transition: string;
522
+ type: "custom";
523
+ widget?: string | undefined;
524
+ options?: {} | undefined;
525
+ enabledWhen?: string[] | undefined;
526
+ }>]>, "many">>;
527
+ parameters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
528
+ }, "strip", z.ZodTypeAny, {
529
+ actions?: ({
530
+ transition: string;
531
+ type: "button";
532
+ widget?: string | undefined;
533
+ options?: {
534
+ position?: number | undefined;
535
+ label?: string | undefined;
536
+ props?: Record<string, any> | undefined;
537
+ } | undefined;
538
+ enabledWhen?: string[] | undefined;
539
+ } | {
540
+ transition: string;
541
+ type: "custom";
542
+ widget?: string | undefined;
543
+ options?: {} | undefined;
544
+ enabledWhen?: string[] | undefined;
545
+ })[] | undefined;
546
+ parameters?: any;
547
+ }, {
548
+ actions?: ({
549
+ transition: string;
550
+ type: "button";
551
+ widget?: string | undefined;
552
+ options?: {
553
+ position?: number | undefined;
554
+ label?: string | undefined;
555
+ props?: Record<string, any> | undefined;
556
+ } | undefined;
557
+ enabledWhen?: string[] | undefined;
558
+ } | {
559
+ transition: string;
560
+ type: "custom";
561
+ widget?: string | undefined;
562
+ options?: {} | undefined;
563
+ enabledWhen?: string[] | undefined;
564
+ })[] | undefined;
565
+ parameters?: any;
566
+ }>>;
567
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
568
+ meta: z.ZodOptional<z.ZodObject<{
569
+ hidden: z.ZodOptional<z.ZodBoolean>;
570
+ mimeType: z.ZodOptional<z.ZodEnum<["text/plain", "text/html", "text/css", "text/xml", "text/markdown", "application/javascript", "application/typescript", "application/json", "application/xml", "application/yaml"]>>;
571
+ invalidate: z.ZodOptional<z.ZodBoolean>;
572
+ level: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"debug">, z.ZodLiteral<"info">, z.ZodLiteral<"warning">, z.ZodLiteral<"error">]>>;
573
+ enableAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
574
+ hideAtPlaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
575
+ data: z.ZodOptional<z.ZodAny>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ hidden?: boolean | undefined;
578
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
579
+ invalidate?: boolean | undefined;
580
+ level?: "debug" | "info" | "warning" | "error" | undefined;
581
+ enableAtPlaces?: string[] | undefined;
582
+ hideAtPlaces?: string[] | undefined;
583
+ data?: any;
584
+ }, {
585
+ hidden?: boolean | undefined;
586
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
587
+ invalidate?: boolean | undefined;
588
+ level?: "debug" | "info" | "warning" | "error" | undefined;
589
+ enableAtPlaces?: string[] | undefined;
590
+ hideAtPlaces?: string[] | undefined;
591
+ data?: any;
592
+ }>>;
593
+ } & {
594
+ content: z.ZodObject<{
595
+ role: z.ZodEnum<["user", "assistant", "system"]>;
596
+ content: z.ZodOptional<z.ZodString>;
597
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
598
+ id: z.ZodString;
599
+ type: z.ZodString;
600
+ function: z.ZodObject<{
601
+ name: z.ZodString;
602
+ arguments: z.ZodOptional<z.ZodString>;
603
+ }, "strip", z.ZodTypeAny, {
604
+ name: string;
605
+ arguments?: string | undefined;
606
+ }, {
607
+ name: string;
608
+ arguments?: string | undefined;
609
+ }>;
610
+ }, "strip", z.ZodTypeAny, {
611
+ function: {
612
+ name: string;
613
+ arguments?: string | undefined;
614
+ };
615
+ type: string;
616
+ id: string;
617
+ }, {
618
+ function: {
619
+ name: string;
620
+ arguments?: string | undefined;
621
+ };
622
+ type: string;
623
+ id: string;
624
+ }>, "many">>;
625
+ animation: z.ZodOptional<z.ZodString>;
626
+ icon: z.ZodOptional<z.ZodString>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ role: "user" | "assistant" | "system";
629
+ content?: string | undefined;
630
+ tool_calls?: {
631
+ function: {
632
+ name: string;
633
+ arguments?: string | undefined;
634
+ };
635
+ type: string;
636
+ id: string;
637
+ }[] | undefined;
638
+ animation?: string | undefined;
639
+ icon?: string | undefined;
640
+ }, {
641
+ role: "user" | "assistant" | "system";
642
+ content?: string | undefined;
643
+ tool_calls?: {
644
+ function: {
645
+ name: string;
646
+ arguments?: string | undefined;
647
+ };
648
+ type: string;
649
+ id: string;
650
+ }[] | undefined;
651
+ animation?: string | undefined;
652
+ icon?: string | undefined;
653
+ }>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ content: {
656
+ role: "user" | "assistant" | "system";
657
+ content?: string | undefined;
658
+ tool_calls?: {
659
+ function: {
660
+ name: string;
661
+ arguments?: string | undefined;
662
+ };
663
+ type: string;
664
+ id: string;
665
+ }[] | undefined;
666
+ animation?: string | undefined;
667
+ icon?: string | undefined;
668
+ };
669
+ type?: "document" | undefined;
670
+ description?: string | undefined;
671
+ ui?: {
672
+ actions?: ({
673
+ transition: string;
674
+ type: "button";
675
+ widget?: string | undefined;
676
+ options?: {
677
+ position?: number | undefined;
678
+ label?: string | undefined;
679
+ props?: Record<string, any> | undefined;
680
+ } | undefined;
681
+ enabledWhen?: string[] | undefined;
682
+ } | {
683
+ transition: string;
684
+ type: "custom";
685
+ widget?: string | undefined;
686
+ options?: {} | undefined;
687
+ enabledWhen?: string[] | undefined;
688
+ })[] | undefined;
689
+ parameters?: any;
690
+ } | undefined;
691
+ tags?: string[] | undefined;
692
+ meta?: {
693
+ hidden?: boolean | undefined;
694
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
695
+ invalidate?: boolean | undefined;
696
+ level?: "debug" | "info" | "warning" | "error" | undefined;
697
+ enableAtPlaces?: string[] | undefined;
698
+ hideAtPlaces?: string[] | undefined;
699
+ data?: any;
700
+ } | undefined;
701
+ }, {
702
+ content: {
703
+ role: "user" | "assistant" | "system";
704
+ content?: string | undefined;
705
+ tool_calls?: {
706
+ function: {
707
+ name: string;
708
+ arguments?: string | undefined;
709
+ };
710
+ type: string;
711
+ id: string;
712
+ }[] | undefined;
713
+ animation?: string | undefined;
714
+ icon?: string | undefined;
715
+ };
716
+ type?: "document" | undefined;
717
+ description?: string | undefined;
718
+ ui?: {
719
+ actions?: ({
720
+ transition: string;
721
+ type: "button";
722
+ widget?: string | undefined;
723
+ options?: {
724
+ position?: number | undefined;
725
+ label?: string | undefined;
726
+ props?: Record<string, any> | undefined;
727
+ } | undefined;
728
+ enabledWhen?: string[] | undefined;
729
+ } | {
730
+ transition: string;
731
+ type: "custom";
732
+ widget?: string | undefined;
733
+ options?: {} | undefined;
734
+ enabledWhen?: string[] | undefined;
735
+ })[] | undefined;
736
+ parameters?: any;
737
+ } | undefined;
738
+ tags?: string[] | undefined;
739
+ meta?: {
740
+ hidden?: boolean | undefined;
741
+ mimeType?: "text/plain" | "text/html" | "text/css" | "text/xml" | "text/markdown" | "application/javascript" | "application/typescript" | "application/json" | "application/xml" | "application/yaml" | undefined;
742
+ invalidate?: boolean | undefined;
743
+ level?: "debug" | "info" | "warning" | "error" | undefined;
744
+ enableAtPlaces?: string[] | undefined;
745
+ hideAtPlaces?: string[] | undefined;
746
+ data?: any;
747
+ } | undefined;
748
+ }>;
749
+ export type DocumentMessageType = z.infer<typeof DocumentMessageSchema>;