@onedeskpro/chatbot-types 0.2.0 → 0.2.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 +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install --save-dev @onedeskpro/chatbot-types
|
|
|
20
20
|
| `ChatbotEventMap` | Event names mapped to payloads, including `state-change`, `ticket-status`, and `human-requested`. |
|
|
21
21
|
| `ChatbotTicketMode` | Who owns the conversation (`'ai' \| 'waiting' \| 'human' \| 'closed'`). |
|
|
22
22
|
| `TicketStatusData` | Mode plus optional `conversationId` and `agentName`. Shared by the human-request and ticket-status endpoints and the `ticket:status` socket event. |
|
|
23
|
-
| `ChatbotBlockReason` | Why a bot is not ready
|
|
23
|
+
| `ChatbotBlockReason` | Why a bot is not ready, or `null`: `'no-prompt'`, `'no-collections'`, `'ai-unavailable'`, `'no-credits'`, `'no-agent'`, `'server-unavailable'`, or the legacy `'no-directories'`. |
|
|
24
24
|
| `SdkConfigResponse` | Remote agent configuration and readiness. |
|
|
25
25
|
| `IdentifyRequest` / `IdentifyResponseData` | Identify endpoint request and response bodies. |
|
|
26
26
|
| `VisitorVerifyResponse` | Result of verifying a stored visitor token. |
|
package/dist/index.d.cts
CHANGED
|
@@ -64,7 +64,17 @@ interface ChatMessage {
|
|
|
64
64
|
content: string;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Why the chatbot cannot answer, or `null` when it can. The widget stays hidden
|
|
69
|
+
* while this is set.
|
|
70
|
+
* - `no-prompt`, `no-collections`: the agent is not set up yet (from the API).
|
|
71
|
+
* - `ai-unavailable`: the platform's AI models are not configured (from the API).
|
|
72
|
+
* - `no-credits`: the workspace has used its AI token budget (from the API).
|
|
73
|
+
* - `no-agent`: no agent is assigned to the Website channel.
|
|
74
|
+
* - `server-unavailable`: the API could not be reached; the SDK retries a few times.
|
|
75
|
+
* - `no-directories`: legacy name for `no-collections`.
|
|
76
|
+
*/
|
|
77
|
+
type ChatbotBlockReason = 'no-prompt' | 'no-collections' | 'no-directories' | 'ai-unavailable' | 'no-credits' | 'no-agent' | 'server-unavailable' | null;
|
|
68
78
|
interface SdkConfigResponse {
|
|
69
79
|
agentId: string;
|
|
70
80
|
agentName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,17 @@ interface ChatMessage {
|
|
|
64
64
|
content: string;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Why the chatbot cannot answer, or `null` when it can. The widget stays hidden
|
|
69
|
+
* while this is set.
|
|
70
|
+
* - `no-prompt`, `no-collections`: the agent is not set up yet (from the API).
|
|
71
|
+
* - `ai-unavailable`: the platform's AI models are not configured (from the API).
|
|
72
|
+
* - `no-credits`: the workspace has used its AI token budget (from the API).
|
|
73
|
+
* - `no-agent`: no agent is assigned to the Website channel.
|
|
74
|
+
* - `server-unavailable`: the API could not be reached; the SDK retries a few times.
|
|
75
|
+
* - `no-directories`: legacy name for `no-collections`.
|
|
76
|
+
*/
|
|
77
|
+
type ChatbotBlockReason = 'no-prompt' | 'no-collections' | 'no-directories' | 'ai-unavailable' | 'no-credits' | 'no-agent' | 'server-unavailable' | null;
|
|
68
78
|
interface SdkConfigResponse {
|
|
69
79
|
agentId: string;
|
|
70
80
|
agentName: string;
|