react-native-chatbot-ai 0.0.5 → 0.1.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.
Files changed (162) hide show
  1. package/lib/module/assets/icons/icon_thinking_step.gif +0 -0
  2. package/lib/module/assets/icons/index.js +6 -0
  3. package/lib/module/assets/icons/index.js.map +1 -0
  4. package/lib/module/assets/images/index.js.map +1 -0
  5. package/lib/module/assets/svgIcon/IconChatArrow.js +25 -0
  6. package/lib/module/assets/svgIcon/IconChatArrow.js.map +1 -0
  7. package/lib/module/assets/svgIcon/IconThinkingStep.js +45 -0
  8. package/lib/module/assets/svgIcon/IconThinkingStep.js.map +1 -0
  9. package/lib/module/components/chat/ChatEmpty.js +60 -0
  10. package/lib/module/components/chat/ChatEmpty.js.map +1 -0
  11. package/lib/module/components/chat/ChatFooter.js +91 -0
  12. package/lib/module/components/chat/ChatFooter.js.map +1 -0
  13. package/lib/module/components/chat/ChatHeader.js +32 -10
  14. package/lib/module/components/chat/ChatHeader.js.map +1 -1
  15. package/lib/module/components/chat/ChatMessageList.js +38 -0
  16. package/lib/module/components/chat/ChatMessageList.js.map +1 -0
  17. package/lib/module/components/chat/SuggestionItem.js +80 -0
  18. package/lib/module/components/chat/SuggestionItem.js.map +1 -0
  19. package/lib/module/components/chat/index.js +14 -2
  20. package/lib/module/components/chat/index.js.map +1 -1
  21. package/lib/module/components/chat/item/ChatAIAnswerMessageItem.js +99 -0
  22. package/lib/module/components/chat/item/ChatAIAnswerMessageItem.js.map +1 -0
  23. package/lib/module/components/chat/item/ChatAIThinkingMessageItem.js +158 -0
  24. package/lib/module/components/chat/item/ChatAIThinkingMessageItem.js.map +1 -0
  25. package/lib/module/components/chat/item/ChatUserMessageItem.js +41 -0
  26. package/lib/module/components/chat/item/ChatUserMessageItem.js.map +1 -0
  27. package/lib/module/components/chat/item/index.js +34 -0
  28. package/lib/module/components/chat/item/index.js.map +1 -0
  29. package/lib/module/constants/events.js +8 -0
  30. package/lib/module/constants/events.js.map +1 -0
  31. package/lib/module/constants/query.js +8 -0
  32. package/lib/module/constants/query.js.map +1 -0
  33. package/lib/module/context/ChatContext.js +20 -7
  34. package/lib/module/context/ChatContext.js.map +1 -1
  35. package/lib/module/hooks/message/useMessage.js +86 -0
  36. package/lib/module/hooks/message/useMessage.js.map +1 -0
  37. package/lib/module/hooks/message/useSendMessage.js +58 -0
  38. package/lib/module/hooks/message/useSendMessage.js.map +1 -0
  39. package/lib/module/hooks/message/useStreamMessage.js +113 -0
  40. package/lib/module/hooks/message/useStreamMessage.js.map +1 -0
  41. package/lib/module/hooks/session/useCreateSession.js +18 -0
  42. package/lib/module/hooks/session/useCreateSession.js.map +1 -0
  43. package/lib/module/hooks/session/useFetchSessionById.js +14 -0
  44. package/lib/module/hooks/session/useFetchSessionById.js.map +1 -0
  45. package/lib/module/hooks/suggestions/useFetchSuggestions.js +15 -0
  46. package/lib/module/hooks/suggestions/useFetchSuggestions.js.map +1 -0
  47. package/lib/module/index.js +2 -2
  48. package/lib/module/index.js.map +1 -1
  49. package/lib/module/services/endpoints.js +11 -0
  50. package/lib/module/services/endpoints.js.map +1 -0
  51. package/lib/module/store/session.js +11 -0
  52. package/lib/module/store/session.js.map +1 -0
  53. package/lib/module/store/streamMessage.js +26 -0
  54. package/lib/module/store/streamMessage.js.map +1 -0
  55. package/lib/module/types/common.js +23 -0
  56. package/lib/module/types/common.js.map +1 -0
  57. package/lib/module/types/dto.js +2 -0
  58. package/lib/module/types/index.js +6 -0
  59. package/lib/module/types/index.js.map +1 -0
  60. package/lib/typescript/src/assets/icons/index.d.ts +5 -0
  61. package/lib/typescript/src/assets/icons/index.d.ts.map +1 -0
  62. package/lib/typescript/src/assets/images/index.d.ts.map +1 -0
  63. package/lib/typescript/src/assets/svgIcon/IconChatArrow.d.ts +9 -0
  64. package/lib/typescript/src/assets/svgIcon/IconChatArrow.d.ts.map +1 -0
  65. package/lib/typescript/src/assets/svgIcon/IconThinkingStep.d.ts +7 -0
  66. package/lib/typescript/src/assets/svgIcon/IconThinkingStep.d.ts.map +1 -0
  67. package/lib/typescript/src/components/chat/ChatEmpty.d.ts +3 -0
  68. package/lib/typescript/src/components/chat/ChatEmpty.d.ts.map +1 -0
  69. package/lib/typescript/src/components/chat/ChatFooter.d.ts +3 -0
  70. package/lib/typescript/src/components/chat/ChatFooter.d.ts.map +1 -0
  71. package/lib/typescript/src/components/chat/ChatHeader.d.ts.map +1 -1
  72. package/lib/typescript/src/components/chat/ChatMessageList.d.ts +3 -0
  73. package/lib/typescript/src/components/chat/ChatMessageList.d.ts.map +1 -0
  74. package/lib/typescript/src/components/chat/SuggestionItem.d.ts +8 -0
  75. package/lib/typescript/src/components/chat/SuggestionItem.d.ts.map +1 -0
  76. package/lib/typescript/src/components/chat/index.d.ts.map +1 -1
  77. package/lib/typescript/src/components/chat/item/ChatAIAnswerMessageItem.d.ts +8 -0
  78. package/lib/typescript/src/components/chat/item/ChatAIAnswerMessageItem.d.ts.map +1 -0
  79. package/lib/typescript/src/components/chat/item/ChatAIThinkingMessageItem.d.ts +8 -0
  80. package/lib/typescript/src/components/chat/item/ChatAIThinkingMessageItem.d.ts.map +1 -0
  81. package/lib/typescript/src/components/chat/item/ChatUserMessageItem.d.ts +7 -0
  82. package/lib/typescript/src/components/chat/item/ChatUserMessageItem.d.ts.map +1 -0
  83. package/lib/typescript/src/components/chat/item/index.d.ts +8 -0
  84. package/lib/typescript/src/components/chat/item/index.d.ts.map +1 -0
  85. package/lib/typescript/src/constants/events.d.ts +6 -0
  86. package/lib/typescript/src/constants/events.d.ts.map +1 -0
  87. package/lib/typescript/src/constants/query.d.ts +6 -0
  88. package/lib/typescript/src/constants/query.d.ts.map +1 -0
  89. package/lib/typescript/src/context/ChatContext.d.ts +2 -1
  90. package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
  91. package/lib/typescript/src/hooks/message/useMessage.d.ts +5 -0
  92. package/lib/typescript/src/hooks/message/useMessage.d.ts.map +1 -0
  93. package/lib/typescript/src/hooks/message/useSendMessage.d.ts +5 -0
  94. package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -0
  95. package/lib/typescript/src/hooks/message/useStreamMessage.d.ts +6 -0
  96. package/lib/typescript/src/hooks/message/useStreamMessage.d.ts.map +1 -0
  97. package/lib/typescript/src/hooks/session/useCreateSession.d.ts +2 -0
  98. package/lib/typescript/src/hooks/session/useCreateSession.d.ts.map +1 -0
  99. package/lib/typescript/src/hooks/session/useFetchSessionById.d.ts +2 -0
  100. package/lib/typescript/src/hooks/session/useFetchSessionById.d.ts.map +1 -0
  101. package/lib/typescript/src/hooks/suggestions/useFetchSuggestions.d.ts +2 -0
  102. package/lib/typescript/src/hooks/suggestions/useFetchSuggestions.d.ts.map +1 -0
  103. package/lib/typescript/src/index.d.ts +2 -2
  104. package/lib/typescript/src/index.d.ts.map +1 -1
  105. package/lib/typescript/src/services/endpoints.d.ts +9 -0
  106. package/lib/typescript/src/services/endpoints.d.ts.map +1 -0
  107. package/lib/typescript/src/store/session.d.ts +4 -0
  108. package/lib/typescript/src/store/session.d.ts.map +1 -0
  109. package/lib/typescript/src/store/streamMessage.d.ts +4 -0
  110. package/lib/typescript/src/store/streamMessage.d.ts.map +1 -0
  111. package/lib/typescript/src/types/chat.d.ts +19 -2
  112. package/lib/typescript/src/types/chat.d.ts.map +1 -1
  113. package/lib/typescript/src/types/common.d.ts +29 -0
  114. package/lib/typescript/src/types/common.d.ts.map +1 -0
  115. package/lib/typescript/src/types/dto.d.ts +66 -0
  116. package/lib/typescript/src/types/dto.d.ts.map +1 -1
  117. package/lib/typescript/src/types/index.d.ts +4 -0
  118. package/lib/typescript/src/types/index.d.ts.map +1 -0
  119. package/package.json +15 -5
  120. package/src/assets/icons/icon_thinking_step.gif +0 -0
  121. package/src/assets/icons/index.ts +3 -0
  122. package/src/assets/svgIcon/IconChatArrow.tsx +27 -0
  123. package/src/assets/svgIcon/IconThinkingStep.tsx +48 -0
  124. package/src/components/chat/ChatEmpty.tsx +60 -0
  125. package/src/components/chat/ChatFooter.tsx +99 -0
  126. package/src/components/chat/ChatHeader.tsx +36 -3
  127. package/src/components/chat/ChatMessageList.tsx +35 -0
  128. package/src/components/chat/SuggestionItem.tsx +106 -0
  129. package/src/components/chat/index.tsx +15 -1
  130. package/src/components/chat/item/ChatAIAnswerMessageItem.tsx +141 -0
  131. package/src/components/chat/item/ChatAIThinkingMessageItem.tsx +205 -0
  132. package/src/components/chat/item/ChatUserMessageItem.tsx +39 -0
  133. package/src/components/chat/item/index.tsx +23 -0
  134. package/src/constants/events.ts +5 -0
  135. package/src/constants/query.ts +5 -0
  136. package/src/context/ChatContext.tsx +13 -5
  137. package/src/hooks/message/useMessage.ts +98 -0
  138. package/src/hooks/message/useSendMessage.ts +58 -0
  139. package/src/hooks/message/useStreamMessage.ts +142 -0
  140. package/src/hooks/session/useCreateSession.ts +23 -0
  141. package/src/hooks/session/useFetchSessionById.ts +17 -0
  142. package/src/hooks/suggestions/useFetchSuggestions.ts +18 -0
  143. package/src/index.ts +3 -2
  144. package/src/services/endpoints.ts +10 -0
  145. package/src/store/session.ts +9 -0
  146. package/src/store/streamMessage.ts +24 -0
  147. package/src/types/chat.ts +24 -3
  148. package/src/types/common.ts +32 -0
  149. package/src/types/dto.ts +79 -0
  150. package/src/types/index.ts +3 -0
  151. package/lib/module/images/index.js.map +0 -1
  152. package/lib/module/utils/index.js +0 -2
  153. package/lib/module/utils/index.js.map +0 -1
  154. package/lib/typescript/src/images/index.d.ts.map +0 -1
  155. package/lib/typescript/src/utils/index.d.ts +0 -1
  156. package/lib/typescript/src/utils/index.d.ts.map +0 -1
  157. package/src/utils/index.ts +0 -0
  158. /package/lib/module/{images → assets/images}/bg_header.png +0 -0
  159. /package/lib/module/{images → assets/images}/index.js +0 -0
  160. /package/lib/typescript/src/{images → assets/images}/index.d.ts +0 -0
  161. /package/src/{images → assets/images}/bg_header.png +0 -0
  162. /package/src/{images → assets/images}/index.ts +0 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ import { useMutation } from '@tanstack/react-query';
