@superatomai/sdk-web 0.0.26 → 0.0.27
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 +21 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +21 -16
- package/dist/index.js.map +1 -1
- package/package.json +41 -43
package/dist/index.cjs
CHANGED
|
@@ -798,9 +798,11 @@ var ArtifactDataSchema = zod.z.object({
|
|
|
798
798
|
});
|
|
799
799
|
var ArtifactsQueryFiltersSchema = zod.z.object({
|
|
800
800
|
createdBy: zod.z.number().optional(),
|
|
801
|
+
type: zod.z.string().optional(),
|
|
801
802
|
status: zod.z.string().optional(),
|
|
802
803
|
name: zod.z.string().optional(),
|
|
803
|
-
deleted: zod.z.boolean().optional()
|
|
804
|
+
deleted: zod.z.boolean().optional(),
|
|
805
|
+
createdAt: zod.z.string().optional()
|
|
804
806
|
});
|
|
805
807
|
var ArtifactsRequestPayloadSchema = zod.z.object({
|
|
806
808
|
operation: zod.z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -812,6 +814,7 @@ var ArtifactsRequestPayloadSchema = zod.z.object({
|
|
|
812
814
|
status: zod.z.string().optional(),
|
|
813
815
|
deleted: zod.z.boolean().optional(),
|
|
814
816
|
limit: zod.z.number().optional(),
|
|
817
|
+
offset: zod.z.number().optional(),
|
|
815
818
|
// Query operation fields
|
|
816
819
|
filters: ArtifactsQueryFiltersSchema.optional(),
|
|
817
820
|
sort: zod.z.enum(["ASC", "DESC"]).optional(),
|
|
@@ -1937,29 +1940,23 @@ async function queryBookmarks(client, options = {}, timeout) {
|
|
|
1937
1940
|
// src/services/artifacts/index.ts
|
|
1938
1941
|
async function createArtifact(client, options, timeout) {
|
|
1939
1942
|
console.log("[SDK-WEB] createArtifact called with options:", JSON.stringify(options, null, 2));
|
|
1940
|
-
const { name, createdBy, dsl,
|
|
1943
|
+
const { name, createdBy, dsl, type, filters, status } = options;
|
|
1941
1944
|
console.log("[SDK-WEB] Extracted parameters:", JSON.stringify({
|
|
1942
1945
|
name,
|
|
1943
1946
|
createdBy,
|
|
1944
1947
|
dsl: dsl ? "present" : "undefined",
|
|
1945
|
-
status,
|
|
1946
1948
|
type,
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
artifactGroupId,
|
|
1950
|
-
artifactGroupIcon
|
|
1949
|
+
filters: filters ? "present" : "undefined",
|
|
1950
|
+
status
|
|
1951
1951
|
}, null, 2));
|
|
1952
1952
|
const messageId = `artifacts_create_${Date.now()}`;
|
|
1953
1953
|
const messageData = {
|
|
1954
1954
|
name,
|
|
1955
1955
|
createdBy,
|
|
1956
1956
|
dsl,
|
|
1957
|
-
status,
|
|
1958
1957
|
type,
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
artifactGroupId,
|
|
1962
|
-
artifactGroupIcon
|
|
1958
|
+
filters,
|
|
1959
|
+
status
|
|
1963
1960
|
};
|
|
1964
1961
|
console.log("[SDK-WEB] Sending message data:", JSON.stringify(messageData, null, 2));
|
|
1965
1962
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
@@ -1982,7 +1979,7 @@ async function createArtifact(client, options, timeout) {
|
|
|
1982
1979
|
};
|
|
1983
1980
|
}
|
|
1984
1981
|
async function updateArtifact(client, options, timeout) {
|
|
1985
|
-
const { id, name, dsl, status, deleted } = options;
|
|
1982
|
+
const { id, name, dsl, type, filters, status, deleted } = options;
|
|
1986
1983
|
const messageId = `artifacts_update_${Date.now()}`;
|
|
1987
1984
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
1988
1985
|
id: messageId,
|
|
@@ -1995,6 +1992,8 @@ async function updateArtifact(client, options, timeout) {
|
|
|
1995
1992
|
id,
|
|
1996
1993
|
name,
|
|
1997
1994
|
dsl,
|
|
1995
|
+
type,
|
|
1996
|
+
filters,
|
|
1998
1997
|
status,
|
|
1999
1998
|
deleted
|
|
2000
1999
|
}
|
|
@@ -2078,9 +2077,10 @@ async function getArtifact(client, id, timeout) {
|
|
|
2078
2077
|
};
|
|
2079
2078
|
}
|
|
2080
2079
|
async function queryArtifacts(client, options = {}, timeout) {
|
|
2081
|
-
const { filters, limit, sort } = options;
|
|
2080
|
+
const { filters, limit, offset, sort } = options;
|
|
2082
2081
|
const messageId = `artifacts_query_${Date.now()}`;
|
|
2083
|
-
|
|
2082
|
+
console.log("[SDK-WEB] queryArtifacts - options.filters:", JSON.stringify(filters, null, 2));
|
|
2083
|
+
const messageBeforeParse = {
|
|
2084
2084
|
id: messageId,
|
|
2085
2085
|
type: "ARTIFACTS",
|
|
2086
2086
|
from: { type: client.type },
|
|
@@ -2090,10 +2090,15 @@ async function queryArtifacts(client, options = {}, timeout) {
|
|
|
2090
2090
|
data: {
|
|
2091
2091
|
filters,
|
|
2092
2092
|
limit,
|
|
2093
|
+
offset,
|
|
2093
2094
|
sort
|
|
2094
2095
|
}
|
|
2095
2096
|
}
|
|
2096
|
-
}
|
|
2097
|
+
};
|
|
2098
|
+
console.log("[SDK-WEB] queryArtifacts - BEFORE parse - payload.data.filters:", JSON.stringify(messageBeforeParse.payload.data.filters, null, 2));
|
|
2099
|
+
const message = ArtifactsRequestMessageSchema.parse(messageBeforeParse);
|
|
2100
|
+
console.log("[SDK-WEB] queryArtifacts - AFTER parse - payload.data.filters:", JSON.stringify(message.payload.data?.filters, null, 2));
|
|
2101
|
+
console.log("[SDK-WEB] queryArtifacts - filters.type:", message.payload.data?.filters?.type);
|
|
2097
2102
|
const response = await client.sendWithResponse(message, timeout);
|
|
2098
2103
|
const payload = response.payload;
|
|
2099
2104
|
return {
|