kore-web-sdk 10.20.0 → 10.20.1

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 (93) hide show
  1. package/README.md +156 -156
  2. package/dist/components/base-sdk/kore-bot-sdk-client.d.ts +2 -2
  3. package/dist/components/chatwindow/chatWindow.d.ts +275 -275
  4. package/dist/components/chatwindow/config/kore-config.d.ts +2 -2
  5. package/dist/components/widgets/config/kore-widgets-config.d.ts +8 -8
  6. package/dist/components/widgets/kore-widgets.d.ts +113 -113
  7. package/dist/esm/exports.d.ts +37 -37
  8. package/dist/esm/kore-web-sdk-chat.min.js +1 -1
  9. package/dist/esm/plugins/kore-solutions-plugin.js +1 -1
  10. package/dist/index_chat.d.ts +3 -3
  11. package/dist/index_plugins/AzureSTT.d.ts +2 -2
  12. package/dist/index_plugins/AzureTTS.d.ts +2 -2
  13. package/dist/index_plugins/BrowserTTS.d.ts +2 -2
  14. package/dist/index_plugins/KoreAWSST.d.ts +2 -2
  15. package/dist/index_plugins/KoreDesktopNotification.d.ts +2 -2
  16. package/dist/index_plugins/SearchSuggestions.d.ts +2 -2
  17. package/dist/index_plugins/WebKitSTT.d.ts +2 -2
  18. package/dist/index_plugins/agentDesktop.d.ts +2 -2
  19. package/dist/index_plugins/fileUpload_umd.d.ts +2 -2
  20. package/dist/index_plugins/googleSTT.d.ts +2 -2
  21. package/dist/index_plugins/googleTTS.d.ts +2 -2
  22. package/dist/index_plugins/graphTemplates.d.ts +2 -2
  23. package/dist/index_plugins/korei18n.d.ts +2 -2
  24. package/dist/index_plugins/korepicker.d.ts +2 -2
  25. package/dist/index_plugins/solutionsTemplates.d.ts +2 -2
  26. package/dist/index_widgets.d.ts +3 -3
  27. package/dist/libs/dompurify.d.ts +28 -28
  28. package/dist/libs/emoji.d.ts +2 -2
  29. package/dist/libs/jquery-clockpicker/jquery-clockpicker.d.ts +9 -9
  30. package/dist/libs/jquery-daterangepicker/jquery.daterangepicker.d.ts +2 -2
  31. package/dist/libs/kore-graph-adapter/KoreGraphAdapter.d.ts +27 -27
  32. package/dist/libs/korejquery.d.ts +2 -2
  33. package/dist/libs/purejscarousel/purejscarousel.d.ts +34 -34
  34. package/dist/plugins/agentDesktop/ac_webrtc.d.ts +237 -237
  35. package/dist/plugins/agentDesktop/agentdesktop.d.ts +26 -26
  36. package/dist/plugins/desktopNotifications/desktopnotifications.d.ts +10 -10
  37. package/dist/plugins/fileUploader/fileUploader.d.ts +145 -145
  38. package/dist/plugins/graphTemplatesPlugin.d.ts +20 -20
  39. package/dist/plugins/i18n.d.ts +25 -25
  40. package/dist/plugins/korePickers.d.ts +172 -172
  41. package/dist/plugins/searchSuggestions/searchSuggestions.d.ts +75 -75
  42. package/dist/plugins/solutions/solutionsPlugin.d.ts +18 -18
  43. package/dist/plugins/solutions/templates/SearchResultsTemplate/searchResults.d.ts +7 -7
  44. package/dist/plugins/solutions/templates/quickRepliesWelcomeTemplate/quick-replies-welcome.d.ts +7 -7
  45. package/dist/plugins/solutions/templates/solutions-list-view/solutions-list-view.d.ts +9 -9
  46. package/dist/plugins/speechToText/AzureSTT/AzureSTT.d.ts +19 -19
  47. package/dist/plugins/speechToText/BaseSTT.d.ts +8 -8
  48. package/dist/plugins/speechToText/GoogleSTT/GoogleSTT.d.ts +48 -48
  49. package/dist/plugins/speechToText/GoogleSTT/recorder.d.ts +21 -21
  50. package/dist/plugins/speechToText/WebKitSTT/WebKitSTT.d.ts +31 -31
  51. package/dist/plugins/textToSpeech/AzureTTS/AzureTTS.d.ts +22 -22
  52. package/dist/plugins/textToSpeech/BaseTTS.d.ts +8 -8
  53. package/dist/plugins/textToSpeech/BrowserTTS/BrowserTTS.d.ts +19 -19
  54. package/dist/plugins/textToSpeech/GoogleTTS/GoogleTTS.d.ts +32 -32
  55. package/dist/plugins/textToSpeech/KoreAWSPolly/kore-aws-polly.d.ts +22 -22
  56. package/dist/templatemanager/templateManager.d.ts +11 -11
  57. package/dist/templatemanager/templates/advancedListTemplate/advancedListTemplate.d.ts +8 -8
  58. package/dist/templatemanager/templates/advancedMultiSelect/advancedMultiSelect.d.ts +7 -7
  59. package/dist/templatemanager/templates/barChartTemplate/barChartTemplate.d.ts +9 -9
  60. package/dist/templatemanager/templates/button/buttonTemplate.d.ts +7 -7
  61. package/dist/templatemanager/templates/cardTemplate/cardTemplate.d.ts +7 -7
  62. package/dist/templatemanager/templates/carouselTemplate/carouselTemplate.d.ts +7 -7
  63. package/dist/templatemanager/templates/checkBoxesTemplate/checkBoxesTemplate.d.ts +7 -7
  64. package/dist/templatemanager/templates/checkListTemplate/checkList.d.ts +8 -8
  65. package/dist/templatemanager/templates/clockPicker/clockPicker.d.ts +12 -12
  66. package/dist/templatemanager/templates/datePicker/datePicker.d.ts +12 -12
  67. package/dist/templatemanager/templates/dateRangePicker/dateRangePicker.d.ts +12 -12
  68. package/dist/templatemanager/templates/dropdownTemplate/dropdownTemplate.d.ts +7 -7
  69. package/dist/templatemanager/templates/formTemplate/formTemplate.d.ts +8 -8
  70. package/dist/templatemanager/templates/iframeTemplate/iframeTemplate.d.ts +7 -7
  71. package/dist/templatemanager/templates/likeDislikeTemplate/likeDislikeTemplate.d.ts +7 -7
  72. package/dist/templatemanager/templates/lineChartTemplate/lineChartTemplate.d.ts +9 -9
  73. package/dist/templatemanager/templates/listTemplate/listTemplate.d.ts +7 -7
  74. package/dist/templatemanager/templates/listViewTemplate/listViewTemplate.d.ts +9 -9
  75. package/dist/templatemanager/templates/listWidgetTemplate/listWidgetTemplate.d.ts +9 -9
  76. package/dist/templatemanager/templates/messageTemplate/messageTemplate.d.ts +6 -6
  77. package/dist/templatemanager/templates/miniTableTemplate/miniTableTemplate.d.ts +7 -7
  78. package/dist/templatemanager/templates/pieChartTemplate/pieChartTemplate.d.ts +9 -9
  79. package/dist/templatemanager/templates/quickReplyTemplate/quickReplyTemplate.d.ts +11 -11
  80. package/dist/templatemanager/templates/radioOptionPicker/radioOptionPicker.d.ts +10 -10
  81. package/dist/templatemanager/templates/ratingTemplate/ratingTemplate.d.ts +8 -8
  82. package/dist/templatemanager/templates/systemTemplate/systemTemplate.d.ts +7 -7
  83. package/dist/templatemanager/templates/tableListTemplate/tableListTemplate.d.ts +8 -8
  84. package/dist/templatemanager/templates/tableTemplate/tableTemplate.d.ts +7 -7
  85. package/dist/templatemanager/templates/taskPickerTemplate/taskPickerTemplate.d.ts +10 -10
  86. package/dist/templatemanager/templates/templateAttachment/templateAttachment.d.ts +7 -7
  87. package/dist/umd/kore-web-sdk-umd-chat.min.js +1 -1
  88. package/dist/umd/plugins/kore-solutions-plugin-umd.js +1 -1
  89. package/dist/utils/EventEmiter.d.ts +11 -11
  90. package/dist/utils/helpers.d.ts +21 -21
  91. package/dist/utils/kore-polyfills.d.ts +2 -2
  92. package/package.json +1 -1
  93. package/dist/components/base-sdk/client.d.ts +0 -2
