@superatomai/sdk-web 0.0.15 → 0.0.17

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.d.cts CHANGED
@@ -850,6 +850,7 @@ declare const DashboardQueryFiltersSchema: z.ZodObject<{
850
850
  createdBy: z.ZodOptional<z.ZodNumber>;
851
851
  updatedBy: z.ZodOptional<z.ZodNumber>;
852
852
  name: z.ZodOptional<z.ZodString>;
853
+ published: z.ZodOptional<z.ZodBoolean>;
853
854
  }, z.core.$strip>;
854
855
  type DashboardQueryFilters = z.infer<typeof DashboardQueryFiltersSchema>;
855
856
  /**
@@ -862,6 +863,7 @@ declare const ReportQueryFiltersSchema: z.ZodObject<{
862
863
  createdBy: z.ZodOptional<z.ZodNumber>;
863
864
  updatedBy: z.ZodOptional<z.ZodNumber>;
864
865
  name: z.ZodOptional<z.ZodString>;
866
+ published: z.ZodOptional<z.ZodBoolean>;
865
867
  }, z.core.$strip>;
866
868
  type ReportQueryFilters = z.infer<typeof ReportQueryFiltersSchema>;
867
869
  /**
@@ -1280,7 +1282,8 @@ interface User {
1280
1282
  email?: string;
1281
1283
  fullname?: string;
1282
1284
  role?: string;
1283
- wsIds: string[];
1285
+ userInfo?: Record<string, unknown>;
1286
+ wsIds?: string[];
1284
1287
  }
1285
1288
  /**
1286
1289
  * Create a new user
@@ -1290,10 +1293,11 @@ interface User {
1290
1293
  * @param email - Email for the new user (optional)
1291
1294
  * @param fullname - Full name for the new user (optional)
1292
1295
  * @param role - Role for the new user (optional)
1296
+ * @param userInfo - Additional user info as JSON object (optional)
1293
1297
  * @param timeout - Request timeout in milliseconds
1294
1298
  * @returns Server response with success status
1295
1299
  */
