@clikvn/agent-widget-embedded 0.0.1-dev

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 (130) hide show
  1. package/.eslintrc +34 -0
  2. package/.prettierrc +8 -0
  3. package/README.md +20 -0
  4. package/base.json +21 -0
  5. package/dist/commons/constants/index.d.ts +2 -0
  6. package/dist/commons/constants/index.d.ts.map +1 -0
  7. package/dist/commons/constants/variables.d.ts +5 -0
  8. package/dist/commons/constants/variables.d.ts.map +1 -0
  9. package/dist/components/Agent/index.d.ts +3 -0
  10. package/dist/components/Agent/index.d.ts.map +1 -0
  11. package/dist/components/Chat/Chat.d.ts +10 -0
  12. package/dist/components/Chat/Chat.d.ts.map +1 -0
  13. package/dist/components/Chat/Icons.d.ts +120 -0
  14. package/dist/components/Chat/Icons.d.ts.map +1 -0
  15. package/dist/components/Chat/Markdown.d.ts +7 -0
  16. package/dist/components/Chat/Markdown.d.ts.map +1 -0
  17. package/dist/components/Chat/Message.d.ts +15 -0
  18. package/dist/components/Chat/Message.d.ts.map +1 -0
  19. package/dist/components/Chat/MultimodalInput.d.ts +24 -0
  20. package/dist/components/Chat/MultimodalInput.d.ts.map +1 -0
  21. package/dist/components/Chat/Overview.d.ts +8 -0
  22. package/dist/components/Chat/Overview.d.ts.map +1 -0
  23. package/dist/components/Chat/PreviewAttachment.d.ts +6 -0
  24. package/dist/components/Chat/PreviewAttachment.d.ts.map +1 -0
  25. package/dist/components/Chat/ui/Button.d.ts +12 -0
  26. package/dist/components/Chat/ui/Button.d.ts.map +1 -0
  27. package/dist/components/Chat/ui/Textarea.d.ts +6 -0
  28. package/dist/components/Chat/ui/Textarea.d.ts.map +1 -0
  29. package/dist/constants.d.ts +2 -0
  30. package/dist/constants.d.ts.map +1 -0
  31. package/dist/features/AgentWidget/index.d.ts +16 -0
  32. package/dist/features/AgentWidget/index.d.ts.map +1 -0
  33. package/dist/hooks/useChat.d.ts +25 -0
  34. package/dist/hooks/useChat.d.ts.map +1 -0
  35. package/dist/hooks/useChatData.d.ts +18 -0
  36. package/dist/hooks/useChatData.d.ts.map +1 -0
  37. package/dist/hooks/useConfiguration.d.ts +20 -0
  38. package/dist/hooks/useConfiguration.d.ts.map +1 -0
  39. package/dist/hooks/useConnection.d.ts +15 -0
  40. package/dist/hooks/useConnection.d.ts.map +1 -0
  41. package/dist/hooks/useScrollToBottom.d.ts +6 -0
  42. package/dist/hooks/useScrollToBottom.d.ts.map +1 -0
  43. package/dist/index.d.ts +2 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/models/FlowiseClient.d.ts +20 -0
  46. package/dist/models/FlowiseClient.d.ts.map +1 -0
  47. package/dist/models.d.ts +2 -0
  48. package/dist/models.d.ts.map +1 -0
  49. package/dist/register.d.ts +30 -0
  50. package/dist/register.d.ts.map +1 -0
  51. package/dist/services/apis.d.ts +7 -0
  52. package/dist/services/apis.d.ts.map +1 -0
  53. package/dist/services/bot.service.d.ts +3 -0
  54. package/dist/services/bot.service.d.ts.map +1 -0
  55. package/dist/services/chat.service.d.ts +32 -0
  56. package/dist/services/chat.service.d.ts.map +1 -0
  57. package/dist/services/user.service.d.ts +3 -0
  58. package/dist/services/user.service.d.ts.map +1 -0
  59. package/dist/types/agentType.d.ts +11 -0
  60. package/dist/types/agentType.d.ts.map +1 -0
  61. package/dist/types/bot.type.d.ts +11 -0
  62. package/dist/types/bot.type.d.ts.map +1 -0
  63. package/dist/types/chat.type.d.ts +10 -0
  64. package/dist/types/chat.type.d.ts.map +1 -0
  65. package/dist/types/common.type.d.ts +11 -0
  66. package/dist/types/common.type.d.ts.map +1 -0
  67. package/dist/types/flowise.type.d.ts +90 -0
  68. package/dist/types/flowise.type.d.ts.map +1 -0
  69. package/dist/types/user.type.d.ts +14 -0
  70. package/dist/types/user.type.d.ts.map +1 -0
  71. package/dist/types.d.ts +1 -0
  72. package/dist/types.d.ts.map +1 -0
  73. package/dist/utils/commonUtils.d.ts +7 -0
  74. package/dist/utils/commonUtils.d.ts.map +1 -0
  75. package/dist/utils/functionUtils.d.ts +3 -0
  76. package/dist/utils/functionUtils.d.ts.map +1 -0
  77. package/dist/utils/requestUtils.d.ts +16 -0
  78. package/dist/utils/requestUtils.d.ts.map +1 -0
  79. package/dist/utils/streamUtils.d.ts +5 -0
  80. package/dist/utils/streamUtils.d.ts.map +1 -0
  81. package/dist/web.d.ts +18 -0
  82. package/dist/web.d.ts.map +1 -0
  83. package/dist/web.js +1 -0
  84. package/dist/window.d.ts +29 -0
  85. package/dist/window.d.ts.map +1 -0
  86. package/package.json +91 -0
  87. package/rollup.config.js +56 -0
  88. package/src/assets/common.css +148 -0
  89. package/src/assets/tailwindcss.css +3 -0
  90. package/src/commons/constants/index.ts +1 -0
  91. package/src/commons/constants/variables.ts +20 -0
  92. package/src/components/Agent/index.tsx +14 -0
  93. package/src/components/Chat/Chat.tsx +84 -0
  94. package/src/components/Chat/Icons.tsx +883 -0
  95. package/src/components/Chat/Markdown.tsx +324 -0
  96. package/src/components/Chat/Message.tsx +185 -0
  97. package/src/components/Chat/MultimodalInput.tsx +371 -0
  98. package/src/components/Chat/Overview.tsx +47 -0
  99. package/src/components/Chat/PreviewAttachment.tsx +41 -0
  100. package/src/components/Chat/ui/Button.tsx +55 -0
  101. package/src/components/Chat/ui/Textarea.tsx +23 -0
  102. package/src/constants.ts +1 -0
  103. package/src/env.d.ts +10 -0
  104. package/src/features/AgentWidget/index.tsx +47 -0
  105. package/src/global.d.ts +1 -0
  106. package/src/hooks/useChat.ts +225 -0
  107. package/src/hooks/useChatData.tsx +68 -0
  108. package/src/hooks/useConfiguration.tsx +54 -0
  109. package/src/hooks/useScrollToBottom.ts +31 -0
  110. package/src/index.ts +1 -0
  111. package/src/models/FlowiseClient.ts +103 -0
  112. package/src/models.ts +1 -0
  113. package/src/register.tsx +66 -0
  114. package/src/services/apis.ts +10 -0
  115. package/src/services/bot.service.ts +15 -0
  116. package/src/services/chat.service.ts +164 -0
  117. package/src/types/bot.type.ts +10 -0
  118. package/src/types/chat.type.ts +11 -0
  119. package/src/types/common.type.ts +11 -0
  120. package/src/types/flowise.type.ts +99 -0
  121. package/src/types/user.type.ts +15 -0
  122. package/src/types.ts +0 -0
  123. package/src/utils/commonUtils.ts +47 -0
  124. package/src/utils/functionUtils.ts +17 -0
  125. package/src/utils/requestUtils.ts +113 -0
  126. package/src/utils/streamUtils.ts +18 -0
  127. package/src/web.ts +6 -0
  128. package/src/window.ts +55 -0
  129. package/tailwind.config.cjs +122 -0
  130. package/tsconfig.json +24 -0
