@superatomai/sdk-web 0.0.25 → 0.0.26
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 +36 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +36 -9
- package/dist/index.js.map +1 -1
- package/package.json +43 -41
package/dist/index.cjs
CHANGED
|
@@ -814,7 +814,13 @@ var ArtifactsRequestPayloadSchema = zod.z.object({
|
|
|
814
814
|
limit: zod.z.number().optional(),
|
|
815
815
|
// Query operation fields
|
|
816
816
|
filters: ArtifactsQueryFiltersSchema.optional(),
|
|
817
|
-
sort: zod.z.enum(["ASC", "DESC"]).optional()
|
|
817
|
+
sort: zod.z.enum(["ASC", "DESC"]).optional(),
|
|
818
|
+
// Menu grouping fields
|
|
819
|
+
type: zod.z.string().optional(),
|
|
820
|
+
menuId: zod.z.number().optional(),
|
|
821
|
+
artifactGroupName: zod.z.string().optional(),
|
|
822
|
+
artifactGroupId: zod.z.string().optional(),
|
|
823
|
+
artifactGroupIcon: zod.z.string().optional()
|
|
818
824
|
}).optional()
|
|
819
825
|
});
|
|
820
826
|
var ArtifactsRequestMessageSchema = zod.z.object({
|
|
@@ -934,7 +940,9 @@ var MenuDataSchema = zod.z.object({
|
|
|
934
940
|
isActive: zod.z.boolean().optional(),
|
|
935
941
|
createdAt: zod.z.string().optional(),
|
|
936
942
|
updatedAt: zod.z.string().optional(),
|
|
937
|
-
children: zod.z.lazy(() => zod.z.array(MenuDataSchema)).optional()
|
|
943
|
+
children: zod.z.lazy(() => zod.z.array(MenuDataSchema)).optional(),
|
|
944
|
+
menuJson: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional(),
|
|
945
|
+
version: zod.z.number().optional()
|
|
938
946
|
});
|
|
939
947
|
var MenuQueryFiltersSchema = zod.z.object({
|
|
940
948
|
parentId: zod.z.number().nullable().optional(),
|
|
@@ -1928,8 +1936,32 @@ async function queryBookmarks(client, options = {}, timeout) {
|
|
|
1928
1936
|
|
|
1929
1937
|
// src/services/artifacts/index.ts
|
|
1930
1938
|
async function createArtifact(client, options, timeout) {
|
|
1931
|
-
|
|
1939
|
+
console.log("[SDK-WEB] createArtifact called with options:", JSON.stringify(options, null, 2));
|
|
1940
|
+
const { name, createdBy, dsl, status, type, menuId, artifactGroupName, artifactGroupId, artifactGroupIcon } = options;
|
|
1941
|
+
console.log("[SDK-WEB] Extracted parameters:", JSON.stringify({
|
|
1942
|
+
name,
|
|
1943
|
+
createdBy,
|
|
1944
|
+
dsl: dsl ? "present" : "undefined",
|
|
1945
|
+
status,
|
|
1946
|
+
type,
|
|
1947
|
+
menuId,
|
|
1948
|
+
artifactGroupName,
|
|
1949
|
+
artifactGroupId,
|
|
1950
|
+
artifactGroupIcon
|
|
1951
|
+
}, null, 2));
|
|
1932
1952
|
const messageId = `artifacts_create_${Date.now()}`;
|
|
1953
|
+
const messageData = {
|
|
1954
|
+
name,
|
|
1955
|
+
createdBy,
|
|
1956
|
+
dsl,
|
|
1957
|
+
status,
|
|
1958
|
+
type,
|
|
1959
|
+
menuId,
|
|
1960
|
+
artifactGroupName,
|
|
1961
|
+
artifactGroupId,
|
|
1962
|
+
artifactGroupIcon
|
|
1963
|
+
};
|
|
1964
|
+
console.log("[SDK-WEB] Sending message data:", JSON.stringify(messageData, null, 2));
|
|
1933
1965
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
1934
1966
|
id: messageId,
|
|
1935
1967
|
type: "ARTIFACTS",
|
|
@@ -1937,12 +1969,7 @@ async function createArtifact(client, options, timeout) {
|
|
|
1937
1969
|
to: { type: "data-agent" },
|
|
1938
1970
|
payload: {
|
|
1939
1971
|
operation: "create",
|
|
1940
|
-
data:
|
|
1941
|
-
name,
|
|
1942
|
-
createdBy,
|
|
1943
|
-
dsl,
|
|
1944
|
-
status
|
|
1945
|
-
}
|
|
1972
|
+
data: messageData
|
|
1946
1973
|
}
|
|
1947
1974
|
});
|
|
1948
1975
|
const response = await client.sendWithResponse(message, timeout);
|