@gobolt/genesis 0.3.4 → 0.3.6
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/components/Chat/Chat.d.ts +17 -2
- package/dist/components/Chat/Message.d.ts +16 -0
- package/dist/components/Chat/__stories__/Chat.stories.d.ts +1 -1
- package/dist/index.cjs +769 -421
- package/dist/index.js +769 -421
- package/package.json +1 -1
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { default as Message } from './Message';
|
|
2
|
+
export declare const PROCESSING_MESSAGE = "Processing your query...";
|
|
3
3
|
type Message = {
|
|
4
4
|
id: string;
|
|
5
5
|
content: string;
|
|
6
6
|
sender: string;
|
|
7
7
|
isThinking?: boolean;
|
|
8
8
|
timestamp: string;
|
|
9
|
+
respondedBy?: "ai" | "search";
|
|
10
|
+
data?: any[];
|
|
11
|
+
response?: string;
|
|
12
|
+
};
|
|
13
|
+
export type ChatHistoryRecord = {
|
|
14
|
+
visitorId: string;
|
|
15
|
+
visitorEmail: string;
|
|
16
|
+
name: string;
|
|
17
|
+
question: string;
|
|
18
|
+
response: string;
|
|
19
|
+
timeToRespond: number;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
responseBy: "search" | "ai";
|
|
9
22
|
};
|
|
10
23
|
export interface ChatProps {
|
|
11
24
|
socketUrl: string;
|
|
@@ -14,6 +27,8 @@ export interface ChatProps {
|
|
|
14
27
|
title?: string;
|
|
15
28
|
isSimulated?: boolean;
|
|
16
29
|
authToken?: string;
|
|
30
|
+
overrideStyle?: React.CSSProperties;
|
|
31
|
+
onChange?: (chatHistoryRecord: ChatHistoryRecord) => void;
|
|
17
32
|
}
|
|
18
|
-
declare const Chat:
|
|
33
|
+
declare const Chat: ({ socketUrl, isOpen, messageHistory, title, isSimulated, authToken, overrideStyle, onChange, }: ChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
34
|
export default Chat;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
interface ProposalData {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
proposal_json: any;
|
|
6
|
+
created_at: string;
|
|
7
|
+
updated_at: string;
|
|
8
|
+
}
|
|
9
|
+
interface OwnerCountData {
|
|
10
|
+
owner_email: string;
|
|
11
|
+
proposal_count: number;
|
|
12
|
+
}
|
|
13
|
+
interface MonthlyCountData {
|
|
14
|
+
creation_month: number;
|
|
15
|
+
proposal_count: number;
|
|
16
|
+
}
|
|
2
17
|
interface MessageProps {
|
|
3
18
|
message: string;
|
|
4
19
|
handle: string;
|
|
5
20
|
isThinking?: boolean;
|
|
6
21
|
id?: string;
|
|
22
|
+
data?: ProposalData[] | OwnerCountData[] | MonthlyCountData[] | Record<string, any>[];
|
|
7
23
|
}
|
|
8
24
|
declare const Message: FC<MessageProps>;
|
|
9
25
|
export default Message;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import('
|
|
4
|
+
component: ({ socketUrl, isOpen, messageHistory, title, isSimulated, authToken, overrideStyle, onChange, }: import('..').ChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: string;
|
|
7
7
|
docs: {
|