@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.cjs +31 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +31 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -448,6 +448,7 @@ var UsersRequestPayloadSchema = zod.z.object({
|
|
|
448
448
|
password: zod.z.string().optional(),
|
|
449
449
|
fullname: zod.z.string().optional(),
|
|
450
450
|
role: zod.z.string().optional(),
|
|
451
|
+
userInfo: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
451
452
|
// Query operation fields
|
|
452
453
|
filters: UserQueryFiltersSchema.optional(),
|
|
453
454
|
limit: zod.z.number().optional(),
|
|
@@ -471,18 +472,26 @@ var UsersResponsePayloadSchema = zod.z.object({
|
|
|
471
472
|
role: zod.z.string().optional(),
|
|
472
473
|
message: zod.z.string().optional(),
|
|
473
474
|
users: zod.z.array(zod.z.object({
|
|
475
|
+
id: zod.z.number(),
|
|
474
476
|
username: zod.z.string(),
|
|
475
477
|
email: zod.z.string().optional(),
|
|
476
478
|
fullname: zod.z.string().optional(),
|
|
477
479
|
role: zod.z.string().optional(),
|
|
478
|
-
|
|
480
|
+
userInfo: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
481
|
+
wsIds: zod.z.array(zod.z.string()).optional(),
|
|
482
|
+
createdAt: zod.z.string().optional(),
|
|
483
|
+
updatedAt: zod.z.string().optional()
|
|
479
484
|
})).optional(),
|
|
480
485
|
user: zod.z.object({
|
|
486
|
+
id: zod.z.number(),
|
|
481
487
|
username: zod.z.string(),
|
|
482
488
|
email: zod.z.string().optional(),
|
|
483
489
|
fullname: zod.z.string().optional(),
|
|
484
490
|
role: zod.z.string().optional(),
|
|
485
|
-
|
|
491
|
+
userInfo: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
492
|
+
wsIds: zod.z.array(zod.z.string()).optional(),
|
|
493
|
+
createdAt: zod.z.string().optional(),
|
|
494
|
+
updatedAt: zod.z.string().optional()
|
|
486
495
|
}).optional(),
|
|
487
496
|
count: zod.z.number().optional()
|
|
488
497
|
}).optional()
|
|
@@ -499,7 +508,8 @@ var DashboardQueryFiltersSchema = zod.z.object({
|
|
|
499
508
|
projectId: zod.z.string().optional(),
|
|
500
509
|
createdBy: zod.z.number().optional(),
|
|
501
510
|
updatedBy: zod.z.number().optional(),
|
|
502
|
-
name: zod.z.string().optional()
|
|
511
|
+
name: zod.z.string().optional(),
|
|
512
|
+
published: zod.z.boolean().optional()
|
|
503
513
|
});
|
|
504
514
|
var DashboardsRequestPayloadSchema = zod.z.object({
|
|
505
515
|
operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -509,6 +519,7 @@ var DashboardsRequestPayloadSchema = zod.z.object({
|
|
|
509
519
|
projectId: zod.z.string().optional(),
|
|
510
520
|
name: zod.z.string().optional(),
|
|
511
521
|
description: zod.z.string().optional(),
|
|
522
|
+
published: zod.z.boolean().optional(),
|
|
512
523
|
createdBy: zod.z.number().optional(),
|
|
513
524
|
updatedBy: zod.z.number().optional(),
|
|
514
525
|
dashboard: DSLRendererPropsSchema.optional(),
|
|
@@ -551,7 +562,8 @@ var ReportQueryFiltersSchema = zod.z.object({
|
|
|
551
562
|
projectId: zod.z.string().optional(),
|
|
552
563
|
createdBy: zod.z.number().optional(),
|
|
553
564
|
updatedBy: zod.z.number().optional(),
|
|
554
|
-
name: zod.z.string().optional()
|
|
565
|
+
name: zod.z.string().optional(),
|
|
566
|
+
published: zod.z.boolean().optional()
|
|
555
567
|
});
|
|
556
568
|
var ReportsRequestPayloadSchema = zod.z.object({
|
|
557
569
|
operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -561,6 +573,7 @@ var ReportsRequestPayloadSchema = zod.z.object({
|
|
|
561
573
|
projectId: zod.z.string().optional(),
|
|
562
574
|
name: zod.z.string().optional(),
|
|
563
575
|
description: zod.z.string().optional(),
|
|
576
|
+
published: zod.z.boolean().optional(),
|
|
564
577
|
createdBy: zod.z.number().optional(),
|
|
565
578
|
updatedBy: zod.z.number().optional(),
|
|
566
579
|
report: DSLRendererPropsSchema2.optional(),
|
|
@@ -1067,7 +1080,7 @@ async function sendComponents(client, components) {
|
|
|
1067
1080
|
}
|
|
1068
1081
|
|
|
1069
1082
|
// src/services/users.ts
|
|
1070
|
-
async function createUser(client, username, password, email, fullname, role, timeout) {
|
|
1083
|
+
async function createUser(client, username, password, email, fullname, role, userInfo, timeout) {
|
|
1071
1084
|
const messageId = `users_create_${Date.now()}`;
|
|
1072
1085
|
const message = UsersRequestMessageSchema.parse({
|
|
1073
1086
|
id: messageId,
|
|
@@ -1081,7 +1094,8 @@ async function createUser(client, username, password, email, fullname, role, tim
|
|
|
1081
1094
|
password,
|
|
1082
1095
|
email,
|
|
1083
1096
|
fullname,
|
|
1084
|
-
role
|
|
1097
|
+
role,
|
|
1098
|
+
userInfo
|
|
1085
1099
|
}
|
|
1086
1100
|
}
|
|
1087
1101
|
});
|
|
@@ -1224,7 +1238,7 @@ async function queryUsers(client, options = {}, timeout) {
|
|
|
1224
1238
|
|
|
1225
1239
|
// src/services/dashboards/index.ts
|
|
1226
1240
|
async function createDashboard(client, options, timeout) {
|
|
1227
|
-
const { dashboardId, projectId, name, description, createdBy, dashboard } = options;
|
|
1241
|
+
const { dashboardId, projectId, name, description, published, createdBy, dashboard } = options;
|
|
1228
1242
|
const messageId = `dashboards_create_${Date.now()}`;
|
|
1229
1243
|
const message = DashboardsRequestMessageSchema.parse({
|
|
1230
1244
|
id: messageId,
|
|
@@ -1238,6 +1252,7 @@ async function createDashboard(client, options, timeout) {
|
|
|
1238
1252
|
projectId,
|
|
1239
1253
|
name,
|
|
1240
1254
|
description,
|
|
1255
|
+
published,
|
|
1241
1256
|
createdBy,
|
|
1242
1257
|
dashboard
|
|
1243
1258
|
}
|
|
@@ -1255,7 +1270,7 @@ async function createDashboard(client, options, timeout) {
|
|
|
1255
1270
|
};
|
|
1256
1271
|
}
|
|
1257
1272
|
async function updateDashboard(client, options, timeout) {
|
|
1258
|
-
const { id, name, description, createdBy, updatedBy, dashboard } = options;
|
|
1273
|
+
const { id, name, description, published, createdBy, updatedBy, dashboard } = options;
|
|
1259
1274
|
const messageId = `dashboards_update_${Date.now()}`;
|
|
1260
1275
|
const message = DashboardsRequestMessageSchema.parse({
|
|
1261
1276
|
id: messageId,
|
|
@@ -1268,6 +1283,7 @@ async function updateDashboard(client, options, timeout) {
|
|
|
1268
1283
|
id,
|
|
1269
1284
|
name,
|
|
1270
1285
|
description,
|
|
1286
|
+
published,
|
|
1271
1287
|
createdBy,
|
|
1272
1288
|
updatedBy,
|
|
1273
1289
|
dashboard
|
|
@@ -1384,7 +1400,7 @@ async function queryDashboards(client, options = {}, timeout) {
|
|
|
1384
1400
|
|
|
1385
1401
|
// src/services/reports/index.ts
|
|
1386
1402
|
async function createReport(client, options, timeout) {
|
|
1387
|
-
const { reportId, projectId, name, description, createdBy, report } = options;
|
|
1403
|
+
const { reportId, projectId, name, description, published, createdBy, report } = options;
|
|
1388
1404
|
const messageId = `reports_create_${Date.now()}`;
|
|
1389
1405
|
const message = ReportsRequestMessageSchema.parse({
|
|
1390
1406
|
id: messageId,
|
|
@@ -1398,6 +1414,7 @@ async function createReport(client, options, timeout) {
|
|
|
1398
1414
|
projectId,
|
|
1399
1415
|
name,
|
|
1400
1416
|
description,
|
|
1417
|
+
published,
|
|
1401
1418
|
createdBy,
|
|
1402
1419
|
report
|
|
1403
1420
|
}
|
|
@@ -1415,7 +1432,7 @@ async function createReport(client, options, timeout) {
|
|
|
1415
1432
|
};
|
|
1416
1433
|
}
|
|
1417
1434
|
async function updateReport(client, options, timeout) {
|
|
1418
|
-
const { id, name, description, createdBy, updatedBy, report } = options;
|
|
1435
|
+
const { id, name, description, published, createdBy, updatedBy, report } = options;
|
|
1419
1436
|
const messageId = `reports_update_${Date.now()}`;
|
|
1420
1437
|
const message = ReportsRequestMessageSchema.parse({
|
|
1421
1438
|
id: messageId,
|
|
@@ -1428,6 +1445,7 @@ async function updateReport(client, options, timeout) {
|
|
|
1428
1445
|
id,
|
|
1429
1446
|
name,
|
|
1430
1447
|
description,
|
|
1448
|
+
published,
|
|
1431
1449
|
createdBy,
|
|
1432
1450
|
updatedBy,
|
|
1433
1451
|
report
|
|
@@ -2487,9 +2505,9 @@ var SuperatomClient = class {
|
|
|
2487
2505
|
* Create a new user
|
|
2488
2506
|
* Delegates to users service
|
|
2489
2507
|
*/
|
|
2490
|
-
async createUser(username, password, email, fullname, role, timeout) {
|
|
2508
|
+
async createUser(username, password, email, fullname, role, userInfo, timeout) {
|
|
2491
2509
|
this.log("info", "Creating user:", username);
|
|
2492
|
-
return createUser(this, username, password, email, fullname, role, timeout);
|
|
2510
|
+
return createUser(this, username, password, email, fullname, role, userInfo, timeout);
|
|
2493
2511
|
}
|
|
2494
2512
|
/**
|
|
2495
2513
|
* Update an existing user
|
|
@@ -2538,7 +2556,7 @@ var SuperatomClient = class {
|
|
|
2538
2556
|
* Delegates to dashboards service
|
|
2539
2557
|
*/
|
|
2540
2558
|
async createDashboard(options, timeout) {
|
|
2541
|
-
this.log("info", "Creating dashboard:", options.dashboardId);
|
|
2559
|
+
this.log("info", "Creating dashboard:", options.dashboardId, options.projectId);
|
|
2542
2560
|
return createDashboard(this, options, timeout);
|
|
2543
2561
|
}
|
|
2544
2562
|
/**
|