@asgard-js/react 0.0.1 → 0.0.3
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/chatbot/chatbot-body.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot-footer.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot-header.d.ts +5 -1
- package/dist/components/chatbot/chatbot-header.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot.d.ts +8 -3
- package/dist/components/chatbot/chatbot.d.ts.map +1 -1
- package/dist/components/chatbot/profile-icon.d.ts +8 -0
- package/dist/components/chatbot/profile-icon.d.ts.map +1 -0
- package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts +1 -1
- package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts.map +1 -1
- package/dist/components/templates/avatar/avatar.d.ts.map +1 -1
- package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts +6 -1
- package/dist/components/templates/bot-typing-box/bot-typing-box.d.ts.map +1 -1
- package/dist/components/templates/button-template/button-template.d.ts +1 -1
- package/dist/components/templates/button-template/button-template.d.ts.map +1 -1
- package/dist/components/templates/carousel-template/carousel-template.d.ts +1 -1
- package/dist/components/templates/carousel-template/carousel-template.d.ts.map +1 -1
- package/dist/components/templates/hint-template/hint-template.d.ts +1 -1
- package/dist/components/templates/hint-template/hint-template.d.ts.map +1 -1
- package/dist/components/templates/quick-replies/quick-replies.d.ts.map +1 -1
- package/dist/components/templates/text-template/text-template.d.ts +1 -1
- package/dist/components/templates/text-template/text-template.d.ts.map +1 -1
- package/dist/context/asgard-service-context.d.ts +13 -5
- package/dist/context/asgard-service-context.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-channel.d.ts +10 -20
- package/dist/hooks/use-channel.d.ts.map +1 -1
- package/dist/index.js +391 -344
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/message-box/message-box.d.ts +0 -9
- package/dist/components/message-box/message-box.d.ts.map +0 -1
- package/dist/hooks/use-chatbot-typing.d.ts +0 -11
- package/dist/hooks/use-chatbot-typing.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-body.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAM7C,wBAAgB,WAAW,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"chatbot-body.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAM7C,wBAAgB,WAAW,IAAI,SAAS,CA0BvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-footer.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAGV,MAAM,OAAO,CAAC;AAIf,wBAAgB,aAAa,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"chatbot-footer.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAGV,MAAM,OAAO,CAAC;AAIf,wBAAgB,aAAa,IAAI,SAAS,CAiDzC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface ChatbotHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ChatbotHeader(props: ChatbotHeaderProps): ReactNode;
|
|
7
|
+
export {};
|
|
4
8
|
//# sourceMappingURL=chatbot-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-header.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"chatbot-header.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAgBlE"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { ConversationMessage } from '
|
|
2
|
-
import { ClientConfig } from '@asgard-js/core';
|
|
1
|
+
import { ClientConfig, ConversationMessage } from '@asgard-js/core';
|
|
3
2
|
import { ReactNode } from 'react';
|
|
4
3
|
|
|
5
4
|
interface ChatbotProps {
|
|
5
|
+
title: string;
|
|
6
6
|
config: ClientConfig;
|
|
7
7
|
customChannelId: string;
|
|
8
|
-
|
|
8
|
+
initMessages?: ConversationMessage[];
|
|
9
|
+
fullScreen?: boolean;
|
|
10
|
+
avatar?: string;
|
|
11
|
+
options?: {
|
|
12
|
+
showDebugMessage?: boolean;
|
|
13
|
+
};
|
|
9
14
|
}
|
|
10
15
|
export declare function Chatbot(props: ChatbotProps): ReactNode;
|
|
11
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"chatbot.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQpE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC1C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CA4BtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-icon.d.ts","sourceRoot":"","sources":["../../../src/components/chatbot/profile-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CA+C9D"}
|
package/dist/components/conversation-message-renderer/conversation-message-renderer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-message-renderer/conversation-message-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"conversation-message-renderer.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-message-renderer/conversation-message-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC;AAQ3E,UAAU,gCAAgC;IACxC,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,GACtC,SAAS,CAqBX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,wBAAgB,MAAM,IAAI,SAAS,CA0BlC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { ConversationBotMessage } from '@asgard-js/core';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
interface BotTypingBoxProps {
|
|
5
|
+
typingMessage: ConversationBotMessage;
|
|
6
|
+
}
|
|
7
|
+
export declare function BotTypingBox(props: BotTypingBoxProps): ReactNode;
|
|
8
|
+
export {};
|
|
4
9
|
//# sourceMappingURL=bot-typing-box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot-typing-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/bot-typing-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"bot-typing-box.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/bot-typing-box/bot-typing-box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAO/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,UAAU,iBAAiB;IACzB,aAAa,EAAE,sBAAsB,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA+BhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/button-template.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/button-template/button-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,mBAAmB;IAC3B,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAiBpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/carousel-template/carousel-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"carousel-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/carousel-template/carousel-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAEL,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,qBAAqB;IAC7B,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAiBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hint-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/hint-template/hint-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"hint-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/hint-template/hint-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC;AAE3E,UAAU,iBAAiB;IACzB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAehE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick-replies.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/quick-replies/quick-replies.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAI/C,UAAU,iBAAiB;IACzB,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"quick-replies.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/quick-replies/quick-replies.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAI/C,UAAU,iBAAiB;IACzB,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA8BhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/text-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"text-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/text-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAMtD,UAAU,iBAAiB;IACzB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA2BhE"}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseChannelReturn } from '../hooks';
|
|
2
2
|
import { DetailedHTMLProps, HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
3
|
-
import { AsgardServiceClient, ClientConfig } from '@asgard-js/core';
|
|
3
|
+
import { AsgardServiceClient, ClientConfig, ConversationBotMessage, ConversationMessage } from '@asgard-js/core';
|
|
4
4
|
|
|
5
|
-
interface AsgardServiceContextType
|
|
5
|
+
interface AsgardServiceContextType {
|
|
6
|
+
avatar?: string;
|
|
6
7
|
client: AsgardServiceClient | null;
|
|
8
|
+
isConnecting: boolean;
|
|
9
|
+
messages: Map<string, ConversationMessage> | null;
|
|
10
|
+
typingMessages: Map<string, ConversationBotMessage> | null;
|
|
7
11
|
messageBoxBottomRef: RefObject<HTMLDivElement>;
|
|
8
|
-
|
|
12
|
+
sendMessage: UseChannelReturn['sendMessage'];
|
|
9
13
|
}
|
|
10
14
|
export declare const AsgardServiceContext: import('react').Context<AsgardServiceContextType>;
|
|
11
15
|
interface AsgardServiceContextProviderProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
12
16
|
children: ReactNode;
|
|
17
|
+
avatar?: string;
|
|
13
18
|
config: ClientConfig;
|
|
14
19
|
customChannelId: string;
|
|
15
20
|
customMessageId?: string;
|
|
16
21
|
delayTime?: number;
|
|
17
|
-
|
|
22
|
+
options?: {
|
|
23
|
+
showDebugMessage?: boolean;
|
|
24
|
+
};
|
|
25
|
+
initMessages?: ConversationMessage[];
|
|
18
26
|
}
|
|
19
27
|
export declare function AsgardServiceContextProvider(props: AsgardServiceContextProviderProps): ReactNode;
|
|
20
28
|
export declare function useAsgardContext(): AsgardServiceContextType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asgard-service-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-service-context.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"asgard-service-context.d.ts","sourceRoot":"","sources":["../../src/context/asgard-service-context.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,SAAS,EAIV,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAEnB,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,GAAG,IAAI,CAAC;IAC3D,mBAAmB,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/C,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,oBAAoB,mDAQ/B,CAAC;AAEH,UAAU,iCACR,SAAQ,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzE,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,GACvC,SAAS,CA0CX;AAED,wBAAgB,gBAAgB,IAAI,wBAAwB,CAE3D"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AsgardServiceClient, EventType, Message, SSEResponse } from '@asgard-js/core';
|
|
1
|
+
import { AsgardServiceClient, ConversationBotMessage, ConversationMessage, EventType, SseResponse } from '@asgard-js/core';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
type: 'user';
|
|
6
|
-
customMessageId?: string;
|
|
7
|
-
text: string;
|
|
8
|
-
time: Date;
|
|
9
|
-
};
|
|
10
|
-
export type ConversationBotMessage = {
|
|
11
|
-
type: 'bot';
|
|
12
|
-
eventType: EventType;
|
|
13
|
-
message: Message;
|
|
14
|
-
time: Date;
|
|
15
|
-
};
|
|
16
|
-
export type ConversationMessage = ConversationUserMessage | ConversationBotMessage;
|
|
17
|
-
interface UseChannelProps extends Pick<UseChatbotTypingReturn, 'startTyping' | 'onTyping' | 'stopTyping'> {
|
|
3
|
+
interface UseChannelProps {
|
|
18
4
|
client: AsgardServiceClient | null;
|
|
19
5
|
customChannelId: string;
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
initMessages?: ConversationMessage[];
|
|
7
|
+
options?: {
|
|
8
|
+
showDebugMessage?: boolean;
|
|
9
|
+
};
|
|
10
|
+
onResetChannelInit?: (event: SseResponse<EventType.INIT>) => void;
|
|
22
11
|
}
|
|
23
12
|
export interface UseChannelReturn {
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
isConnecting: boolean;
|
|
14
|
+
messages: Map<string, ConversationMessage> | null;
|
|
15
|
+
typingMessages: Map<string, ConversationBotMessage> | null;
|
|
26
16
|
sendMessage: (text: string, customMessageId?: string) => void;
|
|
27
17
|
}
|
|
28
18
|
export declare function useChannel(props: UseChannelProps): UseChannelReturn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-channel.d.ts","sourceRoot":"","sources":["../../src/hooks/use-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,SAAS,
|
|
1
|
+
{"version":3,"file":"use-channel.d.ts","sourceRoot":"","sources":["../../src/hooks/use-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEnB,sBAAsB,EACtB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAGzB,UAAU,eAAe;IACvB,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAClD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,GAAG,IAAI,CAAC;IAC3D,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CA+EnE"}
|