@trustgraph/react-state 1.1.0 → 1.2.0

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.
@@ -17,8 +17,8 @@ export interface Settings {
17
17
  mcpTools: boolean;
18
18
  schemas: boolean;
19
19
  tokenCost: boolean;
20
- flowClasses: boolean;
21
- flowClassEditor: boolean;
20
+ flowBlueprints: boolean;
21
+ flowBlueprintEditor: boolean;
22
22
  structuredQuery: boolean;
23
23
  llmModels: boolean;
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"settings-types.d.ts","sourceRoot":"","sources":["../../src/model/settings-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,eAAe,EAAE;QACf,cAAc,EAAE,OAAO,CAAC;QACxB,WAAW,EAAE,OAAO,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,WAAW,EAAE,OAAO,CAAC;QACrB,eAAe,EAAE,OAAO,CAAC;QACzB,eAAe,EAAE,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,QAwB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,wBAAwB,CAAC"}
1
+ {"version":3,"file":"settings-types.d.ts","sourceRoot":"","sources":["../../src/model/settings-types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,eAAe,EAAE;QACf,cAAc,EAAE,OAAO,CAAC;QACxB,WAAW,EAAE,OAAO,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,cAAc,EAAE,OAAO,CAAC;QACxB,mBAAmB,EAAE,OAAO,CAAC;QAC7B,eAAe,EAAE,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,QAwB9B,CAAC;AAEF,eAAO,MAAM,oBAAoB,wBAAwB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { getTriples } from "../utils/knowledge-graph";
1
2
  /**
2
3
  * Custom hook for managing entity detail operations using React Query
3
4
  * Provides functionality for fetching entity details and related triples
@@ -7,18 +8,10 @@
7
8
  * @returns {Object} Entity detail state and operations
8
9
  */
9
10
  export declare const useEntityDetail: (entityUri: string | undefined, flowId: string, collection: string) => {
10
- detail: {
11
- triples: import("@trustgraph/client").Triple[];
12
- uri: string;
13
- label: string;
14
- };
11
+ detail: Awaited<ReturnType<typeof getTriples>> | undefined;
15
12
  isLoading: boolean;
16
13
  isError: boolean;
17
- error: Error;
18
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
19
- triples: import("@trustgraph/client").Triple[];
20
- uri: string;
21
- label: string;
22
- }, Error>>;
14
+ error: Error | null;
15
+ refetch: () => void;
23
16
  };
24
17
  //# sourceMappingURL=entity-query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity-query.d.ts","sourceRoot":"","sources":["../../src/state/entity-query.ts"],"names":[],"mappings":"AAQA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,MAAM,GAAG,SAAS,EAC7B,QAAQ,MAAM,EACd,YAAY,MAAM;;;;;;;;;;;;;;CA8DnB,CAAC"}
1
+ {"version":3,"file":"entity-query.d.ts","sourceRoot":"","sources":["../../src/state/entity-query.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGtD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAC1B,WAAW,MAAM,GAAG,SAAS,EAC7B,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB;IACD,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,GAAG,SAAS,CAAC;IAC3D,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CA8DrB,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Flow blueprint definition interface
3
+ */
4
+ export interface FlowBlueprintDefinition {
5
+ id?: string;
6
+ class: {
7
+ [key: string]: {
8
+ [queueName: string]: string;
9
+ };
10
+ };
11
+ flow: {
12
+ [key: string]: {
13
+ [queueName: string]: string;
14
+ };
15
+ };
16
+ interfaces: {
17
+ [key: string]: string | {
18
+ request: string;
19
+ response: string;
20
+ };
21
+ };
22
+ description?: string;
23
+ tags?: string[];
24
+ }
25
+ /**
26
+ * Custom hook for managing flow blueprint operations
27
+ * Provides functionality for fetching, creating, updating, and deleting flow blueprintes
28
+ * @returns {Object} Flow blueprint state and operations
29
+ */
30
+ export declare const useFlowBlueprints: () => {
31
+ flowBlueprints: FlowBlueprintDefinition[];
32
+ isLoading: boolean;
33
+ error: Error;
34
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<FlowBlueprintDefinition[], Error>>;
35
+ getFlowBlueprint: (id: string) => FlowBlueprintDefinition | undefined;
36
+ exists: (id: string) => boolean;
37
+ createFlowBlueprint: import("@tanstack/react-query").UseMutateAsyncFunction<FlowBlueprintDefinition, Error, {
38
+ id: string;
39
+ flowBlueprint: Omit<FlowBlueprintDefinition, "id">;
40
+ }, unknown>;
41
+ updateFlowBlueprint: import("@tanstack/react-query").UseMutateAsyncFunction<FlowBlueprintDefinition, Error, {
42
+ id: string;
43
+ flowBlueprint: Partial<Omit<FlowBlueprintDefinition, "id">>;
44
+ }, unknown>;
45
+ deleteFlowBlueprint: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, string, unknown>;
46
+ duplicateFlowBlueprint: import("@tanstack/react-query").UseMutateAsyncFunction<FlowBlueprintDefinition, Error, {
47
+ sourceId: string;
48
+ targetId: string;
49
+ }, unknown>;
50
+ isCreating: boolean;
51
+ isUpdating: boolean;
52
+ isDeleting: boolean;
53
+ isDuplicating: boolean;
54
+ };
55
+ /**
56
+ * Generate a unique flow blueprint ID
57
+ */
58
+ export declare const generateFlowBlueprintId: (baseName?: string) => string;
59
+ /**
60
+ * Validate flow blueprint ID format
61
+ */
62
+ export declare const isValidFlowBlueprintId: (id: string) => boolean;
63
+ //# sourceMappingURL=flow-blueprints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-blueprints.d.ts","sourceRoot":"","sources":["../../src/state/flow-blueprints.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;SAC7B,CAAC;KACH,CAAC;IACF,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;SAC7B,CAAC;KACH,CAAC;IACF,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN;YACE,OAAO,EAAE,MAAM,CAAC;YAChB,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACP,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;2BAuSH,MAAM,KAAG,uBAAuB,GAAG,SAAS;iBAMtD,MAAM,KAAG,OAAO;;YA/LvB,MAAM;uBACK,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC;;;YAuC9C,MAAM;uBACK,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;;;;kBA+EjD,MAAM;kBACN,MAAM;;;;;;CAsFrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,iBAAuB,KAAG,MAIjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,IAAI,MAAM,KAAG,OAGnD,CAAC"}
@@ -25,11 +25,11 @@ interface FlowParameterMetadata {
25
25
  "controlled-by"?: string;
26
26
  }
27
27
  /**
28
- * Custom hook for fetching parameter definitions for a flow class
29
- * @param flowClassName - The name of the flow class to fetch parameters for
28
+ * Custom hook for fetching parameter definitions for a flow blueprint
29
+ * @param flowBlueprintName - The name of the flow blueprint to fetch parameters for
30
30
  * @returns Parameter definitions, mapping, and loading states
31
31
  */
32
- export declare const useFlowParameters: (flowClassName?: string) => {
32
+ export declare const useFlowParameters: (flowBlueprintName?: string) => {
33
33
  parameterDefinitions: ParameterDefinitions;
34
34
  parameterMapping: {
35
35
  [key: string]: string;
@@ -1 +1 @@
1
- {"version":3,"file":"flow-parameters.d.ts","sourceRoot":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E,EAC3D,iBAAiB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE;;;;;CAwH5C,CAAC;AAEF,YAAY,EACV,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,qBAAqB,GACtB,CAAC"}
@@ -8,13 +8,13 @@ export declare const useFlows: () => {
8
8
  isLoading: boolean;
9
9
  isError: boolean;
10
10
  error: Error;
11
- flowClasses: any[][];
12
- isFlowClassesLoading: boolean;
13
- isFlowClassesError: boolean;
14
- flowClassesError: Error;
11
+ flowBlueprints: any[][];
12
+ isFlowBlueprintsLoading: boolean;
13
+ isFlowBlueprintsError: boolean;
14
+ flowBlueprintsError: Error;
15
15
  startFlow: import("@tanstack/react-query").UseMutateFunction<void, Error, {
16
16
  id: string;
17
- flowClass: string;
17
+ blueprintName: string;
18
18
  description: string;
19
19
  parameters?: Record<string, unknown>;
20
20
  onSuccess?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/state/flows.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;YA6EX,MAAM;mBACC,MAAM;qBACJ,MAAM;qBACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;oBACxB,MAAM,IAAI;;;;;aA+BjB,MAAM,EAAE;oBACD,MAAM,IAAI;;;;;CAwD3B,CAAC"}
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/state/flows.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;YA6EX,MAAM;uBACK,MAAM;qBACR,MAAM;qBACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;oBACxB,MAAM,IAAI;;;;;aA+BjB,MAAM,EAAE;oBACD,MAAM,IAAI;;;;;CAwD3B,CAAC"}
@@ -5,15 +5,15 @@
5
5
  * @returns {Object} Token cost state and operations
6
6
  */
7
7
  export declare const useGraphEmbeddings: ({ flow, vecs, limit, collection }: {
8
- flow: any;
9
- vecs: any;
10
- limit: any;
11
- collection: any;
8
+ flow?: string;
9
+ vecs: number[][];
10
+ limit: number;
11
+ collection?: string;
12
12
  }) => {
13
- graphEmbeddings: import("@trustgraph/client").Value[];
13
+ graphEmbeddings: any;
14
14
  isLoading: boolean;
15
15
  isError: boolean;
16
- error: Error;
17
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@trustgraph/client").Value[], Error>>;
16
+ error: Error | null;
17
+ refetch: () => void;
18
18
  };
19
19
  //# sourceMappingURL=graph-embeddings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-embeddings.d.ts","sourceRoot":"","sources":["../../src/state/graph-embeddings.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI;;;;;CAAiC;;;;;;CAgDnE,CAAC"}
1
+ {"version":3,"file":"graph-embeddings.d.ts","sourceRoot":"","sources":["../../src/state/graph-embeddings.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,mCAAmC;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG;IACF,eAAe,EAAE,GAAG,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CAiDrB,CAAC"}
@@ -4,22 +4,22 @@
4
4
  * @returns {Object} Library state and operations
5
5
  */
6
6
  export declare const useLibrary: () => {
7
- documents: import("@trustgraph/client").DocumentMetadata[];
7
+ documents: any;
8
8
  isLoading: boolean;
9
9
  isError: boolean;
10
- error: Error;
11
- deleteDocuments: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
10
+ error: Error | null;
11
+ deleteDocuments: (params: any) => void;
12
12
  isDeleting: boolean;
13
- deleteError: Error;
14
- submitDocuments: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
13
+ deleteError: Error | null;
14
+ submitDocuments: (params: any) => void;
15
15
  isSubmitting: boolean;
16
- submitError: Error;
17
- uploadFiles: import("@tanstack/react-query").UseMutateFunction<any, Error, void, unknown>;
16
+ submitError: Error | null;
17
+ uploadFiles: (params: any) => void;
18
18
  isUploadingFiles: boolean;
19
- filesUploadError: Error;
20
- uploadTexts: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
19
+ filesUploadError: Error | null;
20
+ uploadTexts: (params: any) => void;
21
21
  isUploadingTexts: boolean;
22
- textsUploadError: Error;
23
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@trustgraph/client").DocumentMetadata[], Error>>;
22
+ textsUploadError: Error | null;
23
+ refetch: () => void;
24
24
  };
25
25
  //# sourceMappingURL=library.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/state/library.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CA0NtB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/state/library.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,UAAU,QAAO;IAC5B,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,KAAK,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,KAAK,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CA2NrB,CAAC"}
@@ -3,21 +3,21 @@
3
3
  * Provides functionality for converting natural language questions to GraphQL queries
4
4
  */
5
5
  export declare const useNlpQuery: () => {
6
- convertQuery: import("@tanstack/react-query").UseMutateFunction<import("@trustgraph/client").NlpQueryResponse, unknown, {
6
+ convertQuery: (params: {
7
7
  question: string;
8
8
  maxResults?: number;
9
- }, unknown>;
10
- convertQueryAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@trustgraph/client").NlpQueryResponse, unknown, {
9
+ }) => void;
10
+ convertQueryAsync: (params: {
11
11
  question: string;
12
12
  maxResults?: number;
13
- }, unknown>;
13
+ }) => Promise<any>;
14
14
  isConverting: boolean;
15
15
  error: unknown;
16
- data: import("@trustgraph/client").NlpQueryResponse;
17
- graphqlQuery: string;
18
- variables: Record<string, unknown>;
19
- detectedSchemas: Record<string, unknown>[];
20
- confidence: number;
16
+ data: any;
17
+ graphqlQuery: string | undefined;
18
+ variables: Record<string, unknown> | undefined;
19
+ detectedSchemas: Record<string, unknown>[] | undefined;
20
+ confidence: number | undefined;
21
21
  reset: () => void;
22
22
  isReady: boolean;
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"nlp-query.d.ts","sourceRoot":"","sources":["../../src/state/nlp-query.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,eAAO,MAAM,WAAW;;kBAoBR,MAAM;qBACH,MAAM;;;kBADT,MAAM;qBACH,MAAM;;;;;;;;;;;CAmDxB,CAAC"}
1
+ {"version":3,"file":"nlp-query.d.ts","sourceRoot":"","sources":["../../src/state/nlp-query.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAO;IAC7B,YAAY,EAAE,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1E,iBAAiB,EAAE,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACvF,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC/C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IACvD,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAyElB,CAAC"}
@@ -4,10 +4,10 @@
4
4
  * @returns {Object} Processing state and operations
5
5
  */
6
6
  export declare const useProcessing: () => {
7
- processing: never[] | import("@trustgraph/client").ProcessingMetadata;
7
+ processing: any;
8
8
  isLoading: boolean;
9
9
  isError: boolean;
10
- error: Error;
11
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<never[] | import("@trustgraph/client").ProcessingMetadata, Error>>;
10
+ error: Error | null;
11
+ refetch: () => void;
12
12
  };
13
13
  //# sourceMappingURL=processing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"processing.d.ts","sourceRoot":"","sources":["../../src/state/processing.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;CAsCzB,CAAC"}
1
+ {"version":3,"file":"processing.d.ts","sourceRoot":"","sources":["../../src/state/processing.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAAO;IAC/B,UAAU,EAAE,GAAG,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CAuCrB,CAAC"}
@@ -5,24 +5,16 @@
5
5
  * @returns {Object} Token cost state and operations
6
6
  */
7
7
  export declare const useTokenCosts: () => {
8
- tokenCosts: {
9
- model: unknown;
10
- input_price: number;
11
- output_price: number;
12
- }[];
8
+ tokenCosts: any;
13
9
  isLoading: boolean;
14
10
  isError: boolean;
15
11
  error: Error;
16
- deleteTokenCosts: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
12
+ deleteTokenCost: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
17
13
  isDeleting: boolean;
18
14
  deleteError: Error;
19
15
  updateTokenCost: import("@tanstack/react-query").UseMutateFunction<void, Error, void, unknown>;
20
16
  isSubmitting: boolean;
21
17
  submitError: Error;
22
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
23
- model: unknown;
24
- input_price: number;
25
- output_price: number;
26
- }[], Error>>;
18
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<any, Error>>;
27
19
  };
28
20
  //# sourceMappingURL=token-costs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-costs.d.ts","sourceRoot":"","sources":["../../src/state/token-costs.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;CAgJzB,CAAC"}
1
+ {"version":3,"file":"token-costs.d.ts","sourceRoot":"","sources":["../../src/state/token-costs.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;CAgJzB,CAAC"}
@@ -5,17 +5,17 @@
5
5
  * @returns {Object} Token cost state and operations
6
6
  */
7
7
  export declare const useTriples: ({ flow, s, p, o, limit, collection }: {
8
- flow: any;
9
- s: any;
10
- p: any;
11
- o: any;
12
- limit: any;
13
- collection: any;
8
+ flow?: string;
9
+ s?: any;
10
+ p?: any;
11
+ o?: any;
12
+ limit: number;
13
+ collection?: string;
14
14
  }) => {
15
- triples: void | import("@trustgraph/client").Triple[];
15
+ triples: any;
16
16
  isLoading: boolean;
17
17
  isError: boolean;
18
- error: Error;
19
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<void | import("@trustgraph/client").Triple[], Error>>;
18
+ error: Error | null;
19
+ refetch: () => void;
20
20
  };
21
21
  //# sourceMappingURL=triples.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"triples.d.ts","sourceRoot":"","sources":["../../src/state/triples.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI;;;;;;;CAAoC;;;;;;CAkD9D,CAAC"}
1
+ {"version":3,"file":"triples.d.ts","sourceRoot":"","sources":["../../src/state/triples.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,sCAAsC;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,CAAC,EAAE,GAAG,CAAC;IACR,CAAC,CAAC,EAAE,GAAG,CAAC;IACR,CAAC,CAAC,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG;IACF,OAAO,EAAE,GAAG,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CAmDrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trustgraph/react-state",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "React state management hooks for TrustGraph applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -36,8 +36,8 @@
36
36
  "author": "",
37
37
  "license": "MIT",
38
38
  "dependencies": {
39
- "@trustgraph/client": "^1.1.0",
40
- "@trustgraph/react-provider": "^1.1.0",
39
+ "@trustgraph/client": "^1.2.0",
40
+ "@trustgraph/react-provider": "^1.2.0",
41
41
  "compute-cosine-similarity": "^1.1.0",
42
42
  "uuid": "^11.0.3"
43
43
  },
@@ -54,8 +54,8 @@
54
54
  "@tanstack/react-query": "^5.0.0",
55
55
  "@testing-library/dom": "^10.4.1",
56
56
  "@testing-library/react": "^16.3.0",
57
- "@trustgraph/client": "^1.1.0",
58
- "@trustgraph/react-provider": "^1.1.0",
57
+ "@trustgraph/client": "^1.2.0",
58
+ "@trustgraph/react-provider": "^1.2.0",
59
59
  "@types/react": "^18.0.0 || ^19.0.0",
60
60
  "@typescript-eslint/eslint-plugin": "^7.0.0",
61
61
  "@typescript-eslint/parser": "^7.0.0",