@superatomai/sdk-node 0.0.55 → 0.0.57
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.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +485 -112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +485 -112
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -863,13 +863,16 @@ declare const KbNodesQueryFiltersSchema: z.ZodObject<{
|
|
|
863
863
|
query: z.ZodOptional<z.ZodString>;
|
|
864
864
|
category: z.ZodOptional<z.ZodString>;
|
|
865
865
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
866
|
+
type: z.ZodOptional<z.ZodEnum<["global", "user", "query"]>>;
|
|
866
867
|
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
867
868
|
}, "strip", z.ZodTypeAny, {
|
|
869
|
+
type?: "query" | "user" | "global" | undefined;
|
|
868
870
|
query?: string | undefined;
|
|
869
871
|
category?: string | undefined;
|
|
870
872
|
createdBy?: number | undefined;
|
|
871
873
|
tags?: string[] | undefined;
|
|
872
874
|
}, {
|
|
875
|
+
type?: "query" | "user" | "global" | undefined;
|
|
873
876
|
query?: string | undefined;
|
|
874
877
|
category?: string | undefined;
|
|
875
878
|
createdBy?: number | undefined;
|
|
@@ -884,6 +887,7 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
884
887
|
content: z.ZodOptional<z.ZodString>;
|
|
885
888
|
category: z.ZodOptional<z.ZodString>;
|
|
886
889
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
890
|
+
type: z.ZodOptional<z.ZodEnum<["global", "user", "query"]>>;
|
|
887
891
|
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
888
892
|
updatedBy: z.ZodOptional<z.ZodNumber>;
|
|
889
893
|
userId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -892,13 +896,16 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
892
896
|
query: z.ZodOptional<z.ZodString>;
|
|
893
897
|
category: z.ZodOptional<z.ZodString>;
|
|
894
898
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
899
|
+
type: z.ZodOptional<z.ZodEnum<["global", "user", "query"]>>;
|
|
895
900
|
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
896
901
|
}, "strip", z.ZodTypeAny, {
|
|
902
|
+
type?: "query" | "user" | "global" | undefined;
|
|
897
903
|
query?: string | undefined;
|
|
898
904
|
category?: string | undefined;
|
|
899
905
|
createdBy?: number | undefined;
|
|
900
906
|
tags?: string[] | undefined;
|
|
901
907
|
}, {
|
|
908
|
+
type?: "query" | "user" | "global" | undefined;
|
|
902
909
|
query?: string | undefined;
|
|
903
910
|
category?: string | undefined;
|
|
904
911
|
createdBy?: number | undefined;
|
|
@@ -908,12 +915,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
908
915
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
909
916
|
}, "strip", z.ZodTypeAny, {
|
|
910
917
|
id?: number | undefined;
|
|
918
|
+
type?: "query" | "user" | "global" | undefined;
|
|
911
919
|
query?: string | undefined;
|
|
912
920
|
title?: string | undefined;
|
|
913
921
|
category?: string | undefined;
|
|
914
922
|
userId?: number | undefined;
|
|
915
923
|
limit?: number | undefined;
|
|
916
924
|
filters?: {
|
|
925
|
+
type?: "query" | "user" | "global" | undefined;
|
|
917
926
|
query?: string | undefined;
|
|
918
927
|
category?: string | undefined;
|
|
919
928
|
createdBy?: number | undefined;
|
|
@@ -926,12 +935,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
926
935
|
offset?: number | undefined;
|
|
927
936
|
}, {
|
|
928
937
|
id?: number | undefined;
|
|
938
|
+
type?: "query" | "user" | "global" | undefined;
|
|
929
939
|
query?: string | undefined;
|
|
930
940
|
title?: string | undefined;
|
|
931
941
|
category?: string | undefined;
|
|
932
942
|
userId?: number | undefined;
|
|
933
943
|
limit?: number | undefined;
|
|
934
944
|
filters?: {
|
|
945
|
+
type?: "query" | "user" | "global" | undefined;
|
|
935
946
|
query?: string | undefined;
|
|
936
947
|
category?: string | undefined;
|
|
937
948
|
createdBy?: number | undefined;
|
|
@@ -947,12 +958,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
947
958
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
948
959
|
data?: {
|
|
949
960
|
id?: number | undefined;
|
|
961
|
+
type?: "query" | "user" | "global" | undefined;
|
|
950
962
|
query?: string | undefined;
|
|
951
963
|
title?: string | undefined;
|
|
952
964
|
category?: string | undefined;
|
|
953
965
|
userId?: number | undefined;
|
|
954
966
|
limit?: number | undefined;
|
|
955
967
|
filters?: {
|
|
968
|
+
type?: "query" | "user" | "global" | undefined;
|
|
956
969
|
query?: string | undefined;
|
|
957
970
|
category?: string | undefined;
|
|
958
971
|
createdBy?: number | undefined;
|
|
@@ -968,12 +981,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
968
981
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
969
982
|
data?: {
|
|
970
983
|
id?: number | undefined;
|
|
984
|
+
type?: "query" | "user" | "global" | undefined;
|
|
971
985
|
query?: string | undefined;
|
|
972
986
|
title?: string | undefined;
|
|
973
987
|
category?: string | undefined;
|
|
974
988
|
userId?: number | undefined;
|
|
975
989
|
limit?: number | undefined;
|
|
976
990
|
filters?: {
|
|
991
|
+
type?: "query" | "user" | "global" | undefined;
|
|
977
992
|
query?: string | undefined;
|
|
978
993
|
category?: string | undefined;
|
|
979
994
|
createdBy?: number | undefined;
|
|
@@ -2129,8 +2144,9 @@ declare abstract class BaseLLM {
|
|
|
2129
2144
|
* @param components - Optional list of available components for matching suggestions
|
|
2130
2145
|
* @param externalTools - Optional array of external tools (email, calendar, etc.) that can be called
|
|
2131
2146
|
* @param category - Question category ('data_analysis' | 'data_modification' | 'general'). For data_modification, answer component streaming is skipped. For general, component generation is skipped entirely.
|
|
2147
|
+
* @param userId - Optional user ID for fetching user-specific knowledge base nodes
|
|
2132
2148
|
*/
|
|
2133
|
-
generateTextResponse(userPrompt: string, apiKey?: string, logCollector?: any, conversationHistory?: string, streamCallback?: (chunk: string) => void, collections?: any, components?: Component[], externalTools?: any[], category?: 'data_analysis' | 'data_modification' | 'general'): Promise<T_RESPONSE>;
|
|
2149
|
+
generateTextResponse(userPrompt: string, apiKey?: string, logCollector?: any, conversationHistory?: string, streamCallback?: (chunk: string) => void, collections?: any, components?: Component[], externalTools?: any[], category?: 'data_analysis' | 'data_modification' | 'general', userId?: string): Promise<T_RESPONSE>;
|
|
2134
2150
|
/**
|
|
2135
2151
|
* Main orchestration function with semantic search and multi-step classification
|
|
2136
2152
|
* NEW FLOW (Recommended):
|
package/dist/index.d.ts
CHANGED
|
@@ -863,13 +863,16 @@ declare const KbNodesQueryFiltersSchema: z.ZodObject<{
|
|
|
863
863
|
query: z.ZodOptional<z.ZodString>;
|
|
864
864
|
category: z.ZodOptional<z.ZodString>;
|
|
865
865
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
866
|
+
type: z.ZodOptional<z.ZodEnum<["global", "user", "query"]>>;
|
|
866
867
|
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
867
868
|
}, "strip", z.ZodTypeAny, {
|
|
869
|
+
type?: "query" | "user" | "global" | undefined;
|
|
868
870
|
query?: string | undefined;
|
|
869
871
|
category?: string | undefined;
|
|
870
872
|
createdBy?: number | undefined;
|
|
871
873
|
tags?: string[] | undefined;
|
|
872
874
|
}, {
|
|
875
|
+
type?: "query" | "user" | "global" | undefined;
|
|
873
876
|
query?: string | undefined;
|
|
874
877
|
category?: string | undefined;
|
|
875
878
|
createdBy?: number | undefined;
|
|
@@ -884,6 +887,7 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
884
887
|
content: z.ZodOptional<z.ZodString>;
|
|
885
888
|
category: z.ZodOptional<z.ZodString>;
|
|
886
889
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
890
|
+
type: z.ZodOptional<z.ZodEnum<["global", "user", "query"]>>;
|
|
887
891
|
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
888
892
|
updatedBy: z.ZodOptional<z.ZodNumber>;
|
|
889
893
|
userId: z.ZodOptional<z.ZodNumber>;
|
|
@@ -892,13 +896,16 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
892
896
|
query: z.ZodOptional<z.ZodString>;
|
|
893
897
|
category: z.ZodOptional<z.ZodString>;
|
|
894
898
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
899
|
+
type: z.ZodOptional<z.ZodEnum<["global", "user", "query"]>>;
|
|
895
900
|
createdBy: z.ZodOptional<z.ZodNumber>;
|
|
896
901
|
}, "strip", z.ZodTypeAny, {
|
|
902
|
+
type?: "query" | "user" | "global" | undefined;
|
|
897
903
|
query?: string | undefined;
|
|
898
904
|
category?: string | undefined;
|
|
899
905
|
createdBy?: number | undefined;
|
|
900
906
|
tags?: string[] | undefined;
|
|
901
907
|
}, {
|
|
908
|
+
type?: "query" | "user" | "global" | undefined;
|
|
902
909
|
query?: string | undefined;
|
|
903
910
|
category?: string | undefined;
|
|
904
911
|
createdBy?: number | undefined;
|
|
@@ -908,12 +915,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
908
915
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
909
916
|
}, "strip", z.ZodTypeAny, {
|
|
910
917
|
id?: number | undefined;
|
|
918
|
+
type?: "query" | "user" | "global" | undefined;
|
|
911
919
|
query?: string | undefined;
|
|
912
920
|
title?: string | undefined;
|
|
913
921
|
category?: string | undefined;
|
|
914
922
|
userId?: number | undefined;
|
|
915
923
|
limit?: number | undefined;
|
|
916
924
|
filters?: {
|
|
925
|
+
type?: "query" | "user" | "global" | undefined;
|
|
917
926
|
query?: string | undefined;
|
|
918
927
|
category?: string | undefined;
|
|
919
928
|
createdBy?: number | undefined;
|
|
@@ -926,12 +935,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
926
935
|
offset?: number | undefined;
|
|
927
936
|
}, {
|
|
928
937
|
id?: number | undefined;
|
|
938
|
+
type?: "query" | "user" | "global" | undefined;
|
|
929
939
|
query?: string | undefined;
|
|
930
940
|
title?: string | undefined;
|
|
931
941
|
category?: string | undefined;
|
|
932
942
|
userId?: number | undefined;
|
|
933
943
|
limit?: number | undefined;
|
|
934
944
|
filters?: {
|
|
945
|
+
type?: "query" | "user" | "global" | undefined;
|
|
935
946
|
query?: string | undefined;
|
|
936
947
|
category?: string | undefined;
|
|
937
948
|
createdBy?: number | undefined;
|
|
@@ -947,12 +958,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
947
958
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
948
959
|
data?: {
|
|
949
960
|
id?: number | undefined;
|
|
961
|
+
type?: "query" | "user" | "global" | undefined;
|
|
950
962
|
query?: string | undefined;
|
|
951
963
|
title?: string | undefined;
|
|
952
964
|
category?: string | undefined;
|
|
953
965
|
userId?: number | undefined;
|
|
954
966
|
limit?: number | undefined;
|
|
955
967
|
filters?: {
|
|
968
|
+
type?: "query" | "user" | "global" | undefined;
|
|
956
969
|
query?: string | undefined;
|
|
957
970
|
category?: string | undefined;
|
|
958
971
|
createdBy?: number | undefined;
|
|
@@ -968,12 +981,14 @@ declare const KbNodesRequestPayloadSchema: z.ZodObject<{
|
|
|
968
981
|
operation: "create" | "getOne" | "update" | "delete" | "getAll" | "search" | "getByCategory" | "getByUser" | "getCategories" | "getTags";
|
|
969
982
|
data?: {
|
|
970
983
|
id?: number | undefined;
|
|
984
|
+
type?: "query" | "user" | "global" | undefined;
|
|
971
985
|
query?: string | undefined;
|
|
972
986
|
title?: string | undefined;
|
|
973
987
|
category?: string | undefined;
|
|
974
988
|
userId?: number | undefined;
|
|
975
989
|
limit?: number | undefined;
|
|
976
990
|
filters?: {
|
|
991
|
+
type?: "query" | "user" | "global" | undefined;
|
|
977
992
|
query?: string | undefined;
|
|
978
993
|
category?: string | undefined;
|
|
979
994
|
createdBy?: number | undefined;
|
|
@@ -2129,8 +2144,9 @@ declare abstract class BaseLLM {
|
|
|
2129
2144
|
* @param components - Optional list of available components for matching suggestions
|
|
2130
2145
|
* @param externalTools - Optional array of external tools (email, calendar, etc.) that can be called
|
|
2131
2146
|
* @param category - Question category ('data_analysis' | 'data_modification' | 'general'). For data_modification, answer component streaming is skipped. For general, component generation is skipped entirely.
|
|
2147
|
+
* @param userId - Optional user ID for fetching user-specific knowledge base nodes
|
|
2132
2148
|
*/
|
|
2133
|
-
generateTextResponse(userPrompt: string, apiKey?: string, logCollector?: any, conversationHistory?: string, streamCallback?: (chunk: string) => void, collections?: any, components?: Component[], externalTools?: any[], category?: 'data_analysis' | 'data_modification' | 'general'): Promise<T_RESPONSE>;
|
|
2149
|
+
generateTextResponse(userPrompt: string, apiKey?: string, logCollector?: any, conversationHistory?: string, streamCallback?: (chunk: string) => void, collections?: any, components?: Component[], externalTools?: any[], category?: 'data_analysis' | 'data_modification' | 'general', userId?: string): Promise<T_RESPONSE>;
|
|
2134
2150
|
/**
|
|
2135
2151
|
* Main orchestration function with semantic search and multi-step classification
|
|
2136
2152
|
* NEW FLOW (Recommended):
|