package/README.md CHANGED
@@ -1,156 +1,156 @@
1
- # Kore.ai SDK
2
- Kore.ai offers Bots SDKs as a set of platform-specific client libraries that provide a quick and convenient way to integrate Kore.ai Bots chat capability into custom applications.
3
-
4
- With just few lines of code, you can embed our Kore.ai chat widget into your applications to enable end-users to interact with your applications using Natural Language. For more information, refer to
5
-
6
- [Bot SDKs](https://developer.kore.ai/docs/bots/kore-web-sdk/)
7
-
8
- [Web Socket Endpoints and Events](https://developer.kore.ai/docs/bots/sdks/bots-platform-api-reference/)
9
-
10
- [SDK Security](https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/)
11
-
12
- [SDK App Registration](https://developer.kore.ai/docs/bots/sdks/sdk-app-registration/)
13
-
14
- [Message Templates](https://developer.kore.ai/docs/bots/sdks/message-templates/)
15
-
16
- [API Referernce](https://koredotcom.github.io/web-kore-sdk/)
17
-
18
- [FAQ's](/docs/faqs)
19
-
20
-
21
- ## 💡 Getting Started
22
-
23
- First, install kore web SDK via the [npm](https://www.npmjs.com/get-npm) package manager:
24
-
25
- ```bash
26
- npm install --save kore-web-sdk@legacy-v2
27
- ```
28
-
29
- Get chatWindow and chatConfig
30
-
31
- ```js
32
- import { chatConfig, chatWindow } from 'kore-web-sdk';
33
-
34
- ```
35
- Configure ChatConfig
36
-
37
-
38
-
39
- ```js
40
-
41
- let botOptions=chatConfig.botOptions;
42
-
43
- botOptions.JWTUrl = "PLEASE_ENTER_JWTURL_HERE";
44
- botOptions.userIdentity = 'PLEASE_ENTER_USER_EMAIL_ID';// Provide users email id here
45
- botOptions.botInfo = { name: "PLEASE_ENTER_BOT_NAME", "_id": "PLEASE_ENTER_BOT_ID" }; // bot name is case sensitive
46
- botOptions.clientId = "PLEASE_ENTER_CLIENT_ID";
47
- botOptions.clientSecret = "PLEASE_ENTER_CLIENT_SECRET";
48
- /*
49
- Important Note: These keys are provided here for quick demos to generate JWT token at client side but not for Production environment.
50
- Refer below document for JWT token generation at server side. Client Id and Client secret should maintained at server end.
51
- https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/
52
- **/
53
-
54
- ```
55
-
56
-
57
- Create chat window instance and trigger show method
58
- ```js
59
- var chatWindowInstance = new chatWindow(chatConfig);
60
- chatWindowInstance.show(chatConfig);
61
-
62
- ```
63
- ### Examples
64
- Click [here](/docs/sdkdeveloper) to explore different variations how SDK can be consumed
65
-
66
- ### Other options
67
- <details>
68
- <summary>Legacy</summary>
69
-
70
- include the following script in your html file and configure bot configurations
71
-
72
- ```js
73
-
74
- <script src="https://cdn.jsdelivr.net/npm/kore-web-sdk@10.20.0/dist/umd/kore-web-sdk-umd-chat.min.js"></script>
75
- <script>
76
- //chat window declaration
77
- var chatConfig=KoreChatSDK.chatConfig;
78
- var chatWindow=KoreChatSDK.chatWindow;
79
-
80
- //create chat window instance
81
- var chatWindowInstance = new chatWindow();
82
-
83
- //configure bot configurations
84
- var botOptions=chatConfig.botOptions;
85
- botOptions.JWTUrl = "PLEASE_ENTER_JWTURL_HERE";
86
- botOptions.userIdentity = 'PLEASE_ENTER_USER_EMAIL_ID';
87
- botOptions.botInfo = { name: "PLEASE_ENTER_BOT_NAME", "_id": "PLEASE_ENTER_BOT_ID" }; // bot name is case sensitive
88
- botOptions.clientId = "PLEASE_ENTER_CLIENT_ID";
89
- botOptions.clientSecret = "PLEASE_ENTER_CLIENT_SECRET";
90
- /*
91
- Important Note: These keys are provided here for quick demos to generate JWT token at client side but not for Production environment.
92
- Refer below document for JWT token generation at server side. Client Id and Client secret should maintained at server end.
93
- https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/
94
- **/
95
-
96
- //show chatwindow
97
- chatWindowInstance.show(chatConfig);
98
-
99
- </script>
100
-
101
- ```
102
-
103
- </details>
104
-
105
-
106
- <details>
107
- <summary>For quick demo</summary>
108
-
109
-
110
-
111
- #### Instructions
112
- 1.Open examples/umd/chat-with-plugins/index.html
113
- 2.configure bot configurations
114
- 3.Open same file in any browser
115
-
116
-
117
-
118
-
119
- </details>
120
-
121
- ## 💡 Custom Templates
122
-
123
- In addition to the kore message templates, new custom templates can be intstalled into kore chat window with *installTemplate* method
124
-
125
- ```bash
126
- class customTemplateComponent {
127
- renderMessage(msgData) {
128
- if (msgData?.message[0]?.component?.payload?.template_type === 'custom_stock_template') {
129
- return '<h2 data-kr-msg-id=' + msgData.messageId + ' data-time=' + msgData.createdOnTimemillis + '>My Template HTML</h2>';
130
- } else {
131
- return false;
132
- }
133
- }
134
- }
135
-
136
- chatWindowInstance.templateManager.installTemplate(new customTemplateComponent());
137
- ```
138
- Other framework UI components like angular and react can also be injected with this
139
- > [!NOTE]
140
- > - Please add the following two attributes for parent div in the custom template html
141
- > - `data-kr-msg-id` with value `msgData.messageId` and `data-time` with value `msgData.createdOnTimemillis`
142
-
143
- ## 💡 Plugins
144
-
145
- Kore's chatwindow functionlity can be extended with the help of plugins.Newly created plugins can be installed with *installPlugin* method
146
-
147
- ```bash
148
- class KoreCustomPlugin{
149
-
150
- }
151
-
152
- chatWindowInstance.installPlugin(new KoreCustomPlugin());
153
- ```
154
- Kore offered plugins are listed [here](./docs/plugins)
155
-
156
-
1
+ # Kore.ai SDK
2
+ Kore.ai offers Bots SDKs as a set of platform-specific client libraries that provide a quick and convenient way to integrate Kore.ai Bots chat capability into custom applications.
3
+
4
+ With just few lines of code, you can embed our Kore.ai chat widget into your applications to enable end-users to interact with your applications using Natural Language. For more information, refer to
5
+
6
+ [Bot SDKs](https://developer.kore.ai/docs/bots/kore-web-sdk/)
7
+
8
+ [Web Socket Endpoints and Events](https://developer.kore.ai/docs/bots/sdks/bots-platform-api-reference/)
9
+
10
+ [SDK Security](https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/)
11
+
12
+ [SDK App Registration](https://developer.kore.ai/docs/bots/sdks/sdk-app-registration/)
13
+
14
+ [Message Templates](https://developer.kore.ai/docs/bots/sdks/message-templates/)
15
+
16
+ [API Referernce](https://koredotcom.github.io/web-kore-sdk/)
17
+
18
+ [FAQ's](/docs/faqs)
19
+
20
+
21
+ ## 💡 Getting Started
22
+
23
+ First, install kore web SDK via the [npm](https://www.npmjs.com/get-npm) package manager:
24
+
25
+ ```bash
26
+ npm install --save kore-web-sdk@legacy-v2
27
+ ```
28
+
29
+ Get chatWindow and chatConfig
30
+
31
+ ```js
32
+ import { chatConfig, chatWindow } from 'kore-web-sdk';
33
+
34
+ ```
35
+ Configure ChatConfig
36
+
37
+
38
+
39
+ ```js
40
+
41
+ let botOptions=chatConfig.botOptions;
42
+
43
+ botOptions.JWTUrl = "PLEASE_ENTER_JWTURL_HERE";
44
+ botOptions.userIdentity = 'PLEASE_ENTER_USER_EMAIL_ID';// Provide users email id here
45
+ botOptions.botInfo = { name: "PLEASE_ENTER_BOT_NAME", "_id": "PLEASE_ENTER_BOT_ID" }; // bot name is case sensitive
46
+ botOptions.clientId = "PLEASE_ENTER_CLIENT_ID";
47
+ botOptions.clientSecret = "PLEASE_ENTER_CLIENT_SECRET";
48
+ /*
49
+ Important Note: These keys are provided here for quick demos to generate JWT token at client side but not for Production environment.
50
+ Refer below document for JWT token generation at server side. Client Id and Client secret should maintained at server end.
51
+ https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/
52
+ **/
53
+
54
+ ```
55
+
56
+
57
+ Create chat window instance and trigger show method
58
+ ```js
59
+ var chatWindowInstance = new chatWindow(chatConfig);
60
+ chatWindowInstance.show(chatConfig);
61
+
62
+ ```
63
+ ### Examples
64
+ Click [here](/docs/sdkdeveloper) to explore different variations how SDK can be consumed
65
+
66
+ ### Other options
67
+ <details>
68
+ <summary>Legacy</summary>
69
+
70
+ include the following script in your html file and configure bot configurations
71
+
72
+ ```js
73
+
74
+ <script src="https://cdn.jsdelivr.net/npm/kore-web-sdk@10.20.1/dist/umd/kore-web-sdk-umd-chat.min.js"></script>
75
+ <script>
76
+ //chat window declaration
77
+ var chatConfig=KoreChatSDK.chatConfig;
78
+ var chatWindow=KoreChatSDK.chatWindow;
79
+
80
+ //create chat window instance
81
+ var chatWindowInstance = new chatWindow();
82
+
83
+ //configure bot configurations
84
+ var botOptions=chatConfig.botOptions;
85
+ botOptions.JWTUrl = "PLEASE_ENTER_JWTURL_HERE";
86
+ botOptions.userIdentity = 'PLEASE_ENTER_USER_EMAIL_ID';
87
+ botOptions.botInfo = { name: "PLEASE_ENTER_BOT_NAME", "_id": "PLEASE_ENTER_BOT_ID" }; // bot name is case sensitive
88
+ botOptions.clientId = "PLEASE_ENTER_CLIENT_ID";
89
+ botOptions.clientSecret = "PLEASE_ENTER_CLIENT_SECRET";
90
+ /*
91
+ Important Note: These keys are provided here for quick demos to generate JWT token at client side but not for Production environment.
92
+ Refer below document for JWT token generation at server side. Client Id and Client secret should maintained at server end.
93
+ https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/
94
+ **/
95
+
96
+ //show chatwindow
97
+ chatWindowInstance.show(chatConfig);
98
+
99
+ </script>
100
+
101
+ ```
102
+
103
+ </details>
104
+
105
+
106
+ <details>
107
+ <summary>For quick demo</summary>
108
+
109
+
110
+
111
+ #### Instructions
112
+ 1.Open examples/umd/chat-with-plugins/index.html
113
+ 2.configure bot configurations
114
+ 3.Open same file in any browser
115
+
116
+
117
+
118
+
119
+ </details>
120
+
121
+ ## 💡 Custom Templates
122
+
123
+ In addition to the kore message templates, new custom templates can be intstalled into kore chat window with *installTemplate* method
124
+
125
+ ```bash
126
+ class customTemplateComponent {
127
+ renderMessage(msgData) {
128
+ if (msgData?.message[0]?.component?.payload?.template_type === 'custom_stock_template') {
129
+ return '<h2 data-kr-msg-id=' + msgData.messageId + ' data-time=' + msgData.createdOnTimemillis + '>My Template HTML</h2>';
130
+ } else {
131
+ return false;
132
+ }
133
+ }
134
+ }
135
+
136
+ chatWindowInstance.templateManager.installTemplate(new customTemplateComponent());
137
+ ```
138
+ Other framework UI components like angular and react can also be injected with this
139
+ > [!NOTE]
140
+ > - Please add the following two attributes for parent div in the custom template html
141
+ > - `data-kr-msg-id` with value `msgData.messageId` and `data-time` with value `msgData.createdOnTimemillis`
142
+
143
+ ## 💡 Plugins
144
+
145
+ Kore's chatwindow functionlity can be extended with the help of plugins.Newly created plugins can be installed with *installPlugin* method
146
+
147
+ ```bash
148
+ class KoreCustomPlugin{
149
+
150
+ }
151
+
152
+ chatWindowInstance.installPlugin(new KoreCustomPlugin());
153
+ ```
154
+ Kore offered plugins are listed [here](./docs/plugins)
155
+
156
+
@@ -1,2 +1,2 @@
1
- export default requireKr;
2
- declare function requireKr(o: any, u: any): any;
1
+ export default requireKr;
2
+ declare function requireKr(o: any, u: any): any;