4
+ import { QUERY_KEYS } from "../../constants/query.js";
5
+ import { apiInstance } from "../../services/index.js";
6
+ import { ENDPOINTS } from "../../services/endpoints.js";
7
+ export const useFetchSessionById = () => useMutation({
8
+ mutationKey: [QUERY_KEYS.GET_SESSION_BY_ID],
9
+ mutationFn: async sessionId => {
10
+ const res = await apiInstance?.get(ENDPOINTS.assistantService.getSessionById(sessionId));
11
+ return res?.data?.data;
12
+ }
13
+ });
14
+ //# sourceMappingURL=useFetchSessionById.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMutation","QUERY_KEYS","apiInstance","ENDPOINTS","useFetchSessionById","mutationKey","GET_SESSION_BY_ID","mutationFn","sessionId","res","get","assistantService","getSessionById","data"],"sourceRoot":"../../../../src","sources":["hooks/session/useFetchSessionById.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,uBAAuB;AACnD,SAASC,UAAU,QAAQ,0BAAuB;AAClD,SAASC,WAAW,QAAQ,yBAAgB;AAG5C,SAASC,SAAS,QAAQ,6BAA0B;AAEpD,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KACjCJ,WAAW,CAAC;EACVK,WAAW,EAAE,CAACJ,UAAU,CAACK,iBAAiB,CAAC;EAC3CC,UAAU,EAAE,MAAOC,SAAiB,IAAK;IACvC,MAAMC,GAAG,GAAG,MAAMP,WAAW,EAAEQ,GAAG,CAChCP,SAAS,CAACQ,gBAAgB,CAACC,cAAc,CAACJ,SAAS,CACrD,CAAC;IACD,OAAOC,GAAG,EAAEI,IAAI,EAAEA,IAAI;EACxB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ import { useQuery } from '@tanstack/react-query';
4
+ import { QUERY_KEYS } from "../../constants/query.js";
5
+ import { apiInstance } from "../../services/apis.js";
6
+ import { ENDPOINTS } from "../../services/endpoints.js";
7
+ export const useFetchSuggestions = () => useQuery({
8
+ queryKey: [QUERY_KEYS.GET_SUGGESTIONS],
9
+ queryFn: async () => {
10
+ const res = await apiInstance?.get(ENDPOINTS.assistantService.getSuggestions);
11
+ return res?.data?.data;
12
+ },
13
+ enabled: !!apiInstance
14
+ });
15
+ //# sourceMappingURL=useFetchSuggestions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useQuery","QUERY_KEYS","apiInstance","ENDPOINTS","useFetchSuggestions","queryKey","GET_SUGGESTIONS","queryFn","res","get","assistantService","getSuggestions","data","enabled"],"sourceRoot":"../../../../src","sources":["hooks/suggestions/useFetchSuggestions.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,UAAU,QAAQ,0BAAuB;AAClD,SAASC,WAAW,QAAQ,wBAAqB;AACjD,SAASC,SAAS,QAAQ,6BAA0B;AAIpD,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KACjCJ,QAAQ,CAAC;EACPK,QAAQ,EAAE,CAACJ,UAAU,CAACK,eAAe,CAAC;EACtCC,OAAO,EAAE,MAAAA,CAAA,KAAY;IACnB,MAAMC,GAAG,GAAG,MAAMN,WAAW,EAAEO,GAAG,CAChCN,SAAS,CAACO,gBAAgB,CAACC,cAC7B,CAAC;IACD,OAAOH,GAAG,EAAEI,IAAI,EAAEA,IAAI;EACxB,CAAC;EACDC,OAAO,EAAE,CAAC,CAACX;AACb,CAAC,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import ChatBotAI from "./components/chat/index.js";
3
+ import { ChatProvider } from "./context/ChatContext.js";
4
4
  export * from "./services/index.js";
