rohit-chat-widget 1.0.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.
- package/README.md +455 -0
- package/lib/components/ChatContainer/ChatContainer.d.ts +10 -0
- package/lib/components/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/lib/components/ChatContainer/ChatContainer.js +9 -0
- package/lib/components/ChatContainer/ChatContainer.js.map +1 -0
- package/lib/components/ChatContainer/index.d.ts +2 -0
- package/lib/components/ChatContainer/index.d.ts.map +1 -0
- package/lib/components/ChatContainer/index.js +2 -0
- package/lib/components/ChatContainer/index.js.map +1 -0
- package/lib/components/ChatHeader/ChatHeader.d.ts +12 -0
- package/lib/components/ChatHeader/ChatHeader.d.ts.map +1 -0
- package/lib/components/ChatHeader/ChatHeader.js +25 -0
- package/lib/components/ChatHeader/ChatHeader.js.map +1 -0
- package/lib/components/ChatHeader/index.d.ts +2 -0
- package/lib/components/ChatHeader/index.d.ts.map +1 -0
- package/lib/components/ChatHeader/index.js +2 -0
- package/lib/components/ChatHeader/index.js.map +1 -0
- package/lib/components/ChatWidget/ChatWidget.d.ts +13 -0
- package/lib/components/ChatWidget/ChatWidget.d.ts.map +1 -0
- package/lib/components/ChatWidget/ChatWidget.js +69 -0
- package/lib/components/ChatWidget/ChatWidget.js.map +1 -0
- package/lib/components/ChatWidget/index.d.ts +2 -0
- package/lib/components/ChatWidget/index.d.ts.map +1 -0
- package/lib/components/ChatWidget/index.js +2 -0
- package/lib/components/ChatWidget/index.js.map +1 -0
- package/lib/components/DropdownMenu/DropdownMenu.d.ts +16 -0
- package/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/lib/components/DropdownMenu/DropdownMenu.js +78 -0
- package/lib/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/lib/components/DropdownMenu/index.d.ts +3 -0
- package/lib/components/DropdownMenu/index.d.ts.map +1 -0
- package/lib/components/DropdownMenu/index.js +2 -0
- package/lib/components/DropdownMenu/index.js.map +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts +21 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.js +40 -0
- package/lib/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/lib/components/ErrorBoundary/index.d.ts +2 -0
- package/lib/components/ErrorBoundary/index.d.ts.map +1 -0
- package/lib/components/ErrorBoundary/index.js +2 -0
- package/lib/components/ErrorBoundary/index.js.map +1 -0
- package/lib/components/ErrorDisplay/ErrorDisplay.d.ts +9 -0
- package/lib/components/ErrorDisplay/ErrorDisplay.d.ts.map +1 -0
- package/lib/components/ErrorDisplay/ErrorDisplay.js +11 -0
- package/lib/components/ErrorDisplay/ErrorDisplay.js.map +1 -0
- package/lib/components/ErrorDisplay/index.d.ts +3 -0
- package/lib/components/ErrorDisplay/index.d.ts.map +1 -0
- package/lib/components/ErrorDisplay/index.js +3 -0
- package/lib/components/ErrorDisplay/index.js.map +1 -0
- package/lib/components/LoadingIndicator/LoadingIndicator.d.ts +10 -0
- package/lib/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -0
- package/lib/components/LoadingIndicator/LoadingIndicator.js +10 -0
- package/lib/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
- package/lib/components/LoadingIndicator/index.d.ts +2 -0
- package/lib/components/LoadingIndicator/index.d.ts.map +1 -0
- package/lib/components/LoadingIndicator/index.js +3 -0
- package/lib/components/LoadingIndicator/index.js.map +1 -0
- package/lib/components/MenuButton/MenuButton.d.ts +10 -0
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -0
- package/lib/components/MenuButton/MenuButton.js +7 -0
- package/lib/components/MenuButton/MenuButton.js.map +1 -0
- package/lib/components/MenuButton/index.d.ts +2 -0
- package/lib/components/MenuButton/index.d.ts.map +1 -0
- package/lib/components/MenuButton/index.js +2 -0
- package/lib/components/MenuButton/index.js.map +1 -0
- package/lib/components/MenuItem/MenuItem.d.ts +12 -0
- package/lib/components/MenuItem/MenuItem.d.ts.map +1 -0
- package/lib/components/MenuItem/MenuItem.js +12 -0
- package/lib/components/MenuItem/MenuItem.js.map +1 -0
- package/lib/components/MenuItem/index.d.ts +2 -0
- package/lib/components/MenuItem/index.d.ts.map +1 -0
- package/lib/components/MenuItem/index.js +2 -0
- package/lib/components/MenuItem/index.js.map +1 -0
- package/lib/components/MessageBubble/MessageBubble.d.ts +17 -0
- package/lib/components/MessageBubble/MessageBubble.d.ts.map +1 -0
- package/lib/components/MessageBubble/MessageBubble.js +111 -0
- package/lib/components/MessageBubble/MessageBubble.js.map +1 -0
- package/lib/components/MessageBubble/index.d.ts +2 -0
- package/lib/components/MessageBubble/index.d.ts.map +1 -0
- package/lib/components/MessageBubble/index.js +2 -0
- package/lib/components/MessageBubble/index.js.map +1 -0
- package/lib/components/MessageInput/MessageInput.d.ts +9 -0
- package/lib/components/MessageInput/MessageInput.d.ts.map +1 -0
- package/lib/components/MessageInput/MessageInput.js +75 -0
- package/lib/components/MessageInput/MessageInput.js.map +1 -0
- package/lib/components/MessageInput/index.d.ts +2 -0
- package/lib/components/MessageInput/index.d.ts.map +1 -0
- package/lib/components/MessageInput/index.js +2 -0
- package/lib/components/MessageInput/index.js.map +1 -0
- package/lib/components/MessageList/MessageList.d.ts +21 -0
- package/lib/components/MessageList/MessageList.d.ts.map +1 -0
- package/lib/components/MessageList/MessageList.js +61 -0
- package/lib/components/MessageList/MessageList.js.map +1 -0
- package/lib/components/MessageList/index.d.ts +2 -0
- package/lib/components/MessageList/index.d.ts.map +1 -0
- package/lib/components/MessageList/index.js +2 -0
- package/lib/components/MessageList/index.js.map +1 -0
- package/lib/components/StatusIndicator/StatusIndicator.d.ts +10 -0
- package/lib/components/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/lib/components/StatusIndicator/StatusIndicator.js +19 -0
- package/lib/components/StatusIndicator/StatusIndicator.js.map +1 -0
- package/lib/components/StatusIndicator/index.d.ts +2 -0
- package/lib/components/StatusIndicator/index.d.ts.map +1 -0
- package/lib/components/StatusIndicator/index.js +2 -0
- package/lib/components/StatusIndicator/index.js.map +1 -0
- package/lib/components/index.d.ts +21 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +13 -0
- package/lib/components/index.js.map +1 -0
- package/lib/config/api.d.ts +79 -0
- package/lib/config/api.d.ts.map +1 -0
- package/lib/config/api.js +10 -0
- package/lib/config/api.js.map +1 -0
- package/lib/config/constants.d.ts +5 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +5 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useChatInit.d.ts +21 -0
- package/lib/hooks/useChatInit.d.ts.map +1 -0
- package/lib/hooks/useChatInit.js +66 -0
- package/lib/hooks/useChatInit.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.esm.js +21148 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +16 -0
- package/lib/index.js.map +1 -0
- package/lib/services/acs/acsClient.d.ts +29 -0
- package/lib/services/acs/acsClient.d.ts.map +1 -0
- package/lib/services/acs/acsClient.js +101 -0
- package/lib/services/acs/acsClient.js.map +1 -0
- package/lib/services/acs/index.d.ts +2 -0
- package/lib/services/acs/index.d.ts.map +1 -0
- package/lib/services/acs/index.js +2 -0
- package/lib/services/acs/index.js.map +1 -0
- package/lib/services/api/backendApi.d.ts +842 -0
- package/lib/services/api/backendApi.d.ts.map +1 -0
- package/lib/services/api/backendApi.js +70 -0
- package/lib/services/api/backendApi.js.map +1 -0
- package/lib/services/api/index.d.ts +3 -0
- package/lib/services/api/index.d.ts.map +1 -0
- package/lib/services/api/index.js +3 -0
- package/lib/services/api/index.js.map +1 -0
- package/lib/services/chatService.d.ts +51 -0
- package/lib/services/chatService.d.ts.map +1 -0
- package/lib/services/chatService.js +232 -0
- package/lib/services/chatService.js.map +1 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +4 -0
- package/lib/services/index.js.map +1 -0
- package/lib/src/components/ChatContainer/ChatContainer.d.ts +10 -0
- package/lib/src/components/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/lib/src/components/ChatContainer/index.d.ts +2 -0
- package/lib/src/components/ChatContainer/index.d.ts.map +1 -0
- package/lib/src/components/ChatHeader/ChatHeader.d.ts +12 -0
- package/lib/src/components/ChatHeader/ChatHeader.d.ts.map +1 -0
- package/lib/src/components/ChatHeader/index.d.ts +2 -0
- package/lib/src/components/ChatHeader/index.d.ts.map +1 -0
- package/lib/src/components/ChatWidget/ChatWidget.d.ts +13 -0
- package/lib/src/components/ChatWidget/ChatWidget.d.ts.map +1 -0
- package/lib/src/components/ChatWidget/index.d.ts +2 -0
- package/lib/src/components/ChatWidget/index.d.ts.map +1 -0
- package/lib/src/components/DropdownMenu/DropdownMenu.d.ts +16 -0
- package/lib/src/components/DropdownMenu/DropdownMenu.d.ts.map +1 -0
- package/lib/src/components/DropdownMenu/index.d.ts +3 -0
- package/lib/src/components/DropdownMenu/index.d.ts.map +1 -0
- package/lib/src/components/ErrorBoundary/ErrorBoundary.d.ts +21 -0
- package/lib/src/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/lib/src/components/ErrorBoundary/index.d.ts +2 -0
- package/lib/src/components/ErrorBoundary/index.d.ts.map +1 -0
- package/lib/src/components/ErrorDisplay/ErrorDisplay.d.ts +9 -0
- package/lib/src/components/ErrorDisplay/ErrorDisplay.d.ts.map +1 -0
- package/lib/src/components/ErrorDisplay/index.d.ts +3 -0
- package/lib/src/components/ErrorDisplay/index.d.ts.map +1 -0
- package/lib/src/components/LoadingIndicator/LoadingIndicator.d.ts +10 -0
- package/lib/src/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -0
- package/lib/src/components/LoadingIndicator/index.d.ts +2 -0
- package/lib/src/components/LoadingIndicator/index.d.ts.map +1 -0
- package/lib/src/components/MenuButton/MenuButton.d.ts +10 -0
- package/lib/src/components/MenuButton/MenuButton.d.ts.map +1 -0
- package/lib/src/components/MenuButton/index.d.ts +2 -0
- package/lib/src/components/MenuButton/index.d.ts.map +1 -0
- package/lib/src/components/MenuItem/MenuItem.d.ts +12 -0
- package/lib/src/components/MenuItem/MenuItem.d.ts.map +1 -0
- package/lib/src/components/MenuItem/index.d.ts +2 -0
- package/lib/src/components/MenuItem/index.d.ts.map +1 -0
- package/lib/src/components/MessageBubble/MessageBubble.d.ts +17 -0
- package/lib/src/components/MessageBubble/MessageBubble.d.ts.map +1 -0
- package/lib/src/components/MessageBubble/index.d.ts +2 -0
- package/lib/src/components/MessageBubble/index.d.ts.map +1 -0
- package/lib/src/components/MessageInput/MessageInput.d.ts +9 -0
- package/lib/src/components/MessageInput/MessageInput.d.ts.map +1 -0
- package/lib/src/components/MessageInput/index.d.ts +2 -0
- package/lib/src/components/MessageInput/index.d.ts.map +1 -0
- package/lib/src/components/MessageList/MessageList.d.ts +21 -0
- package/lib/src/components/MessageList/MessageList.d.ts.map +1 -0
- package/lib/src/components/MessageList/index.d.ts +2 -0
- package/lib/src/components/MessageList/index.d.ts.map +1 -0
- package/lib/src/components/StatusIndicator/StatusIndicator.d.ts +10 -0
- package/lib/src/components/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/lib/src/components/StatusIndicator/index.d.ts +2 -0
- package/lib/src/components/StatusIndicator/index.d.ts.map +1 -0
- package/lib/src/components/index.d.ts +21 -0
- package/lib/src/components/index.d.ts.map +1 -0
- package/lib/src/config/api.d.ts +79 -0
- package/lib/src/config/api.d.ts.map +1 -0
- package/lib/src/config/constants.d.ts +5 -0
- package/lib/src/config/constants.d.ts.map +1 -0
- package/lib/src/hooks/index.d.ts +2 -0
- package/lib/src/hooks/index.d.ts.map +1 -0
- package/lib/src/hooks/useChatInit.d.ts +21 -0
- package/lib/src/hooks/useChatInit.d.ts.map +1 -0
- package/lib/src/index.d.ts +14 -0
- package/lib/src/index.d.ts.map +1 -0
- package/lib/src/services/acs/acsClient.d.ts +29 -0
- package/lib/src/services/acs/acsClient.d.ts.map +1 -0
- package/lib/src/services/acs/index.d.ts +2 -0
- package/lib/src/services/acs/index.d.ts.map +1 -0
- package/lib/src/services/api/backendApi.d.ts +842 -0
- package/lib/src/services/api/backendApi.d.ts.map +1 -0
- package/lib/src/services/api/index.d.ts +3 -0
- package/lib/src/services/api/index.d.ts.map +1 -0
- package/lib/src/services/chatService.d.ts +51 -0
- package/lib/src/services/chatService.d.ts.map +1 -0
- package/lib/src/services/index.d.ts +4 -0
- package/lib/src/services/index.d.ts.map +1 -0
- package/lib/src/store/index.d.ts +36 -0
- package/lib/src/store/index.d.ts.map +1 -0
- package/lib/src/store/slices/index.d.ts +5 -0
- package/lib/src/store/slices/index.d.ts.map +1 -0
- package/lib/src/store/slices/messagesSlice.d.ts +73 -0
- package/lib/src/store/slices/messagesSlice.d.ts.map +1 -0
- package/lib/src/store/slices/threadSlice.d.ts +42 -0
- package/lib/src/store/slices/threadSlice.d.ts.map +1 -0
- package/lib/src/store/store.d.ts +36 -0
- package/lib/src/store/store.d.ts.map +1 -0
- package/lib/src/types/index.d.ts +29 -0
- package/lib/src/types/index.d.ts.map +1 -0
- package/lib/src/utils/dateUtils.d.ts +13 -0
- package/lib/src/utils/dateUtils.d.ts.map +1 -0
- package/lib/src/utils/index.d.ts +4 -0
- package/lib/src/utils/index.d.ts.map +1 -0
- package/lib/src/utils/styleManager.d.ts +45 -0
- package/lib/src/utils/styleManager.d.ts.map +1 -0
- package/lib/src/utils/validation.d.ts +17 -0
- package/lib/src/utils/validation.d.ts.map +1 -0
- package/lib/store/index.d.ts +36 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +9 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/slices/index.d.ts +5 -0
- package/lib/store/slices/index.d.ts.map +1 -0
- package/lib/store/slices/index.js +7 -0
- package/lib/store/slices/index.js.map +1 -0
- package/lib/store/slices/messagesSlice.d.ts +73 -0
- package/lib/store/slices/messagesSlice.d.ts.map +1 -0
- package/lib/store/slices/messagesSlice.js +81 -0
- package/lib/store/slices/messagesSlice.js.map +1 -0
- package/lib/store/slices/threadSlice.d.ts +42 -0
- package/lib/store/slices/threadSlice.d.ts.map +1 -0
- package/lib/store/slices/threadSlice.js +54 -0
- package/lib/store/slices/threadSlice.js.map +1 -0
- package/lib/store/store.d.ts +36 -0
- package/lib/store/store.d.ts.map +1 -0
- package/lib/store/store.js +17 -0
- package/lib/store/store.js.map +1 -0
- package/lib/styles.css +3534 -0
- package/lib/types/index.d.ts +29 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/utils/dateUtils.d.ts +13 -0
- package/lib/utils/dateUtils.d.ts.map +1 -0
- package/lib/utils/dateUtils.js +33 -0
- package/lib/utils/dateUtils.js.map +1 -0
- package/lib/utils/index.d.ts +4 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +5 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/styleManager.d.ts +45 -0
- package/lib/utils/styleManager.d.ts.map +1 -0
- package/lib/utils/styleManager.js +69 -0
- package/lib/utils/styleManager.js.map +1 -0
- package/lib/utils/validation.d.ts +17 -0
- package/lib/utils/validation.d.ts.map +1 -0
- package/lib/utils/validation.js +32 -0
- package/lib/utils/validation.js.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backendApi.d.ts","sourceRoot":"","sources":["../../../../src/services/api/backendApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AAC/J,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAOlD,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,SAG9D,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;iBAgD6D,MAAM;;cAAvC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;oJAUnE,CAAC;AAGH,eAAO,MACH,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACvB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACtB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GACnB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACvB,+BAA+B;;;;;;;;;;;cAlBgB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;aAAe,MAAM;;UAAvC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;cAAlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;aAAe,MAAM;;UAAvC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;cAAlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;aAAe,MAAM;;UAAvC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;cAAlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;aAAe,MAAM;;UAAvC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;cAAlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;kBAAlB;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;iBAAe,MAAM;;cAAvC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;kBAAlB;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;;;;;;iBAAe,MAAM;;cAAvC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;kBAAlB;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;;iBAAe,MAAM;;cAAvC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;kBAAlB;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;iBAAe,MAAM;;cAAvC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;kBAAlB;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;aAAe,MAAM;;aAAN,MAAM;;UAAvC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;;;;;iBAAe,MAAM;;EAmB5E,CAAC;;;;;;iBAnBqE,MAAM;;cAAvC;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;AAsBrE,wBAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEzI,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { InitiateChatRequest } from '@/config/api';
|
|
2
|
+
export declare class ChatService {
|
|
3
|
+
private isInitialized;
|
|
4
|
+
private acsClient;
|
|
5
|
+
/**
|
|
6
|
+
* Initialize chat thread - calls /initiate-chat endpoint
|
|
7
|
+
*/
|
|
8
|
+
initializeChat(params: InitiateChatRequest): Promise<{
|
|
9
|
+
success: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Send a message via backend API
|
|
14
|
+
*/
|
|
15
|
+
sendMessage(message: string): Promise<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Load initial messages after chat initialization
|
|
21
|
+
*/
|
|
22
|
+
private loadInitialMessages;
|
|
23
|
+
/**
|
|
24
|
+
* Transform API message format to internal Message format
|
|
25
|
+
*/
|
|
26
|
+
private transformApiMessage;
|
|
27
|
+
/**
|
|
28
|
+
* Load message from backend API
|
|
29
|
+
*/
|
|
30
|
+
loadMessage(): Promise<{
|
|
31
|
+
success: boolean;
|
|
32
|
+
error?: string;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Start real-time messaging with ACS
|
|
36
|
+
*/
|
|
37
|
+
startRealTimeListeners(acstoken: string): Promise<{
|
|
38
|
+
success: boolean;
|
|
39
|
+
error?: string;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Stop real-time listeners and cleanup
|
|
43
|
+
*/
|
|
44
|
+
stopRealTimeListeners(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Dispose and cleanup all resources
|
|
47
|
+
*/
|
|
48
|
+
dispose(): void;
|
|
49
|
+
}
|
|
50
|
+
export declare const chatService: ChatService;
|
|
51
|
+
//# sourceMappingURL=chatService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatService.d.ts","sourceRoot":"","sources":["../../../src/services/chatService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAc,MAAM,cAAc,CAAC;AAK/D,qBAAa,WAAW;IACpB,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,SAAS,CAA0B;IAE3C;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAuChG;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAiCjF;;OAEG;YACW,mBAAmB;IAcjC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IA8DlE;;OAEG;IACG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAqC7F;;OAEG;IACH,qBAAqB,IAAI,IAAI;IAI7B;;OAEG;IACH,OAAO,IAAI,IAAI;CAIlB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { store } from './store';
|
|
2
|
+
export type { RootState, AppDispatch } from './store';
|
|
3
|
+
export * from './slices';
|
|
4
|
+
export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
5
|
+
thread: import("./slices").ThreadState;
|
|
6
|
+
messages: import("./slices").MessagesState;
|
|
7
|
+
backendApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
8
|
+
initiateChat: import("@reduxjs/toolkit/query").MutationDefinition<import("..").InitiateChatRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("..").InitiateChatResponse, "backendApi", unknown>;
|
|
9
|
+
sendMessage: import("@reduxjs/toolkit/query").MutationDefinition<import("../config/api").SendMessageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").SendMessageResponse, "backendApi", unknown>;
|
|
10
|
+
getMessages: import("@reduxjs/toolkit/query").QueryDefinition<import("../config/api").GetMessagesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").GetMessagesResponse, "backendApi", unknown>;
|
|
11
|
+
getAttachmentSasUrl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
12
|
+
blobUrl: string;
|
|
13
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
14
|
+
data: {
|
|
15
|
+
sasUrl: string;
|
|
16
|
+
};
|
|
17
|
+
}, "backendApi", unknown>;
|
|
18
|
+
}, never, "backendApi">;
|
|
19
|
+
}, undefined, import("redux").UnknownAction> & import("redux").Dispatch<import("redux").UnknownAction>;
|
|
20
|
+
export declare const useAppSelector: import("react-redux").UseSelector<{
|
|
21
|
+
thread: import("./slices").ThreadState;
|
|
22
|
+
messages: import("./slices").MessagesState;
|
|
23
|
+
backendApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
24
|
+
initiateChat: import("@reduxjs/toolkit/query").MutationDefinition<import("..").InitiateChatRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("..").InitiateChatResponse, "backendApi", unknown>;
|
|
25
|
+
sendMessage: import("@reduxjs/toolkit/query").MutationDefinition<import("../config/api").SendMessageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").SendMessageResponse, "backendApi", unknown>;
|
|
26
|
+
getMessages: import("@reduxjs/toolkit/query").QueryDefinition<import("../config/api").GetMessagesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").GetMessagesResponse, "backendApi", unknown>;
|
|
27
|
+
getAttachmentSasUrl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
28
|
+
blobUrl: string;
|
|
29
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
30
|
+
data: {
|
|
31
|
+
sasUrl: string;
|
|
32
|
+
};
|
|
33
|
+
}, "backendApi", unknown>;
|
|
34
|
+
}, never, "backendApi">;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtD,cAAc,UAAU,CAAC;AAOzB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;sGAAmC,CAAC;AAC/D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/store/slices/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AAGzD,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
export type MessageStatus = 'pending' | 'sent' | 'failed';
|
|
3
|
+
export interface Message {
|
|
4
|
+
id: string;
|
|
5
|
+
content: string;
|
|
6
|
+
senderDisplayName: string;
|
|
7
|
+
senderACSId: string;
|
|
8
|
+
version: number;
|
|
9
|
+
createdOn: string;
|
|
10
|
+
updatedOn: string;
|
|
11
|
+
status?: MessageStatus;
|
|
12
|
+
isDoubleTickVisible?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface MessagesState {
|
|
15
|
+
messages: Message[];
|
|
16
|
+
continuationToken: string | null;
|
|
17
|
+
isInitializing: boolean;
|
|
18
|
+
isLoadingPage: boolean;
|
|
19
|
+
error: string | null;
|
|
20
|
+
isInitialized: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const messagesSlice: import("@reduxjs/toolkit").Slice<MessagesState, {
|
|
23
|
+
startInitialization: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
24
|
+
finishInitialization: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
25
|
+
setIsInitialized: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<boolean>) => void;
|
|
26
|
+
startLoadingPage: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
27
|
+
setPageMessages: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<{
|
|
28
|
+
messages: Message[];
|
|
29
|
+
}>) => void;
|
|
30
|
+
setInitialMessages: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<{
|
|
31
|
+
messages: Message[];
|
|
32
|
+
}>) => void;
|
|
33
|
+
addNewMessage: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<Message>) => void;
|
|
34
|
+
updateMessageStatus: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<{
|
|
35
|
+
id: string;
|
|
36
|
+
status: MessageStatus;
|
|
37
|
+
isDoubleTickVisible?: boolean;
|
|
38
|
+
}>) => void;
|
|
39
|
+
setContinuationToken: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<string | null>) => void;
|
|
40
|
+
setError: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<string | null>) => void;
|
|
41
|
+
clearError: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
42
|
+
resetMessages: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
43
|
+
}, "messages", "messages", import("@reduxjs/toolkit").SliceSelectors<MessagesState>>;
|
|
44
|
+
export declare const startInitialization: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/startInitialization">, setIsInitialized: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "messages/setIsInitialized">, finishInitialization: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/finishInitialization">, startLoadingPage: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/startLoadingPage">, setPageMessages: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
45
|
+
messages: Message[];
|
|
46
|
+
}, "messages/setPageMessages">, setInitialMessages: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
47
|
+
messages: Message[];
|
|
48
|
+
}, "messages/setInitialMessages">, addNewMessage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Message, "messages/addNewMessage">, updateMessageStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
49
|
+
id: string;
|
|
50
|
+
status: MessageStatus;
|
|
51
|
+
isDoubleTickVisible?: boolean;
|
|
52
|
+
}, "messages/updateMessageStatus">, setContinuationToken: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "messages/setContinuationToken">, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "messages/setError">, clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/clearError">, resetMessages: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/resetMessages">;
|
|
53
|
+
declare const _default: import("redux").Reducer<MessagesState>;
|
|
54
|
+
export default _default;
|
|
55
|
+
export declare const selectMessages: (state: {
|
|
56
|
+
messages: MessagesState;
|
|
57
|
+
}) => Message[];
|
|
58
|
+
export declare const selectIsInitializing: (state: {
|
|
59
|
+
messages: MessagesState;
|
|
60
|
+
}) => boolean;
|
|
61
|
+
export declare const selectIsLoadingPage: (state: {
|
|
62
|
+
messages: MessagesState;
|
|
63
|
+
}) => boolean;
|
|
64
|
+
export declare const selectError: (state: {
|
|
65
|
+
messages: MessagesState;
|
|
66
|
+
}) => string | null;
|
|
67
|
+
export declare const selectContinuationToken: (state: {
|
|
68
|
+
messages: MessagesState;
|
|
69
|
+
}) => string | null;
|
|
70
|
+
export declare const selectIsInitialized: (state: {
|
|
71
|
+
messages: MessagesState;
|
|
72
|
+
}) => boolean;
|
|
73
|
+
//# sourceMappingURL=messagesSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../../src/store/slices/messagesSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mBAAoB,CAAC,EAAE,OAAO,CAAA;CACjC;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAG,OAAO,CAAC;CAC3B;AAWD,eAAO,MAAM,aAAa;;;oFAcgB,aAAa,CAAC,OAAO,CAAC;;mFASvB,aAAa,CAAC;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;sFAOnC,aAAa,CAAC;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;iFAO3C,aAAa,CAAC,OAAO,CAAC;uFAIhB,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAC;QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;wFAWlF,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;4EAIxC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;;;oFAc5D,CAAC;AAGH,eAAO,MAAQ,mBAAmB,0FAAC,gBAAgB,6FAAE,oBAAoB,2FAAE,gBAAgB,uFAAE,eAAe;cAlDzC,OAAO,EAAE;gCAkDkC,kBAAkB;cA3C1D,OAAO,EAAE;mCA2CmD,aAAa,0FAAE,mBAAmB;QAhCnG,MAAM;YAAU,aAAa;0BAAwB,OAAO;oCAgCyC,oBAAoB,uGAAE,QAAQ,2FAAE,UAAU,iFAAE,aAAa,kFAA0B,CAAC;;AAG1P,wBAAqC;AAGrC,eAAO,MAAM,cAAc,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,cAA4B,CAAC;AAC9F,eAAO,MAAM,oBAAoB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,YAAkC,CAAC;AAC1G,eAAO,MAAM,mBAAmB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,YAAiC,CAAC;AACxG,eAAO,MAAM,WAAW,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,kBAAyB,CAAC;AACxF,eAAO,MAAM,uBAAuB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,kBAAqC,CAAC;AAChH,eAAO,MAAM,mBAAmB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,YAAiC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface ThreadState {
|
|
2
|
+
threadId: string | null;
|
|
3
|
+
threadType: string | null;
|
|
4
|
+
acsAccessToken: string | null;
|
|
5
|
+
orderNumber: string | null;
|
|
6
|
+
userEmail: string | null;
|
|
7
|
+
firstName: string | null;
|
|
8
|
+
lastName: string | null;
|
|
9
|
+
apiKey: string | null;
|
|
10
|
+
acsUserId: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare const setThreadInfo: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
13
|
+
threadId: string;
|
|
14
|
+
threadType: string;
|
|
15
|
+
acsAccessToken: string;
|
|
16
|
+
orderNumber: string;
|
|
17
|
+
userEmail: string;
|
|
18
|
+
firstName: string;
|
|
19
|
+
lastName: string;
|
|
20
|
+
apiKey: string;
|
|
21
|
+
acsUserId: string;
|
|
22
|
+
}, "thread/setThreadInfo">, clearThreadInfo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"thread/clearThreadInfo">;
|
|
23
|
+
declare const _default: import("redux").Reducer<ThreadState>;
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare const selectThread: (state: {
|
|
26
|
+
thread: ThreadState;
|
|
27
|
+
}) => ThreadState;
|
|
28
|
+
export declare const selectThreadId: (state: {
|
|
29
|
+
thread: ThreadState;
|
|
30
|
+
}) => string | null;
|
|
31
|
+
export declare const selectAcsAccessToken: (state: {
|
|
32
|
+
thread: ThreadState;
|
|
33
|
+
}) => string | null;
|
|
34
|
+
export declare const selectUserInfo: (state: {
|
|
35
|
+
thread: ThreadState;
|
|
36
|
+
}) => {
|
|
37
|
+
userEmail: string | null;
|
|
38
|
+
firstName: string | null;
|
|
39
|
+
lastName: string | null;
|
|
40
|
+
acsUserId: string | null;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=threadSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threadSlice.d.ts","sourceRoot":"","sources":["../../../../src/store/slices/threadSlice.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAsDD,eAAO,MAAQ,aAAa;cAnCN,MAAM;gBACJ,MAAM;oBACF,MAAM;iBACT,MAAM;eACR,MAAM;eACN,MAAM;cACP,MAAM;YACR,MAAM;eACH,MAAM;4BA2BC,eAAe,kFAAwB,CAAC;;AAGtE,wBAAmC;AAGnC,eAAO,MAAM,YAAY,GAAI,OAAO;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,gBAAiB,CAAC;AAC7E,eAAO,MAAM,cAAc,GAAI,OAAO;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,kBAA0B,CAAC;AACxF,eAAO,MAAM,oBAAoB,GAAI,OAAO;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,kBAAgC,CAAC;AACpG,eAAO,MAAM,cAAc,GAAI,OAAO;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE;;;;;CAK3D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
2
|
+
thread: import("./slices").ThreadState;
|
|
3
|
+
messages: import("./slices").MessagesState;
|
|
4
|
+
backendApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
5
|
+
initiateChat: import("@reduxjs/toolkit/query").MutationDefinition<import("..").InitiateChatRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("..").InitiateChatResponse, "backendApi", unknown>;
|
|
6
|
+
sendMessage: import("@reduxjs/toolkit/query").MutationDefinition<import("../config/api").SendMessageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").SendMessageResponse, "backendApi", unknown>;
|
|
7
|
+
getMessages: import("@reduxjs/toolkit/query").QueryDefinition<import("../config/api").GetMessagesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").GetMessagesResponse, "backendApi", unknown>;
|
|
8
|
+
getAttachmentSasUrl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
9
|
+
blobUrl: string;
|
|
10
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
11
|
+
data: {
|
|
12
|
+
sasUrl: string;
|
|
13
|
+
};
|
|
14
|
+
}, "backendApi", unknown>;
|
|
15
|
+
}, never, "backendApi">;
|
|
16
|
+
}, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
17
|
+
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
18
|
+
thread: import("./slices").ThreadState;
|
|
19
|
+
messages: import("./slices").MessagesState;
|
|
20
|
+
backendApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
21
|
+
initiateChat: import("@reduxjs/toolkit/query").MutationDefinition<import("..").InitiateChatRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("..").InitiateChatResponse, "backendApi", unknown>;
|
|
22
|
+
sendMessage: import("@reduxjs/toolkit/query").MutationDefinition<import("../config/api").SendMessageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").SendMessageResponse, "backendApi", unknown>;
|
|
23
|
+
getMessages: import("@reduxjs/toolkit/query").QueryDefinition<import("../config/api").GetMessagesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").GetMessagesResponse, "backendApi", unknown>;
|
|
24
|
+
getAttachmentSasUrl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
25
|
+
blobUrl: string;
|
|
26
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
27
|
+
data: {
|
|
28
|
+
sasUrl: string;
|
|
29
|
+
};
|
|
30
|
+
}, "backendApi", unknown>;
|
|
31
|
+
}, never, "backendApi">;
|
|
32
|
+
}, undefined, import("redux").UnknownAction>;
|
|
33
|
+
}>, import("redux").StoreEnhancer]>>;
|
|
34
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
35
|
+
export type AppDispatch = typeof store.dispatch;
|
|
36
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/store/store.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAahB,CAAC;AAGH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ChatMessage {
|
|
2
|
+
id: string;
|
|
3
|
+
text: string;
|
|
4
|
+
sender: 'user' | 'agent';
|
|
5
|
+
timestamp: Date;
|
|
6
|
+
}
|
|
7
|
+
export interface ChatUser {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
avatar?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ChatSession {
|
|
13
|
+
id: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
agentId?: string;
|
|
16
|
+
startTime: Date;
|
|
17
|
+
endTime?: Date;
|
|
18
|
+
status: 'active' | 'closed' | 'waiting';
|
|
19
|
+
}
|
|
20
|
+
export interface ChatWidgetState {
|
|
21
|
+
isOpen: boolean;
|
|
22
|
+
isMinimized: boolean;
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
hasError: boolean;
|
|
25
|
+
messages: ChatMessage[];
|
|
26
|
+
currentUser?: ChatUser;
|
|
27
|
+
session?: ChatSession;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;CACzC;AAGD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a date to a readable time string
|
|
3
|
+
*/
|
|
4
|
+
export declare const formatTime: (date: Date) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Formats a date to a readable date string
|
|
7
|
+
*/
|
|
8
|
+
export declare const formatDate: (date: Date) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Gets a relative time string (e.g., "2 minutes ago")
|
|
11
|
+
*/
|
|
12
|
+
export declare const getRelativeTime: (date: Date) => string;
|
|
13
|
+
//# sourceMappingURL=dateUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/dateUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,KAAG,MAEvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,IAAI,KAAG,MAEvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,KAAG,MAoB5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages CSS custom properties for theming
|
|
3
|
+
*/
|
|
4
|
+
export declare class StyleManager {
|
|
5
|
+
private static instance;
|
|
6
|
+
private root;
|
|
7
|
+
private constructor();
|
|
8
|
+
static getInstance(): StyleManager;
|
|
9
|
+
/**
|
|
10
|
+
* Sets a CSS custom property
|
|
11
|
+
*/
|
|
12
|
+
setProperty(property: string, value: string): void;
|
|
13
|
+
/**
|
|
14
|
+
* Gets a CSS custom property value
|
|
15
|
+
*/
|
|
16
|
+
getProperty(property: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Sets multiple CSS properties
|
|
19
|
+
*/
|
|
20
|
+
setTheme(theme: Record<string, string>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Resets all chat-related CSS properties
|
|
23
|
+
*/
|
|
24
|
+
reset(): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Default theme colors
|
|
28
|
+
*/
|
|
29
|
+
export declare const defaultTheme: {
|
|
30
|
+
'primary-color': string;
|
|
31
|
+
'primary-hover': string;
|
|
32
|
+
'background-color': string;
|
|
33
|
+
'text-color': string;
|
|
34
|
+
'border-color': string;
|
|
35
|
+
'shadow-color': string;
|
|
36
|
+
'user-message-bg': string;
|
|
37
|
+
'agent-message-bg': string;
|
|
38
|
+
'input-bg': string;
|
|
39
|
+
'header-bg': string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Applies the default theme
|
|
43
|
+
*/
|
|
44
|
+
export declare const applyDefaultTheme: () => void;
|
|
45
|
+
//# sourceMappingURL=styleManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styleManager.d.ts","sourceRoot":"","sources":["../../../src/utils/styleManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,IAAI,CAAc;IAE1B,OAAO;WAIO,WAAW,IAAI,YAAY;IAOzC;;OAEG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzD;;OAEG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI5C;;OAEG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAMpD;;OAEG;IACI,KAAK,IAAI,IAAI;CASrB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAWxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO,IAGpC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates if a message is not empty and within length limits
|
|
3
|
+
*/
|
|
4
|
+
export declare const validateMessage: (message: string) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Validates email format
|
|
7
|
+
*/
|
|
8
|
+
export declare const validateEmail: (email: string) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Sanitizes user input to prevent XSS
|
|
11
|
+
*/
|
|
12
|
+
export declare const sanitizeInput: (input: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Validates if a string is a valid UUID
|
|
15
|
+
*/
|
|
16
|
+
export declare const isValidUUID: (uuid: string) => boolean;
|
|
17
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,OAEjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,OAG7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAO7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,OAG1C,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { store } from './store';
|
|
2
|
+
export type { RootState, AppDispatch } from './store';
|
|
3
|
+
export * from './slices';
|
|
4
|
+
export declare const useAppDispatch: () => import("redux-thunk").ThunkDispatch<{
|
|
5
|
+
thread: import("./slices").ThreadState;
|
|
6
|
+
messages: import("./slices").MessagesState;
|
|
7
|
+
backendApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
8
|
+
initiateChat: import("@reduxjs/toolkit/query").MutationDefinition<import("..").InitiateChatRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("..").InitiateChatResponse, "backendApi", unknown>;
|
|
9
|
+
sendMessage: import("@reduxjs/toolkit/query").MutationDefinition<import("../config/api").SendMessageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").SendMessageResponse, "backendApi", unknown>;
|
|
10
|
+
getMessages: import("@reduxjs/toolkit/query").QueryDefinition<import("../config/api").GetMessagesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").GetMessagesResponse, "backendApi", unknown>;
|
|
11
|
+
getAttachmentSasUrl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
12
|
+
blobUrl: string;
|
|
13
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
14
|
+
data: {
|
|
15
|
+
sasUrl: string;
|
|
16
|
+
};
|
|
17
|
+
}, "backendApi", unknown>;
|
|
18
|
+
}, never, "backendApi">;
|
|
19
|
+
}, undefined, import("redux").UnknownAction> & import("redux").Dispatch<import("redux").UnknownAction>;
|
|
20
|
+
export declare const useAppSelector: import("react-redux").UseSelector<{
|
|
21
|
+
thread: import("./slices").ThreadState;
|
|
22
|
+
messages: import("./slices").MessagesState;
|
|
23
|
+
backendApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
24
|
+
initiateChat: import("@reduxjs/toolkit/query").MutationDefinition<import("..").InitiateChatRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("..").InitiateChatResponse, "backendApi", unknown>;
|
|
25
|
+
sendMessage: import("@reduxjs/toolkit/query").MutationDefinition<import("../config/api").SendMessageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").SendMessageResponse, "backendApi", unknown>;
|
|
26
|
+
getMessages: import("@reduxjs/toolkit/query").QueryDefinition<import("../config/api").GetMessagesRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, import("../config/api").GetMessagesResponse, "backendApi", unknown>;
|
|
27
|
+
getAttachmentSasUrl: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
28
|
+
blobUrl: string;
|
|
29
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, {
|
|
30
|
+
data: {
|
|
31
|
+
sasUrl: string;
|
|
32
|
+
};
|
|
33
|
+
}, "backendApi", unknown>;
|
|
34
|
+
}, never, "backendApi">;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtD,cAAc,UAAU,CAAC;AAOzB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;sGAAmC,CAAC;AAC/D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAAqC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { store } from './store';
|
|
2
|
+
// Export all slice actions and selectors
|
|
3
|
+
export * from './slices';
|
|
4
|
+
// Typed hooks for components
|
|
5
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
+
// Pre-typed hooks for components (Typescript infers types automatically)
|
|
7
|
+
export const useAppDispatch = () => useDispatch();
|
|
8
|
+
export const useAppSelector = useSelector.withTypes();
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,yCAAyC;AACzC,cAAc,UAAU,CAAC;AAEzB,6BAA6B;AAC7B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGvD,yEAAyE;AACzE,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,WAAW,EAAe,CAAC;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC,SAAS,EAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/slices/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AAGzD,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Export all thread slice exports
|
|
2
|
+
export * from './threadSlice';
|
|
3
|
+
export { default as threadReducer } from './threadSlice';
|
|
4
|
+
// Export all messages slice exports
|
|
5
|
+
export * from './messagesSlice';
|
|
6
|
+
export { default as messagesReducer } from './messagesSlice';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/slices/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AAEzD,oCAAoC;AACpC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
export type MessageStatus = 'pending' | 'sent' | 'failed';
|
|
3
|
+
export interface Message {
|
|
4
|
+
id: string;
|
|
5
|
+
content: string;
|
|
6
|
+
senderDisplayName: string;
|
|
7
|
+
senderACSId: string;
|
|
8
|
+
version: number;
|
|
9
|
+
createdOn: string;
|
|
10
|
+
updatedOn: string;
|
|
11
|
+
status?: MessageStatus;
|
|
12
|
+
isDoubleTickVisible?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface MessagesState {
|
|
15
|
+
messages: Message[];
|
|
16
|
+
continuationToken: string | null;
|
|
17
|
+
isInitializing: boolean;
|
|
18
|
+
isLoadingPage: boolean;
|
|
19
|
+
error: string | null;
|
|
20
|
+
isInitialized: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const messagesSlice: import("@reduxjs/toolkit").Slice<MessagesState, {
|
|
23
|
+
startInitialization: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
24
|
+
finishInitialization: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
25
|
+
setIsInitialized: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<boolean>) => void;
|
|
26
|
+
startLoadingPage: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
27
|
+
setPageMessages: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<{
|
|
28
|
+
messages: Message[];
|
|
29
|
+
}>) => void;
|
|
30
|
+
setInitialMessages: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<{
|
|
31
|
+
messages: Message[];
|
|
32
|
+
}>) => void;
|
|
33
|
+
addNewMessage: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<Message>) => void;
|
|
34
|
+
updateMessageStatus: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<{
|
|
35
|
+
id: string;
|
|
36
|
+
status: MessageStatus;
|
|
37
|
+
isDoubleTickVisible?: boolean;
|
|
38
|
+
}>) => void;
|
|
39
|
+
setContinuationToken: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<string | null>) => void;
|
|
40
|
+
setError: (state: import("immer").WritableDraft<MessagesState>, action: PayloadAction<string | null>) => void;
|
|
41
|
+
clearError: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
42
|
+
resetMessages: (state: import("immer").WritableDraft<MessagesState>) => void;
|
|
43
|
+
}, "messages", "messages", import("@reduxjs/toolkit").SliceSelectors<MessagesState>>;
|
|
44
|
+
export declare const startInitialization: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/startInitialization">, setIsInitialized: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "messages/setIsInitialized">, finishInitialization: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/finishInitialization">, startLoadingPage: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/startLoadingPage">, setPageMessages: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
45
|
+
messages: Message[];
|
|
46
|
+
}, "messages/setPageMessages">, setInitialMessages: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
47
|
+
messages: Message[];
|
|
48
|
+
}, "messages/setInitialMessages">, addNewMessage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Message, "messages/addNewMessage">, updateMessageStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
49
|
+
id: string;
|
|
50
|
+
status: MessageStatus;
|
|
51
|
+
isDoubleTickVisible?: boolean;
|
|
52
|
+
}, "messages/updateMessageStatus">, setContinuationToken: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "messages/setContinuationToken">, setError: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "messages/setError">, clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/clearError">, resetMessages: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"messages/resetMessages">;
|
|
53
|
+
declare const _default: import("redux").Reducer<MessagesState>;
|
|
54
|
+
export default _default;
|
|
55
|
+
export declare const selectMessages: (state: {
|
|
56
|
+
messages: MessagesState;
|
|
57
|
+
}) => Message[];
|
|
58
|
+
export declare const selectIsInitializing: (state: {
|
|
59
|
+
messages: MessagesState;
|
|
60
|
+
}) => boolean;
|
|
61
|
+
export declare const selectIsLoadingPage: (state: {
|
|
62
|
+
messages: MessagesState;
|
|
63
|
+
}) => boolean;
|
|
64
|
+
export declare const selectError: (state: {
|
|
65
|
+
messages: MessagesState;
|
|
66
|
+
}) => string | null;
|
|
67
|
+
export declare const selectContinuationToken: (state: {
|
|
68
|
+
messages: MessagesState;
|
|
69
|
+
}) => string | null;
|
|
70
|
+
export declare const selectIsInitialized: (state: {
|
|
71
|
+
messages: MessagesState;
|
|
72
|
+
}) => boolean;
|
|
73
|
+
//# sourceMappingURL=messagesSlice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messagesSlice.d.ts","sourceRoot":"","sources":["../../../src/store/slices/messagesSlice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mBAAoB,CAAC,EAAE,OAAO,CAAA;CACjC;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAG,OAAO,CAAC;CAC3B;AAWD,eAAO,MAAM,aAAa;;;oFAcgB,aAAa,CAAC,OAAO,CAAC;;mFASvB,aAAa,CAAC;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;sFAOnC,aAAa,CAAC;QAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;iFAO3C,aAAa,CAAC,OAAO,CAAC;uFAIhB,aAAa,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAC;QAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;wFAWlF,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;4EAIxC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;;;oFAc5D,CAAC;AAGH,eAAO,MAAQ,mBAAmB,0FAAC,gBAAgB,6FAAE,oBAAoB,2FAAE,gBAAgB,uFAAE,eAAe;cAlDzC,OAAO,EAAE;gCAkDkC,kBAAkB;cA3C1D,OAAO,EAAE;mCA2CmD,aAAa,0FAAE,mBAAmB;QAhCnG,MAAM;YAAU,aAAa;0BAAwB,OAAO;oCAgCyC,oBAAoB,uGAAE,QAAQ,2FAAE,UAAU,iFAAE,aAAa,kFAA0B,CAAC;;AAG1P,wBAAqC;AAGrC,eAAO,MAAM,cAAc,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,cAA4B,CAAC;AAC9F,eAAO,MAAM,oBAAoB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,YAAkC,CAAC;AAC1G,eAAO,MAAM,mBAAmB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,YAAiC,CAAC;AACxG,eAAO,MAAM,WAAW,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,kBAAyB,CAAC;AACxF,eAAO,MAAM,uBAAuB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,kBAAqC,CAAC;AAChH,eAAO,MAAM,mBAAmB,GAAI,OAAO;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,YAAiC,CAAC"}
|