@superatomai/sdk-node 0.0.64 → 0.0.65
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.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +22 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -943,9 +943,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
943
943
|
} | undefined;
|
|
944
944
|
createdBy?: number | undefined;
|
|
945
945
|
updatedBy?: number | undefined;
|
|
946
|
+
offset?: number | undefined;
|
|
946
947
|
tags?: string[] | undefined;
|
|
947
948
|
content?: string | undefined;
|
|
948
|
-
offset?: number | undefined;
|
|
949
949
|
}, {
|
|
950
950
|
id?: number | undefined;
|
|
951
951
|
type?: "query" | "user" | "global" | undefined;
|
|
@@ -963,9 +963,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
963
963
|
} | undefined;
|
|
964
964
|
createdBy?: number | undefined;
|
|
965
965
|
updatedBy?: number | undefined;
|
|
966
|
+
offset?: number | undefined;
|
|
966
967
|
tags?: string[] | undefined;
|
|
967
968
|
content?: string | undefined;
|
|
968
|
-
offset?: number | undefined;
|
|
969
969
|
}>>;
|
|
970
970
|
}, "strip", z.ZodTypeAny, {
|
|
971
971
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
@@ -986,9 +986,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
986
986
|
} | undefined;
|
|
987
987
|
createdBy?: number | undefined;
|
|
988
988
|
updatedBy?: number | undefined;
|
|
989
|
+
offset?: number | undefined;
|
|
989
990
|
tags?: string[] | undefined;
|
|
990
991
|
content?: string | undefined;
|
|
991
|
-
offset?: number | undefined;
|
|
992
992
|
} | undefined;
|
|
993
993
|
}, {
|
|
994
994
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
@@ -1009,9 +1009,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
1009
1009
|
} | undefined;
|
|
1010
1010
|
createdBy?: number | undefined;
|
|
1011
1011
|
updatedBy?: number | undefined;
|
|
1012
|
+
offset?: number | undefined;
|
|
1012
1013
|
tags?: string[] | undefined;
|
|
1013
1014
|
content?: string | undefined;
|
|
1014
|
-
offset?: number | undefined;
|
|
1015
1015
|
} | undefined;
|
|
1016
1016
|
}>;
|
|
1017
1017
|
type KbNodesRequestPayload = z.infer<typeof KbNodesRequestPayloadSchema>;
|
package/dist/index.d.ts
CHANGED
|
@@ -943,9 +943,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
943
943
|
} | undefined;
|
|
944
944
|
createdBy?: number | undefined;
|
|
945
945
|
updatedBy?: number | undefined;
|
|
946
|
+
offset?: number | undefined;
|
|
946
947
|
tags?: string[] | undefined;
|
|
947
948
|
content?: string | undefined;
|
|
948
|
-
offset?: number | undefined;
|
|
949
949
|
}, {
|
|
950
950
|
id?: number | undefined;
|
|
951
951
|
type?: "query" | "user" | "global" | undefined;
|
|
@@ -963,9 +963,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
963
963
|
} | undefined;
|
|
964
964
|
createdBy?: number | undefined;
|
|
965
965
|
updatedBy?: number | undefined;
|
|
966
|
+
offset?: number | undefined;
|
|
966
967
|
tags?: string[] | undefined;
|
|
967
968
|
content?: string | undefined;
|
|
968
|
-
offset?: number | undefined;
|
|
969
969
|
}>>;
|
|
970
970
|
}, "strip", z.ZodTypeAny, {
|
|
971
971
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
@@ -986,9 +986,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
986
986
|
} | undefined;
|
|
987
987
|
createdBy?: number | undefined;
|
|
988
988
|
updatedBy?: number | undefined;
|
|
989
|
+
offset?: number | undefined;
|
|
989
990
|
tags?: string[] | undefined;
|
|
990
991
|
content?: string | undefined;
|
|
991
|
-
offset?: number | undefined;
|
|
992
992
|
} | undefined;
|
|
993
993
|
}, {
|
|
994
994
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
@@ -1009,9 +1009,9 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
1009
1009
|
} | undefined;
|
|
1010
1010
|
createdBy?: number | undefined;
|
|
1011
1011
|
updatedBy?: number | undefined;
|
|
1012
|
+
offset?: number | undefined;
|
|
1012
1013
|
tags?: string[] | undefined;
|
|
1013
1014
|
content?: string | undefined;
|
|
1014
|
-
offset?: number | undefined;
|
|
1015
1015
|
} | undefined;
|
|
1016
1016
|
}>;
|
|
1017
1017
|
type KbNodesRequestPayload = z.infer<typeof KbNodesRequestPayloadSchema>;
|
package/dist/index.js
CHANGED
|
@@ -2529,9 +2529,11 @@ var BookmarksRequestMessageSchema = import_zod3.z.object({
|
|
|
2529
2529
|
});
|
|
2530
2530
|
var ArtifactsQueryFiltersSchema = import_zod3.z.object({
|
|
2531
2531
|
createdBy: import_zod3.z.number().optional(),
|
|
2532
|
+
type: import_zod3.z.string().optional(),
|
|
2532
2533
|
status: import_zod3.z.string().optional(),
|
|
2533
2534
|
name: import_zod3.z.string().optional(),
|
|
2534
|
-
deleted: import_zod3.z.boolean().optional()
|
|
2535
|
+
deleted: import_zod3.z.boolean().optional(),
|
|
2536
|
+
createdAt: import_zod3.z.string().optional()
|
|
2535
2537
|
});
|
|
2536
2538
|
var ArtifactsRequestPayloadSchema = import_zod3.z.object({
|
|
2537
2539
|
operation: import_zod3.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -2543,6 +2545,7 @@ var ArtifactsRequestPayloadSchema = import_zod3.z.object({
|
|
|
2543
2545
|
status: import_zod3.z.string().optional(),
|
|
2544
2546
|
deleted: import_zod3.z.boolean().optional(),
|
|
2545
2547
|
limit: import_zod3.z.number().optional(),
|
|
2548
|
+
offset: import_zod3.z.number().optional(),
|
|
2546
2549
|
// Query operation fields
|
|
2547
2550
|
filters: ArtifactsQueryFiltersSchema.optional(),
|
|
2548
2551
|
sort: import_zod3.z.enum(["ASC", "DESC"]).optional(),
|
|
@@ -11075,30 +11078,25 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
11075
11078
|
const name = requestData?.name;
|
|
11076
11079
|
const createdBy = requestData?.createdBy;
|
|
11077
11080
|
const dsl = requestData?.dsl;
|
|
11081
|
+
const type = requestData?.type;
|
|
11082
|
+
const filters = requestData?.filters;
|
|
11078
11083
|
const status = requestData?.status;
|
|
11079
11084
|
const deleted = requestData?.deleted;
|
|
11080
11085
|
const limit = requestData?.limit;
|
|
11081
|
-
const
|
|
11086
|
+
const offset = requestData?.offset;
|
|
11082
11087
|
const sort = requestData?.sort;
|
|
11083
|
-
|
|
11084
|
-
const menuId = requestData?.menuId;
|
|
11085
|
-
const artifactGroupName = requestData?.artifactGroupName;
|
|
11086
|
-
const artifactGroupId = requestData?.artifactGroupId;
|
|
11087
|
-
const artifactGroupIcon = requestData?.artifactGroupIcon;
|
|
11088
|
-
logger.info("[SDK-NODEJS] Extracted params for create:", JSON.stringify({
|
|
11088
|
+
logger.info("[SDK-NODEJS] Extracted params:", JSON.stringify({
|
|
11089
11089
|
name,
|
|
11090
11090
|
type,
|
|
11091
|
-
|
|
11092
|
-
artifactGroupName,
|
|
11093
|
-
artifactGroupId,
|
|
11094
|
-
artifactGroupIcon
|
|
11091
|
+
filters: filters ? "present" : "undefined"
|
|
11095
11092
|
}, null, 2));
|
|
11093
|
+
logger.info("[SDK-NODEJS] Full requestData.filters:", JSON.stringify(filters, null, 2));
|
|
11096
11094
|
switch (operation) {
|
|
11097
11095
|
case "create":
|
|
11098
|
-
await handleCreate6(id, name, createdBy, dsl,
|
|
11096
|
+
await handleCreate6(id, name, createdBy, dsl, type, filters, status, executeCollection, sendMessage, from.id);
|
|
11099
11097
|
break;
|
|
11100
11098
|
case "update":
|
|
11101
|
-
await handleUpdate6(id, artifactId, name, dsl, status, deleted, executeCollection, sendMessage, from.id);
|
|
11099
|
+
await handleUpdate6(id, artifactId, name, dsl, type, filters, status, deleted, executeCollection, sendMessage, from.id);
|
|
11102
11100
|
break;
|
|
11103
11101
|
case "delete":
|
|
11104
11102
|
await handleDelete6(id, artifactId, executeCollection, sendMessage, from.id);
|
|
@@ -11110,7 +11108,7 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
11110
11108
|
await handleGetOne6(id, artifactId, executeCollection, sendMessage, from.id);
|
|
11111
11109
|
break;
|
|
11112
11110
|
case "query":
|
|
11113
|
-
await handleQuery6(id, { filters, limit, sort }, executeCollection, sendMessage, from.id);
|
|
11111
|
+
await handleQuery6(id, { filters, limit, offset, sort }, executeCollection, sendMessage, from.id);
|
|
11114
11112
|
break;
|
|
11115
11113
|
default:
|
|
11116
11114
|
sendResponse8(id, {
|
|
@@ -11126,7 +11124,7 @@ async function handleArtifactsRequest(data, collections, sendMessage) {
|
|
|
11126
11124
|
}, sendMessage);
|
|
11127
11125
|
}
|
|
11128
11126
|
}
|
|
11129
|
-
async function handleCreate6(id, name, createdBy, dsl,
|
|
11127
|
+
async function handleCreate6(id, name, createdBy, dsl, type, filters, status, executeCollection, sendMessage, clientId) {
|
|
11130
11128
|
if (!name) {
|
|
11131
11129
|
sendResponse8(id, {
|
|
11132
11130
|
success: false,
|
|
@@ -11139,12 +11137,9 @@ async function handleCreate6(id, name, createdBy, dsl, status, type, menuId, art
|
|
|
11139
11137
|
name,
|
|
11140
11138
|
createdBy,
|
|
11141
11139
|
dsl,
|
|
11142
|
-
status,
|
|
11143
11140
|
type,
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
artifactGroupId,
|
|
11147
|
-
artifactGroupIcon
|
|
11141
|
+
filters,
|
|
11142
|
+
status
|
|
11148
11143
|
});
|
|
11149
11144
|
sendResponse8(id, {
|
|
11150
11145
|
success: true,
|
|
@@ -11159,7 +11154,7 @@ async function handleCreate6(id, name, createdBy, dsl, status, type, menuId, art
|
|
|
11159
11154
|
}, sendMessage, clientId);
|
|
11160
11155
|
}
|
|
11161
11156
|
}
|
|
11162
|
-
async function handleUpdate6(id, artifactId, name, dsl, status, deleted, executeCollection, sendMessage, clientId) {
|
|
11157
|
+
async function handleUpdate6(id, artifactId, name, dsl, type, filters, status, deleted, executeCollection, sendMessage, clientId) {
|
|
11163
11158
|
if (!artifactId) {
|
|
11164
11159
|
sendResponse8(id, {
|
|
11165
11160
|
success: false,
|
|
@@ -11168,7 +11163,7 @@ async function handleUpdate6(id, artifactId, name, dsl, status, deleted, execute
|
|
|
11168
11163
|
return;
|
|
11169
11164
|
}
|
|
11170
11165
|
try {
|
|
11171
|
-
const result = await executeCollection("artifacts", "update", { id: artifactId, name, dsl, status, deleted });
|
|
11166
|
+
const result = await executeCollection("artifacts", "update", { id: artifactId, name, dsl, type, filters, status, deleted });
|
|
11172
11167
|
sendResponse8(id, {
|
|
11173
11168
|
success: true,
|
|
11174
11169
|
data: result.data,
|
|
@@ -11247,11 +11242,15 @@ async function handleGetOne6(id, artifactId, executeCollection, sendMessage, cli
|
|
|
11247
11242
|
}
|
|
11248
11243
|
async function handleQuery6(id, queryParams, executeCollection, sendMessage, clientId) {
|
|
11249
11244
|
try {
|
|
11245
|
+
logger.info("[SDK-NODEJS] handleQuery - queryParams:", JSON.stringify(queryParams, null, 2));
|
|
11246
|
+
logger.info("[SDK-NODEJS] handleQuery - filters.type:", queryParams.filters?.type);
|
|
11250
11247
|
const result = await executeCollection("artifacts", "query", {
|
|
11251
11248
|
filters: queryParams.filters,
|
|
11252
11249
|
limit: queryParams.limit || 50,
|
|
11250
|
+
offset: queryParams.offset || 0,
|
|
11253
11251
|
sort: queryParams.sort || "DESC"
|
|
11254
11252
|
});
|
|
11253
|
+
logger.info("[SDK-NODEJS] handleQuery - executeCollection result count:", result.count);
|
|
11255
11254
|
sendResponse8(id, {
|
|
11256
11255
|
success: true,
|
|
11257
11256
|
data: result.data,
|