1296
- declare function createUser(client: SuperatomClient, username: string, password: string, email?: string, fullname?: string, role?: string, timeout?: number): Promise<{
1300
+ declare function createUser(client: SuperatomClient, username: string, password: string, email?: string, fullname?: string, role?: string, userInfo?: Record<string, unknown>, timeout?: number): Promise<{
1297
1301
  success: boolean;
1298
1302
  error?: string;
1299
1303
  message?: string;
@@ -1315,6 +1319,7 @@ declare function updateUser(client: SuperatomClient, id: number, updates: {
1315
1319
  email?: string;
1316
1320
  fullname?: string;
1317
1321
  role?: string;
1322
+ userInfo?: Record<string, unknown>;
1318
1323
  }, timeout?: number): Promise<{
1319
1324
  success: boolean;
1320
1325
  error?: string;
@@ -1403,6 +1408,7 @@ interface Dashboard {
1403
1408
  projectId?: string;
1404
1409
  name?: string;
1405
1410
  description?: string;
1411
+ published?: boolean;
1406
1412
  dashboard?: DSLRendererProps$2;
1407
1413
  createdBy?: number;
1408
1414
  updatedBy?: number;
@@ -1417,6 +1423,7 @@ interface CreateDashboardOptions {
1417
1423
  projectId: string;
1418
1424
  name?: string;
1419
1425
  description?: string;
1426
+ published?: boolean;
1420
1427
  createdBy?: number;
1421
1428
  dashboard?: DSLRendererProps$2;
1422
1429
  }
@@ -1427,6 +1434,7 @@ interface UpdateDashboardOptions {
1427
1434
  id: number;
1428
1435
  name?: string;
1429
1436
  description?: string;
1437
+ published?: boolean;
1430
1438
  createdBy?: number;
1431
1439
  updatedBy?: number;
1432
1440
  dashboard?: DSLRendererProps$2;
@@ -1539,6 +1547,7 @@ interface Report {
1539
1547
  projectId?: string;
1540
1548
  name?: string;
1541
1549
  description?: string;
1550
+ published?: boolean;
1542
1551
  report?: DSLRendererProps$1;
1543
1552
  createdBy?: number;
1544
1553
  updatedBy?: number;
@@ -1553,6 +1562,7 @@ interface CreateReportOptions {
1553
1562
  projectId: string;
1554
1563
  name?: string;
1555
1564
  description?: string;
1565
+ published?: boolean;
1556
1566
  createdBy?: number;
1557
1567
  report?: DSLRendererProps$1;
1558
1568
  }
@@ -1563,6 +1573,7 @@ interface UpdateReportOptions {
1563
1573
  id: number;
1564
1574
  name?: string;
1565
1575
  description?: string;
1576
+ published?: boolean;
1566
1577
  createdBy?: number;
1567
1578
  updatedBy?: number;
1568
1579
  report?: DSLRendererProps$1;
@@ -2430,7 +2441,7 @@ declare class SuperatomClient {
2430
2441
  * Create a new user
2431
2442
  * Delegates to users service
2432
2443
  */
2433
- createUser(username: string, password: string, email?: string, fullname?: string, role?: string, timeout?: number): Promise<{
2444
+ createUser(username: string, password: string, email?: string, fullname?: string, role?: string, userInfo?: Record<string, unknown>, timeout?: number): Promise<{
2434
2445
  success: boolean;
2435
2446
  error?: string;
2436
2447
  message?: string;
@@ -2448,6 +2459,7 @@ declare class SuperatomClient {
2448
2459
  email?: string;
2449
2460
  fullname?: string;
2450
2461
  role?: string;
2462
+ userInfo?: Record<string, unknown>;
2451
2463
  }, timeout?: number): Promise<{
2452
2464
  success: boolean;
2453
2465
  error?: string;
package/dist/index.d.ts CHANGED
@@ -850,6 +850,7 @@ declare const DashboardQueryFiltersSchema: z.ZodObject<{
850
850
  createdBy: z.ZodOptional<z.ZodNumber>;
851
851
  updatedBy: z.ZodOptional<z.ZodNumber>;
852
852
  name: z.ZodOptional<z.ZodString>;
853
+ published: z.ZodOptional<z.ZodBoolean>;
853
854
  }, z.core.$strip>;
854
855
  type DashboardQueryFilters = z.infer<typeof DashboardQueryFiltersSchema>;
855
856
  /**
@@ -862,6 +863,7 @@ declare const ReportQueryFiltersSchema: z.ZodObject<{
862
863
  createdBy: z.ZodOptional<z.ZodNumber>;
863
864
  updatedBy: z.ZodOptional<z.ZodNumber>;
864
865
  name: z.ZodOptional<z.ZodString>;
866
+ published: z.ZodOptional<z.ZodBoolean>;
865
867
  }, z.core.$strip>;
866
868
  type ReportQueryFilters = z.infer<typeof ReportQueryFiltersSchema>;
867
869
  /**
@@ -1280,7 +1282,8 @@ interface User {
1280
1282
  email?: string;
1281
1283
  fullname?: string;
1282
1284
  role?: string;
1283
- wsIds: string[];
1285
+ userInfo?: Record<string, unknown>;
1286
+ wsIds?: string[];
1284
1287
  }
1285
1288
  /**
1286
1289
  * Create a new user
@@ -1290,10 +1293,11 @@ interface User {
1290
1293
  * @param email - Email for the new user (optional)
1291
1294
  * @param fullname - Full name for the new user (optional)
1292
1295
  * @param role - Role for the new user (optional)
1296
+ * @param userInfo - Additional user info as JSON object (optional)
1293
1297
  * @param timeout - Request timeout in milliseconds
1294
1298
  * @returns Server response with success status
1295
1299
  */
1296
- declare function createUser(client: SuperatomClient, username: string, password: string, email?: string, fullname?: string, role?: string, timeout?: number): Promise<{
1300
+ declare function createUser(client: SuperatomClient, username: string, password: string, email?: string, fullname?: string, role?: string, userInfo?: Record<string, unknown>, timeout?: number): Promise<{
1297
1301
  success: boolean;
1298
1302
  error?: string;
1299
1303
  message?: string;
@@ -1315,6 +1319,7 @@ declare function updateUser(client: SuperatomClient, id: number, updates: {
1315
1319
  email?: string;
1316
1320
  fullname?: string;
1317
1321
  role?: string;
1322
+ userInfo?: Record<string, unknown>;
1318
1323
  }, timeout?: number): Promise<{
1319
1324
  success: boolean;
1320
1325
  error?: string;
@@ -1403,6 +1408,7 @@ interface Dashboard {
1403
1408
  projectId?: string;
1404
1409
  name?: string;
1405
1410
  description?: string;
1411
+ published?: boolean;
1406
1412
  dashboard?: DSLRendererProps$2;
1407
1413
  createdBy?: number;
1408
1414
  updatedBy?: number;
@@ -1417,6 +1423,7 @@ interface CreateDashboardOptions {
1417
1423
  projectId: string;
1418
1424
  name?: string;
1419
1425
  description?: string;
1426
+ published?: boolean;
1420
1427
  createdBy?: number;
1421
1428
  dashboard?: DSLRendererProps$2;
1422
1429
  }
@@ -1427,6 +1434,7 @@ interface UpdateDashboardOptions {
1427
1434
  id: number;
1428
1435
  name?: string;
1429
1436
  description?: string;
1437
+ published?: boolean;
1430
1438
  createdBy?: number;
1431
1439
  updatedBy?: number;
1432
1440
  dashboard?: DSLRendererProps$2;
@@ -1539,6 +1547,7 @@ interface Report {
1539
1547
  projectId?: string;
1540
1548
  name?: string;
1541
1549
  description?: string;
1550
+ published?: boolean;
1542
1551
  report?: DSLRendererProps$1;
1543
1552
  createdBy?: number;
1544
1553
  updatedBy?: number;
@@ -1553,6 +1562,7 @@ interface CreateReportOptions {
1553
1562
  projectId: string;
1554
1563
  name?: string;
1555
1564
  description?: string;
1565
+ published?: boolean;
1556
1566
  createdBy?: number;
1557
1567
  report?: DSLRendererProps$1;
1558
1568
  }
@@ -1563,6 +1573,7 @@ interface UpdateReportOptions {
1563
1573
  id: number;
1564
1574
  name?: string;
1565
1575
  description?: string;
1576
+ published?: boolean;
1566
1577
  createdBy?: number;
1567
1578
  updatedBy?: number;
1568
1579
  report?: DSLRendererProps$1;
@@ -2430,7 +2441,7 @@ declare class SuperatomClient {
2430
2441
  * Create a new user
2431
2442
  * Delegates to users service
2432
2443
  */
2433
- createUser(username: string, password: string, email?: string, fullname?: string, role?: string, timeout?: number): Promise<{
2444
+ createUser(username: string, password: string, email?: string, fullname?: string, role?: string, userInfo?: Record<string, unknown>, timeout?: number): Promise<{
2434
2445
  success: boolean;
2435
2446
  error?: string;
2436
2447
  message?: string;
@@ -2448,6 +2459,7 @@ declare class SuperatomClient {
2448
2459
  email?: string;
2449
2460
  fullname?: string;
2450
2461
  role?: string;
2462
+ userInfo?: Record<string, unknown>;
2451
2463
  }, timeout?: number): Promise<{
2452
2464
  success: boolean;
2453
2465
  error?: string;
package/dist/index.js CHANGED
@@ -446,6 +446,7 @@ var UsersRequestPayloadSchema = z.object({
446
446
  password: z.string().optional(),
447
447
  fullname: z.string().optional(),
448
448
  role: z.string().optional(),
449
+ userInfo: z.record(z.string(), z.unknown()).optional(),
449
450
  // Query operation fields
450
451
  filters: UserQueryFiltersSchema.optional(),
451
452
  limit: z.number().optional(),
@@ -469,18 +470,26 @@ var UsersResponsePayloadSchema = z.object({
469
470
  role: z.string().optional(),
470
471
  message: z.string().optional(),
471
472
  users: z.array(z.object({
473
+ id: z.number(),
472
474
  username: z.string(),
473
475
  email: z.string().optional(),
474
476
  fullname: z.string().optional(),
475
477
  role: z.string().optional(),
476
- wsIds: z.array(z.string())
478
+ userInfo: z.record(z.string(), z.unknown()).optional(),
479
+ wsIds: z.array(z.string()).optional(),
480
+ createdAt: z.string().optional(),
481
+ updatedAt: z.string().optional()
477
482
  })).optional(),
478
483
  user: z.object({
484
+ id: z.number(),
479
485
  username: z.string(),
480
486
  email: z.string().optional(),
481
487
  fullname: z.string().optional(),
482
488
  role: z.string().optional(),
483
- wsIds: z.array(z.string())
489
+ userInfo: z.record(z.string(), z.unknown()).optional(),
490
+ wsIds: z.array(z.string()).optional(),
491
+ createdAt: z.string().optional(),
492
+ updatedAt: z.string().optional()
484
493
  }).optional(),
485
494
  count: z.number().optional()
486
495
  }).optional()
@@ -497,7 +506,8 @@ var DashboardQueryFiltersSchema = z.object({
497
506
  projectId: z.string().optional(),
498
507
  createdBy: z.number().optional(),
499
508
  updatedBy: z.number().optional(),
500
- name: z.string().optional()
509
+ name: z.string().optional(),
510
+ published: z.boolean().optional()
501
511
  });
502
512
  var DashboardsRequestPayloadSchema = z.object({
503
513
  operation: z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
@@ -507,6 +517,7 @@ var DashboardsRequestPayloadSchema = z.object({
507
517
  projectId: z.string().optional(),
508
518
  name: z.string().optional(),
509
519
  description: z.string().optional(),
520
+ published: z.boolean().optional(),
510
521
  createdBy: z.number().optional(),
511
522
  updatedBy: z.number().optional(),
512
523
  dashboard: DSLRendererPropsSchema.optional(),
@@ -549,7 +560,8 @@ var ReportQueryFiltersSchema = z.object({
549
560
  projectId: z.string().optional(),
550
561
  createdBy: z.number().optional(),
551
562
  updatedBy: z.number().optional(),
552
- name: z.string().optional()
563
+ name: z.string().optional(),
564
+ published: z.boolean().optional()
553
565
  });
554
566
  var ReportsRequestPayloadSchema = z.object({
555
567
  operation: z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
@@ -559,6 +571,7 @@ var ReportsRequestPayloadSchema = z.object({
559
571
  projectId: z.string().optional(),
560
572
  name: z.string().optional(),
561
573
  description: z.string().optional(),
574
+ published: z.boolean().optional(),
562
575
  createdBy: z.number().optional(),
563
576
  updatedBy: z.number().optional(),
564
577
  report: DSLRendererPropsSchema2.optional(),
@@ -1065,7 +1078,7 @@ async function sendComponents(client, components) {
1065
1078
  }
1066
1079
 
1067
1080
  // src/services/users.ts
1068
- async function createUser(client, username, password, email, fullname, role, timeout) {
1081
+ async function createUser(client, username, password, email, fullname, role, userInfo, timeout) {
1069
1082
  const messageId = `users_create_${Date.now()}`;
1070
1083
  const message = UsersRequestMessageSchema.parse({
1071
1084
  id: messageId,
@@ -1079,7 +1092,8 @@ async function createUser(client, username, password, email, fullname, role, tim
1079
1092
  password,
1080
1093
  email,
1081
1094
  fullname,
1082
- role
1095
+ role,
1096
+ userInfo
1083
1097
  }
1084
1098
  }
1085
1099
  });
@@ -1222,7 +1236,7 @@ async function queryUsers(client, options = {}, timeout) {
1222
1236
 
1223
1237
  // src/services/dashboards/index.ts
1224
1238
  async function createDashboard(client, options, timeout) {
1225
- const { dashboardId, projectId, name, description, createdBy, dashboard } = options;
1239
+ const { dashboardId, projectId, name, description, published, createdBy, dashboard } = options;
1226
1240
  const messageId = `dashboards_create_${Date.now()}`;
1227
1241
  const message = DashboardsRequestMessageSchema.parse({
1228
1242
  id: messageId,
@@ -1236,6 +1250,7 @@ async function createDashboard(client, options, timeout) {
1236
1250
  projectId,
1237
1251
  name,
1238
1252
  description,
1253
+ published,
1239
1254
  createdBy,
1240
1255
  dashboard
1241
1256
  }
@@ -1253,7 +1268,7 @@ async function createDashboard(client, options, timeout) {
1253
1268
  };
1254
1269
  }
1255
1270
  async function updateDashboard(client, options, timeout) {
1256
- const { id, name, description, createdBy, updatedBy, dashboard } = options;
1271
+ const { id, name, description, published, createdBy, updatedBy, dashboard } = options;
1257
1272
  const messageId = `dashboards_update_${Date.now()}`;
1258
1273
  const message = DashboardsRequestMessageSchema.parse({
1259
1274
  id: messageId,
@@ -1266,6 +1281,7 @@ async function updateDashboard(client, options, timeout) {
1266
1281
  id,
1267
1282
  name,
1268
1283
  description,
1284
+ published,
1269
1285
  createdBy,
1270
1286
  updatedBy,
1271
1287
  dashboard
@@ -1382,7 +1398,7 @@ async function queryDashboards(client, options = {}, timeout) {
1382
1398
 
1383
1399
  // src/services/reports/index.ts
1384
1400
  async function createReport(client, options, timeout) {
1385
- const { reportId, projectId, name, description, createdBy, report } = options;
1401
+ const { reportId, projectId, name, description, published, createdBy, report } = options;
1386
1402
  const messageId = `reports_create_${Date.now()}`;
1387
1403
  const message = ReportsRequestMessageSchema.parse({
1388
1404
  id: messageId,
@@ -1396,6 +1412,7 @@ async function createReport(client, options, timeout) {
1396
1412
  projectId,
1397
1413
  name,
1398
1414
  description,
1415
+ published,
1399
1416
  createdBy,
1400
1417
  report
1401
1418
  }
@@ -1413,7 +1430,7 @@ async function createReport(client, options, timeout) {
1413
1430
  };
1414
1431
  }
1415
1432
  async function updateReport(client, options, timeout) {
1416
- const { id, name, description, createdBy, updatedBy, report } = options;
1433
+ const { id, name, description, published, createdBy, updatedBy, report } = options;
1417
1434
  const messageId = `reports_update_${Date.now()}`;
1418
1435
  const message = ReportsRequestMessageSchema.parse({
1419
1436
  id: messageId,
@@ -1426,6 +1443,7 @@ async function updateReport(client, options, timeout) {
1426
1443
  id,
1427
1444
  name,
1428
1445
  description,
1446
+ published,
1429
1447
  createdBy,
1430
1448
  updatedBy,
1431
1449
  report
@@ -2485,9 +2503,9 @@ var SuperatomClient = class {
2485
2503
  * Create a new user
2486
2504
  * Delegates to users service
2487
2505
  */
2488
- async createUser(username, password, email, fullname, role, timeout) {
2506
+ async createUser(username, password, email, fullname, role, userInfo, timeout) {
2489
2507
  this.log("info", "Creating user:", username);
2490
- return createUser(this, username, password, email, fullname, role, timeout);
2508
+ return createUser(this, username, password, email, fullname, role, userInfo, timeout);
2491
2509
  }
2492
2510
  /**
2493
2511
  * Update an existing user
@@ -2536,7 +2554,7 @@ var SuperatomClient = class {
2536
2554
  * Delegates to dashboards service
2537
2555
  */
2538
2556
  async createDashboard(options, timeout) {
2539
- this.log("info", "Creating dashboard:", options.dashboardId);
2557
+ this.log("info", "Creating dashboard:", options.dashboardId, options.projectId);
2540
2558
  return createDashboard(this, options, timeout);
2541
2559
  }
2542
2560
  /**