5
- export { ChatBotAI };
5
+ export { ChatProvider as ChatBotAI };
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ChatBotAI"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,4BAAmB;AACzC,cAAc,qBAAY;AAC1B,SAASA,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["ChatProvider","ChatBotAI"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,0BAAuB;AAEpD,cAAc,qBAAY;AAC1B,SAASA,YAAY,IAAIC,SAAS","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ export const ENDPOINTS = {
4
+ assistantService: {
5
+ getSuggestions: '/assistant-service/v1/app/chat/prompt-suggestions',
6
+ getSessionById: sessionId => `/assistant-service/v1/app/chat/sessions/${sessionId}`,
7
+ getStreamMessage: sessionId => `/assistant-service/v1/app/chat/sessions/${sessionId}/stream`,
8
+ createSession: '/assistant-service/v1/app/chat/sessions'
9
+ }
10
+ };
11
+ //# sourceMappingURL=endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ENDPOINTS","assistantService","getSuggestions","getSessionById","sessionId","getStreamMessage","createSession"],"sourceRoot":"../../../src","sources":["services/endpoints.ts"],"mappings":";;AAAA,OAAO,MAAMA,SAAS,GAAG;EACvBC,gBAAgB,EAAE;IAChBC,cAAc,EAAE,mDAAmD;IACnEC,cAAc,EAAGC,SAAiB,IAChC,2CAA2CA,SAAS,EAAE;IACxDC,gBAAgB,EAAGD,SAAiB,IAClC,2CAA2CA,SAAS,SAAS;IAC/DE,aAAa,EAAE;EACjB;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ import { create } from 'zustand';
4
+ const useSessionStore = create(set => ({
5
+ sessionId: undefined,
6
+ setSessionId: sessionId => set({
7
+ sessionId
8
+ })
9
+ }));
10
+ export default useSessionStore;
11
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["create","useSessionStore","set","sessionId","undefined","setSessionId"],"sourceRoot":"../../../src","sources":["store/session.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAGhC,MAAMC,eAAe,GAAGD,MAAM,CAAgBE,GAAG,KAAM;EACrDC,SAAS,EAAEC,SAAS;EACpBC,YAAY,EAAGF,SAAS,IAAKD,GAAG,CAAC;IAAEC;EAAU,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,eAAeF,eAAe","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ import { create } from 'zustand';
4
+ const useStreamMessageStore = create(set => ({
5
+ isStreaming: false,
6
+ setIsStreaming: isStreaming => set({
7
+ isStreaming
8
+ }),
9
+ streamMessage: {},
10
+ setStreamMessage: streamMessage => {
11
+ if (!streamMessage || Object.keys(streamMessage).length === 0) return;
12
+ set(state => {
13
+ const updated = {
14
+ ...state.streamMessage
15
+ };
16
+ for (const [id, msg] of Object.entries(streamMessage)) {
17
+ updated[id] = msg;
18
+ }
19
+ return {
20
+ streamMessage: updated
21
+ };
22
+ });
23
+ }
24
+ }));
25
+ export default useStreamMessageStore;
26
+ //# sourceMappingURL=streamMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["create","useStreamMessageStore","set","isStreaming","setIsStreaming","streamMessage","setStreamMessage","Object","keys","length","state","updated","id","msg","entries"],"sourceRoot":"../../../src","sources":["store/streamMessage.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAIhC,MAAMC,qBAAqB,GAAGD,MAAM,CAAsBE,GAAG,KAAM;EACjEC,WAAW,EAAE,KAAK;EAClBC,cAAc,EAAGD,WAAW,IAAKD,GAAG,CAAC;IAAEC;EAAY,CAAC,CAAC;EACrDE,aAAa,EAAE,CAAC,CAAC;EACjBC,gBAAgB,EAAGD,aAA2C,IAAK;IACjE,IAAI,CAACA,aAAa,IAAIE,MAAM,CAACC,IAAI,CAACH,aAAa,CAAC,CAACI,MAAM,KAAK,CAAC,EAAE;IAE/DP,GAAG,CAAEQ,KAAK,IAAK;MACb,MAAMC,OAAO,GAAG;QAAE,GAAGD,KAAK,CAACL;MAAc,CAAC;MAE1C,KAAK,MAAM,CAACO,EAAE,EAAEC,GAAG,CAAC,IAAIN,MAAM,CAACO,OAAO,CAACT,aAAa,CAAC,EAAE;QACrDM,OAAO,CAACC,EAAE,CAAC,GAAGC,GAAG;MACnB;MAEA,OAAO;QAAER,aAAa,EAAEM;MAAQ,CAAC;IACnC,CAAC,CAAC;EACJ;AACF,CAAC,CAAC,CAAC;AAEH,eAAeV,qBAAqB","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ export let SuggestionCategory = /*#__PURE__*/function (SuggestionCategory) {
4
+ SuggestionCategory["product"] = "product";
5
+ SuggestionCategory["discount"] = "discount";
6
+ SuggestionCategory["gift"] = "gift";
7
+ SuggestionCategory["health_advice"] = "health_advice";
8
+ SuggestionCategory["content"] = "content";
9
+ SuggestionCategory["guide"] = "guide";
10
+ return SuggestionCategory;
11
+ }({});
12
+ export let MessageType = /*#__PURE__*/function (MessageType) {
13
+ MessageType["user_message"] = "user-message";
14
+ MessageType["ai_thinking"] = "ai-thinking";
15
+ MessageType["ai_answer"] = "ai-answer";
16
+ return MessageType;
17
+ }({});
18
+ export let RoleType = /*#__PURE__*/function (RoleType) {
19
+ RoleType["user"] = "user";
20
+ RoleType["ai"] = "ai";
21
+ return RoleType;
22
+ }({});
23
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SuggestionCategory","MessageType","RoleType"],"sourceRoot":"../../../src","sources":["types/common.ts"],"mappings":";;AAaA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAS9B,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAMvB,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA","ignoreList":[]}
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+
3
+ export {};
2
4
  //# sourceMappingURL=dto.js.map
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export * from "./common.js";
4
+ export * from "./dto.js";
5
+ export * from "./chat.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;AAAA,cAAc,aAAU;AACxB,cAAc,UAAO;AACrB,cAAc,WAAQ","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ icon_thinking_step: any;
3
+ };
4
+ export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/assets/icons/index.ts"],"names":[],"mappings":";;;AAAA,wBAEC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/assets/images/index.ts"],"names":[],"mappings":";;;AAAA,wBAEE"}
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ width?: number;
3
+ height?: number;
4
+ fill?: string;
5
+ opacity?: number;
6
+ }
7
+ export declare const IconChatArrow: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=IconChatArrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconChatArrow.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconChatArrow.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,4CAiBzC,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ width?: number;
3
+ height?: number;
4
+ }
5
+ export declare const IconThinkingStep: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=IconThinkingStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconThinkingStep.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconThinkingStep.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,4CAwC5C,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const ChatEmpty: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ChatEmpty;
3
+ //# sourceMappingURL=ChatEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatEmpty.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatEmpty.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,SAAS,+CAuCd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const ChatFooter: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ChatFooter;
3
+ //# sourceMappingURL=ChatFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatFooter.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,UAAU,+CA0Df,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatHeader.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,+CAsBtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatHeader.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,UAAU,+CAyCtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const ChatMessageList: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ChatMessageList;
3
+ //# sourceMappingURL=ChatMessageList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatMessageList.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,eAAe,+CAiBpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ISuggestionItem } from '../../types/dto';
2
+ interface SuggestionItemProps {
3
+ item: ISuggestionItem;
4
+ onPressItem: (item: ISuggestionItem) => void;
5
+ }
6
+ declare const SuggestionItem: ({ item, onPressItem }: SuggestionItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SuggestionItem;
8
+ //# sourceMappingURL=SuggestionItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuggestionItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/SuggestionItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAYlD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,cAAc,GAAI,uBAAuB,mBAAmB,4CAyEjE,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/index.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS,+CAMd,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/index.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS,+CAad,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { IMessageItem } from '../../../types';
2
+ interface ChatAIAnswerMessageItemProps {
3
+ item: IMessageItem;
4
+ isLast?: boolean;
5
+ }
6
+ declare const ChatAIAnswerMessageItem: ({ item, isLast, }: ChatAIAnswerMessageItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ChatAIAnswerMessageItem;
8
+ //# sourceMappingURL=ChatAIAnswerMessageItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatAIAnswerMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatAIAnswerMessageItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM9C,UAAU,4BAA4B;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAuED,QAAA,MAAM,uBAAuB,GAAI,mBAG9B,4BAA4B,4CAgD9B,CAAC;AACF,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { IMessageItem } from '../../../types';
2
+ interface ChatAIThinkingMessageItemProps {
3
+ item: IMessageItem;
4
+ isLast?: boolean;
5
+ }
6
+ declare const ChatAIThinkingMessageItem: ({ item, isLast, }: ChatAIThinkingMessageItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ChatAIThinkingMessageItem;
8
+ //# sourceMappingURL=ChatAIThinkingMessageItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatAIThinkingMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatAIThinkingMessageItem.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AASnD,UAAU,8BAA8B;IACtC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAmED,QAAA,MAAM,yBAAyB,GAAI,mBAGhC,8BAA8B,4CA4EhC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { IMessageItem } from '../../../types';
2
+ interface ChatUserMessageItemProps {
3
+ item: IMessageItem;
4
+ }
5
+ declare const ChatUserMessageItem: ({ item }: ChatUserMessageItemProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default ChatUserMessageItem;
7
+ //# sourceMappingURL=ChatUserMessageItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatUserMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatUserMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,UAAU,wBAAwB;IAChC,IAAI,EAAE,YAAY,CAAC;CACpB;AACD,QAAA,MAAM,mBAAmB,GAAI,UAAU,wBAAwB,4CAW9D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { IMessageItem } from '../../../types';
2
+ interface ChatItemProps {
3
+ item: IMessageItem;
4
+ index: number;
5
+ }
6
+ declare const ChatItem: ({ item, index }: ChatItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default ChatItem;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,gBAAgB,CAAC;AAK3D,UAAU,aAAa;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AACD,QAAA,MAAM,QAAQ,GAAI,iBAAiB,aAAa,4CAW/C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const events: {
2
+ updateOneMessage: string;
3
+ updateMultipleMessage: string;
4
+ forceUpdateMessages: string;
5
+ };
6
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/constants/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;CAIlB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const QUERY_KEYS: {
2
+ GET_SUGGESTIONS: string;
3
+ GET_SESSION_BY_ID: string;
4
+ CREATE_SESSION: string;
5
+ };
6
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/constants/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;CAItB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { ChatContextType, ChatProviderProps } from '../types/chat';
2
2
  export declare const ChatContext: import("react").Context<ChatContextType>;
3
- export declare const ChatProvider: ({ children }: ChatProviderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const useChatContext: () => ChatContextType;
4
+ export declare const ChatProvider: (props: ChatProviderProps) => import("react/jsx-runtime").JSX.Element;
4
5
  //# sourceMappingURL=ChatContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,WAAW,0CAAqC,CAAC;AAE9D,eAAO,MAAM,YAAY,GAAI,cAAc,iBAAiB,4CAM3D,CAAC"}
1
+ {"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGxE,eAAO,MAAM,WAAW,0CAItB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAOpD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { SessionDetailResponse } from '../../types/dto';
2
+ export declare const useMessage: () => {
3
+ messageState: SessionDetailResponse;
4
+ };
5
+ //# sourceMappingURL=useMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAetE,eAAO,MAAM,UAAU;;CA+EtB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const useSendMessage: () => {
2
+ onSendMessage: (message: string) => Promise<void>;
3
+ stopStream: () => void;
4
+ };
5
+ //# sourceMappingURL=useSendMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc;6BAKP,MAAM;;CA2CzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type StreamMessageRequest } from '../../types';
2
+ export declare const useStreamMessage: () => {
3
+ startStream: (payload: StreamMessageRequest, latestSessionId?: string) => void;
4
+ stopStream: () => void;
5
+ };
6
+ //# sourceMappingURL=useStreamMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStreamMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useStreamMessage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAQ3E,eAAO,MAAM,gBAAgB;2BAef,oBAAoB,oBAAoB,MAAM;;CAmH3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useCreateSession: () => any;
2
+ //# sourceMappingURL=useCreateSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateSession.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useCreateSession.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,WAazB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useFetchSessionById: () => any;
2
+ //# sourceMappingURL=useFetchSessionById.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSessionById.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useFetchSessionById.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,WAS5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useFetchSuggestions: () => any;
2
+ //# sourceMappingURL=useFetchSuggestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSuggestions.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/suggestions/useFetchSuggestions.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,WAU5B,CAAC"}
@@ -1,4 +1,4 @@
1
- import ChatBotAI from './components/chat';
1
+ import { ChatProvider } from './context/ChatContext';
2
2
  export * from './services';
3
- export { ChatBotAI };
3
+ export { ChatProvider as ChatBotAI };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const ENDPOINTS: {
2
+ assistantService: {
3
+ getSuggestions: string;
4
+ getSessionById: (sessionId: string) => string;
5
+ getStreamMessage: (sessionId: string) => string;
6
+ createSession: string;
7
+ };
8
+ };
9
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;oCAGU,MAAM;sCAEJ,MAAM;;;CAIvC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SessionStore } from '../types/chat';
2
+ declare const useSessionStore: import("zustand").UseBoundStore<import("zustand").StoreApi<SessionStore>>;
3
+ export default useSessionStore;
4
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/store/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,QAAA,MAAM,eAAe,2EAGlB,CAAC;AAEJ,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { StreamMessageStore } from '../types/chat';
2
+ declare const useStreamMessageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<StreamMessageStore>>;
3
+ export default useStreamMessageStore;
4
+ //# sourceMappingURL=streamMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streamMessage.d.ts","sourceRoot":"","sources":["../../../../src/store/streamMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGnD,QAAA,MAAM,qBAAqB,iFAiBxB,CAAC;AAEJ,eAAe,qBAAqB,CAAC"}
@@ -1,6 +1,23 @@
1
- import type { PropsWithChildren } from 'react';
1
+ import { JSX } from 'react';
2
+ import { IMessageItem } from './dto';
2
3
  export interface ChatContextType {
4
+ apiAddress: string;
5
+ userId: string;
6
+ cartButton?: JSX.Element;
3
7
  }
4
- export interface ChatProviderProps extends PropsWithChildren {
8
+ export interface ChatProviderProps {
9
+ apiAddress: string;
10
+ userId: string;
11
+ cartButton?: JSX.Element;
12
+ }
13
+ export interface SessionStore {
14
+ sessionId?: string;
15
+ setSessionId: (sessionId: string | undefined) => void;
16
+ }
17
+ export interface StreamMessageStore {
18
+ isStreaming: boolean;
19
+ setIsStreaming: (isStreaming: boolean) => void;
20
+ streamMessage: Record<string, IMessageItem>;
21
+ setStreamMessage: (streamMessage: Record<string, IMessageItem>) => void;
5
22
  }
6
23
  //# sourceMappingURL=chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,MAAM,WAAW,eAAe;CAAG;AAEnC,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;CAAG"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,IAAI,CAAC;CACzE"}
@@ -0,0 +1,29 @@
1
+ export interface BaseResponse<T> {
2
+ statusCode: number;
3
+ message: any;
4
+ data: T;
5
+ }
6
+ export interface Pageable {
7
+ pageNumber: number;
8
+ totalPages: number;
9
+ pageSize: number;
10
+ totalElements: number;
11
+ }
12
+ export declare enum SuggestionCategory {
13
+ product = "product",
14
+ discount = "discount",
15
+ gift = "gift",
16
+ health_advice = "health_advice",
17
+ content = "content",
18
+ guide = "guide"
19
+ }
20
+ export declare enum MessageType {
21
+ user_message = "user-message",
22
+ ai_thinking = "ai-thinking",
23
+ ai_answer = "ai-answer"
24
+ }
25
+ export declare enum RoleType {
26
+ user = "user",
27
+ ai = "ai"
28
+ }
29
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,oBAAY,WAAW;IACrB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;CACxB;AAED,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,EAAE,OAAO;CACV"}
@@ -1 +1,67 @@
1
+ import { MessageType, RoleType, SuggestionCategory } from './common';
2
+ export interface ISuggestionItem {
3
+ content: string;
4
+ category: SuggestionCategory;
5
+ suggestion_id: string;
6
+ }
7
+ export interface SuggetionResponse {
8
+ group_suggestion_id: string;
9
+ suggestions: ISuggestionItem[];
10
+ }
11
+ export interface IMessageItem {
12
+ id: string;
13
+ content: string;
14
+ additional_kwargs: Record<string, any>;
15
+ response_metadata: Record<string, any>;
16
+ type: MessageType;
17
+ name: string | null;
18
+ role: RoleType;
19
+ metadata: Record<string, any>;
20
+ created_at: string;
21
+ modified_at: string;
22
+ attachments: any[];
23
+ }
24
+ export interface SessionDetailResponse {
25
+ id: string;
26
+ title: string;
27
+ created_at: string;
28
+ updated_at: string;
29
+ metadata: {
30
+ source: string;
31
+ };
32
+ shared: boolean;
33
+ messages: IMessageItem[];
34
+ }
35
+ export interface IAttachment {
36
+ type: 'image' | 'file';
37
+ source_type: 'url';
38
+ data: string;
39
+ name?: string;
40
+ size?: number;
41
+ loading?: boolean;
42
+ mime_type: 'image/jpeg' | 'image/png' | 'image/webp' | 'image/jpg' | 'application/pdf';
43
+ }
44
+ export interface StreamMessageRequest {
45
+ content: string;
46
+ stream: boolean;
47
+ attachments: IAttachment[];
48
+ clicked_suggestion_id?: string;
49
+ metadata: {
50
+ source: 'user';
51
+ };
52
+ manual_retry_attempts: number;
53
+ retried_message_id?: string;
54
+ }
55
+ export interface CreateSessionRequest {
56
+ title: string;
57
+ }
58
+ export interface CreateSessionResponse {
59
+ id: string;
60
+ title: string;
61
+ created_at: string;
62
+ updated_at: string;
63
+ metadata: {
64
+ source: string;
65
+ };
66
+ }
1
67
  //# sourceMappingURL=dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../../src/types/dto.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../../src/types/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,GAAG,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,WAAW,EAAE,KAAK,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EACL,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,iBAAiB,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,qBAAqB,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}