@xpert-ai/chatkit-ui5 0.0.1 → 0.1.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.
package/README.md CHANGED
@@ -14,7 +14,7 @@ pnpm add @xpert-ai/chatkit-ui5
14
14
  # or npm i @xpert-ai/chatkit-ui5
15
15
  ```
16
16
 
17
- Place the build output in the UI5 static resources directory and declare the resource root path in `manifest.json` (example matches sample-app):
17
+ Place the build output *chatkit.ui5.js* in the UI5 static resources directory and declare the resource root path in `manifest.json` (example matches sample-app):
18
18
 
19
19
  ```json
20
20
  "sap.ui5": {
@@ -42,7 +42,10 @@ sap.ui.require(["xpertai/chatkit/ui5"], (ChatKitLib) => {
42
42
  api: {
43
43
  apiUrl: "https://api.mtda.cloud/api/ai",
44
44
  xpertId: "your-xpert-id",
45
- getClientSecret: async () => "<API Key securely retrieved from backend>"
45
+ getClientSecret: async () => ({
46
+ secret: "<API Key securely retrieved from backend>",
47
+ organizationId: "<current-user-org-id>"
48
+ })
46
49
  },
47
50
  onEffect: ({ name, data }) => {
48
51
  // Handle ChatKit effects for application integration, e.g., adding to todo list
@@ -59,7 +62,7 @@ sap.ui.require(["xpertai/chatkit/ui5"], (ChatKitLib) => {
59
62
  - `frameUrl`: ChatKit Host address (HTML container).
60
63
  - `api.apiUrl`: Backend API address.
61
64
  - `api.xpertId`: XpertAI platform digital expert ID.
62
- - `api.getClientSecret()`: Async function to securely retrieve user-specific API Key from backend.
65
+ - `api.getClientSecret()`: Async function to securely retrieve a user-specific API key from backend. It may return either the legacy `string` or `{ secret, organizationId }`.
63
66
  - Event callbacks: `onReady`, `onError`, `onResponseStart`, `onResponseEnd`, `onThreadChange`, `onThreadLoadStart`, `onThreadLoadEnd`, `onEffect`, etc. (follow `onXxx` naming convention).
64
67
 
65
68
  ## Control Methods