package/.eslintrc ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "plugins": ["@typescript-eslint", "prettier", "react-hooks"],
5
+ "extends": [
6
+ "eslint:recommended",
7
+ "plugin:@typescript-eslint/recommended",
8
+ "plugin:react-hooks/recommended",
9
+ "plugin:@typescript-eslint/recommended",
10
+ "plugin:prettier/recommended"
11
+ ],
12
+ "ignorePatterns": ["node_modules/*"],
13
+ "parserOptions": {
14
+ "project": ["./tsconfig.json"]
15
+ },
16
+ "rules": {
17
+ "@typescript-eslint/no-explicit-any": "warn",
18
+ "@typescript-eslint/no-unused-vars": ["warn", { "vars": "all" }],
19
+ "react-hooks/exhaustive-deps": "warn",
20
+ "no-console": ["warn", { "allow": ["info", "warn", "error"] }],
21
+ "no-return-await": "off",
22
+ "@typescript-eslint/return-await": "warn",
23
+ "@typescript-eslint/no-empty-object-type": "warn",
24
+ "@next/next/no-img-element": "off",
25
+ "prettier/prettier": ["warn", {
26
+ "semi": true,
27
+ "singleQuote": true,
28
+ "tabWidth": 2,
29
+ "trailingComma": "es5",
30
+ "printWidth": 80,
31
+ "bracketSpacing": true
32
+ }]
33
+ }
34
+ }
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "tabWidth": 2,
5
+ "trailingComma": "es5",
6
+ "printWidth": 80,
7
+ "bracketSpacing": true
8
+ }
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ <!-- markdownlint-disable MD030 -->
2
+
3
+ # Clik Agent Widget Embed
4
+
5
+ Javascript library to display Clik Agent Embed on your website
6
+
7
+ ```html
8
+ <!-- public/index.html -->
9
+ <script type="module">
10
+ import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
11
+ Agent.initWidget({
12
+ apiHost: 'https://ci-api.clik.vn/chatbot',
13
+ agentId: '6d02b23f-465f-44ec-8766-27a82890a9b8',
14
+ overrideConfig: {
15
+ chatId: '',
16
+ },
17
+ });
18
+ </script>
19
+ <clik-agent-widget></clik-agent-widget>
20
+ ```
package/base.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Default",
4
+ "compilerOptions": {
5
+ "composite": false,
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "esModuleInterop": true,
9
+ "forceConsistentCasingInFileNames": true,
10
+ "inlineSources": false,
11
+ "isolatedModules": true,
12
+ "moduleResolution": "node",
13
+ "noUnusedLocals": false,
14
+ "noUnusedParameters": false,
15
+ "preserveWatchOutput": true,
16
+ "skipLibCheck": true,
17
+ "strict": true,
18
+ "downlevelIteration": true
19
+ },
20
+ "exclude": ["node_modules"]
21
+ }
@@ -0,0 +1,2 @@
1
+ export * from './variables';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commons/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const BE_API = "";
2
+ export declare const LANGUAGE_HEADER: {
3
+ [key: string]: string;
4
+ };
5
+ //# sourceMappingURL=variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/commons/constants/variables.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,eAAe,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAiBpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const Agent: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Agent;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Agent/index.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,KAAK,+CAOV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ChatMessageType } from '../../types/flowise.type';
3
+ type PropsType = {
4
+ id?: string;
5
+ initialMessages?: ChatMessageType[];
6
+ agentId?: string;
7
+ };
8
+ export declare const Chat: FC<PropsType>;
9
+ export {};
10
+ //# sourceMappingURL=Chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,eAAe,EAAe,MAAM,0BAA0B,CAAC;AAQxE,KAAK,SAAS,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAoE9B,CAAC"}
@@ -0,0 +1,120 @@
1
+ export declare const BotIcon: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const UserIcon: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const AttachmentIcon: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const VercelIcon: ({ size }: {
5
+ size?: number | undefined;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const GitIcon: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const BoxIcon: ({ size }: {
9
+ size: number;
10
+ }) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const HomeIcon: ({ size }: {
12
+ size: number;
13
+ }) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const GPSIcon: ({ size }: {
15
+ size: number;
16
+ }) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const InvoiceIcon: ({ size }: {
18
+ size: number;
19
+ }) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const LogoOpenAI: ({ size }: {
21
+ size?: number;
22
+ }) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const LogoGoogle: ({ size }: {
24
+ size?: number;
25
+ }) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const LogoAnthropic: () => import("react/jsx-runtime").JSX.Element;
27
+ export declare const RouteIcon: ({ size }: {
28
+ size?: number;
29
+ }) => import("react/jsx-runtime").JSX.Element;
30
+ export declare const FileIcon: ({ size }: {
31
+ size?: number;
32
+ }) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const LoaderIcon: ({ size }: {
34
+ size?: number;
35
+ }) => import("react/jsx-runtime").JSX.Element;
36
+ export declare const UploadIcon: ({ size }: {
37
+ size?: number;
38
+ }) => import("react/jsx-runtime").JSX.Element;
39
+ export declare const MenuIcon: ({ size }: {
40
+ size?: number;
41
+ }) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const PencilEditIcon: ({ size }: {
43
+ size?: number;
44
+ }) => import("react/jsx-runtime").JSX.Element;
45
+ export declare const CheckedSquare: ({ size }: {
46
+ size?: number;
47
+ }) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const UncheckedSquare: ({ size }: {
49
+ size?: number;
50
+ }) => import("react/jsx-runtime").JSX.Element;
51
+ export declare const MoreIcon: ({ size }: {
52
+ size?: number;
53
+ }) => import("react/jsx-runtime").JSX.Element;
54
+ export declare const TrashIcon: ({ size }: {
55
+ size?: number;
56
+ }) => import("react/jsx-runtime").JSX.Element;
57
+ export declare const InfoIcon: ({ size }: {
58
+ size?: number;
59
+ }) => import("react/jsx-runtime").JSX.Element;
60
+ export declare const ArrowUpIcon: ({ size }: {
61
+ size?: number;
62
+ }) => import("react/jsx-runtime").JSX.Element;
63
+ export declare const StopIcon: ({ size }: {
64
+ size?: number;
65
+ }) => import("react/jsx-runtime").JSX.Element;
66
+ export declare const PaperclipIcon: ({ size }: {
67
+ size?: number;
68
+ }) => import("react/jsx-runtime").JSX.Element;
69
+ export declare const MoreHorizontalIcon: ({ size }: {
70
+ size?: number;
71
+ }) => import("react/jsx-runtime").JSX.Element;
72
+ export declare const MessageIcon: ({ size }: {
73
+ size?: number;
74
+ }) => import("react/jsx-runtime").JSX.Element;
75
+ export declare const CrossIcon: ({ size }: {
76
+ size?: number;
77
+ }) => import("react/jsx-runtime").JSX.Element;
78
+ export declare const UndoIcon: ({ size }: {
79
+ size?: number;
80
+ }) => import("react/jsx-runtime").JSX.Element;
81
+ export declare const RedoIcon: ({ size }: {
82
+ size?: number;
83
+ }) => import("react/jsx-runtime").JSX.Element;
84
+ export declare const DeltaIcon: ({ size }: {
85
+ size?: number;
86
+ }) => import("react/jsx-runtime").JSX.Element;
87
+ export declare const PenIcon: ({ size }: {
88
+ size?: number;
89
+ }) => import("react/jsx-runtime").JSX.Element;
90
+ export declare const SummarizeIcon: ({ size }: {
91
+ size?: number;
92
+ }) => import("react/jsx-runtime").JSX.Element;
93
+ export declare const SidebarLeftIcon: ({ size }: {
94
+ size?: number;
95
+ }) => import("react/jsx-runtime").JSX.Element;
96
+ export declare const PlusIcon: ({ size }: {
97
+ size?: number;
98
+ }) => import("react/jsx-runtime").JSX.Element;
99
+ export declare const CopyIcon: ({ size }: {
100
+ size?: number;
101
+ }) => import("react/jsx-runtime").JSX.Element;
102
+ export declare const ThumbUpIcon: ({ size }: {
103
+ size?: number;
104
+ }) => import("react/jsx-runtime").JSX.Element;
105
+ export declare const ThumbDownIcon: ({ size }: {
106
+ size?: number;
107
+ }) => import("react/jsx-runtime").JSX.Element;
108
+ export declare const ChevronDownIcon: ({ size }: {
109
+ size?: number;
110
+ }) => import("react/jsx-runtime").JSX.Element;
111
+ export declare const SparklesIcon: ({ size }: {
112
+ size?: number;
113
+ }) => import("react/jsx-runtime").JSX.Element;
114
+ export declare const CheckCirclFillIcon: ({ size }: {
115
+ size?: number;
116
+ }) => import("react/jsx-runtime").JSX.Element;
117
+ export declare const MicrophoneIcon: ({ size }: {
118
+ size?: number;
119
+ }) => import("react/jsx-runtime").JSX.Element;
120
+ //# sourceMappingURL=Icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Icons.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ToolUsage } from '../../types/flowise.type';
3
+ export declare const Markdown: React.NamedExoticComponent<{
4
+ children: string;
5
+ usedTools?: ToolUsage[];
6
+ }>;
7
+ //# sourceMappingURL=Markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AA2TrD,eAAO,MAAM,QAAQ;cA9JT,MAAM;gBACJ,SAAS,EAAE;EAkKxB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { BotType } from '../../types/bot.type';
3
+ import { ChatMessageType } from '../../types/flowise.type';
4
+ type PropsType = {
5
+ chatId?: string;
6
+ message: ChatMessageType;
7
+ isLoading: boolean;
8
+ bot: BotType | null;
9
+ };
10
+ export declare const PreviewMessage: FC<PropsType>;
11
+ export declare const ThinkingMessage: ({ bot }: {
12
+ bot: BotType | null;
13
+ }) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=Message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Message.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAIpC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAEL,eAAe,EAEhB,MAAM,0BAA0B,CAAC;AAGlC,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CACrB,CAAC;AAUF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,SAAS,CAkHxC,CAAC;AAEF,eAAO,MAAM,eAAe,YAAa;IAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,4CAwC/D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { ChatMessageType, IFileUpload } from '../../types/flowise.type';
3
+ import { BotType } from '../../types/bot.type';
4
+ type PropsType = {
5
+ input: string;
6
+ setInput: (value: string) => void;
7
+ isLoading: boolean;
8
+ stop: () => void;
9
+ messages: ChatMessageType[];
10
+ setMessages: (messages: ChatMessageType[]) => void;
11
+ chatId: string;
12
+ handleSubmit: (event?: {
13
+ preventDefault?: () => void;
14
+ }, files?: IFileUpload[]) => void;
15
+ className?: string;
16
+ append?: (message: ChatMessageType) => Promise<void>;
17
+ attachments?: IFileUpload[];
18
+ setAttachments?: (func: (files: IFileUpload[]) => IFileUpload[]) => void;
19
+ bot: BotType | null;
20
+ apiHost: string;
21
+ };
22
+ export declare const MultimodalInput: FC<PropsType>;
23
+ export {};
24
+ //# sourceMappingURL=MultimodalInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultimodalInput.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/MultimodalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EAKH,MAAM,OAAO,CAAC;AAUf,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AA6B/C,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CACZ,KAAK,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,EACvC,KAAK,CAAC,EAAE,WAAW,EAAE,KAClB,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,CAAC;IACzE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,SAAS,CA+SzC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { BotType } from '../../types/bot.type';
3
+ type PropsType = {
4
+ bot: BotType | null;
5
+ };
6
+ export declare const Overview: FC<PropsType>;
7
+ export default Overview;
8
+ //# sourceMappingURL=Overview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overview.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Overview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CACrB,CAAC;AACF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,SAAS,CAqClC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { IFileUpload } from '../../types/flowise.type';
2
+ export declare const PreviewAttachment: ({ attachment, isUploading, }: {
3
+ attachment: IFileUpload;
4
+ isUploading?: boolean;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=PreviewAttachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviewAttachment.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/PreviewAttachment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,eAAO,MAAM,iBAAiB,iCAG3B;IACD,UAAU,EAAE,WAAW,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,4CA+BA,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import { ButtonHTMLAttributes } from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
12
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ui/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAc,MAAM,OAAO,CAAC;AAEzD,QAAA,MAAM,cAAc;;;mFA2BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,2GAWX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { TextareaHTMLAttributes } from 'react';
2
+ export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ }
4
+ declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
5
+ export { Textarea };
6
+ //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/ui/Textarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE3D,MAAM,WAAW,aACf,SAAQ,sBAAsB,CAAC,mBAAmB,CAAC;CAAG;AAExD,QAAA,MAAM,QAAQ,+GAab,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const agentWidgetElementName = "clik-agent-widget";
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,sBAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { EVENT_TYPE } from '../../models';
3
+ export type AgentWidgetType = {
4
+ apiHost: string;
5
+ agentId: string;
6
+ overrideConfig?: {
7
+ chatId?: string | undefined;
8
+ } & Record<string, unknown>;
9
+ theme?: {
10
+ avatar?: string;
11
+ } & Record<string, unknown>;
12
+ listeners?: Record<EVENT_TYPE, (props: any) => void>;
13
+ };
14
+ declare const AgentWidget: FC<AgentWidgetType>;
15
+ export default AgentWidget;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/AgentWidget/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;CACtD,CAAC;AACF,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,eAAe,CAyBpC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { ChatMessageType } from '../types/flowise.type';
2
+ import { BotType } from '../types/bot.type';
3
+ type PropsType = {
4
+ id?: string;
5
+ agentId?: string;
6
+ initialMessages: ChatMessageType[];
7
+ initialInput?: string;
8
+ };
9
+ type ReturnType = {
10
+ messages?: ChatMessageType[];
11
+ setMessages: (messages: ChatMessageType[]) => void;
12
+ handleSubmit: (event?: {
13
+ preventDefault?: () => void;
14
+ }) => void;
15
+ input?: string;
16
+ setInput: (input: string) => void;
17
+ isLoading: boolean;
18
+ stop: () => void;
19
+ chatId: string;
20
+ append: (message: ChatMessageType) => Promise<void>;
21
+ bot: BotType | null;
22
+ };
23
+ export declare const useChat: (props: PropsType) => ReturnType;
24
+ export {};
25
+ //# sourceMappingURL=useChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useChat.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,eAAe,EAKhB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,KAAK,SAAS,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,SAAS,KAAG,UA4L1C,CAAC"}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { EVENT_TYPE } from '../models';
3
+ import { ChatMessageType } from '../types/flowise.type';
4
+ type ChatData = {
5
+ chatId?: string | undefined;
6
+ theme?: {
7
+ avatar?: string;
8
+ } & Record<string, unknown>;
9
+ listeners?: Record<EVENT_TYPE, (props: any) => void>;
10
+ initialMessages?: ChatMessageType[];
11
+ };
12
+ export declare const ChatDataProvider: ({ children, data, }: {
13
+ children: React.ReactNode;
14
+ data: ChatData;
15
+ }) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const useChatData: () => ChatData;
17
+ export {};
18
+ //# sourceMappingURL=useChatData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatData.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,KAAK,QAAQ,GAAG;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IACrD,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;CACrC,CAAC;AAIF,eAAO,MAAM,gBAAgB,wBAG1B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;CAChB,4CAmCA,CAAC;AAEF,eAAO,MAAM,WAAW,gBAMvB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { EVENT_TYPE } from '../models';
3
+ type ConfigurationData = {
4
+ apiHost: string;
5
+ agentId: string;
6
+ overrideConfig?: {
7
+ chatId?: string | undefined;
8
+ } & Record<string, unknown>;
9
+ theme?: {
10
+ avatar?: string;
11
+ } & Record<string, unknown>;
12
+ listeners?: Record<EVENT_TYPE, (props: any) => void>;
13
+ };
14
+ export declare const ConfigurationProvider: ({ children, config, }: {
15
+ children: React.ReactNode;
16
+ config: ConfigurationData;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const useConfiguration: () => ConfigurationData;
19
+ export {};
20
+ //# sourceMappingURL=useConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfiguration.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfiguration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;CACtD,CAAC;AAMF,eAAO,MAAM,qBAAqB,0BAG/B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,4CAkBA,CAAC;AAEF,eAAO,MAAM,gBAAgB,yBAQ5B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ type TokenGeneratorData = {
3
+ shouldConnect: boolean;
4
+ wsUrl: string;
5
+ token: string;
6
+ disconnect: () => Promise<void>;
7
+ connect: () => Promise<void>;
8
+ };
9
+ export declare const ConnectionProvider: ({ children, livekitURL, }: {
10
+ children: React.ReactNode;
11
+ livekitURL: string;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const useConnection: () => TokenGeneratorData;
14
+ export {};
15
+ //# sourceMappingURL=useConnection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConnection.d.ts","sourceRoot":"","sources":["../../src/hooks/useConnection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAIvD,KAAK,kBAAkB,GAAG;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAMF,eAAO,MAAM,kBAAkB,8BAG5B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB,4CA6CA,CAAC;AAEF,eAAO,MAAM,aAAa,0BAMzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type RefObject } from 'react';
2
+ export declare function useScrollToBottom<T extends HTMLElement>(): [
3
+ RefObject<T>,
4
+ RefObject<T>
5
+ ];
6
+ //# sourceMappingURL=useScrollToBottom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollToBottom.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollToBottom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,KAAK;IAC1D,SAAS,CAAC,CAAC,CAAC;IACZ,SAAS,CAAC,CAAC,CAAC;CACb,CAyBA"}
@@ -0,0 +1,2 @@
1
+ export type { AgentWidgetType } from './features/AgentWidget';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { PredictionData } from '../types/flowise.type';
2
+ interface FlowiseClientOptions {
3
+ baseUrl: string;
4
+ accessToken?: string;
5
+ host?: string;
6
+ }
7
+ export interface StreamResponse {
8
+ event: string;
9
+ data: unknown;
10
+ }
11
+ type PredictionResponse<T extends PredictionData> = T['streaming'] extends true ? AsyncGenerator<StreamResponse, void, unknown> : Record<string, any>;
12
+ export default class FlowiseClient {
13
+ private baseUrl;
14
+ private accessToken;
15
+ private host;
16
+ constructor(options: FlowiseClientOptions);
17
+ createPrediction<T extends PredictionData>(data: T): Promise<PredictionResponse<T>>;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=FlowiseClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlowiseClient.d.ts","sourceRoot":"","sources":["../../src/models/FlowiseClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAED,KAAK,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,CAAC,WAAW,CAAC,SAAS,IAAI,GAC3E,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,GAC7C,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,IAAI,CAAqB;gBAErB,OAAO,EAAE,oBAAoB;IAOnC,gBAAgB,CAAC,CAAC,SAAS,cAAc,EAC7C,IAAI,EAAE,CAAC,GACN,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAsElC"}
@@ -0,0 +1,2 @@
1
+ export type EVENT_TYPE = 'CONNECT' | 'DISCONNECT';
2
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,YAAY,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { EVENT_TYPE } from './models';
2
+ type AgentType = {
3
+ apiHost: string;
4
+ agentId: string;
5
+ overrideConfig?: {
6
+ chatId?: string | undefined;
7
+ } & Record<string, unknown>;
8
+ theme?: {
9
+ avatar?: string;
10
+ } & Record<string, unknown>;
11
+ listeners?: Record<EVENT_TYPE, (props: any) => void>;
12
+ };
13
+ export declare class AgentWidgetComponent extends HTMLElement {
14
+ apiHost?: string;
15
+ agentId?: string;
16
+ overrideConfig?: {
17
+ chatId?: string | undefined;
18
+ } & Record<string, unknown>;
19
+ theme?: {
20
+ avatar?: string;
21
+ } & Record<string, unknown>;
22
+ listeners?: Record<EVENT_TYPE, (props: any) => void>;
23
+ constructor();
24
+ updateAttributes(attributes: AgentType): void;
25
+ connectedCallback(): void;
26
+ render(): void;
27
+ }
28
+ export declare const registerWebComponents: () => void;
29
+ export {};
30
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,SAAS,GAAG;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;CACtD,CAAC;AAEF,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE;QACN,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;;IAMrD,gBAAgB,CAAC,UAAU,EAAE,SAAS;IAStC,iBAAiB;IAMjB,MAAM;CAYP;AACD,eAAO,MAAM,qBAAqB,YAKjC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const API_VERSION = "/ext/v1";
2
+ export declare const API_CHATS = "/chats";
3
+ export declare const API_CHAT_MESSAGE = "/chats/chatmessage";
4
+ export declare const API_PREDICTION = "/chats/prediction";
5
+ export declare const API_CHATBOTS = "/ext/v1/bots";
6
+ export declare const API_CREATE_ATTACHMENTS = "/chats/attachments";
7
+ //# sourceMappingURL=apis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apis.d.ts","sourceRoot":"","sources":["../../src/services/apis.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,SAAS,WAAW,CAAC;AAElC,eAAO,MAAM,gBAAgB,uBAA6B,CAAC;AAE3D,eAAO,MAAM,cAAc,sBAA4B,CAAC;AAExD,eAAO,MAAM,YAAY,iBAAwB,CAAC;AAElD,eAAO,MAAM,sBAAsB,uBAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { BotType } from '../types/bot.type';
2
+ export declare const getBot: (id: string, apiHost: string) => Promise<BotType>;
3
+ //# sourceMappingURL=bot.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bot.service.d.ts","sourceRoot":"","sources":["../../src/services/bot.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,eAAO,MAAM,MAAM,OAAc,MAAM,WAAW,MAAM,KAAG,OAAO,CAAC,OAAO,CAUzE,CAAC"}