@superatomai/sdk-node 0.0.60 → 0.0.61
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 +942 -942
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +37 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +49 -48
package/dist/index.mjs
CHANGED
|
@@ -2494,7 +2494,13 @@ var ArtifactsRequestPayloadSchema = z3.object({
|
|
|
2494
2494
|
limit: z3.number().optional(),
|
|
2495
2495
|
// Query operation fields
|
|
2496
2496
|
filters: ArtifactsQueryFiltersSchema.optional(),
|
|
2497
|
-
sort: z3.enum(["ASC", "DESC"]).optional()
|
|
2497
|
+
sort: z3.enum(["ASC", "DESC"]).optional(),
|
|
2498
|
+
// Menu grouping fields
|
|
2499
|
+
type: z3.string().optional(),
|
|
2500
|
+
menuId: z3.number().optional(),
|
|
2501
|
+
artifactGroupName: z3.string().optional(),
|
|
2502
|
+
artifactGroupId: z3.string().optional(),
|
|
2503
|
+
artifactGroupIcon: z3.string().optional()
|
|
2498
2504
|
}).optional()
|
|
2499
2505
|
});
|
|
2500
2506
|
var ArtifactsRequestMessageSchema = z3.object({
|
|
@@ -2571,7 +2577,9 @@ var MenusRequestPayloadSchema = z3.object({
|
|
|
2571
2577
|
items: z3.array(z3.object({
|
|
2572
2578
|
id: z3.number(),
|
|
2573
2579
|
sortOrder: z3.number()
|
|
2574
|
-
})).optional()
|
|
2580
|
+
})).optional(),
|
|
2581
|
+
menuJson: z3.record(z3.unknown()).optional(),
|
|
2582
|
+
version: z3.number().optional()
|
|
2575
2583
|
}).optional()
|
|
2576
2584
|
});
|
|
2577
2585
|
var MenusRequestMessageSchema = z3.object({
|
|
@@ -10551,6 +10559,7 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
10551
10559
|
const request = ArtifactsRequestMessageSchema.parse(data);
|
|
10552
10560
|
const { id, payload, from } = request;
|
|
10553
10561
|
const { operation, data: requestData } = payload;
|
|
10562
|
+
logger.info("[SDK-NODEJS] Received artifacts request:", JSON.stringify({ operation, requestData }, null, 2));
|
|
10554
10563
|
const artifactId = requestData?.id;
|
|
10555
10564
|
const name = requestData?.name;
|
|
10556
10565
|
const createdBy = requestData?.createdBy;
|
|
@@ -10560,9 +10569,22 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
10560
10569
|
const limit = requestData?.limit;
|
|
10561
10570
|
const filters = requestData?.filters;
|
|
10562
10571
|
const sort = requestData?.sort;
|
|
10572
|
+
const type = requestData?.type;
|
|
10573
|
+
const menuId = requestData?.menuId;
|
|
10574
|
+
const artifactGroupName = requestData?.artifactGroupName;
|
|
10575
|
+
const artifactGroupId = requestData?.artifactGroupId;
|
|
10576
|
+
const artifactGroupIcon = requestData?.artifactGroupIcon;
|
|
10577
|
+
logger.info("[SDK-NODEJS] Extracted params for create:", JSON.stringify({
|
|
10578
|
+
name,
|
|
10579
|
+
type,
|
|
10580
|
+
menuId,
|
|
10581
|
+
artifactGroupName,
|
|
10582
|
+
artifactGroupId,
|
|
10583
|
+
artifactGroupIcon
|
|
10584
|
+
}, null, 2));
|
|
10563
10585
|
switch (operation) {
|
|
10564
10586
|
case "create":
|
|
10565
|
-
await handleCreate6(id, name, createdBy, dsl, status, executeCollection, sendMessage, from.id);
|
|
10587
|
+
await handleCreate6(id, name, createdBy, dsl, status, type, menuId, artifactGroupName, artifactGroupId, artifactGroupIcon, executeCollection, sendMessage, from.id);
|
|
10566
10588
|
break;
|
|
10567
10589
|
case "update":
|
|
10568
10590
|
await handleUpdate6(id, artifactId, name, dsl, status, deleted, executeCollection, sendMessage, from.id);
|
|
@@ -10593,7 +10615,7 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
10593
10615
|
}, sendMessage);
|
|
10594
10616
|
}
|
|
10595
10617
|
}
|
|
10596
|
-
async function handleCreate6(id, name, createdBy, dsl, status, executeCollection, sendMessage, clientId) {
|
|
10618
|
+
async function handleCreate6(id, name, createdBy, dsl, status, type, menuId, artifactGroupName, artifactGroupId, artifactGroupIcon, executeCollection, sendMessage, clientId) {
|
|
10597
10619
|
if (!name) {
|
|
10598
10620
|
sendResponse8(id, {
|
|
10599
10621
|
success: false,
|
|
@@ -10602,7 +10624,17 @@ async function handleCreate6(id, name, createdBy, dsl, status, executeCollection
|
|
|
10602
10624
|
return;
|
|
10603
10625
|
}
|
|
10604
10626
|
try {
|
|
10605
|
-
const result = await executeCollection("artifacts", "create", {
|
|
10627
|
+
const result = await executeCollection("artifacts", "create", {
|
|
10628
|
+
name,
|
|
10629
|
+
createdBy,
|
|
10630
|
+
dsl,
|
|
10631
|
+
status,
|
|
10632
|
+
type,
|
|
10633
|
+
menuId,
|
|
10634
|
+
artifactGroupName,
|
|
10635
|
+
artifactGroupId,
|
|
10636
|
+
artifactGroupIcon
|
|
10637
|
+
});
|
|
10606
10638
|
sendResponse8(id, {
|
|
10607
10639
|
success: true,
|
|
10608
10640
|
data: result.data,
|