@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.js
CHANGED
|
@@ -2544,7 +2544,13 @@ var ArtifactsRequestPayloadSchema = import_zod3.z.object({
|
|
|
2544
2544
|
limit: import_zod3.z.number().optional(),
|
|
2545
2545
|
// Query operation fields
|
|
2546
2546
|
filters: ArtifactsQueryFiltersSchema.optional(),
|
|
2547
|
-
sort: import_zod3.z.enum(["ASC", "DESC"]).optional()
|
|
2547
|
+
sort: import_zod3.z.enum(["ASC", "DESC"]).optional(),
|
|
2548
|
+
// Menu grouping fields
|
|
2549
|
+
type: import_zod3.z.string().optional(),
|
|
2550
|
+
menuId: import_zod3.z.number().optional(),
|
|
2551
|
+
artifactGroupName: import_zod3.z.string().optional(),
|
|
2552
|
+
artifactGroupId: import_zod3.z.string().optional(),
|
|
2553
|
+
artifactGroupIcon: import_zod3.z.string().optional()
|
|
2548
2554
|
}).optional()
|
|
2549
2555
|
});
|
|
2550
2556
|
var ArtifactsRequestMessageSchema = import_zod3.z.object({
|
|
@@ -2621,7 +2627,9 @@ var MenusRequestPayloadSchema = import_zod3.z.object({
|
|
|
2621
2627
|
items: import_zod3.z.array(import_zod3.z.object({
|
|
2622
2628
|
id: import_zod3.z.number(),
|
|
2623
2629
|
sortOrder: import_zod3.z.number()
|
|
2624
|
-
})).optional()
|
|
2630
|
+
})).optional(),
|
|
2631
|
+
menuJson: import_zod3.z.record(import_zod3.z.unknown()).optional(),
|
|
2632
|
+
version: import_zod3.z.number().optional()
|
|
2625
2633
|
}).optional()
|
|
2626
2634
|
});
|
|
2627
2635
|
var MenusRequestMessageSchema = import_zod3.z.object({
|
|
@@ -10601,6 +10609,7 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
10601
10609
|
const request = ArtifactsRequestMessageSchema.parse(data);
|
|
10602
10610
|
const { id, payload, from } = request;
|
|
10603
10611
|
const { operation, data: requestData } = payload;
|
|
10612
|
+
logger.info("[SDK-NODEJS] Received artifacts request:", JSON.stringify({ operation, requestData }, null, 2));
|
|
10604
10613
|
const artifactId = requestData?.id;
|
|
10605
10614
|
const name = requestData?.name;
|
|
10606
10615
|
const createdBy = requestData?.createdBy;
|
|
@@ -10610,9 +10619,22 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
10610
10619
|
const limit = requestData?.limit;
|
|
10611
10620
|
const filters = requestData?.filters;
|
|
10612
10621
|
const sort = requestData?.sort;
|
|
10622
|
+
const type = requestData?.type;
|
|
10623
|
+
const menuId = requestData?.menuId;
|
|
10624
|
+
const artifactGroupName = requestData?.artifactGroupName;
|
|
10625
|
+
const artifactGroupId = requestData?.artifactGroupId;
|
|
10626
|
+
const artifactGroupIcon = requestData?.artifactGroupIcon;
|
|
10627
|
+
logger.info("[SDK-NODEJS] Extracted params for create:", JSON.stringify({
|
|
10628
|
+
name,
|
|
10629
|
+
type,
|
|
10630
|
+
menuId,
|
|
10631
|
+
artifactGroupName,
|
|
10632
|
+
artifactGroupId,
|
|
10633
|
+
artifactGroupIcon
|
|
10634
|
+
}, null, 2));
|
|
10613
10635
|
switch (operation) {
|
|
10614
10636
|
case "create":
|
|
10615
|
-
await handleCreate6(id, name, createdBy, dsl, status, executeCollection, sendMessage, from.id);
|
|
10637
|
+
await handleCreate6(id, name, createdBy, dsl, status, type, menuId, artifactGroupName, artifactGroupId, artifactGroupIcon, executeCollection, sendMessage, from.id);
|
|
10616
10638
|
break;
|
|
10617
10639
|
case "update":
|
|
10618
10640
|
await handleUpdate6(id, artifactId, name, dsl, status, deleted, executeCollection, sendMessage, from.id);
|
|
@@ -10643,7 +10665,7 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
10643
10665
|
}, sendMessage);
|
|
10644
10666
|
}
|
|
10645
10667
|
}
|
|
10646
|
-
async function handleCreate6(id, name, createdBy, dsl, status, executeCollection, sendMessage, clientId) {
|
|
10668
|
+
async function handleCreate6(id, name, createdBy, dsl, status, type, menuId, artifactGroupName, artifactGroupId, artifactGroupIcon, executeCollection, sendMessage, clientId) {
|
|
10647
10669
|
if (!name) {
|
|
10648
10670
|
sendResponse8(id, {
|
|
10649
10671
|
success: false,
|
|
@@ -10652,7 +10674,17 @@ async function handleCreate6(id, name, createdBy, dsl, status, executeCollection
|
|
|
10652
10674
|
return;
|
|
10653
10675
|
}
|
|
10654
10676
|
try {
|
|
10655
|
-
const result = await executeCollection("artifacts", "create", {
|
|
10677
|
+
const result = await executeCollection("artifacts", "create", {
|
|
10678
|
+
name,
|
|
10679
|
+
createdBy,
|
|
10680
|
+
dsl,
|
|
10681
|
+
status,
|
|
10682
|
+
type,
|
|
10683
|
+
menuId,
|
|
10684
|
+
artifactGroupName,
|
|
10685
|
+
artifactGroupId,
|
|
10686
|
+
artifactGroupIcon
|
|
10687
|
+
});
|
|
10656
10688
|
sendResponse8(id, {
|
|
10657
10689
|
success: true,
|
|
10658
10690
|
data: result.data,
|