Skip to content

Commit 38933e9

Browse files
committed
docs: Improve events documentation
1 parent 9d78b47 commit 38933e9

File tree

1 file changed

+34
-18
lines changed

1 file changed

+34
-18
lines changed

docs/api/events.md

+34-18
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Events emitted by the chatbot provide the following **details** accessible via `
4545

4646
| Name | Type | Description |
4747
|-----------|----------|-----------------------------------------------------------------|
48-
| id | `string` | Uniquely identifies the chatbot the event is emitted from. |
48+
| botId | `string` | Uniquely identifies the chatbot the event is emitted from. |
4949
| currPath | `string` | Represents the current path of the user. |
5050
| prevPath | `string` | Represents the previous path of the user. |
5151

@@ -61,7 +61,8 @@ Below is a detailed description of each event and how to use them.
6161
Emitted when the chatbot changes its conversation path.
6262

6363
#### Note
64-
Requires `settings.event.RcbChangePath` to be set to true.
64+
- Requires `settings.event.RcbChangePath` to be set to true.
65+
- Event is **preventable** with `event.preventDefault()`.
6566

6667
#### Data
6768
| Name | Type | Description |
@@ -99,7 +100,8 @@ const MyComponent = () => {
99100
Emitted when a chunk of a streamed message is received.
100101

101102
#### Note
102-
Requires `settings.event.RcbChunkStreamMessage` to be set to true.
103+
- Requires `settings.event.RcbChunkStreamMessage` to be set to true.
104+
- Event is **preventable** with `event.preventDefault()`.
103105

104106
#### Data
105107
| Name | Type | Description |
@@ -135,7 +137,8 @@ const MyComponent = () => {
135137
Emitted when a toast message is dismissed.
136138

137139
#### Note
138-
Requires `settings.event.RcbDismissToast` to be set to true.
140+
- Requires `settings.event.RcbDismissToast` to be set to true.
141+
- Event is **preventable** with `event.preventDefault()`.
139142

140143
#### Data
141144
| Name | Type | Description |
@@ -171,7 +174,8 @@ const MyComponent = () => {
171174
Emitted when the chat history is loaded.
172175

173176
#### Note
174-
Requires `settings.event.RcbLoadChatHistory` to be set to true.
177+
- Requires `settings.event.RcbLoadChatHistory` to be set to true.
178+
- Event is **preventable** with `event.preventDefault()`.
175179

176180
#### Data
177181
None
@@ -205,7 +209,7 @@ const MyComponent = () => {
205209
Emitted after a message is injected into the chat.
206210

207211
#### Note
208-
Requires `settings.event.RcbPostInjectMessage` to be set to true.
212+
- Requires `settings.event.RcbPostInjectMessage` to be set to true.
209213

210214
#### Data
211215
| Name | Type | Description |
@@ -241,7 +245,8 @@ const MyComponent = () => {
241245
Emitted before a message is injected into the chat.
242246

243247
#### Note
244-
Requires `settings.event.RcbPreInjectMessage` to be set to true.
248+
- Requires `settings.event.RcbPreInjectMessage` to be set to true.
249+
- Event is **preventable** with `event.preventDefault()`.
245250

246251
#### Data
247252
| Name | Type | Description |
@@ -277,7 +282,8 @@ const MyComponent = () => {
277282
Emitted when a message is removed from the chat.
278283

279284
#### Note
280-
Requires `settings.event.RcbRemoveMessage` to be set to true.
285+
- Requires `settings.event.RcbRemoveMessage` to be set to true.
286+
- Event is **preventable** with `event.preventDefault()`.
281287

282288
#### Data
283289
| Name | Type | Description |
@@ -313,7 +319,8 @@ const MyComponent = () => {
313319
Emitted when a toast message is displayed.
314320

315321
#### Note
316-
Requires `settings.event.RcbShowToast` to be set to true.
322+
- Requires `settings.event.RcbShowToast` to be set to true.
323+
- Event is **preventable** with `event.preventDefault()`.
317324

318325
#### Data
319326
| Name | Type | Description |
@@ -349,7 +356,8 @@ const MyComponent = () => {
349356
Emitted when the chatbot starts streaming a message.
350357

351358
#### Note
352-
Requires `settings.event.RcbStartStreamMessage` to be set to true.
359+
- Requires `settings.event.RcbStartStreamMessage` to be set to true.
360+
- Event is **preventable** with `event.preventDefault()`.
353361

354362
#### Data
355363
| Name | Type | Description |
@@ -385,7 +393,8 @@ const MyComponent = () => {
385393
Emitted when the chatbot stops streaming a message.
386394

387395
#### Note
388-
Requires `settings.event.RcbStopStreamMessage` to be set to true.
396+
- Requires `settings.event.RcbStopStreamMessage` to be set to true.
397+
- Event is **preventable** with `event.preventDefault()`.
389398

390399
#### Data
391400
| Name | Type | Description |
@@ -421,7 +430,8 @@ const MyComponent = () => {
421430
Emitted when the audio is toggled on or off.
422431

423432
#### Note
424-
Requires `settings.event.RcbToggleAudio` to be set to true.
433+
- Requires `settings.event.RcbToggleAudio` to be set to true.
434+
- Event is **preventable** with `event.preventDefault()`.
425435

426436
#### Data
427437
| Name | Type | Description |
@@ -458,7 +468,8 @@ const MyComponent = () => {
458468
Emitted when the chat window is toggled open or closed.
459469

460470
#### Note
461-
Requires `settings.event.RcbToggleChatWindow` to be set to true.
471+
- Requires `settings.event.RcbToggleChatWindow` to be set to true.
472+
- Event is **preventable** with `event.preventDefault()`.
462473

463474
#### Data
464475
| Name | Type | Description |
@@ -495,7 +506,8 @@ const MyComponent = () => {
495506
Emitted when notifications are toggled on or off.
496507

497508
#### Note
498-
Requires `settings.event.RcbToggleNotifications` to be set to true.
509+
- Requires `settings.event.RcbToggleNotifications` to be set to true.
510+
- Event is **preventable** with `event.preventDefault()`.
499511

500512
#### Data
501513
| Name | Type | Description |
@@ -532,7 +544,8 @@ const MyComponent = () => {
532544
Emitted when the voice feature is toggled on or off.
533545

534546
#### Note
535-
Requires `settings.event.RcbToggleVoice` to be set to true.
547+
- Requires `settings.event.RcbToggleVoice` to be set to true.
548+
- Event is **preventable** with `event.preventDefault()`.
536549

537550
#### Data
538551
| Name | Type | Description |
@@ -569,7 +582,8 @@ const MyComponent = () => {
569582
Emitted when a user submits text in the chat.
570583

571584
#### Note
572-
Requires `settings.event.RcbUserSubmitText` to be set to true.
585+
- Requires `settings.event.RcbUserSubmitText` to be set to true.
586+
- Event is **preventable** with `event.preventDefault()`.
573587

574588
#### Data
575589
| Name | Type | Description |
@@ -605,7 +619,8 @@ const MyComponent = () => {
605619
Emitted when a user uploads a file.
606620

607621
#### Note
608-
Requires `settings.event.RcbUserUploadFile` to be set to true.
622+
- Requires `settings.event.RcbUserUploadFile` to be set to true.
623+
- Event is **preventable** with `event.preventDefault()`.
609624

610625
#### Data
611626
| Name | Type | Description |
@@ -641,7 +656,8 @@ const MyComponent = () => {
641656
Emitted when a user uploads a file.
642657

643658
#### Note
644-
Requires `settings.event.RcbTextAreaChangeValue` to be set to true.
659+
- Requires `settings.event.RcbTextAreaChangeValue` to be set to true.
660+
- Event is **preventable** with `event.preventDefault()`.
645661

646662
#### Data
647663
| Name | Type | Description |

0 commit comments

Comments
 (0)