@superatomai/sdk-web 0.0.15 → 0.0.16
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/README.md +755 -755
- package/dist/index.cjs +21 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/package.json +41 -43
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(),
|
|
@@ -499,7 +500,8 @@ var DashboardQueryFiltersSchema = zod.z.object({
|
|
|
499
500
|
projectId: zod.z.string().optional(),
|
|
500
501
|
createdBy: zod.z.number().optional(),
|
|
501
502
|
updatedBy: zod.z.number().optional(),
|
|
502
|
-
name: zod.z.string().optional()
|
|
503
|
+
name: zod.z.string().optional(),
|
|
504
|
+
published: zod.z.boolean().optional()
|
|
503
505
|
});
|
|
504
506
|
var DashboardsRequestPayloadSchema = zod.z.object({
|
|
505
507
|
operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -509,6 +511,7 @@ var DashboardsRequestPayloadSchema = zod.z.object({
|
|
|
509
511
|
projectId: zod.z.string().optional(),
|
|
510
512
|
name: zod.z.string().optional(),
|
|
511
513
|
description: zod.z.string().optional(),
|
|
514
|
+
published: zod.z.boolean().optional(),
|
|
512
515
|
createdBy: zod.z.number().optional(),
|
|
513
516
|
updatedBy: zod.z.number().optional(),
|
|
514
517
|
dashboard: DSLRendererPropsSchema.optional(),
|
|
@@ -551,7 +554,8 @@ var ReportQueryFiltersSchema = zod.z.object({
|
|
|
551
554
|
projectId: zod.z.string().optional(),
|
|
552
555
|
createdBy: zod.z.number().optional(),
|
|
553
556
|
updatedBy: zod.z.number().optional(),
|
|
554
|
-
name: zod.z.string().optional()
|
|
557
|
+
name: zod.z.string().optional(),
|
|
558
|
+
published: zod.z.boolean().optional()
|
|
555
559
|
});
|
|
556
560
|
var ReportsRequestPayloadSchema = zod.z.object({
|
|
557
561
|
operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -561,6 +565,7 @@ var ReportsRequestPayloadSchema = zod.z.object({
|
|
|
561
565
|
projectId: zod.z.string().optional(),
|
|
562
566
|
name: zod.z.string().optional(),
|
|
563
567
|
description: zod.z.string().optional(),
|
|
568
|
+
published: zod.z.boolean().optional(),
|
|
564
569
|
createdBy: zod.z.number().optional(),
|
|
565
570
|
updatedBy: zod.z.number().optional(),
|
|
566
571
|
report: DSLRendererPropsSchema2.optional(),
|
|
@@ -1067,7 +1072,7 @@ async function sendComponents(client, components) {
|
|
|
1067
1072
|
}
|
|
1068
1073
|
|
|
1069
1074
|
// src/services/users.ts
|
|
1070
|
-
async function createUser(client, username, password, email, fullname, role, timeout) {
|
|
1075
|
+
async function createUser(client, username, password, email, fullname, role, userInfo, timeout) {
|
|
1071
1076
|
const messageId = `users_create_${Date.now()}`;
|
|
1072
1077
|
const message = UsersRequestMessageSchema.parse({
|
|
1073
1078
|
id: messageId,
|
|
@@ -1081,7 +1086,8 @@ async function createUser(client, username, password, email, fullname, role, tim
|
|
|
1081
1086
|
password,
|
|
1082
1087
|
email,
|
|
1083
1088
|
fullname,
|
|
1084
|
-
role
|
|
1089
|
+
role,
|
|
1090
|
+
userInfo
|
|
1085
1091
|
}
|
|
1086
1092
|
}
|
|
1087
1093
|
});
|
|
@@ -1224,7 +1230,7 @@ async function queryUsers(client, options = {}, timeout) {
|
|
|
1224
1230
|
|
|
1225
1231
|
// src/services/dashboards/index.ts
|
|
1226
1232
|
async function createDashboard(client, options, timeout) {
|
|
1227
|
-
const { dashboardId, projectId, name, description, createdBy, dashboard } = options;
|
|
1233
|
+
const { dashboardId, projectId, name, description, published, createdBy, dashboard } = options;
|
|
1228
1234
|
const messageId = `dashboards_create_${Date.now()}`;
|
|
1229
1235
|
const message = DashboardsRequestMessageSchema.parse({
|
|
1230
1236
|
id: messageId,
|
|
@@ -1238,6 +1244,7 @@ async function createDashboard(client, options, timeout) {
|
|
|
1238
1244
|
projectId,
|
|
1239
1245
|
name,
|
|
1240
1246
|
description,
|
|
1247
|
+
published,
|
|
1241
1248
|
createdBy,
|
|
1242
1249
|
dashboard
|
|
1243
1250
|
}
|
|
@@ -1255,7 +1262,7 @@ async function createDashboard(client, options, timeout) {
|
|
|
1255
1262
|
};
|
|
1256
1263
|
}
|
|
1257
1264
|
async function updateDashboard(client, options, timeout) {
|
|
1258
|
-
const { id, name, description, createdBy, updatedBy, dashboard } = options;
|
|
1265
|
+
const { id, name, description, published, createdBy, updatedBy, dashboard } = options;
|
|
1259
1266
|
const messageId = `dashboards_update_${Date.now()}`;
|
|
1260
1267
|
const message = DashboardsRequestMessageSchema.parse({
|
|
1261
1268
|
id: messageId,
|
|
@@ -1268,6 +1275,7 @@ async function updateDashboard(client, options, timeout) {
|
|
|
1268
1275
|
id,
|
|
1269
1276
|
name,
|
|
1270
1277
|
description,
|
|
1278
|
+
published,
|
|
1271
1279
|
createdBy,
|
|
1272
1280
|
updatedBy,
|
|
1273
1281
|
dashboard
|
|
@@ -1384,7 +1392,7 @@ async function queryDashboards(client, options = {}, timeout) {
|
|
|
1384
1392
|
|
|
1385
1393
|
// src/services/reports/index.ts
|
|
1386
1394
|
async function createReport(client, options, timeout) {
|
|
1387
|
-
const { reportId, projectId, name, description, createdBy, report } = options;
|
|
1395
|
+
const { reportId, projectId, name, description, published, createdBy, report } = options;
|
|
1388
1396
|
const messageId = `reports_create_${Date.now()}`;
|
|
1389
1397
|
const message = ReportsRequestMessageSchema.parse({
|
|
1390
1398
|
id: messageId,
|
|
@@ -1398,6 +1406,7 @@ async function createReport(client, options, timeout) {
|
|
|
1398
1406
|
projectId,
|
|
1399
1407
|
name,
|
|
1400
1408
|
description,
|
|
1409
|
+
published,
|
|
1401
1410
|
createdBy,
|
|
1402
1411
|
report
|
|
1403
1412
|
}
|
|
@@ -1415,7 +1424,7 @@ async function createReport(client, options, timeout) {
|
|
|
1415
1424
|
};
|
|
1416
1425
|
}
|
|
1417
1426
|
async function updateReport(client, options, timeout) {
|
|
1418
|
-
const { id, name, description, createdBy, updatedBy, report } = options;
|
|
1427
|
+
const { id, name, description, published, createdBy, updatedBy, report } = options;
|
|
1419
1428
|
const messageId = `reports_update_${Date.now()}`;
|
|
1420
1429
|
const message = ReportsRequestMessageSchema.parse({
|
|
1421
1430
|
id: messageId,
|
|
@@ -1428,6 +1437,7 @@ async function updateReport(client, options, timeout) {
|
|
|
1428
1437
|
id,
|
|
1429
1438
|
name,
|
|
1430
1439
|
description,
|
|
1440
|
+
published,
|
|
1431
1441
|
createdBy,
|
|
1432
1442
|
updatedBy,
|
|
1433
1443
|
report
|
|
@@ -2487,9 +2497,9 @@ var SuperatomClient = class {
|
|
|
2487
2497
|
* Create a new user
|
|
2488
2498
|
* Delegates to users service
|
|
2489
2499
|
*/
|
|
2490
|
-
async createUser(username, password, email, fullname, role, timeout) {
|
|
2500
|
+
async createUser(username, password, email, fullname, role, userInfo, timeout) {
|
|
2491
2501
|
this.log("info", "Creating user:", username);
|
|
2492
|
-
return createUser(this, username, password, email, fullname, role, timeout);
|
|
2502
|
+
return createUser(this, username, password, email, fullname, role, userInfo, timeout);
|
|
2493
2503
|
}
|
|
2494
2504
|
/**
|
|
2495
2505
|
* Update an existing user
|
|
@@ -2538,7 +2548,7 @@ var SuperatomClient = class {
|
|
|
2538
2548
|
* Delegates to dashboards service
|
|
2539
2549
|
*/
|
|
2540
2550
|
async createDashboard(options, timeout) {
|
|
2541
|
-
this.log("info", "Creating dashboard:", options.dashboardId);
|
|
2551
|
+
this.log("info", "Creating dashboard:", options.dashboardId, options.projectId);
|
|
2542
2552
|
return createDashboard(this, options, timeout);
|
|
2543
2553
|
}
|
|
2544
2554
|
/**
|