@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.d.cts
CHANGED
|
@@ -2099,12 +2099,9 @@ interface CreateArtifactOptions {
|
|
|
2099
2099
|
name: string;
|
|
2100
2100
|
createdBy?: number;
|
|
2101
2101
|
dsl?: Record<string, any>;
|
|
2102
|
-
status?: string;
|
|
2103
2102
|
type?: string;
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
artifactGroupId?: string;
|
|
2107
|
-
artifactGroupIcon?: string;
|
|
2103
|
+
filters?: Record<string, any>;
|
|
2104
|
+
status?: string;
|
|
2108
2105
|
}
|
|
2109
2106
|
/**
|
|
2110
2107
|
* Create a new artifact
|
|
@@ -2126,6 +2123,8 @@ interface UpdateArtifactOptions {
|
|
|
2126
2123
|
id: number;
|
|
2127
2124
|
name?: string;
|
|
2128
2125
|
dsl?: Record<string, any>;
|
|
2126
|
+
type?: string;
|
|
2127
|
+
filters?: Record<string, any>;
|
|
2129
2128
|
status?: string;
|
|
2130
2129
|
deleted?: boolean;
|
|
2131
2130
|
}
|
|
@@ -2187,9 +2186,11 @@ declare function getArtifact(client: SuperatomClient, id: number, timeout?: numb
|
|
|
2187
2186
|
*/
|
|
2188
2187
|
interface QueryArtifactsFilters {
|
|
2189
2188
|
createdBy?: number;
|
|
2189
|
+
type?: string;
|
|
2190
2190
|
status?: string;
|
|
2191
2191
|
name?: string;
|
|
2192
2192
|
deleted?: boolean;
|
|
2193
|
+
createdAt?: string;
|
|
2193
2194
|
}
|
|
2194
2195
|
/**
|
|
2195
2196
|
* Query artifacts options
|
|
@@ -2197,6 +2198,7 @@ interface QueryArtifactsFilters {
|
|
|
2197
2198
|
interface QueryArtifactsOptions {
|
|
2198
2199
|
filters?: QueryArtifactsFilters;
|
|
2199
2200
|
limit?: number;
|
|
2201
|
+
offset?: number;
|
|
2200
2202
|
sort?: 'ASC' | 'DESC';
|
|
2201
2203
|
}
|
|
2202
2204
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2099,12 +2099,9 @@ interface CreateArtifactOptions {
|
|
|
2099
2099
|
name: string;
|
|
2100
2100
|
createdBy?: number;
|
|
2101
2101
|
dsl?: Record<string, any>;
|
|
2102
|
-
status?: string;
|
|
2103
2102
|
type?: string;
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
artifactGroupId?: string;
|
|
2107
|
-
artifactGroupIcon?: string;
|
|
2103
|
+
filters?: Record<string, any>;
|
|
2104
|
+
status?: string;
|
|
2108
2105
|
}
|
|
2109
2106
|
/**
|
|
2110
2107
|
* Create a new artifact
|
|
@@ -2126,6 +2123,8 @@ interface UpdateArtifactOptions {
|
|
|
2126
2123
|
id: number;
|
|
2127
2124
|
name?: string;
|
|
2128
2125
|
dsl?: Record<string, any>;
|
|
2126
|
+
type?: string;
|
|
2127
|
+
filters?: Record<string, any>;
|
|
2129
2128
|
status?: string;
|
|
2130
2129
|
deleted?: boolean;
|
|
2131
2130
|
}
|
|
@@ -2187,9 +2186,11 @@ declare function getArtifact(client: SuperatomClient, id: number, timeout?: numb
|
|
|
2187
2186
|
*/
|
|
2188
2187
|
interface QueryArtifactsFilters {
|
|
2189
2188
|
createdBy?: number;
|
|
2189
|
+
type?: string;
|
|
2190
2190
|
status?: string;
|
|
2191
2191
|
name?: string;
|
|
2192
2192
|
deleted?: boolean;
|
|
2193
|
+
createdAt?: string;
|
|
2193
2194
|
}
|
|
2194
2195
|
/**
|
|
2195
2196
|
* Query artifacts options
|
|
@@ -2197,6 +2198,7 @@ interface QueryArtifactsFilters {
|
|
|
2197
2198
|
interface QueryArtifactsOptions {
|
|
2198
2199
|
filters?: QueryArtifactsFilters;
|
|
2199
2200
|
limit?: number;
|
|
2201
|
+
offset?: number;
|
|
2200
2202
|
sort?: 'ASC' | 'DESC';
|
|
2201
2203
|
}
|
|
2202
2204
|
/**
|
package/dist/index.js
CHANGED
|
@@ -796,9 +796,11 @@ var ArtifactDataSchema = z.object({
|
|
|
796
796
|
});
|
|
797
797
|
var ArtifactsQueryFiltersSchema = z.object({
|
|
798
798
|
createdBy: z.number().optional(),
|
|
799
|
+
type: z.string().optional(),
|
|
799
800
|
status: z.string().optional(),
|
|
800
801
|
name: z.string().optional(),
|
|
801
|
-
deleted: z.boolean().optional()
|
|
802
|
+
deleted: z.boolean().optional(),
|
|
803
|
+
createdAt: z.string().optional()
|
|
802
804
|
});
|
|
803
805
|
var ArtifactsRequestPayloadSchema = z.object({
|
|
804
806
|
operation: z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
@@ -810,6 +812,7 @@ var ArtifactsRequestPayloadSchema = z.object({
|
|
|
810
812
|
status: z.string().optional(),
|
|
811
813
|
deleted: z.boolean().optional(),
|
|
812
814
|
limit: z.number().optional(),
|
|
815
|
+
offset: z.number().optional(),
|
|
813
816
|
// Query operation fields
|
|
814
817
|
filters: ArtifactsQueryFiltersSchema.optional(),
|
|
815
818
|
sort: z.enum(["ASC", "DESC"]).optional(),
|
|
@@ -1935,29 +1938,23 @@ async function queryBookmarks(client, options = {}, timeout) {
|
|
|
1935
1938
|
// src/services/artifacts/index.ts
|
|
1936
1939
|
async function createArtifact(client, options, timeout) {
|
|
1937
1940
|
console.log("[SDK-WEB] createArtifact called with options:", JSON.stringify(options, null, 2));
|
|
1938
|
-
const { name, createdBy, dsl,
|
|
1941
|
+
const { name, createdBy, dsl, type, filters, status } = options;
|
|
1939
1942
|
console.log("[SDK-WEB] Extracted parameters:", JSON.stringify({
|
|
1940
1943
|
name,
|
|
1941
1944
|
createdBy,
|
|
1942
1945
|
dsl: dsl ? "present" : "undefined",
|
|
1943
|
-
status,
|
|
1944
1946
|
type,
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
artifactGroupId,
|
|
1948
|
-
artifactGroupIcon
|
|
1947
|
+
filters: filters ? "present" : "undefined",
|
|
1948
|
+
status
|
|
1949
1949
|
}, null, 2));
|
|
1950
1950
|
const messageId = `artifacts_create_${Date.now()}`;
|
|
1951
1951
|
const messageData = {
|
|
1952
1952
|
name,
|
|
1953
1953
|
createdBy,
|
|
1954
1954
|
dsl,
|
|
1955
|
-
status,
|
|
1956
1955
|
type,
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
artifactGroupId,
|
|
1960
|
-
artifactGroupIcon
|
|
1956
|
+
filters,
|
|
1957
|
+
status
|
|
1961
1958
|
};
|
|
1962
1959
|
console.log("[SDK-WEB] Sending message data:", JSON.stringify(messageData, null, 2));
|
|
1963
1960
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
@@ -1980,7 +1977,7 @@ async function createArtifact(client, options, timeout) {
|
|
|
1980
1977
|
};
|
|
1981
1978
|
}
|
|
1982
1979
|
async function updateArtifact(client, options, timeout) {
|
|
1983
|
-
const { id, name, dsl, status, deleted } = options;
|
|
1980
|
+
const { id, name, dsl, type, filters, status, deleted } = options;
|
|
1984
1981
|
const messageId = `artifacts_update_${Date.now()}`;
|
|
1985
1982
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
1986
1983
|
id: messageId,
|
|
@@ -1993,6 +1990,8 @@ async function updateArtifact(client, options, timeout) {
|
|
|
1993
1990
|
id,
|
|
1994
1991
|
name,
|
|
1995
1992
|
dsl,
|
|
1993
|
+
type,
|
|
1994
|
+
filters,
|
|
1996
1995
|
status,
|
|
1997
1996
|
deleted
|
|
1998
1997
|
}
|
|
@@ -2076,9 +2075,10 @@ async function getArtifact(client, id, timeout) {
|
|
|
2076
2075
|
};
|
|
2077
2076
|
}
|
|
2078
2077
|
async function queryArtifacts(client, options = {}, timeout) {
|
|
2079
|
-
const { filters, limit, sort } = options;
|
|
2078
|
+
const { filters, limit, offset, sort } = options;
|
|
2080
2079
|
const messageId = `artifacts_query_${Date.now()}`;
|
|
2081
|
-
|
|
2080
|
+
console.log("[SDK-WEB] queryArtifacts - options.filters:", JSON.stringify(filters, null, 2));
|
|
2081
|
+
const messageBeforeParse = {
|
|
2082
2082
|
id: messageId,
|
|
2083
2083
|
type: "ARTIFACTS",
|
|
2084
2084
|
from: { type: client.type },
|
|
@@ -2088,10 +2088,15 @@ async function queryArtifacts(client, options = {}, timeout) {
|
|
|
2088
2088
|
data: {
|
|
2089
2089
|
filters,
|
|
2090
2090
|
limit,
|
|
2091
|
+
offset,
|
|
2091
2092
|
sort
|
|
2092
2093
|
}
|
|
2093
2094
|
}
|
|
2094
|
-
}
|
|
2095
|
+
};
|
|
2096
|
+
console.log("[SDK-WEB] queryArtifacts - BEFORE parse - payload.data.filters:", JSON.stringify(messageBeforeParse.payload.data.filters, null, 2));
|
|
2097
|
+
const message = ArtifactsRequestMessageSchema.parse(messageBeforeParse);
|
|
2098
|
+
console.log("[SDK-WEB] queryArtifacts - AFTER parse - payload.data.filters:", JSON.stringify(message.payload.data?.filters, null, 2));
|
|
2099
|
+
console.log("[SDK-WEB] queryArtifacts - filters.type:", message.payload.data?.filters?.type);
|
|
2095
2100
|
const response = await client.sendWithResponse(message, timeout);
|
|
2096
2101
|
const payload = response.payload;
|
|
2097
2102
|
return {
|