@superatomai/sdk-web 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -481,11 +481,28 @@ zod.z.object({
481
481
  to: MessageParticipantSchema.optional(),
482
482
  payload: UsersResponsePayloadSchema
483
483
  });
484
+ var DashboardQueryFiltersSchema = zod.z.object({
485
+ dashboardId: zod.z.string().optional(),
486
+ projectId: zod.z.string().optional(),
487
+ createdBy: zod.z.number().optional(),
488
+ updatedBy: zod.z.number().optional(),
489
+ name: zod.z.string().optional()
490
+ });
484
491
  var DashboardsRequestPayloadSchema = zod.z.object({
485
- operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne"]),
492
+ operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
486
493
  data: zod.z.object({
494
+ id: zod.z.number().optional(),
487
495
  dashboardId: zod.z.string().optional(),
488
- dashboard: DSLRendererPropsSchema.optional()
496
+ projectId: zod.z.string().optional(),
497
+ name: zod.z.string().optional(),
498
+ description: zod.z.string().optional(),
499
+ createdBy: zod.z.number().optional(),
500
+ updatedBy: zod.z.number().optional(),
501
+ dashboard: DSLRendererPropsSchema.optional(),
502
+ // Query operation fields
503
+ filters: DashboardQueryFiltersSchema.optional(),
504
+ limit: zod.z.number().optional(),
505
+ sort: zod.z.enum(["ASC", "DESC"]).optional()
489
506
  }).optional()
490
507
  });
