@superatomai/sdk-web 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1550 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ExpressionSchema: z.ZodObject<{
4
+ $exp: z.ZodString;
5
+ $deps: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
+ }, z.core.$strip>;
7
+ type Expression = z.infer<typeof ExpressionSchema>;
8
+ declare const BindingSchema: z.ZodObject<{
9
+ $bind: z.ZodString;
10
+ $transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ name: z.ZodString;
12
+ args: z.ZodOptional<z.ZodArray<z.ZodAny>>;
13
+ }, z.core.$strip>>>;
14
+ }, z.core.$strip>;
15
+ type Binding = z.infer<typeof BindingSchema>;
16
+ declare const ForDirectiveSchema: z.ZodObject<{
17
+ in: z.ZodUnion<readonly [z.ZodObject<{
18
+ $exp: z.ZodString;
19
+ $deps: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ $bind: z.ZodString;
22
+ $transform: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ name: z.ZodString;
24
+ args: z.ZodOptional<z.ZodArray<z.ZodAny>>;
25
+ }, z.core.$strip>>>;
26
+ }, z.core.$strip>, z.ZodString]>;
27
+ as: z.ZodString;
28
+ key: z.ZodOptional<z.ZodString>;
29
+ index: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>;
31
+ type ForDirective = z.infer<typeof ForDirectiveSchema>;
32
+ declare const QuerySpecSchema: z.ZodObject<{
33
+ graphql: z.ZodOptional<z.ZodString>;
34
+ sql: z.ZodOptional<z.ZodString>;
35
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
36
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
37
+ key: z.ZodOptional<z.ZodString>;
38
+ refetchPolicy: z.ZodOptional<z.ZodEnum<{
39
+ "cache-first": "cache-first";
40
+ "network-only": "network-only";
41
+ "cache-and-network": "cache-and-network";
42
+ }>>;
43
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
+ }, z.core.$strip>;
45
+ type QuerySpec = z.infer<typeof QuerySpecSchema>;
46
+ declare const UIElementSchema: z.ZodType<any>;
47
+ type UIElement = z.infer<typeof UIElementSchema>;
48
+ declare const UIComponentSchema: z.ZodObject<{
49
+ id: z.ZodString;
50
+ name: z.ZodOptional<z.ZodString>;
51
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
52
+ states: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
53
+ methods: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
54
+ fn: z.ZodString;
55
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
56
+ }, z.core.$strip>>>;
57
+ effects: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ fn: z.ZodString;
59
+ deps: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
+ }, z.core.$strip>>>;
61
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
62
+ render: z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>;
63
+ query: z.ZodOptional<z.ZodObject<{
64
+ graphql: z.ZodOptional<z.ZodString>;
65
+ sql: z.ZodOptional<z.ZodString>;
66
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
67
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
68
+ key: z.ZodOptional<z.ZodString>;
69
+ refetchPolicy: z.ZodOptional<z.ZodEnum<{
70
+ "cache-first": "cache-first";
71
+ "network-only": "network-only";
72
+ "cache-and-network": "cache-and-network";
73
+ }>>;
74
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ }, z.core.$strip>>;
76
+ }, z.core.$strip>;
77
+ type UIComponent = z.infer<typeof UIComponentSchema>;
78
+ declare const DSLRendererPropsSchema$1: z.ZodObject<{
79
+ dsl: z.ZodObject<{
80
+ id: z.ZodString;
81
+ name: z.ZodOptional<z.ZodString>;
82
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
83
+ states: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
84
+ methods: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
85
+ fn: z.ZodString;
86
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
87
+ }, z.core.$strip>>>;
88
+ effects: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ fn: z.ZodString;
90
+ deps: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
+ }, z.core.$strip>>>;
92
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
93
+ render: z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>;
94
+ query: z.ZodOptional<z.ZodObject<{
95
+ graphql: z.ZodOptional<z.ZodString>;
96
+ sql: z.ZodOptional<z.ZodString>;
97
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
98
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
99
+ key: z.ZodOptional<z.ZodString>;
100
+ refetchPolicy: z.ZodOptional<z.ZodEnum<{
101
+ "cache-first": "cache-first";
102
+ "network-only": "network-only";
103
+ "cache-and-network": "cache-and-network";
104
+ }>>;
105
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>;
108
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
109
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
110
+ }, z.core.$strip>;
111
+ type DSLRendererProps$1 = z.infer<typeof DSLRendererPropsSchema$1>;
112
+
113
+ declare const DSLRendererPropsSchema: z.ZodObject<{
114
+ dsl: z.ZodObject<{
115
+ id: z.ZodString;
116
+ name: z.ZodOptional<z.ZodString>;
117
+ props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
118
+ states: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
119
+ methods: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
120
+ fn: z.ZodString;
121
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
122
+ }, z.core.$strip>>>;
123
+ effects: z.ZodOptional<z.ZodArray<z.ZodObject<{
124
+ fn: z.ZodString;
125
+ deps: z.ZodOptional<z.ZodArray<z.ZodString>>;
126
+ }, z.core.$strip>>>;
127
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
128
+ render: z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>;
129
+ query: z.ZodOptional<z.ZodObject<{
130
+ graphql: z.ZodOptional<z.ZodString>;
131
+ sql: z.ZodOptional<z.ZodString>;
132
+ variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
133
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
134
+ key: z.ZodOptional<z.ZodString>;
135
+ refetchPolicy: z.ZodOptional<z.ZodEnum<{
136
+ "cache-first": "cache-first";
137
+ "network-only": "network-only";
138
+ "cache-and-network": "cache-and-network";
139
+ }>>;
140
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
+ }, z.core.$strip>>;
142
+ }, z.core.$strip>;
143
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
144
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
145
+ }, z.core.$strip>;
146
+ type DSLRendererProps = z.infer<typeof DSLRendererPropsSchema>;
147
+
148
+ /**
149
+ * Message participant schema (from/to)
150
+ * Synced with sdk-nodejs/src/types.ts
151
+ */
152
+ declare const MessageParticipantSchema: z.ZodObject<{
153
+ id: z.ZodOptional<z.ZodString>;
154
+ type: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strip>;
156
+ type MessageParticipant = z.infer<typeof MessageParticipantSchema>;
157
+ /**
158
+ * Base message schema
159
+ * Synced with sdk-nodejs/src/types.ts
160
+ */
161
+ declare const MessageSchema: z.ZodObject<{
162
+ id: z.ZodString;
163
+ type: z.ZodString;
164
+ from: z.ZodObject<{
165
+ id: z.ZodOptional<z.ZodString>;
166
+ type: z.ZodOptional<z.ZodString>;
167
+ }, z.core.$strip>;
168
+ to: z.ZodOptional<z.ZodObject<{
169
+ id: z.ZodOptional<z.ZodString>;
170
+ type: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strip>>;
172
+ payload: z.ZodUnknown;
173
+ }, z.core.$strip>;
174
+ type Message = z.infer<typeof MessageSchema>;
175
+ /**
176
+ * Authentication login request payload schema
177
+ * Synced with sdk-nodejs: AuthLoginRequestPayloadSchema
178
+ */
179
+ declare const AuthLoginPayloadSchema: z.ZodObject<{
180
+ login_data: z.ZodString;
181
+ }, z.core.$strip>;
182
+ type AuthLoginPayload = z.infer<typeof AuthLoginPayloadSchema>;
183
+ /**
184
+ * Authentication login request message schema
185
+ * Synced with sdk-nodejs: AuthLoginRequestMessageSchema
186
+ */
187
+ declare const AuthLoginRequestMessageSchema: z.ZodObject<{
188
+ id: z.ZodString;
189
+ type: z.ZodLiteral<"AUTH_LOGIN_REQ">;
190
+ from: z.ZodObject<{
191
+ id: z.ZodOptional<z.ZodString>;
192
+ type: z.ZodOptional<z.ZodString>;
193
+ }, z.core.$strip>;
194
+ to: z.ZodOptional<z.ZodObject<{
195
+ id: z.ZodOptional<z.ZodString>;
196
+ type: z.ZodOptional<z.ZodString>;
197
+ }, z.core.$strip>>;
198
+ payload: z.ZodObject<{
199
+ login_data: z.ZodString;
200
+ }, z.core.$strip>;
201
+ }, z.core.$strip>;
202
+ type AuthLoginRequestMessage = z.infer<typeof AuthLoginRequestMessageSchema>;
203
+ /**
204
+ * Authentication login response payload schema
205
+ * Synced with sdk-nodejs handler: auth-login-requests.ts
206
+ */
207
+ declare const AuthLoginResponsePayloadSchema: z.ZodObject<{
208
+ success: z.ZodBoolean;
209
+ error: z.ZodOptional<z.ZodString>;
210
+ data: z.ZodOptional<z.ZodUnknown>;
211
+ }, z.core.$strip>;
212
+ type AuthLoginResponsePayload = z.infer<typeof AuthLoginResponsePayloadSchema>;
213
+ /**
214
+ * Authentication login response message schema
215
+ */
216
+ declare const AuthLoginResponseMessageSchema: z.ZodObject<{
217
+ id: z.ZodString;
218
+ type: z.ZodLiteral<"AUTH_LOGIN_RES">;
219
+ from: z.ZodObject<{
220
+ id: z.ZodOptional<z.ZodString>;
221
+ type: z.ZodOptional<z.ZodString>;
222
+ }, z.core.$strip>;
223
+ to: z.ZodOptional<z.ZodObject<{
224
+ id: z.ZodOptional<z.ZodString>;
225
+ type: z.ZodOptional<z.ZodString>;
226
+ }, z.core.$strip>>;
227
+ payload: z.ZodObject<{
228
+ success: z.ZodBoolean;
229
+ error: z.ZodOptional<z.ZodString>;
230
+ data: z.ZodOptional<z.ZodUnknown>;
231
+ }, z.core.$strip>;
232
+ }, z.core.$strip>;
233
+ type AuthLoginResponseMessage = z.infer<typeof AuthLoginResponseMessageSchema>;
234
+ /**
235
+ * Authentication verify request payload schema
236
+ * Synced with sdk-nodejs: AuthVerifyRequestPayloadSchema
237
+ */
238
+ declare const AuthVerifyPayloadSchema: z.ZodObject<{
239
+ token: z.ZodString;
240
+ }, z.core.$strip>;
241
+ type AuthVerifyPayload = z.infer<typeof AuthVerifyPayloadSchema>;
242
+ /**
243
+ * Authentication verify request message schema
244
+ * Synced with sdk-nodejs: AuthVerifyRequestMessageSchema
245
+ */
246
+ declare const AuthVerifyRequestMessageSchema: z.ZodObject<{
247
+ id: z.ZodString;
248
+ type: z.ZodLiteral<"AUTH_VERIFY_REQ">;
249
+ from: z.ZodObject<{
250
+ id: z.ZodOptional<z.ZodString>;
251
+ type: z.ZodOptional<z.ZodString>;
252
+ }, z.core.$strip>;
253
+ to: z.ZodOptional<z.ZodObject<{
254
+ id: z.ZodOptional<z.ZodString>;
255
+ type: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strip>>;
257
+ payload: z.ZodObject<{
258
+ token: z.ZodString;
259
+ }, z.core.$strip>;
260
+ }, z.core.$strip>;
261
+ type AuthVerifyRequestMessage = z.infer<typeof AuthVerifyRequestMessageSchema>;
262
+ /**
263
+ * Authentication verify response payload schema
264
+ * Synced with sdk-nodejs handler: auth-verify-request.ts
265
+ */
266
+ declare const AuthVerifyResponsePayloadSchema: z.ZodObject<{
267
+ success: z.ZodBoolean;
268
+ error: z.ZodOptional<z.ZodString>;
269
+ data: z.ZodOptional<z.ZodUnknown>;
270
+ }, z.core.$strip>;
271
+ type AuthVerifyResponsePayload = z.infer<typeof AuthVerifyResponsePayloadSchema>;
272
+ /**
273
+ * Authentication verify response message schema
274
+ */
275
+ declare const AuthVerifyResponseMessageSchema: z.ZodObject<{
276
+ id: z.ZodString;
277
+ type: z.ZodLiteral<"AUTH_VERIFY_RES">;
278
+ from: z.ZodObject<{
279
+ id: z.ZodOptional<z.ZodString>;
280
+ type: z.ZodOptional<z.ZodString>;
281
+ }, z.core.$strip>;
282
+ to: z.ZodOptional<z.ZodObject<{
283
+ id: z.ZodOptional<z.ZodString>;
284
+ type: z.ZodOptional<z.ZodString>;
285
+ }, z.core.$strip>>;
286
+ payload: z.ZodObject<{
287
+ success: z.ZodBoolean;
288
+ error: z.ZodOptional<z.ZodString>;
289
+ data: z.ZodOptional<z.ZodUnknown>;
290
+ }, z.core.$strip>;
291
+ }, z.core.$strip>;
292
+ type AuthVerifyResponseMessage = z.infer<typeof AuthVerifyResponseMessageSchema>;
293
+ /**
294
+ * User prompt request payload schema
295
+ * Synced with sdk-nodejs: UserPromptRequestPayloadSchema
296
+ */
297
+ declare const UserPromptRequestPayloadSchema: z.ZodObject<{
298
+ prompt: z.ZodString;
299
+ SA_RUNTIME: z.ZodOptional<z.ZodObject<{
300
+ threadId: z.ZodString;
301
+ uiBlockId: z.ZodString;
302
+ }, z.core.$strip>>;
303
+ }, z.core.$strip>;
304
+ type UserPromptRequestPayload = z.infer<typeof UserPromptRequestPayloadSchema>;
305
+ /**
306
+ * User prompt request message schema
307
+ * Synced with sdk-nodejs: UserPromptRequestMessageSchema
308
+ */
309
+ declare const UserPromptRequestMessageSchema: z.ZodObject<{
310
+ id: z.ZodString;
311
+ type: z.ZodLiteral<"USER_PROMPT_REQ">;
312
+ from: z.ZodObject<{
313
+ id: z.ZodOptional<z.ZodString>;
314
+ type: z.ZodOptional<z.ZodString>;
315
+ }, z.core.$strip>;
316
+ to: z.ZodOptional<z.ZodObject<{
317
+ id: z.ZodOptional<z.ZodString>;
318
+ type: z.ZodOptional<z.ZodString>;
319
+ }, z.core.$strip>>;
320
+ payload: z.ZodObject<{
321
+ prompt: z.ZodString;
322
+ SA_RUNTIME: z.ZodOptional<z.ZodObject<{
323
+ threadId: z.ZodString;
324
+ uiBlockId: z.ZodString;
325
+ }, z.core.$strip>>;
326
+ }, z.core.$strip>;
327
+ }, z.core.$strip>;
328
+ type UserPromptRequestMessage = z.infer<typeof UserPromptRequestMessageSchema>;
329
+ /**
330
+ * Component schema (from backend)
331
+ * Synced with sdk-nodejs: ComponentSchema
332
+ */
333
+ declare const ComponentSchema: z.ZodObject<{
334
+ id: z.ZodString;
335
+ name: z.ZodString;
336
+ type: z.ZodString;
337
+ description: z.ZodString;
338
+ props: z.ZodObject<{
339
+ query: z.ZodOptional<z.ZodString>;
340
+ title: z.ZodOptional<z.ZodString>;
341
+ description: z.ZodOptional<z.ZodString>;
342
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
343
+ }, z.core.$strip>;
344
+ category: z.ZodOptional<z.ZodString>;
345
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
346
+ }, z.core.$strip>;
347
+ type Component = z.infer<typeof ComponentSchema>;
348
+ /**
349
+ * User prompt response payload schema
350
+ * Synced with sdk-nodejs handler: user-prompt-request.ts
351
+ */
352
+ declare const UserPromptResponsePayloadSchema: z.ZodObject<{
353
+ success: z.ZodBoolean;
354
+ error: z.ZodOptional<z.ZodString>;
355
+ data: z.ZodOptional<z.ZodObject<{
356
+ component: z.ZodOptional<z.ZodObject<{
357
+ id: z.ZodString;
358
+ name: z.ZodString;
359
+ type: z.ZodString;
360
+ description: z.ZodString;
361
+ props: z.ZodObject<{
362
+ query: z.ZodOptional<z.ZodString>;
363
+ title: z.ZodOptional<z.ZodString>;
364
+ description: z.ZodOptional<z.ZodString>;
365
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
366
+ }, z.core.$strip>;
367
+ category: z.ZodOptional<z.ZodString>;
368
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
369
+ }, z.core.$strip>>;
370
+ }, z.core.$strip>>;
371
+ uiBlockId: z.ZodOptional<z.ZodString>;
372
+ threadId: z.ZodOptional<z.ZodString>;
373
+ }, z.core.$strip>;
374
+ type UserPromptResponsePayload = z.infer<typeof UserPromptResponsePayloadSchema>;
375
+ /**
376
+ * User prompt response message schema
377
+ */
378
+ declare const UserPromptResponseMessageSchema: z.ZodObject<{
379
+ id: z.ZodString;
380
+ type: z.ZodLiteral<"USER_PROMPT_RES">;
381
+ from: z.ZodObject<{
382
+ id: z.ZodOptional<z.ZodString>;
383
+ type: z.ZodOptional<z.ZodString>;
384
+ }, z.core.$strip>;
385
+ to: z.ZodOptional<z.ZodObject<{
386
+ id: z.ZodOptional<z.ZodString>;
387
+ type: z.ZodOptional<z.ZodString>;
388
+ }, z.core.$strip>>;
389
+ payload: z.ZodObject<{
390
+ success: z.ZodBoolean;
391
+ error: z.ZodOptional<z.ZodString>;
392
+ data: z.ZodOptional<z.ZodObject<{
393
+ component: z.ZodOptional<z.ZodObject<{
394
+ id: z.ZodString;
395
+ name: z.ZodString;
396
+ type: z.ZodString;
397
+ description: z.ZodString;
398
+ props: z.ZodObject<{
399
+ query: z.ZodOptional<z.ZodString>;
400
+ title: z.ZodOptional<z.ZodString>;
401
+ description: z.ZodOptional<z.ZodString>;
402
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
403
+ }, z.core.$strip>;
404
+ category: z.ZodOptional<z.ZodString>;
405
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
406
+ }, z.core.$strip>>;
407
+ }, z.core.$strip>>;
408
+ uiBlockId: z.ZodOptional<z.ZodString>;
409
+ threadId: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strip>;
411
+ }, z.core.$strip>;
412
+ type UserPromptResponseMessage = z.infer<typeof UserPromptResponseMessageSchema>;
413
+ /**
414
+ * User prompt suggestions request payload schema
415
+ * Synced with sdk-nodejs: UserPromptSuggestionsPayloadSchema
416
+ */
417
+ declare const UserPromptSuggestionsRequestPayloadSchema: z.ZodObject<{
418
+ prompt: z.ZodString;
419
+ limit: z.ZodDefault<z.ZodNumber>;
420
+ }, z.core.$strip>;
421
+ type UserPromptSuggestionsRequestPayload = z.infer<typeof UserPromptSuggestionsRequestPayloadSchema>;
422
+ /**
423
+ * User prompt suggestions request message schema
424
+ * Synced with sdk-nodejs: UserPromptSuggestionsMessageSchema
425
+ */
426
+ declare const UserPromptSuggestionsRequestMessageSchema: z.ZodObject<{
427
+ id: z.ZodString;
428
+ type: z.ZodLiteral<"USER_PROMPT_SUGGESTIONS_REQ">;
429
+ from: z.ZodObject<{
430
+ id: z.ZodOptional<z.ZodString>;
431
+ type: z.ZodOptional<z.ZodString>;
432
+ }, z.core.$strip>;
433
+ to: z.ZodOptional<z.ZodObject<{
434
+ id: z.ZodOptional<z.ZodString>;
435
+ type: z.ZodOptional<z.ZodString>;
436
+ }, z.core.$strip>>;
437
+ payload: z.ZodObject<{
438
+ prompt: z.ZodString;
439
+ limit: z.ZodDefault<z.ZodNumber>;
440
+ }, z.core.$strip>;
441
+ }, z.core.$strip>;
442
+ type UserPromptSuggestionsRequestMessage = z.infer<typeof UserPromptSuggestionsRequestMessageSchema>;
443
+ /**
444
+ * User prompt suggestions response payload schema
445
+ * Synced with sdk-nodejs handler: user-prompt-suggestions.ts
446
+ */
447
+ declare const UserPromptSuggestionsResponsePayloadSchema: z.ZodObject<{
448
+ success: z.ZodBoolean;
449
+ error: z.ZodOptional<z.ZodString>;
450
+ data: z.ZodOptional<z.ZodObject<{
451
+ prompt: z.ZodString;
452
+ suggestions: z.ZodArray<z.ZodObject<{
453
+ id: z.ZodString;
454
+ name: z.ZodString;
455
+ type: z.ZodString;
456
+ description: z.ZodString;
457
+ props: z.ZodObject<{
458
+ query: z.ZodOptional<z.ZodString>;
459
+ title: z.ZodOptional<z.ZodString>;
460
+ description: z.ZodOptional<z.ZodString>;
461
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
462
+ }, z.core.$strip>;
463
+ category: z.ZodOptional<z.ZodString>;
464
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
465
+ }, z.core.$strip>>;
466
+ count: z.ZodNumber;
467
+ message: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strip>>;
469
+ }, z.core.$strip>;
470
+ type UserPromptSuggestionsResponsePayload = z.infer<typeof UserPromptSuggestionsResponsePayloadSchema>;
471
+ /**
472
+ * User prompt suggestions response message schema
473
+ */
474
+ declare const UserPromptSuggestionsResponseMessageSchema: z.ZodObject<{
475
+ id: z.ZodString;
476
+ type: z.ZodLiteral<"USER_PROMPT_SUGGESTIONS_RES">;
477
+ from: z.ZodObject<{
478
+ id: z.ZodOptional<z.ZodString>;
479
+ type: z.ZodOptional<z.ZodString>;
480
+ }, z.core.$strip>;
481
+ to: z.ZodOptional<z.ZodObject<{
482
+ id: z.ZodOptional<z.ZodString>;
483
+ type: z.ZodOptional<z.ZodString>;
484
+ }, z.core.$strip>>;
485
+ payload: z.ZodObject<{
486
+ success: z.ZodBoolean;
487
+ error: z.ZodOptional<z.ZodString>;
488
+ data: z.ZodOptional<z.ZodObject<{
489
+ prompt: z.ZodString;
490
+ suggestions: z.ZodArray<z.ZodObject<{
491
+ id: z.ZodString;
492
+ name: z.ZodString;
493
+ type: z.ZodString;
494
+ description: z.ZodString;
495
+ props: z.ZodObject<{
496
+ query: z.ZodOptional<z.ZodString>;
497
+ title: z.ZodOptional<z.ZodString>;
498
+ description: z.ZodOptional<z.ZodString>;
499
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
500
+ }, z.core.$strip>;
501
+ category: z.ZodOptional<z.ZodString>;
502
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
503
+ }, z.core.$strip>>;
504
+ count: z.ZodNumber;
505
+ message: z.ZodOptional<z.ZodString>;
506
+ }, z.core.$strip>>;
507
+ }, z.core.$strip>;
508
+ }, z.core.$strip>;
509
+ type UserPromptSuggestionsResponseMessage = z.infer<typeof UserPromptSuggestionsResponseMessageSchema>;
510
+ /**
511
+ * Bundle request payload schema
512
+ * Bundle requests have empty payload
513
+ */
514
+ declare const BundleRequestPayloadSchema: z.ZodObject<{}, z.core.$strip>;
515
+ type BundleRequestPayload = z.infer<typeof BundleRequestPayloadSchema>;
516
+ /**
517
+ * Bundle request message schema
518
+ */
519
+ declare const BundleRequestMessageSchema: z.ZodObject<{
520
+ id: z.ZodString;
521
+ type: z.ZodLiteral<"BUNDLE_REQ">;
522
+ from: z.ZodObject<{
523
+ id: z.ZodOptional<z.ZodString>;
524
+ type: z.ZodOptional<z.ZodString>;
525
+ }, z.core.$strip>;
526
+ to: z.ZodOptional<z.ZodObject<{
527
+ id: z.ZodOptional<z.ZodString>;
528
+ type: z.ZodOptional<z.ZodString>;
529
+ }, z.core.$strip>>;
530
+ payload: z.ZodObject<{}, z.core.$strip>;
531
+ }, z.core.$strip>;
532
+ type BundleRequestMessage = z.infer<typeof BundleRequestMessageSchema>;
533
+ /**
534
+ * Bundle chunk payload schema
535
+ * Synced with sdk-nodejs handler: bundle-request.ts
536
+ */
537
+ declare const BundleChunkPayloadSchema: z.ZodObject<{
538
+ chunk: z.ZodString;
539
+ chunkIndex: z.ZodNumber;
540
+ totalChunks: z.ZodNumber;
541
+ isComplete: z.ZodBoolean;
542
+ progress: z.ZodNumber;
543
+ }, z.core.$strip>;
544
+ type BundleChunkPayload = z.infer<typeof BundleChunkPayloadSchema>;
545
+ /**
546
+ * Bundle chunk message schema
547
+ */
548
+ declare const BundleChunkMessageSchema: z.ZodObject<{
549
+ id: z.ZodString;
550
+ type: z.ZodLiteral<"BUNDLE_CHUNK">;
551
+ from: z.ZodObject<{
552
+ id: z.ZodOptional<z.ZodString>;
553
+ type: z.ZodOptional<z.ZodString>;
554
+ }, z.core.$strip>;
555
+ to: z.ZodOptional<z.ZodObject<{
556
+ id: z.ZodOptional<z.ZodString>;
557
+ type: z.ZodOptional<z.ZodString>;
558
+ }, z.core.$strip>>;
559
+ payload: z.ZodObject<{
560
+ chunk: z.ZodString;
561
+ chunkIndex: z.ZodNumber;
562
+ totalChunks: z.ZodNumber;
563
+ isComplete: z.ZodBoolean;
564
+ progress: z.ZodNumber;
565
+ }, z.core.$strip>;
566
+ }, z.core.$strip>;
567
+ type BundleChunkMessage = z.infer<typeof BundleChunkMessageSchema>;
568
+ /**
569
+ * Bundle error response payload schema
570
+ * Synced with sdk-nodejs handler: bundle-request.ts
571
+ */
572
+ declare const BundleErrorPayloadSchema: z.ZodObject<{
573
+ error: z.ZodString;
574
+ }, z.core.$strip>;
575
+ type BundleErrorPayload = z.infer<typeof BundleErrorPayloadSchema>;
576
+ /**
577
+ * Bundle error response message schema
578
+ */
579
+ declare const BundleErrorMessageSchema: z.ZodObject<{
580
+ id: z.ZodString;
581
+ type: z.ZodLiteral<"BUNDLE_RES">;
582
+ from: z.ZodObject<{
583
+ id: z.ZodOptional<z.ZodString>;
584
+ type: z.ZodOptional<z.ZodString>;
585
+ }, z.core.$strip>;
586
+ to: z.ZodOptional<z.ZodObject<{
587
+ id: z.ZodOptional<z.ZodString>;
588
+ type: z.ZodOptional<z.ZodString>;
589
+ }, z.core.$strip>>;
590
+ payload: z.ZodObject<{
591
+ error: z.ZodString;
592
+ }, z.core.$strip>;
593
+ }, z.core.$strip>;
594
+ type BundleErrorMessage = z.infer<typeof BundleErrorMessageSchema>;
595
+ /**
596
+ * Data request payload schema
597
+ * Synced with sdk-nodejs: DataRequestPayloadSchema
598
+ */
599
+ declare const DataRequestPayloadSchema: z.ZodObject<{
600
+ collection: z.ZodString;
601
+ op: z.ZodString;
602
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
603
+ SA_RUNTIME: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
604
+ }, z.core.$strip>;
605
+ type DataRequestPayload = z.infer<typeof DataRequestPayloadSchema>;
606
+ /**
607
+ * Data request message schema
608
+ * Synced with sdk-nodejs: DataRequestMessageSchema
609
+ */
610
+ declare const DataRequestMessageSchema: z.ZodObject<{
611
+ id: z.ZodString;
612
+ type: z.ZodLiteral<"DATA_REQ">;
613
+ from: z.ZodObject<{
614
+ id: z.ZodOptional<z.ZodString>;
615
+ type: z.ZodOptional<z.ZodString>;
616
+ }, z.core.$strip>;
617
+ to: z.ZodOptional<z.ZodObject<{
618
+ id: z.ZodOptional<z.ZodString>;
619
+ type: z.ZodOptional<z.ZodString>;
620
+ }, z.core.$strip>>;
621
+ payload: z.ZodObject<{
622
+ collection: z.ZodString;
623
+ op: z.ZodString;
624
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
625
+ SA_RUNTIME: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
626
+ }, z.core.$strip>;
627
+ }, z.core.$strip>;
628
+ type DataRequestMessage = z.infer<typeof DataRequestMessageSchema>;
629
+ /**
630
+ * Data response payload schema
631
+ * Synced with sdk-nodejs handler: data-request.ts
632
+ */
633
+ declare const DataResponsePayloadSchema: z.ZodObject<{
634
+ collection: z.ZodString;
635
+ op: z.ZodString;
636
+ data: z.ZodUnknown;
637
+ executionMs: z.ZodOptional<z.ZodNumber>;
638
+ error: z.ZodOptional<z.ZodString>;
639
+ }, z.core.$strip>;
640
+ type DataResponsePayload = z.infer<typeof DataResponsePayloadSchema>;
641
+ /**
642
+ * Data response message schema
643
+ */
644
+ declare const DataResponseMessageSchema: z.ZodObject<{
645
+ id: z.ZodString;
646
+ type: z.ZodLiteral<"DATA_RES">;
647
+ from: z.ZodObject<{
648
+ id: z.ZodOptional<z.ZodString>;
649
+ type: z.ZodOptional<z.ZodString>;
650
+ }, z.core.$strip>;
651
+ to: z.ZodOptional<z.ZodObject<{
652
+ id: z.ZodOptional<z.ZodString>;
653
+ type: z.ZodOptional<z.ZodString>;
654
+ }, z.core.$strip>>;
655
+ payload: z.ZodObject<{
656
+ collection: z.ZodString;
657
+ op: z.ZodString;
658
+ data: z.ZodUnknown;
659
+ executionMs: z.ZodOptional<z.ZodNumber>;
660
+ error: z.ZodOptional<z.ZodString>;
661
+ }, z.core.$strip>;
662
+ }, z.core.$strip>;
663
+ type DataResponseMessage = z.infer<typeof DataResponseMessageSchema>;
664
+ /**
665
+ * UI log entry schema
666
+ * Synced with sdk-nodejs: UILogsPayloadSchema
667
+ */
668
+ declare const UILogEntrySchema: z.ZodObject<{
669
+ timestamp: z.ZodNumber;
670
+ level: z.ZodEnum<{
671
+ error: "error";
672
+ info: "info";
673
+ warn: "warn";
674
+ debug: "debug";
675
+ }>;
676
+ message: z.ZodString;
677
+ type: z.ZodOptional<z.ZodEnum<{
678
+ query: "query";
679
+ explanation: "explanation";
680
+ general: "general";
681
+ }>>;
682
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
683
+ }, z.core.$strip>;
684
+ type UILogEntry = z.infer<typeof UILogEntrySchema>;
685
+ /**
686
+ * UI logs payload schema
687
+ * Synced with sdk-nodejs: UILogsPayloadSchema
688
+ */
689
+ declare const UILogsPayloadSchema: z.ZodObject<{
690
+ logs: z.ZodArray<z.ZodObject<{
691
+ timestamp: z.ZodNumber;
692
+ level: z.ZodEnum<{
693
+ error: "error";
694
+ info: "info";
695
+ warn: "warn";
696
+ debug: "debug";
697
+ }>;
698
+ message: z.ZodString;
699
+ type: z.ZodOptional<z.ZodEnum<{
700
+ query: "query";
701
+ explanation: "explanation";
702
+ general: "general";
703
+ }>>;
704
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
705
+ }, z.core.$strip>>;
706
+ }, z.core.$strip>;
707
+ type UILogsPayload = z.infer<typeof UILogsPayloadSchema>;
708
+ /**
709
+ * UI logs message schema
710
+ * Synced with sdk-nodejs: UILogsMessageSchema
711
+ */
712
+ declare const UILogsMessageSchema: z.ZodObject<{
713
+ id: z.ZodString;
714
+ type: z.ZodLiteral<"UI_LOGS">;
715
+ from: z.ZodObject<{
716
+ id: z.ZodOptional<z.ZodString>;
717
+ type: z.ZodOptional<z.ZodString>;
718
+ }, z.core.$strip>;
719
+ to: z.ZodOptional<z.ZodObject<{
720
+ id: z.ZodOptional<z.ZodString>;
721
+ type: z.ZodOptional<z.ZodString>;
722
+ }, z.core.$strip>>;
723
+ payload: z.ZodObject<{
724
+ logs: z.ZodArray<z.ZodObject<{
725
+ timestamp: z.ZodNumber;
726
+ level: z.ZodEnum<{
727
+ error: "error";
728
+ info: "info";
729
+ warn: "warn";
730
+ debug: "debug";
731
+ }>;
732
+ message: z.ZodString;
733
+ type: z.ZodOptional<z.ZodEnum<{
734
+ query: "query";
735
+ explanation: "explanation";
736
+ general: "general";
737
+ }>>;
738
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
739
+ }, z.core.$strip>>;
740
+ }, z.core.$strip>;
741
+ }, z.core.$strip>;
742
+ type UILogsMessage = z.infer<typeof UILogsMessageSchema>;
743
+ /**
744
+ * Client configuration schema
745
+ */
746
+ declare const ClientConfigSchema: z.ZodObject<{
747
+ userId: z.ZodString;
748
+ projectId: z.ZodString;
749
+ baseUrl: z.ZodDefault<z.ZodString>;
750
+ type: z.ZodDefault<z.ZodString>;
751
+ maxReconnectAttempts: z.ZodDefault<z.ZodNumber>;
752
+ initialReconnectDelay: z.ZodDefault<z.ZodNumber>;
753
+ maxReconnectDelay: z.ZodDefault<z.ZodNumber>;
754
+ defaultTimeout: z.ZodDefault<z.ZodNumber>;
755
+ debug: z.ZodDefault<z.ZodBoolean>;
756
+ }, z.core.$strip>;
757
+ type ClientConfig = z.input<typeof ClientConfigSchema>;
758
+ type ResolvedClientConfig = z.output<typeof ClientConfigSchema>;
759
+
760
+ /**
761
+ * Authentication Service
762
+ * Handles auth_login_req and auth_verify_req messages
763
+ */
764
+
765
+ /**
766
+ * Send authentication login request
767
+ * @param client - SuperatomClient instance
768
+ * @param loginDataBase64 - Base64 encoded login data (username + SHA-1 hashed password)
769
+ * @param timeout - Request timeout in milliseconds
770
+ * @returns Server response message
771
+ */
772
+ declare function sendAuthLoginRequest(client: SuperatomClient, loginDataBase64: string, timeout?: number): Promise<Message>;
773
+ /**
774
+ * Send authentication verify request
775
+ * @param client - SuperatomClient instance
776
+ * @param token - Base64 encoded authentication token
777
+ * @param timeout - Request timeout in milliseconds
778
+ * @returns Server response message
779
+ */
780
+ declare function sendAuthVerifyRequest(client: SuperatomClient, token: string, timeout?: number): Promise<Message>;
781
+
782
+ /**
783
+ * User Prompt Service
784
+ * Handles user_prompt_req and user_prompt_suggestions_req messages
785
+ */
786
+
787
+ /**
788
+ * Send a user prompt request
789
+ * @param client - SuperatomClient instance
790
+ * @param prompt - User's prompt text
791
+ * @param threadId - Thread ID for conversation context
792
+ * @param uiBlockId - UI block ID for context
793
+ * @param timeout - Request timeout in milliseconds
794
+ * @returns Server response message
795
+ */
796
+ declare function sendUserPromptRequest(client: SuperatomClient, prompt: string, threadId: string, uiBlockId: string, timeout?: number): Promise<Message>;
797
+ /**
798
+ * Send a user prompt suggestions request
799
+ * @param client - SuperatomClient instance
800
+ * @param prompt - User's partial prompt text
801
+ * @param limit - Maximum number of suggestions to return
802
+ * @param timeout - Request timeout in milliseconds
803
+ * @returns Server response message or null if prompt is empty
804
+ */
805
+ declare function sendUserPromptSuggestionsRequest(client: SuperatomClient, prompt: string, limit?: number, timeout?: number): Promise<Message | null>;
806
+
807
+ /**
808
+ * Bundle Service
809
+ * Handles bundle_req messages and chunked bundle delivery
810
+ */
811
+
812
+ /**
813
+ * Request bundle from server
814
+ * @param client - SuperatomClient instance
815
+ * @param options - Bundle request options
816
+ * @param options.timeout - Request timeout in milliseconds (default: 60000)
817
+ * @param options.onProgress - Progress callback (0-100)
818
+ * @returns Complete bundle as string
819
+ */
820
+ declare function requestBundle(client: SuperatomClient, options?: {
821
+ timeout?: number;
822
+ onProgress?: (progress: number) => void;
823
+ }): Promise<string>;
824
+
825
+ /**
826
+ * Data Service
827
+ * Handles data_req messages for querying collections
828
+ */
829
+
830
+ /**
831
+ * Request data from a collection
832
+ * @param client - SuperatomClient instance
833
+ * @param options - Data request options
834
+ * @param options.collection - Collection name to query
835
+ * @param options.operation - Operation to perform (e.g., 'find', 'aggregate')
836
+ * @param options.params - Operation parameters
837
+ * @param options.timeout - Request timeout in milliseconds
838
+ * @returns Response with data or error
839
+ */
840
+ declare function requestData(client: SuperatomClient, options: {
841
+ collection: string;
842
+ operation: string;
843
+ params?: Record<string, unknown>;
844
+ timeout?: number;
845
+ }): Promise<{
846
+ data?: unknown;
847
+ error?: string;
848
+ executionMs?: number;
849
+ }>;
850
+
851
+ /**
852
+ * Component Service
853
+ * Handles AI-powered component suggestions
854
+ */
855
+
856
+ /**
857
+ * Get AI-powered component suggestions based on a query
858
+ * @param client - SuperatomClient instance
859
+ * @param query - User query for component suggestion
860
+ * @param options - Request options
861
+ * @param options.timeout - Request timeout in milliseconds
862
+ * @returns Component suggestion or error
863
+ */
864
+ declare function getComponentSuggestions(client: SuperatomClient, query: string, options?: {
865
+ timeout?: number;
866
+ }): Promise<{
867
+ component?: {
868
+ id: string;
869
+ name: string;
870
+ };
871
+ error?: string;
872
+ }>;
873
+
874
+ /**
875
+ * Users Service
876
+ * Handles USERS message for user CRUD operations
877
+ */
878
+
879
+ /**
880
+ * User interface for response data
881
+ */
882
+ interface User {
883
+ username: string;
884
+ wsIds: string[];
885
+ }
886
+ /**
887
+ * Create a new user
888
+ * @param client - SuperatomClient instance
889
+ * @param username - Username for the new user
890
+ * @param password - Password for the new user
891
+ * @param timeout - Request timeout in milliseconds
892
+ * @returns Server response with success status
893
+ */
894
+ declare function createUser(client: SuperatomClient, username: string, password: string, timeout?: number): Promise<{
895
+ success: boolean;
896
+ error?: string;
897
+ message?: string;
898
+ username?: string;
899
+ }>;
900
+ /**
901
+ * Update an existing user
902
+ * @param client - SuperatomClient instance
903
+ * @param username - Username to update
904
+ * @param password - New password for the user
905
+ * @param timeout - Request timeout in milliseconds
906
+ * @returns Server response with success status
907
+ */
908
+ declare function updateUser(client: SuperatomClient, username: string, password: string, timeout?: number): Promise<{
909
+ success: boolean;
910
+ error?: string;
911
+ message?: string;
912
+ username?: string;
913
+ }>;
914
+ /**
915
+ * Delete a user
916
+ * @param client - SuperatomClient instance
917
+ * @param username - Username to delete
918
+ * @param timeout - Request timeout in milliseconds
919
+ * @returns Server response with success status
920
+ */
921
+ declare function deleteUser(client: SuperatomClient, username: string, timeout?: number): Promise<{
922
+ success: boolean;
923
+ error?: string;
924
+ message?: string;
925
+ username?: string;
926
+ }>;
927
+ /**
928
+ * Get all users
929
+ * @param client - SuperatomClient instance
930
+ * @param timeout - Request timeout in milliseconds
931
+ * @returns Server response with list of users
932
+ */
933
+ declare function getAllUsers(client: SuperatomClient, timeout?: number): Promise<{
934
+ success: boolean;
935
+ error?: string;
936
+ users?: User[];
937
+ count?: number;
938
+ message?: string;
939
+ }>;
940
+ /**
941
+ * Get a specific user by username
942
+ * @param client - SuperatomClient instance
943
+ * @param username - Username to retrieve
944
+ * @param timeout - Request timeout in milliseconds
945
+ * @returns Server response with user data
946
+ */
947
+ declare function getUser(client: SuperatomClient, username: string, timeout?: number): Promise<{
948
+ success: boolean;
949
+ error?: string;
950
+ user?: User;
951
+ message?: string;
952
+ }>;
953
+
954
+ /**
955
+ * Dashboards Service
956
+ * Handles DASHBOARDS message for dashboard CRUD operations
957
+ */
958
+
959
+ /**
960
+ * Dashboard interface for response data
961
+ */
962
+ interface Dashboard {
963
+ dashboardId: string;
964
+ dashboard: DSLRendererProps$1;
965
+ }
966
+ /**
967
+ * Create a new dashboard
968
+ * @param client - SuperatomClient instance
969
+ * @param dashboardId - Unique dashboard ID
970
+ * @param dashboard - Dashboard DSL data
971
+ * @param timeout - Request timeout in milliseconds
972
+ * @returns Server response with success status
973
+ */
974
+ declare function createDashboard(client: SuperatomClient, dashboardId: string, dashboard: DSLRendererProps$1, timeout?: number): Promise<{
975
+ success: boolean;
976
+ error?: string;
977
+ message?: string;
978
+ dashboardId?: string;
979
+ dashboard?: DSLRendererProps$1;
980
+ }>;
981
+ /**
982
+ * Update an existing dashboard
983
+ * @param client - SuperatomClient instance
984
+ * @param dashboardId - Dashboard ID to update
985
+ * @param dashboard - Updated dashboard DSL data
986
+ * @param timeout - Request timeout in milliseconds
987
+ * @returns Server response with success status
988
+ */
989
+ declare function updateDashboard(client: SuperatomClient, dashboardId: string, dashboard: DSLRendererProps$1, timeout?: number): Promise<{
990
+ success: boolean;
991
+ error?: string;
992
+ message?: string;
993
+ dashboardId?: string;
994
+ dashboard?: DSLRendererProps$1;
995
+ }>;
996
+ /**
997
+ * Delete a dashboard
998
+ * @param client - SuperatomClient instance
999
+ * @param dashboardId - Dashboard ID to delete
1000
+ * @param timeout - Request timeout in milliseconds
1001
+ * @returns Server response with success status
1002
+ */
1003
+ declare function deleteDashboard(client: SuperatomClient, dashboardId: string, timeout?: number): Promise<{
1004
+ success: boolean;
1005
+ error?: string;
1006
+ message?: string;
1007
+ dashboardId?: string;
1008
+ }>;
1009
+ /**
1010
+ * Get all dashboards
1011
+ * @param client - SuperatomClient instance
1012
+ * @param timeout - Request timeout in milliseconds
1013
+ * @returns Server response with list of dashboards
1014
+ */
1015
+ declare function getAllDashboards(client: SuperatomClient, timeout?: number): Promise<{
1016
+ success: boolean;
1017
+ error?: string;
1018
+ dashboards?: Dashboard[];
1019
+ count?: number;
1020
+ message?: string;
1021
+ }>;
1022
+ /**
1023
+ * Get a specific dashboard by ID
1024
+ * @param client - SuperatomClient instance
1025
+ * @param dashboardId - Dashboard ID to retrieve
1026
+ * @param timeout - Request timeout in milliseconds
1027
+ * @returns Server response with dashboard data
1028
+ */
1029
+ declare function getDashboard(client: SuperatomClient, dashboardId: string, timeout?: number): Promise<{
1030
+ success: boolean;
1031
+ error?: string;
1032
+ dashboardId?: string;
1033
+ dashboard?: DSLRendererProps$1;
1034
+ message?: string;
1035
+ }>;
1036
+
1037
+ /**
1038
+ * Reports Service
1039
+ * Handles REPORTS message for report CRUD operations
1040
+ */
1041
+
1042
+ /**
1043
+ * Report interface for response data
1044
+ */
1045
+ interface Report {
1046
+ reportId: string;
1047
+ report: DSLRendererProps;
1048
+ }
1049
+ /**
1050
+ * Create a new report
1051
+ * @param client - SuperatomClient instance
1052
+ * @param reportId - Unique report ID
1053
+ * @param report - Report DSL data
1054
+ * @param timeout - Request timeout in milliseconds
1055
+ * @returns Server response with success status
1056
+ */
1057
+ declare function createReport(client: SuperatomClient, reportId: string, report: DSLRendererProps, timeout?: number): Promise<{
1058
+ success: boolean;
1059
+ error?: string;
1060
+ message?: string;
1061
+ reportId?: string;
1062
+ report?: DSLRendererProps;
1063
+ }>;
1064
+ /**
1065
+ * Update an existing report
1066
+ * @param client - SuperatomClient instance
1067
+ * @param reportId - Report ID to update
1068
+ * @param report - Updated report DSL data
1069
+ * @param timeout - Request timeout in milliseconds
1070
+ * @returns Server response with success status
1071
+ */
1072
+ declare function updateReport(client: SuperatomClient, reportId: string, report: DSLRendererProps, timeout?: number): Promise<{
1073
+ success: boolean;
1074
+ error?: string;
1075
+ message?: string;
1076
+ reportId?: string;
1077
+ report?: DSLRendererProps;
1078
+ }>;
1079
+ /**
1080
+ * Delete a report
1081
+ * @param client - SuperatomClient instance
1082
+ * @param reportId - Report ID to delete
1083
+ * @param timeout - Request timeout in milliseconds
1084
+ * @returns Server response with success status
1085
+ */
1086
+ declare function deleteReport(client: SuperatomClient, reportId: string, timeout?: number): Promise<{
1087
+ success: boolean;
1088
+ error?: string;
1089
+ message?: string;
1090
+ reportId?: string;
1091
+ }>;
1092
+ /**
1093
+ * Get all reports
1094
+ * @param client - SuperatomClient instance
1095
+ * @param timeout - Request timeout in milliseconds
1096
+ * @returns Server response with list of reports
1097
+ */
1098
+ declare function getAllReports(client: SuperatomClient, timeout?: number): Promise<{
1099
+ success: boolean;
1100
+ error?: string;
1101
+ reports?: Report[];
1102
+ count?: number;
1103
+ message?: string;
1104
+ }>;
1105
+ /**
1106
+ * Get a specific report by ID
1107
+ * @param client - SuperatomClient instance
1108
+ * @param reportId - Report ID to retrieve
1109
+ * @param timeout - Request timeout in milliseconds
1110
+ * @returns Server response with report data
1111
+ */
1112
+ declare function getReport(client: SuperatomClient, reportId: string, timeout?: number): Promise<{
1113
+ success: boolean;
1114
+ error?: string;
1115
+ reportId?: string;
1116
+ report?: DSLRendererProps;
1117
+ message?: string;
1118
+ }>;
1119
+
1120
+ /**
1121
+ * Services Index
1122
+ * Re-exports all service functions for easy importing
1123
+ */
1124
+
1125
+ type index_Binding = Binding;
1126
+ declare const index_BindingSchema: typeof BindingSchema;
1127
+ type index_Dashboard = Dashboard;
1128
+ type index_Expression = Expression;
1129
+ declare const index_ExpressionSchema: typeof ExpressionSchema;
1130
+ type index_ForDirective = ForDirective;
1131
+ declare const index_ForDirectiveSchema: typeof ForDirectiveSchema;
1132
+ type index_QuerySpec = QuerySpec;
1133
+ declare const index_QuerySpecSchema: typeof QuerySpecSchema;
1134
+ type index_Report = Report;
1135
+ type index_UIComponent = UIComponent;
1136
+ declare const index_UIComponentSchema: typeof UIComponentSchema;
1137
+ type index_UIElement = UIElement;
1138
+ declare const index_UIElementSchema: typeof UIElementSchema;
1139
+ type index_User = User;
1140
+ declare const index_createDashboard: typeof createDashboard;
1141
+ declare const index_createReport: typeof createReport;
1142
+ declare const index_createUser: typeof createUser;
1143
+ declare const index_deleteDashboard: typeof deleteDashboard;
1144
+ declare const index_deleteReport: typeof deleteReport;
1145
+ declare const index_deleteUser: typeof deleteUser;
1146
+ declare const index_getAllDashboards: typeof getAllDashboards;
1147
+ declare const index_getAllReports: typeof getAllReports;
1148
+ declare const index_getAllUsers: typeof getAllUsers;
1149
+ declare const index_getComponentSuggestions: typeof getComponentSuggestions;
1150
+ declare const index_getDashboard: typeof getDashboard;
1151
+ declare const index_getReport: typeof getReport;
1152
+ declare const index_getUser: typeof getUser;
1153
+ declare const index_requestBundle: typeof requestBundle;
1154
+ declare const index_requestData: typeof requestData;
1155
+ declare const index_sendAuthLoginRequest: typeof sendAuthLoginRequest;
1156
+ declare const index_sendAuthVerifyRequest: typeof sendAuthVerifyRequest;
1157
+ declare const index_sendUserPromptRequest: typeof sendUserPromptRequest;
1158
+ declare const index_sendUserPromptSuggestionsRequest: typeof sendUserPromptSuggestionsRequest;
1159
+ declare const index_updateDashboard: typeof updateDashboard;
1160
+ declare const index_updateReport: typeof updateReport;
1161
+ declare const index_updateUser: typeof updateUser;
1162
+ declare namespace index {
1163
+ export { type index_Binding as Binding, index_BindingSchema as BindingSchema, type DSLRendererProps$1 as DSLRendererProps, DSLRendererPropsSchema$1 as DSLRendererPropsSchema, type index_Dashboard as Dashboard, type index_Expression as Expression, index_ExpressionSchema as ExpressionSchema, type index_ForDirective as ForDirective, index_ForDirectiveSchema as ForDirectiveSchema, type index_QuerySpec as QuerySpec, index_QuerySpecSchema as QuerySpecSchema, type index_Report as Report, type DSLRendererProps as ReportDSLRendererProps, type index_UIComponent as UIComponent, index_UIComponentSchema as UIComponentSchema, type index_UIElement as UIElement, index_UIElementSchema as UIElementSchema, type index_User as User, index_createDashboard as createDashboard, index_createReport as createReport, index_createUser as createUser, index_deleteDashboard as deleteDashboard, index_deleteReport as deleteReport, index_deleteUser as deleteUser, index_getAllDashboards as getAllDashboards, index_getAllReports as getAllReports, index_getAllUsers as getAllUsers, index_getComponentSuggestions as getComponentSuggestions, index_getDashboard as getDashboard, index_getReport as getReport, index_getUser as getUser, index_requestBundle as requestBundle, index_requestData as requestData, index_sendAuthLoginRequest as sendAuthLoginRequest, index_sendAuthVerifyRequest as sendAuthVerifyRequest, index_sendUserPromptRequest as sendUserPromptRequest, index_sendUserPromptSuggestionsRequest as sendUserPromptSuggestionsRequest, index_updateDashboard as updateDashboard, index_updateReport as updateReport, index_updateUser as updateUser };
1164
+ }
1165
+
1166
+ type MessageHandler = (message: Message) => void;
1167
+ type ConnectionHandler = () => void;
1168
+ type ErrorHandler = (error: Event | Error) => void;
1169
+ /**
1170
+ * SuperatomClient - WebSocket client for SuperAtom platform
1171
+ *
1172
+ * Core WebSocket client handling connection management, messaging, and event handling.
1173
+ * Domain-specific functionality (auth, user prompts, bundles) is delegated to service functions.
1174
+ */
1175
+ declare class SuperatomClient {
1176
+ private socket;
1177
+ private reconnectAttempts;
1178
+ private reconnectTimer;
1179
+ private shouldReconnect;
1180
+ private messageHandlers;
1181
+ private connectionHandlers;
1182
+ private disconnectionHandlers;
1183
+ private errorHandlers;
1184
+ private config;
1185
+ private connectPromise;
1186
+ private connectResolve;
1187
+ constructor(config: ClientConfig);
1188
+ /**
1189
+ * Get WebSocket URL with query parameters
1190
+ */
1191
+ private getWebSocketUrl;
1192
+ /**
1193
+ * Calculate reconnection delay with exponential backoff
1194
+ */
1195
+ private calculateReconnectDelay;
1196
+ /**
1197
+ * Schedule reconnection attempt
1198
+ */
1199
+ private scheduleReconnect;
1200
+ /**
1201
+ * Setup WebSocket event handlers
1202
+ */
1203
+ private setupSocketHandlers;
1204
+ /**
1205
+ * Connect to SuperAtom WebSocket server
1206
+ * Returns a Promise that resolves when the connection is established
1207
+ * The Promise never rejects - failures are logged silently and auto-reconnect is triggered
1208
+ */
1209
+ connect(): Promise<void>;
1210
+ /**
1211
+ * Disconnect from WebSocket server
1212
+ */
1213
+ disconnect(): void;
1214
+ /**
1215
+ * Update client configuration
1216
+ */
1217
+ private updateConfig;
1218
+ /**
1219
+ * Reconnect with new configuration
1220
+ * Disconnects from existing connection and reconnects with updated config
1221
+ * Returns a Promise that resolves when the new connection is established
1222
+ */
1223
+ reconnectWithConfig(config: Partial<ClientConfig>): Promise<void>;
1224
+ /**
1225
+ * Send a message to the server
1226
+ */
1227
+ send(message: Omit<Message, 'from'> & {
1228
+ from?: {
1229
+ type?: string;
1230
+ id?: string;
1231
+ };
1232
+ }): void;
1233
+ /**
1234
+ * Send a message and wait for a response with the same ID
1235
+ * Uses closure-based approach - no global state management needed
1236
+ */
1237
+ sendWithResponse(message: Omit<Message, 'from'> & {
1238
+ from?: {
1239
+ type?: string;
1240
+ id?: string;
1241
+ };
1242
+ }, timeout?: number): Promise<Message>;
1243
+ /**
1244
+ * Register message handler
1245
+ */
1246
+ onMessage(handler: MessageHandler): () => void;
1247
+ /**
1248
+ * Register connection handler
1249
+ */
1250
+ onConnect(handler: ConnectionHandler): () => void;
1251
+ /**
1252
+ * Register disconnection handler
1253
+ */
1254
+ onDisconnect(handler: ConnectionHandler): () => void;
1255
+ /**
1256
+ * Register error handler
1257
+ */
1258
+ onError(handler: ErrorHandler): () => void;
1259
+ /**
1260
+ * Check if client is connected
1261
+ */
1262
+ isConnected(): boolean;
1263
+ /**
1264
+ * Get current reconnection attempts
1265
+ */
1266
+ getReconnectAttempts(): number;
1267
+ /**
1268
+ * Send a message and wait for response with timeout (alias for sendWithResponse)
1269
+ */
1270
+ ask(message: Omit<Message, 'from'> & {
1271
+ from?: {
1272
+ type?: string;
1273
+ id?: string;
1274
+ };
1275
+ }, options?: {
1276
+ timeout?: number;
1277
+ }): Promise<Message>;
1278
+ /**
1279
+ * Send authentication login request
1280
+ * Delegates to auth service
1281
+ */
1282
+ sendAuthLoginRequest(loginDataBase64: string, timeout?: number): Promise<Message>;
1283
+ /**
1284
+ * Send authentication verify request
1285
+ * Delegates to auth service
1286
+ */
1287
+ sendAuthVerifyRequest(token: string, timeout?: number): Promise<Message>;
1288
+ /**
1289
+ * Send a user prompt request
1290
+ * Delegates to user prompt service
1291
+ */
1292
+ sendUserPromptRequest(prompt: string, threadId: string, uiBlockId: string, timeout?: number): Promise<Message>;
1293
+ /**
1294
+ * Send a user prompt suggestions request
1295
+ * Delegates to user prompt service
1296
+ */
1297
+ sendUserPromptSuggestionsRequest(prompt: string, limit?: number, timeout?: number): Promise<Message | null>;
1298
+ /**
1299
+ * Request bundle from server
1300
+ * Delegates to bundle service
1301
+ */
1302
+ requestBundle(options?: {
1303
+ timeout?: number;
1304
+ onProgress?: (progress: number) => void;
1305
+ }): Promise<string>;
1306
+ /**
1307
+ * Request data from a collection
1308
+ * Delegates to data service
1309
+ */
1310
+ requestData(options: {
1311
+ collection: string;
1312
+ operation: string;
1313
+ params?: Record<string, unknown>;
1314
+ timeout?: number;
1315
+ }): Promise<{
1316
+ data?: unknown;
1317
+ error?: string;
1318
+ }>;
1319
+ /**
1320
+ * Get AI-powered component suggestions based on a query
1321
+ * Delegates to component service
1322
+ */
1323
+ getComponentSuggestions(query: string, options?: {
1324
+ timeout?: number;
1325
+ }): Promise<{
1326
+ component?: {
1327
+ id: string;
1328
+ name: string;
1329
+ };
1330
+ error?: string;
1331
+ }>;
1332
+ /**
1333
+ * Create a new user
1334
+ * Delegates to users service
1335
+ */
1336
+ createUser(username: string, password: string, timeout?: number): Promise<{
1337
+ success: boolean;
1338
+ error?: string;
1339
+ message?: string;
1340
+ username?: string;
1341
+ }>;
1342
+ /**
1343
+ * Update an existing user
1344
+ * Delegates to users service
1345
+ */
1346
+ updateUser(username: string, password: string, timeout?: number): Promise<{
1347
+ success: boolean;
1348
+ error?: string;
1349
+ message?: string;
1350
+ username?: string;
1351
+ }>;
1352
+ /**
1353
+ * Delete a user
1354
+ * Delegates to users service
1355
+ */
1356
+ deleteUser(username: string, timeout?: number): Promise<{
1357
+ success: boolean;
1358
+ error?: string;
1359
+ message?: string;
1360
+ username?: string;
1361
+ }>;
1362
+ /**
1363
+ * Get all users
1364
+ * Delegates to users service
1365
+ */
1366
+ getAllUsers(timeout?: number): Promise<{
1367
+ success: boolean;
1368
+ error?: string;
1369
+ users?: User[];
1370
+ count?: number;
1371
+ message?: string;
1372
+ }>;
1373
+ /**
1374
+ * Get a specific user by username
1375
+ * Delegates to users service
1376
+ */
1377
+ getUser(username: string, timeout?: number): Promise<{
1378
+ success: boolean;
1379
+ error?: string;
1380
+ user?: User;
1381
+ message?: string;
1382
+ }>;
1383
+ /**
1384
+ * Create a new dashboard
1385
+ * Delegates to dashboards service
1386
+ */
1387
+ createDashboard(dashboardId: string, dashboard: DSLRendererProps$1, timeout?: number): Promise<{
1388
+ success: boolean;
1389
+ error?: string;
1390
+ message?: string;
1391
+ dashboardId?: string;
1392
+ dashboard?: DSLRendererProps$1;
1393
+ }>;
1394
+ /**
1395
+ * Update an existing dashboard
1396
+ * Delegates to dashboards service
1397
+ */
1398
+ updateDashboard(dashboardId: string, dashboard: DSLRendererProps$1, timeout?: number): Promise<{
1399
+ success: boolean;
1400
+ error?: string;
1401
+ message?: string;
1402
+ dashboardId?: string;
1403
+ dashboard?: DSLRendererProps$1;
1404
+ }>;
1405
+ /**
1406
+ * Delete a dashboard
1407
+ * Delegates to dashboards service
1408
+ */
1409
+ deleteDashboard(dashboardId: string, timeout?: number): Promise<{
1410
+ success: boolean;
1411
+ error?: string;
1412
+ message?: string;
1413
+ dashboardId?: string;
1414
+ }>;
1415
+ /**
1416
+ * Get all dashboards
1417
+ * Delegates to dashboards service
1418
+ */
1419
+ getAllDashboards(timeout?: number): Promise<{
1420
+ success: boolean;
1421
+ error?: string;
1422
+ dashboards?: Dashboard[];
1423
+ count?: number;
1424
+ message?: string;
1425
+ }>;
1426
+ /**
1427
+ * Get a specific dashboard by ID
1428
+ * Delegates to dashboards service
1429
+ */
1430
+ getDashboard(dashboardId: string, timeout?: number): Promise<{
1431
+ success: boolean;
1432
+ error?: string;
1433
+ dashboardId?: string;
1434
+ dashboard?: DSLRendererProps$1;
1435
+ message?: string;
1436
+ }>;
1437
+ /**
1438
+ * Create a new report
1439
+ * Delegates to reports service
1440
+ */
1441
+ createReport(reportId: string, report: DSLRendererProps, timeout?: number): Promise<{
1442
+ success: boolean;
1443
+ error?: string;
1444
+ message?: string;
1445
+ reportId?: string;
1446
+ report?: DSLRendererProps;
1447
+ }>;
1448
+ /**
1449
+ * Update an existing report
1450
+ * Delegates to reports service
1451
+ */
1452
+ updateReport(reportId: string, report: DSLRendererProps, timeout?: number): Promise<{
1453
+ success: boolean;
1454
+ error?: string;
1455
+ message?: string;
1456
+ reportId?: string;
1457
+ report?: DSLRendererProps;
1458
+ }>;
1459
+ /**
1460
+ * Delete a report
1461
+ * Delegates to reports service
1462
+ */
1463
+ deleteReport(reportId: string, timeout?: number): Promise<{
1464
+ success: boolean;
1465
+ error?: string;
1466
+ message?: string;
1467
+ reportId?: string;
1468
+ }>;
1469
+ /**
1470
+ * Get all reports
1471
+ * Delegates to reports service
1472
+ */
1473
+ getAllReports(timeout?: number): Promise<{
1474
+ success: boolean;
1475
+ error?: string;
1476
+ reports?: Report[];
1477
+ count?: number;
1478
+ message?: string;
1479
+ }>;
1480
+ /**
1481
+ * Get a specific report by ID
1482
+ * Delegates to reports service
1483
+ */
1484
+ getReport(reportId: string, timeout?: number): Promise<{
1485
+ success: boolean;
1486
+ error?: string;
1487
+ reportId?: string;
1488
+ report?: DSLRendererProps;
1489
+ message?: string;
1490
+ }>;
1491
+ /**
1492
+ * Internal logging
1493
+ */
1494
+ private log;
1495
+ }
1496
+
1497
+ /**
1498
+ * Component mount function type
1499
+ */
1500
+ type MountFunction = (Component: any, container: HTMLElement, props?: Record<string, any>) => {
1501
+ unmount: () => void;
1502
+ };
1503
+ /**
1504
+ * Components registry interface
1505
+ */
1506
+ interface ComponentsRegistry {
1507
+ [key: string]: any;
1508
+ mount: MountFunction;
1509
+ }
1510
+ /**
1511
+ * SuperAtom global interface
1512
+ */
1513
+ interface SuperAtomGlobal {
1514
+ COMPONENTS?: ComponentsRegistry;
1515
+ wsClient?: any;
1516
+ runtime?: {
1517
+ componentsLoaded?: () => void;
1518
+ };
1519
+ }
1520
+ declare global {
1521
+ interface Window {
1522
+ SUPERATOM?: SuperAtomGlobal;
1523
+ SA?: SuperAtomGlobal;
1524
+ }
1525
+ }
1526
+ /**
1527
+ * Setup function to register components with SuperAtom
1528
+ * This makes components available to the runtime for dynamic rendering
1529
+ */
1530
+ declare function setup(components: ComponentsRegistry): void;
1531
+ /**
1532
+ * Get registered components
1533
+ */
1534
+ declare function getComponents(): ComponentsRegistry | undefined;
1535
+ /**
1536
+ * Get a specific component by name
1537
+ */
1538
+ declare function getComponent(name: string): any;
1539
+ /**
1540
+ * Check if components are registered
1541
+ */
1542
+ declare function hasComponents(): boolean;
1543
+
1544
+ /**
1545
+ * @superatom/sdk-web
1546
+ * SuperAtom Web SDK - TypeScript SDK for browser-based WebSocket communication
1547
+ */
1548
+ declare const SDK_VERSION = "0.1.0";
1549
+
1550
+ export { type AuthLoginPayload, AuthLoginPayloadSchema, type AuthLoginRequestMessage, AuthLoginRequestMessageSchema, type AuthLoginResponseMessage, AuthLoginResponseMessageSchema, type AuthLoginResponsePayload, AuthLoginResponsePayloadSchema, type AuthVerifyPayload, AuthVerifyPayloadSchema, type AuthVerifyRequestMessage, AuthVerifyRequestMessageSchema, type AuthVerifyResponseMessage, AuthVerifyResponseMessageSchema, type AuthVerifyResponsePayload, AuthVerifyResponsePayloadSchema, type BundleChunkMessage, BundleChunkMessageSchema, type BundleChunkPayload, BundleChunkPayloadSchema, type BundleErrorMessage, BundleErrorMessageSchema, type BundleErrorPayload, BundleErrorPayloadSchema, type BundleRequestMessage, BundleRequestMessageSchema, type BundleRequestPayload, BundleRequestPayloadSchema, type ClientConfig, ClientConfigSchema, type Component, ComponentSchema, type ComponentsRegistry, type DataRequestMessage, DataRequestMessageSchema, type DataRequestPayload, DataRequestPayloadSchema, type DataResponseMessage, DataResponseMessageSchema, type DataResponsePayload, DataResponsePayloadSchema, type Message, type MessageParticipant, MessageParticipantSchema, MessageSchema, type MountFunction, type ResolvedClientConfig, SDK_VERSION, type SuperAtomGlobal, SuperatomClient, type UILogEntry, UILogEntrySchema, type UILogsMessage, UILogsMessageSchema, type UILogsPayload, UILogsPayloadSchema, type UserPromptRequestMessage, UserPromptRequestMessageSchema, type UserPromptRequestPayload, UserPromptRequestPayloadSchema, type UserPromptResponseMessage, UserPromptResponseMessageSchema, type UserPromptResponsePayload, UserPromptResponsePayloadSchema, type UserPromptSuggestionsRequestMessage, UserPromptSuggestionsRequestMessageSchema, type UserPromptSuggestionsRequestPayload, UserPromptSuggestionsRequestPayloadSchema, type UserPromptSuggestionsResponseMessage, UserPromptSuggestionsResponseMessageSchema, type UserPromptSuggestionsResponsePayload, UserPromptSuggestionsResponsePayloadSchema, getComponent, getComponents, hasComponents, index as services, setup };