@trustgraph/react-state 1.2.1 → 1.3.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.
@@ -1,13 +0,0 @@
1
- /**
2
- * Custom hook for managing chat operations using React Query
3
- * Provides functionality for sending chat messages and handling responses
4
- * @returns {Object} Chat operations and state
5
- */
6
- export declare const useChat: () => {
7
- submitMessage: import("@tanstack/react-query").UseMutateFunction<string, Error, {
8
- input: string;
9
- }, unknown>;
10
- isSubmitting: boolean;
11
- submitError: Error;
12
- };
13
- //# sourceMappingURL=chat-query.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-query.d.ts","sourceRoot":"","sources":["../../src/state/chat-query.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,eAAO,MAAM,OAAO;;eAgLuB,MAAM;;;;CAsDhD,CAAC"}
@@ -1,13 +0,0 @@
1
- import { Message } from "../model/message";
2
- export type ChatMode = "graph-rag" | "agent" | "basic-llm";
3
- export interface ChatState {
4
- messages: Message[];
5
- input: string;
6
- chatMode: ChatMode;
7
- setMessages: (v: Message[]) => void;
8
- addMessage: (role: string, text: string, type?: "normal" | "thinking" | "observation" | "answer") => void;
9
- setInput: (v: string) => void;
10
- setChatMode: (mode: ChatMode) => void;
11
- }
12
- export declare const useChatStateStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ChatState>>;
13
- //# sourceMappingURL=chat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/state/chat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IAEnB,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,KACpD,IAAI,CAAC;IACV,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,iBAAiB,wEAyC3B,CAAC"}
@@ -1,63 +0,0 @@
1
- /**
2
- * Flow class definition interface
3
- */
4
- export interface FlowClassDefinition {
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 class operations
27
- * Provides functionality for fetching, creating, updating, and deleting flow classes
28
- * @returns {Object} Flow class state and operations
29
- */
30
- export declare const useFlowClasses: () => {
31
- flowClasses: FlowClassDefinition[];
32
- isLoading: boolean;
33
- error: Error;
34
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<FlowClassDefinition[], Error>>;
35
- getFlowClass: (id: string) => FlowClassDefinition | undefined;
36
- exists: (id: string) => boolean;
37
- createFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<FlowClassDefinition, Error, {
38
- id: string;
39
- flowClass: Omit<FlowClassDefinition, "id">;
40
- }, unknown>;
41
- updateFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<FlowClassDefinition, Error, {
42
- id: string;
43
- flowClass: Partial<Omit<FlowClassDefinition, "id">>;
44
- }, unknown>;
45
- deleteFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, string, unknown>;
46
- duplicateFlowClass: import("@tanstack/react-query").UseMutateAsyncFunction<FlowClassDefinition, 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 class ID
57
- */
58
- export declare const generateFlowClassId: (baseName?: string) => string;
59
- /**
60
- * Validate flow class ID format
61
- */
62
- export declare const isValidFlowClassId: (id: string) => boolean;
63
- //# sourceMappingURL=flow-classes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flow-classes.d.ts","sourceRoot":"","sources":["../../src/state/flow-classes.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,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,cAAc;;;;;uBAuSJ,MAAM,KAAG,mBAAmB,GAAG,SAAS;iBAM9C,MAAM,KAAG,OAAO;;YA/LvB,MAAM;mBACC,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC;;;YAuCtC,MAAM;mBACC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;;;;kBA+EzC,MAAM;kBACN,MAAM;;;;;;CAsFrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,iBAAuB,KAAG,MAI7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,KAAG,OAG/C,CAAC"}