491
508
  var DashboardsRequestMessageSchema = zod.z.object({
@@ -516,11 +533,28 @@ zod.z.object({
516
533
  to: MessageParticipantSchema.optional(),
517
534
  payload: DashboardsResponsePayloadSchema
518
535
  });
536
+ var ReportQueryFiltersSchema = zod.z.object({
537
+ reportId: zod.z.string().optional(),
538
+ projectId: zod.z.string().optional(),
539
+ createdBy: zod.z.number().optional(),
540
+ updatedBy: zod.z.number().optional(),
541
+ name: zod.z.string().optional()
542
+ });
519
543
  var ReportsRequestPayloadSchema = zod.z.object({
520
- operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne"]),
544
+ operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
521
545
  data: zod.z.object({
546
+ id: zod.z.number().optional(),
522
547
  reportId: zod.z.string().optional(),
523
- report: DSLRendererPropsSchema2.optional()
548
+ projectId: zod.z.string().optional(),
549
+ name: zod.z.string().optional(),
550
+ description: zod.z.string().optional(),
551
+ createdBy: zod.z.number().optional(),
552
+ updatedBy: zod.z.number().optional(),
553
+ report: DSLRendererPropsSchema2.optional(),
554
+ // Query operation fields
555
+ filters: ReportQueryFiltersSchema.optional(),
556
+ limit: zod.z.number().optional(),
557
+ sort: zod.z.enum(["ASC", "DESC"]).optional()
524
558
  }).optional()
525
559
  });
526
560
  var ReportsRequestMessageSchema = zod.z.object({
@@ -551,10 +585,67 @@ zod.z.object({
551
585
  to: MessageParticipantSchema.optional(),
552
586
  payload: ReportsResponsePayloadSchema
553
587
  });
588
+ var UIQueryFiltersSchema = zod.z.object({
589
+ uiId: zod.z.string().optional(),
590
+ projectId: zod.z.string().optional(),
591
+ createdBy: zod.z.number().optional(),
592
+ updatedBy: zod.z.number().optional(),
593
+ name: zod.z.string().optional()
594
+ });
595
+ var UIsRequestPayloadSchema = zod.z.object({
596
+ operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
597
+ data: zod.z.object({
598
+ id: zod.z.number().optional(),
599
+ uiId: zod.z.string().optional(),
600
+ projectId: zod.z.string().optional(),
601
+ name: zod.z.string().optional(),
602
+ description: zod.z.string().optional(),
603
+ createdBy: zod.z.number().optional(),
604
+ updatedBy: zod.z.number().optional(),
605
+ ui: DSLRendererPropsSchema.optional(),
606
+ // Query operation fields
607
+ filters: UIQueryFiltersSchema.optional(),
608
+ limit: zod.z.number().optional(),
609
+ sort: zod.z.enum(["ASC", "DESC"]).optional()
610
+ }).optional()
611
+ });
612
+ var UIsRequestMessageSchema = zod.z.object({
613
+ id: zod.z.string(),
614
+ type: zod.z.literal("UIS"),
615
+ from: MessageParticipantSchema,
616
+ to: MessageParticipantSchema.optional(),
617
+ payload: UIsRequestPayloadSchema
618
+ });
619
+ var UIsResponsePayloadSchema = zod.z.object({
620
+ success: zod.z.boolean(),
621
+ error: zod.z.string().optional(),
622
+ data: zod.z.object({
623
+ uiId: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
624
+ ui: DSLRendererPropsSchema.optional(),
625
+ uis: zod.z.array(zod.z.object({
626
+ uiId: zod.z.string(),
627
+ ui: DSLRendererPropsSchema.optional()
628
+ })).optional(),
629
+ count: zod.z.number().optional(),
630
+ message: zod.z.string().optional()
631
+ }).optional()
632
+ });
633
+ zod.z.object({
634
+ id: zod.z.string(),
635
+ type: zod.z.literal("UIS_RES"),
636
+ from: MessageParticipantSchema,
637
+ to: MessageParticipantSchema.optional(),
638
+ payload: UIsResponsePayloadSchema
639
+ });
640
+ var DBUIBlockSchema = zod.z.object({
641
+ id: zod.z.string(),
642
+ component: zod.z.record(zod.z.string(), zod.z.any()).nullable(),
643
+ analysis: zod.z.string().nullable(),
644
+ user_prompt: zod.z.string()
645
+ });
554
646
  var BookmarkDataSchema = zod.z.object({
555
647
  id: zod.z.number().optional(),
556
- uiblock: zod.z.any(),
557
- // JSON object
648
+ uiblock: DBUIBlockSchema,
558
649
  created_at: zod.z.string().optional(),
559
650
  updated_at: zod.z.string().optional()
560
651
  });
@@ -564,7 +655,9 @@ var BookmarksRequestPayloadSchema = zod.z.object({
564
655
  id: zod.z.number().optional(),
565
656
  userId: zod.z.number().optional(),
566
657
  threadId: zod.z.string().optional(),
567
- uiblock: zod.z.any().optional()
658
+ name: zod.z.string().optional(),
659
+ description: zod.z.string().optional(),
660
+ uiblock: DBUIBlockSchema.optional()
568
661
  }).optional()
569
662
  });
570
663
  var BookmarksRequestMessageSchema = zod.z.object({
@@ -616,15 +709,18 @@ __export(services_exports, {
616
709
  createBookmark: () => createBookmark,
617
710
  createDashboard: () => createDashboard,
618
711
  createReport: () => createReport,
712
+ createUI: () => createUI,
619
713
  createUser: () => createUser,
620
714
  deleteBookmark: () => deleteBookmark,
621
715
  deleteDashboard: () => deleteDashboard,
622
716
  deleteReport: () => deleteReport,
717
+ deleteUI: () => deleteUI,
623
718
  deleteUser: () => deleteUser,
624
719
  getActions: () => getActions,
625
720
  getAllBookmarks: () => getAllBookmarks,
626
721
  getAllDashboards: () => getAllDashboards,
627
722
  getAllReports: () => getAllReports,
723
+ getAllUIs: () => getAllUIs,
628
724
  getAllUsers: () => getAllUsers,
629
725
  getBookmark: () => getBookmark,
630
726
  getBookmarksByThread: () => getBookmarksByThread,
@@ -632,7 +728,11 @@ __export(services_exports, {
632
728
  getComponentSuggestions: () => getComponentSuggestions,
633
729
  getDashboard: () => getDashboard,
634
730
  getReport: () => getReport,
731
+ getUI: () => getUI,
635
732
  getUser: () => getUser,
733
+ queryDashboards: () => queryDashboards,
734
+ queryReports: () => queryReports,
735
+ queryUIs: () => queryUIs,
636
736
  requestBundle: () => requestBundle,
637
737
  requestData: () => requestData,
638
738
  sendAuthLoginRequest: () => sendAuthLoginRequest,
@@ -643,6 +743,7 @@ __export(services_exports, {
643
743
  updateBookmark: () => updateBookmark,
644
744
  updateDashboard: () => updateDashboard,
645
745
  updateReport: () => updateReport,
746
+ updateUI: () => updateUI,
646
747
  updateUser: () => updateUser
647
748
  });
648
749
 
@@ -987,7 +1088,8 @@ async function getUser(client, username, timeout) {
987
1088
  }
988
1089
 
989
1090
  // src/services/dashboards/index.ts
990
- async function createDashboard(client, dashboardId, dashboard, timeout) {
1091
+ async function createDashboard(client, options, timeout) {
1092
+ const { dashboardId, projectId, name, description, createdBy, dashboard } = options;
991
1093
  const messageId = `dashboards_create_${Date.now()}`;
992
1094
  const message = DashboardsRequestMessageSchema.parse({
993
1095
  id: messageId,
@@ -998,6 +1100,10 @@ async function createDashboard(client, dashboardId, dashboard, timeout) {
998
1100
  operation: "create",
999
1101
  data: {
1000
1102
  dashboardId,
1103
+ projectId,
1104
+ name,
1105
+ description,
1106
+ createdBy,
1001
1107
  dashboard
1002
1108
  }
1003
1109
  }
@@ -1008,11 +1114,13 @@ async function createDashboard(client, dashboardId, dashboard, timeout) {
1008
1114
  success: payload.success,
1009
1115
  error: payload.error,
1010
1116
  message: payload.data?.message,
1117
+ id: payload.data?.id,
1011
1118
  dashboardId: payload.data?.dashboardId,
1012
1119
  dashboard: payload.data?.dashboard
1013
1120
  };
1014
1121
  }
1015
- async function updateDashboard(client, dashboardId, dashboard, timeout) {
1122
+ async function updateDashboard(client, options, timeout) {
1123
+ const { id, name, description, createdBy, updatedBy, dashboard } = options;
1016
1124
  const messageId = `dashboards_update_${Date.now()}`;
1017
1125
  const message = DashboardsRequestMessageSchema.parse({
1018
1126
  id: messageId,
@@ -1022,7 +1130,11 @@ async function updateDashboard(client, dashboardId, dashboard, timeout) {
1022
1130
  payload: {
1023
1131
  operation: "update",
1024
1132
  data: {
1025
- dashboardId,
1133
+ id,
1134
+ name,
1135
+ description,
1136
+ createdBy,
1137
+ updatedBy,
1026
1138
  dashboard
1027
1139
  }
1028
1140
  }
@@ -1033,11 +1145,12 @@ async function updateDashboard(client, dashboardId, dashboard, timeout) {
1033
1145
  success: payload.success,
1034
1146
  error: payload.error,
1035
1147
  message: payload.data?.message,
1148
+ id: payload.data?.id,
1036
1149
  dashboardId: payload.data?.dashboardId,
1037
1150
  dashboard: payload.data?.dashboard
1038
1151
  };
1039
1152
  }
1040
- async function deleteDashboard(client, dashboardId, timeout) {
1153
+ async function deleteDashboard(client, id, timeout) {
1041
1154
  const messageId = `dashboards_delete_${Date.now()}`;
1042
1155
  const message = DashboardsRequestMessageSchema.parse({
1043
1156
  id: messageId,
@@ -1047,7 +1160,7 @@ async function deleteDashboard(client, dashboardId, timeout) {
1047
1160
  payload: {
1048
1161
  operation: "delete",
1049
1162
  data: {
1050
- dashboardId
1163
+ id
1051
1164
  }
1052
1165
  }
1053
1166
  });
@@ -1057,7 +1170,7 @@ async function deleteDashboard(client, dashboardId, timeout) {
1057
1170
  success: payload.success,
1058
1171
  error: payload.error,
1059
1172
  message: payload.data?.message,
1060
- dashboardId: payload.data?.dashboardId
1173
+ id: payload.data?.id
1061
1174
  };
1062
1175
  }
1063
1176
  async function getAllDashboards(client, timeout) {
@@ -1081,7 +1194,7 @@ async function getAllDashboards(client, timeout) {
1081
1194
  message: payload.data?.message
1082
1195
  };
1083
1196
  }
1084
- async function getDashboard(client, dashboardId, timeout) {
1197
+ async function getDashboard(client, id, timeout) {
1085
1198
  const messageId = `dashboards_getone_${Date.now()}`;
1086
1199
  const message = DashboardsRequestMessageSchema.parse({
1087
1200
  id: messageId,
@@ -1091,7 +1204,7 @@ async function getDashboard(client, dashboardId, timeout) {
1091
1204
  payload: {
1092
1205
  operation: "getOne",
1093
1206
  data: {
1094
- dashboardId
1207
+ id
1095
1208
  }
1096
1209
  }
1097
1210
  });
@@ -1100,14 +1213,43 @@ async function getDashboard(client, dashboardId, timeout) {
1100
1213
  return {
1101
1214
  success: payload.success,
1102
1215
  error: payload.error,
1216
+ id: payload.data?.id,
1103
1217
  dashboardId: payload.data?.dashboardId,
1104
1218
  dashboard: payload.data?.dashboard,
1105
1219
  message: payload.data?.message
1106
1220
  };
1107
1221
  }
1222
+ async function queryDashboards(client, options = {}, timeout) {
1223
+ const { filters, limit, sort } = options;
1224
+ const messageId = `dashboards_query_${Date.now()}`;
1225
+ const message = DashboardsRequestMessageSchema.parse({
1226
+ id: messageId,
1227
+ type: "DASHBOARDS",
1228
+ from: { type: client.type },
1229
+ to: { type: "data-agent" },
1230
+ payload: {
1231
+ operation: "query",
1232
+ data: {
1233
+ filters,
1234
+ limit,
1235
+ sort
1236
+ }
1237
+ }
1238
+ });
1239
+ const response = await client.sendWithResponse(message, timeout);
1240
+ const payload = response.payload;
1241
+ return {
1242
+ success: payload.success,
1243
+ error: payload.error,
1244
+ dashboards: payload.data?.dashboards,
1245
+ count: payload.data?.count,
1246
+ message: payload.data?.message
1247
+ };
1248
+ }
1108
1249
 
1109
1250
  // src/services/reports/index.ts
1110
- async function createReport(client, reportId, report, timeout) {
1251
+ async function createReport(client, options, timeout) {
1252
+ const { reportId, projectId, name, description, createdBy, report } = options;
1111
1253
  const messageId = `reports_create_${Date.now()}`;
1112
1254
  const message = ReportsRequestMessageSchema.parse({
1113
1255
  id: messageId,
@@ -1118,6 +1260,10 @@ async function createReport(client, reportId, report, timeout) {
1118
1260
  operation: "create",
1119
1261
  data: {
1120
1262
  reportId,
1263
+ projectId,
1264
+ name,
1265
+ description,
1266
+ createdBy,
1121
1267
  report
1122
1268
  }
1123
1269
  }
@@ -1128,11 +1274,13 @@ async function createReport(client, reportId, report, timeout) {
1128
1274
  success: payload.success,
1129
1275
  error: payload.error,
1130
1276
  message: payload.data?.message,
1277
+ id: payload.data?.id,
1131
1278
  reportId: payload.data?.reportId,
1132
1279
  report: payload.data?.report
1133
1280
  };
1134
1281
  }
1135
- async function updateReport(client, reportId, report, timeout) {
1282
+ async function updateReport(client, options, timeout) {
1283
+ const { id, name, description, createdBy, updatedBy, report } = options;
1136
1284
  const messageId = `reports_update_${Date.now()}`;
1137
1285
  const message = ReportsRequestMessageSchema.parse({
1138
1286
  id: messageId,
@@ -1142,7 +1290,11 @@ async function updateReport(client, reportId, report, timeout) {
1142
1290
  payload: {
1143
1291
  operation: "update",
1144
1292
  data: {
1145
- reportId,
1293
+ id,
1294
+ name,
1295
+ description,
1296
+ createdBy,
1297
+ updatedBy,
1146
1298
  report
1147
1299
  }
1148
1300
  }
@@ -1153,11 +1305,12 @@ async function updateReport(client, reportId, report, timeout) {
1153
1305
  success: payload.success,
1154
1306
  error: payload.error,
1155
1307
  message: payload.data?.message,
1308
+ id: payload.data?.id,
1156
1309
  reportId: payload.data?.reportId,
1157
1310
  report: payload.data?.report
1158
1311
  };
1159
1312
  }
1160
- async function deleteReport(client, reportId, timeout) {
1313
+ async function deleteReport(client, id, timeout) {
1161
1314
  const messageId = `reports_delete_${Date.now()}`;
1162
1315
  const message = ReportsRequestMessageSchema.parse({
1163
1316
  id: messageId,
@@ -1167,7 +1320,7 @@ async function deleteReport(client, reportId, timeout) {
1167
1320
  payload: {
1168
1321
  operation: "delete",
1169
1322
  data: {
1170
- reportId
1323
+ id
1171
1324
  }
1172
1325
  }
1173
1326
  });
@@ -1177,7 +1330,7 @@ async function deleteReport(client, reportId, timeout) {
1177
1330
  success: payload.success,
1178
1331
  error: payload.error,
1179
1332
  message: payload.data?.message,
1180
- reportId: payload.data?.reportId
1333
+ id: payload.data?.id
1181
1334
  };
1182
1335
  }
1183
1336
  async function getAllReports(client, timeout) {
@@ -1201,7 +1354,7 @@ async function getAllReports(client, timeout) {
1201
1354
  message: payload.data?.message
1202
1355
  };
1203
1356
  }
1204
- async function getReport(client, reportId, timeout) {
1357
+ async function getReport(client, id, timeout) {
1205
1358
  const messageId = `reports_getone_${Date.now()}`;
1206
1359
  const message = ReportsRequestMessageSchema.parse({
1207
1360
  id: messageId,
@@ -1211,7 +1364,7 @@ async function getReport(client, reportId, timeout) {
1211
1364
  payload: {
1212
1365
  operation: "getOne",
1213
1366
  data: {
1214
- reportId
1367
+ id
1215
1368
  }
1216
1369
  }
1217
1370
  });
@@ -1220,14 +1373,43 @@ async function getReport(client, reportId, timeout) {
1220
1373
  return {
1221
1374
  success: payload.success,
1222
1375
  error: payload.error,
1376
+ id: payload.data?.id,
1223
1377
  reportId: payload.data?.reportId,
1224
1378
  report: payload.data?.report,
1225
1379
  message: payload.data?.message
1226
1380
  };
1227
1381
  }
1382
+ async function queryReports(client, options = {}, timeout) {
1383
+ const { filters, limit, sort } = options;
1384
+ const messageId = `reports_query_${Date.now()}`;
1385
+ const message = ReportsRequestMessageSchema.parse({
1386
+ id: messageId,
1387
+ type: "REPORTS",
1388
+ from: { type: client.type },
1389
+ to: { type: "data-agent" },
1390
+ payload: {
1391
+ operation: "query",
1392
+ data: {
1393
+ filters,
1394
+ limit,
1395
+ sort
1396
+ }
1397
+ }
1398
+ });
1399
+ const response = await client.sendWithResponse(message, timeout);
1400
+ const payload = response.payload;
1401
+ return {
1402
+ success: payload.success,
1403
+ error: payload.error,
1404
+ reports: payload.data?.reports,
1405
+ count: payload.data?.count,
1406
+ message: payload.data?.message
1407
+ };
1408
+ }
1228
1409
 
1229
1410
  // src/services/bookmarks/index.ts
1230
- async function createBookmark(client, userId, uiblock, threadId, timeout) {
1411
+ async function createBookmark(client, options, timeout) {
1412
+ const { userId, uiblock, threadId, name, description } = options;
1231
1413
  const messageId = `bookmarks_create_${Date.now()}`;
1232
1414
  const message = BookmarksRequestMessageSchema.parse({
1233
1415
  id: messageId,
@@ -1239,6 +1421,8 @@ async function createBookmark(client, userId, uiblock, threadId, timeout) {
1239
1421
  data: {
1240
1422
  userId,
1241
1423
  threadId,
1424
+ name,
1425
+ description,
1242
1426
  uiblock
1243
1427
  }
1244
1428
  }
@@ -1252,7 +1436,8 @@ async function createBookmark(client, userId, uiblock, threadId, timeout) {
1252
1436
  data: Array.isArray(payload.data) ? payload.data[0] : payload.data
1253
1437
  };
1254
1438
  }
1255
- async function updateBookmark(client, id, uiblock, timeout) {
1439
+ async function updateBookmark(client, options, timeout) {
1440
+ const { id, uiblock, threadId, name, description } = options;
1256
1441
  const messageId = `bookmarks_update_${Date.now()}`;
1257
1442
  const message = BookmarksRequestMessageSchema.parse({
1258
1443
  id: messageId,
@@ -1263,6 +1448,9 @@ async function updateBookmark(client, id, uiblock, timeout) {
1263
1448
  operation: "update",
1264
1449
  data: {
1265
1450
  id,
1451
+ threadId,
1452
+ name,
1453
+ description,
1266
1454
  uiblock
1267
1455
  }
1268
1456
  }
@@ -1414,6 +1602,166 @@ async function getActions(client, options) {
1414
1602
  };
1415
1603
  }
1416
1604
 
1605
+ // src/services/uis/index.ts
1606
+ async function createUI(client, options, timeout) {
1607
+ const { uiId, projectId, name, description, createdBy, ui } = options;
1608
+ const messageId = `uis_create_${Date.now()}`;
1609
+ const message = UIsRequestMessageSchema.parse({
1610
+ id: messageId,
1611
+ type: "UIS",
1612
+ from: { type: client.type },
1613
+ to: { type: "data-agent" },
1614
+ payload: {
1615
+ operation: "create",
1616
+ data: {
1617
+ uiId,
1618
+ projectId,
1619
+ name,
1620
+ description,
1621
+ createdBy,
1622
+ ui
1623
+ }
1624
+ }
1625
+ });
1626
+ const response = await client.sendWithResponse(message, timeout);
1627
+ const payload = response.payload;
1628
+ return {
1629
+ success: payload.success,
1630
+ error: payload.error,
1631
+ message: payload.data?.message,
1632
+ id: payload.data?.id,
1633
+ uiId: payload.data?.uiId,
1634
+ ui: payload.data?.ui
1635
+ };
1636
+ }
1637
+ async function updateUI(client, options, timeout) {
1638
+ const { id, name, description, createdBy, updatedBy, ui } = options;
1639
+ const messageId = `uis_update_${Date.now()}`;
1640
+ const message = UIsRequestMessageSchema.parse({
1641
+ id: messageId,
1642
+ type: "UIS",
1643
+ from: { type: client.type },
1644
+ to: { type: "data-agent" },
1645
+ payload: {
1646
+ operation: "update",
1647
+ data: {
1648
+ id,
1649
+ name,
1650
+ description,
1651
+ createdBy,
1652
+ updatedBy,
1653
+ ui
1654
+ }
1655
+ }
1656
+ });
1657
+ const response = await client.sendWithResponse(message, timeout);
1658
+ const payload = response.payload;
1659
+ return {
1660
+ success: payload.success,
1661
+ error: payload.error,
1662
+ message: payload.data?.message,
1663
+ id: payload.data?.id,
1664
+ uiId: payload.data?.uiId,
1665
+ ui: payload.data?.ui
1666
+ };
1667
+ }
1668
+ async function deleteUI(client, id, timeout) {
1669
+ const messageId = `uis_delete_${Date.now()}`;
1670
+ const message = UIsRequestMessageSchema.parse({
1671
+ id: messageId,
1672
+ type: "UIS",
1673
+ from: { type: client.type },
1674
+ to: { type: "data-agent" },
1675
+ payload: {
1676
+ operation: "delete",
1677
+ data: {
1678
+ id
1679
+ }
1680
+ }
1681
+ });
1682
+ const response = await client.sendWithResponse(message, timeout);
1683
+ const payload = response.payload;
1684
+ return {
1685
+ success: payload.success,
1686
+ error: payload.error,
1687
+ message: payload.data?.message,
1688
+ id: payload.data?.id
1689
+ };
1690
+ }
1691
+ async function getAllUIs(client, timeout) {
1692
+ const messageId = `uis_getall_${Date.now()}`;
1693
+ const message = UIsRequestMessageSchema.parse({
1694
+ id: messageId,
1695
+ type: "UIS",
1696
+ from: { type: client.type },
1697
+ to: { type: "data-agent" },
1698
+ payload: {
1699
+ operation: "getAll"
1700
+ }
1701
+ });
1702
+ const response = await client.sendWithResponse(message, timeout);
1703
+ const payload = response.payload;
1704
+ return {
1705
+ success: payload.success,
1706
+ error: payload.error,
1707
+ uis: payload.data?.uis,
1708
+ count: payload.data?.count,
1709
+ message: payload.data?.message
1710
+ };
1711
+ }
1712
+ async function getUI(client, id, timeout) {
1713
+ const messageId = `uis_getone_${Date.now()}`;
1714
+ const message = UIsRequestMessageSchema.parse({
1715
+ id: messageId,
1716
+ type: "UIS",
1717
+ from: { type: client.type },
1718
+ to: { type: "data-agent" },
1719
+ payload: {
1720
+ operation: "getOne",
1721
+ data: {
1722
+ id
1723
+ }
1724
+ }
1725
+ });
1726
+ const response = await client.sendWithResponse(message, timeout);
1727
+ const payload = response.payload;
1728
+ return {
1729
+ success: payload.success,
1730
+ error: payload.error,
1731
+ id: payload.data?.id,
1732
+ uiId: payload.data?.uiId,
1733
+ ui: payload.data?.ui,
1734
+ message: payload.data?.message
1735
+ };
1736
+ }
1737
+ async function queryUIs(client, options = {}, timeout) {
1738
+ const { filters, limit, sort } = options;
1739
+ const messageId = `uis_query_${Date.now()}`;
1740
+ const message = UIsRequestMessageSchema.parse({
1741
+ id: messageId,
1742
+ type: "UIS",
1743
+ from: { type: client.type },
1744
+ to: { type: "data-agent" },
1745
+ payload: {
1746
+ operation: "query",
1747
+ data: {
1748
+ filters,
1749
+ limit,
1750
+ sort
1751
+ }
1752
+ }
1753
+ });
1754
+ const response = await client.sendWithResponse(message, timeout);
1755
+ const payload = response.payload;
1756
+ return {
1757
+ success: payload.success,
1758
+ error: payload.error,
1759
+ uis: payload.data?.uis,
1760
+ count: payload.data?.count,
1761
+ message: payload.data?.message
1762
+ };
1763
+ }
1764
+
1417
1765
  // src/client.ts
1418
1766
  var SuperatomClient = class {
1419
1767
  constructor(config) {
@@ -1797,25 +2145,25 @@ var SuperatomClient = class {
1797
2145
  * Create a new dashboard
1798
2146
  * Delegates to dashboards service
1799
2147
  */
1800
- async createDashboard(dashboardId, dashboard, timeout) {
1801
- this.log("info", "Creating dashboard:", dashboardId);
1802
- return createDashboard(this, dashboardId, dashboard, timeout);
2148
+ async createDashboard(options, timeout) {
2149
+ this.log("info", "Creating dashboard:", options.dashboardId);
2150
+ return createDashboard(this, options, timeout);
1803
2151
  }
1804
2152
  /**
1805
2153
  * Update an existing dashboard
1806
2154
  * Delegates to dashboards service
1807
2155
  */
1808
- async updateDashboard(dashboardId, dashboard, timeout) {
1809
- this.log("info", "Updating dashboard:", dashboardId);
1810
- return updateDashboard(this, dashboardId, dashboard, timeout);
2156
+ async updateDashboard(options, timeout) {
2157
+ this.log("info", "Updating dashboard:", options.id);
2158
+ return updateDashboard(this, options, timeout);
1811
2159
  }
1812
2160
  /**
1813
2161
  * Delete a dashboard
1814
2162
  * Delegates to dashboards service
1815
2163
  */
1816
- async deleteDashboard(dashboardId, timeout) {
1817
- this.log("info", "Deleting dashboard:", dashboardId);
1818
- return deleteDashboard(this, dashboardId, timeout);
2164
+ async deleteDashboard(id, timeout) {
2165
+ this.log("info", "Deleting dashboard:", id);
2166
+ return deleteDashboard(this, id, timeout);
1819
2167
  }
1820
2168
  /**
1821
2169
  * Get all dashboards
@@ -1829,9 +2177,17 @@ var SuperatomClient = class {
1829
2177
  * Get a specific dashboard by ID
1830
2178
  * Delegates to dashboards service
1831
2179
  */
1832
- async getDashboard(dashboardId, timeout) {
1833
- this.log("info", "Fetching dashboard:", dashboardId);
1834
- return getDashboard(this, dashboardId, timeout);
2180
+ async getDashboard(id, timeout) {
2181
+ this.log("info", "Fetching dashboard:", id);
2182
+ return getDashboard(this, id, timeout);
2183
+ }
2184
+ /**
2185
+ * Query dashboards with filters
2186
+ * Delegates to dashboards service
2187
+ */
2188
+ async queryDashboards(options, timeout) {
2189
+ this.log("info", "Querying dashboards with filters:", options?.filters);
2190
+ return queryDashboards(this, options, timeout);
1835
2191
  }
1836
2192
  // ==================== Bookmark Management Methods ====================
1837
2193
  // These methods delegate to bookmark service for bookmark CRUD operations
@@ -1839,17 +2195,17 @@ var SuperatomClient = class {
1839
2195
  * Create a new bookmark
1840
2196
  * Delegates to bookmarks service
1841
2197
  */
1842
- async createBookmark(userId, uiblock, threadId, timeout) {
1843
- this.log("info", "Creating bookmark for user:", userId);
1844
- return createBookmark(this, userId, uiblock, threadId, timeout);
2198
+ async createBookmark(options, timeout) {
2199
+ this.log("info", "Creating bookmark for user:", options.userId);
2200
+ return createBookmark(this, options, timeout);
1845
2201
  }
1846
2202
  /**
1847
2203
  * Update an existing bookmark
1848
2204
  * Delegates to bookmarks service
1849
2205
  */
1850
- async updateBookmark(id, uiblock, timeout) {
1851
- this.log("info", "Updating bookmark:", id);
1852
- return updateBookmark(this, id, uiblock, timeout);
2206
+ async updateBookmark(options, timeout) {
2207
+ this.log("info", "Updating bookmark:", options.id);
2208
+ return updateBookmark(this, options, timeout);
1853
2209
  }
1854
2210
  /**
1855
2211
  * Delete a bookmark
@@ -1897,25 +2253,25 @@ var SuperatomClient = class {
1897
2253
  * Create a new report
1898
2254
  * Delegates to reports service
1899
2255
  */
1900
- async createReport(reportId, report, timeout) {
1901
- this.log("info", "Creating report:", reportId);
1902
- return createReport(this, reportId, report, timeout);
2256
+ async createReport(options, timeout) {
2257
+ this.log("info", "Creating report:", options.reportId);
2258
+ return createReport(this, options, timeout);
1903
2259
  }
1904
2260
  /**
1905
2261
  * Update an existing report
1906
2262
  * Delegates to reports service
1907
2263
  */
1908
- async updateReport(reportId, report, timeout) {
1909
- this.log("info", "Updating report:", reportId);
1910
- return updateReport(this, reportId, report, timeout);
2264
+ async updateReport(options, timeout) {
2265
+ this.log("info", "Updating report:", options.id);
2266
+ return updateReport(this, options, timeout);
1911
2267
  }
1912
2268
  /**
1913
2269
  * Delete a report
1914
2270
  * Delegates to reports service
1915
2271
  */
1916
- async deleteReport(reportId, timeout) {
1917
- this.log("info", "Deleting report:", reportId);
1918
- return deleteReport(this, reportId, timeout);
2272
+ async deleteReport(id, timeout) {
2273
+ this.log("info", "Deleting report:", id);
2274
+ return deleteReport(this, id, timeout);
1919
2275
  }
1920
2276
  /**
1921
2277
  * Get all reports
@@ -1929,9 +2285,67 @@ var SuperatomClient = class {
1929
2285
  * Get a specific report by ID
1930
2286
  * Delegates to reports service
1931
2287
  */
1932
- async getReport(reportId, timeout) {
1933
- this.log("info", "Fetching report:", reportId);
1934
- return getReport(this, reportId, timeout);
2288
+ async getReport(id, timeout) {
2289
+ this.log("info", "Fetching report:", id);
2290
+ return getReport(this, id, timeout);
2291
+ }
2292
+ /**
2293
+ * Query reports with filters
2294
+ * Delegates to reports service
2295
+ */
2296
+ async queryReports(options, timeout) {
2297
+ this.log("info", "Querying reports with filters:", options?.filters);
2298
+ return queryReports(this, options, timeout);
2299
+ }
2300
+ // ==================== UI Management Methods ====================
2301
+ // These methods delegate to uis service for admin UI CRUD operations
2302
+ /**
2303
+ * Create a new UI
2304
+ * Delegates to uis service
2305
+ */
2306
+ async createUI(options, timeout) {
2307
+ this.log("info", "Creating UI:", options.uiId);
2308
+ return createUI(this, options, timeout);
2309
+ }
2310
+ /**
2311
+ * Update an existing UI
2312
+ * Delegates to uis service
2313
+ */
2314
+ async updateUI(options, timeout) {
2315
+ this.log("info", "Updating UI:", options.id);
2316
+ return updateUI(this, options, timeout);
2317
+ }
2318
+ /**
2319
+ * Delete a UI
2320
+ * Delegates to uis service
2321
+ */
2322
+ async deleteUI(id, timeout) {
2323
+ this.log("info", "Deleting UI:", id);
2324
+ return deleteUI(this, id, timeout);
2325
+ }
2326
+ /**
2327
+ * Get all UIs
2328
+ * Delegates to uis service
2329
+ */
2330
+ async getAllUIs(timeout) {
2331
+ this.log("info", "Fetching all UIs");
2332
+ return getAllUIs(this, timeout);
2333
+ }
2334
+ /**
2335
+ * Get a specific UI by ID
2336
+ * Delegates to uis service
2337
+ */
2338
+ async getUI(id, timeout) {
2339
+ this.log("info", "Fetching UI:", id);
2340
+ return getUI(this, id, timeout);
2341
+ }
2342
+ /**
2343
+ * Query UIs with filters
2344
+ * Delegates to uis service
2345
+ */
2346
+ async queryUIs(options, timeout) {
2347
+ this.log("info", "Querying UIs with filters:", options?.filters);
2348
+ return queryUIs(this, options, timeout);
1935
2349
  }
1936
2350
  /**
1937
2351
  * Internal logging