@superatomai/sdk-web 0.0.27 → 0.0.29
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 +9 -7
- 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 +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -276,7 +276,7 @@ var UserPromptRequestMessageSchema = zod.z.object({
|
|
|
276
276
|
payload: UserPromptRequestPayloadSchema
|
|
277
277
|
});
|
|
278
278
|
var ComponentPropsSchema = zod.z.object({
|
|
279
|
-
query: zod.z.string().or(zod.z.record(zod.z.string(), zod.z.unknown())).optional(),
|
|
279
|
+
query: zod.z.string().or(zod.z.record(zod.z.string(), zod.z.unknown())).nullable().optional(),
|
|
280
280
|
title: zod.z.string().optional(),
|
|
281
281
|
description: zod.z.string().optional(),
|
|
282
282
|
config: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
@@ -791,6 +791,8 @@ var ArtifactDataSchema = zod.z.object({
|
|
|
791
791
|
name: zod.z.string(),
|
|
792
792
|
createdBy: zod.z.number().nullable().optional(),
|
|
793
793
|
dsl: zod.z.record(zod.z.string(), zod.z.any()).nullable().optional(),
|
|
794
|
+
type: zod.z.string().nullable().optional(),
|
|
795
|
+
filters: zod.z.any().nullable().optional(),
|
|
794
796
|
status: zod.z.string().nullable().optional(),
|
|
795
797
|
deleted: zod.z.boolean().optional(),
|
|
796
798
|
createdAt: zod.z.string().optional(),
|
|
@@ -1949,7 +1951,7 @@ async function createArtifact(client, options, timeout) {
|
|
|
1949
1951
|
filters: filters ? "present" : "undefined",
|
|
1950
1952
|
status
|
|
1951
1953
|
}, null, 2));
|
|
1952
|
-
const messageId = `artifacts_create_${Date.now()}`;
|
|
1954
|
+
const messageId = `artifacts_create_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
1953
1955
|
const messageData = {
|
|
1954
1956
|
name,
|
|
1955
1957
|
createdBy,
|
|
@@ -1980,7 +1982,7 @@ async function createArtifact(client, options, timeout) {
|
|
|
1980
1982
|
}
|
|
1981
1983
|
async function updateArtifact(client, options, timeout) {
|
|
1982
1984
|
const { id, name, dsl, type, filters, status, deleted } = options;
|
|
1983
|
-
const messageId = `artifacts_update_${Date.now()}`;
|
|
1985
|
+
const messageId = `artifacts_update_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
1984
1986
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
1985
1987
|
id: messageId,
|
|
1986
1988
|
type: "ARTIFACTS",
|
|
@@ -2009,7 +2011,7 @@ async function updateArtifact(client, options, timeout) {
|
|
|
2009
2011
|
};
|
|
2010
2012
|
}
|
|
2011
2013
|
async function deleteArtifact(client, id, timeout) {
|
|
2012
|
-
const messageId = `artifacts_delete_${Date.now()}`;
|
|
2014
|
+
const messageId = `artifacts_delete_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
2013
2015
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
2014
2016
|
id: messageId,
|
|
2015
2017
|
type: "ARTIFACTS",
|
|
@@ -2032,7 +2034,7 @@ async function deleteArtifact(client, id, timeout) {
|
|
|
2032
2034
|
};
|
|
2033
2035
|
}
|
|
2034
2036
|
async function getAllArtifacts(client, limit, timeout) {
|
|
2035
|
-
const messageId = `artifacts_getall_${Date.now()}`;
|
|
2037
|
+
const messageId = `artifacts_getall_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
2036
2038
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
2037
2039
|
id: messageId,
|
|
2038
2040
|
type: "ARTIFACTS",
|
|
@@ -2054,7 +2056,7 @@ async function getAllArtifacts(client, limit, timeout) {
|
|
|
2054
2056
|
};
|
|
2055
2057
|
}
|
|
2056
2058
|
async function getArtifact(client, id, timeout) {
|
|
2057
|
-
const messageId = `artifacts_getone_${Date.now()}`;
|
|
2059
|
+
const messageId = `artifacts_getone_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
2058
2060
|
const message = ArtifactsRequestMessageSchema.parse({
|
|
2059
2061
|
id: messageId,
|
|
2060
2062
|
type: "ARTIFACTS",
|
|
@@ -2078,7 +2080,7 @@ async function getArtifact(client, id, timeout) {
|
|
|
2078
2080
|
}
|
|
2079
2081
|
async function queryArtifacts(client, options = {}, timeout) {
|
|
2080
2082
|
const { filters, limit, offset, sort } = options;
|
|
2081
|
-
const messageId = `artifacts_query_${Date.now()}`;
|
|
2083
|
+
const messageId = `artifacts_query_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
2082
2084
|
console.log("[SDK-WEB] queryArtifacts - options.filters:", JSON.stringify(filters, null, 2));
|
|
2083
2085
|
const messageBeforeParse = {
|
|
2084
2086
|
id: messageId,
|