1 | const EVENTS = {
|
2 | CONNECTION_FAILED: "ChatRequestFail",
|
3 | CONNECTED: "ChatRequestSuccess",
|
4 | SESSION_CREATED: "ChatEstablished",
|
5 | QUEUE_POSITION_CHANGED: "QueueUpdate",
|
6 | AGENT_TYPING: "AgentTyping",
|
7 | AGENT_NOT_TYPING: "AgentNotTyping",
|
8 | NEW_MESSAGE: "ChatMessage",
|
9 | ENDED: "ChatEnded",
|
10 | ERROR: "ChatError"
|
11 | };
|
12 |
|
13 | const EVENTS_DESCRIPTIONS = [{
|
14 | code: EVENTS.CONNECTION_FAILED,
|
15 | description: "Connection with Live Agent API failed"
|
16 | }, {
|
17 | code: EVENTS.CONNECTED,
|
18 | description: "Connection with Live Agent API was successful"
|
19 | }, {
|
20 | code: EVENTS.SESSION_CREATED,
|
21 | description: "Live Agent API user session created successfully"
|
22 | }, {
|
23 | code: EVENTS.QUEUE_POSITION_CHANGED,
|
24 | description: "Client queue position changed"
|
25 | }, {
|
26 | code: EVENTS.AGENT_NOT_TYPING,
|
27 | description: "Human agent is not typing right now"
|
28 | }, {
|
29 | code: EVENTS.AGENT_TYPING,
|
30 | description: "Human agent is typing"
|
31 | }, {
|
32 | code: EVENTS.NEW_MESSAGE,
|
33 | description: "Human agent sent a new message"
|
34 | }, {
|
35 | code: EVENTS.ENDED,
|
36 | description: "Human agent ended the session"
|
37 | }, {
|
38 | code: EVENTS.ERROR,
|
39 | description: "System Error"
|
40 | }];
|
41 |
|
42 | module.exports = { EVENTS, EVENTS_DESCRIPTIONS }; |
\ | No newline at end of file |