@superatomai/sdk-web 0.0.25 → 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 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,9 +814,16 @@ 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
- sort: zod.z.enum(["ASC", "DESC"]).optional()
820
+ sort: zod.z.enum(["ASC", "DESC"]).optional(),
821
+ // Menu grouping fields
822
+ type: zod.z.string().optional(),
823
+ menuId: zod.z.number().optional(),
824
+ artifactGroupName: zod.z.string().optional(),
825
+ artifactGroupId: zod.z.string().optional(),
826
+ artifactGroupIcon: zod.z.string().optional()
818
827
  }).optional()
819
828
  });
820
829
  var ArtifactsRequestMessageSchema = zod.z.object({
@@ -934,7 +943,9 @@ var MenuDataSchema = zod.z.object({
934
943
  isActive: zod.z.boolean().optional(),
935
944
  createdAt: zod.z.string().optional(),
936
945
  updatedAt: zod.z.string().optional(),
937
- children: zod.z.lazy(() => zod.z.array(MenuDataSchema)).optional()
946
+ children: zod.z.lazy(() => zod.z.array(MenuDataSchema)).optional(),
947
+ menuJson: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional(),
948
+ version: zod.z.number().optional()
938
949
  });
939
950
  var MenuQueryFiltersSchema = zod.z.object({
940
951
  parentId: zod.z.number().nullable().optional(),
@@ -1928,8 +1939,26 @@ async function queryBookmarks(client, options = {}, timeout) {
1928
1939
 
1929
1940
  // src/services/artifacts/index.ts
1930
1941
  async function createArtifact(client, options, timeout) {
1931
- const { name, createdBy, dsl, status } = options;
1942
+ console.log("[SDK-WEB] createArtifact called with options:", JSON.stringify(options, null, 2));
1943
+ const { name, createdBy, dsl, type, filters, status } = options;
1944
+ console.log("[SDK-WEB] Extracted parameters:", JSON.stringify({
1945
+ name,
1946
+ createdBy,
1947
+ dsl: dsl ? "present" : "undefined",
1948
+ type,
1949
+ filters: filters ? "present" : "undefined",
1950
+ status
1951
+ }, null, 2));
1932
1952
  const messageId = `artifacts_create_${Date.now()}`;
1953
+ const messageData = {
1954
+ name,
1955
+ createdBy,
1956
+ dsl,
1957
+ type,
1958
+ filters,
1959
+ status
1960
+ };
1961
+ console.log("[SDK-WEB] Sending message data:", JSON.stringify(messageData, null, 2));
1933
1962
  const message = ArtifactsRequestMessageSchema.parse({
1934
1963
  id: messageId,
1935
1964
  type: "ARTIFACTS",
@@ -1937,12 +1966,7 @@ async function createArtifact(client, options, timeout) {
1937
1966
  to: { type: "data-agent" },
1938
1967
  payload: {
1939
1968
  operation: "create",
1940
- data: {
1941
- name,
1942
- createdBy,
1943
- dsl,
1944
- status
1945
- }
1969
+ data: messageData
1946
1970
  }
1947
1971
  });
1948
1972
  const response = await client.sendWithResponse(message, timeout);
@@ -1955,7 +1979,7 @@ async function createArtifact(client, options, timeout) {
1955
1979
  };
1956
1980
  }
1957
1981
  async function updateArtifact(client, options, timeout) {
1958
- const { id, name, dsl, status, deleted } = options;
1982
+ const { id, name, dsl, type, filters, status, deleted } = options;
1959
1983
  const messageId = `artifacts_update_${Date.now()}`;
1960
1984
  const message = ArtifactsRequestMessageSchema.parse({
1961
1985
  id: messageId,
@@ -1968,6 +1992,8 @@ async function updateArtifact(client, options, timeout) {
1968
1992
  id,
1969
1993
  name,
1970
1994
  dsl,
1995
+ type,
1996
+ filters,
1971
1997
  status,
1972
1998
  deleted
1973
1999
  }
@@ -2051,9 +2077,10 @@ async function getArtifact(client, id, timeout) {
2051
2077
  };
2052
2078
  }
2053
2079
  async function queryArtifacts(client, options = {}, timeout) {
2054
- const { filters, limit, sort } = options;
2080
+ const { filters, limit, offset, sort } = options;
2055
2081
  const messageId = `artifacts_query_${Date.now()}`;
2056
- const message = ArtifactsRequestMessageSchema.parse({
2082
+ console.log("[SDK-WEB] queryArtifacts - options.filters:", JSON.stringify(filters, null, 2));
2083
+ const messageBeforeParse = {
2057
2084
  id: messageId,
2058
2085
  type: "ARTIFACTS",
2059
2086
  from: { type: client.type },
@@ -2063,10 +2090,15 @@ async function queryArtifacts(client, options = {}, timeout) {
2063
2090
  data: {
2064
2091
  filters,
2065
2092
  limit,
2093
+ offset,
2066
2094
  sort
2067
2095
  }
2068
2096
  }
2069
- });
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);
2070
2102
  const response = await client.sendWithResponse(message, timeout);
2071
2103
  const payload = response.payload;
2072
2104
  return {