-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebhookTypes.ts
68 lines (67 loc) · 1.7 KB
/
WebhookTypes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import type * as ClientAPI from './types'
export type Events = {
/**
* @protected - Only used internally.
* Used when triggering a unfurl completion
*/
'unfurl:resolve': {
name: 'unfurl:resolve'
messageId: string
}
/**
* Event received when a user is trying to
* authenticate and webhook authentication is set.
*/
'user:authenticate': {
token: string
visitorId: string
name: 'user:authenticate'
attributes?: Array<ClientAPI.VisitorAttributeCategoryInput>
}
/**
* Triggered when a visitor starts a new conversation.
*/
'visitor:new-conversation': {
name: 'visitor:new-conversation'
conversation: ClientAPI.Conversation
}
/**
* Triggered when a visitor posts a new message.
*/
'visitor:message': {
name: 'visitor:message'
message: ClientAPI.ConversationItem
}
/**
* Triggered when a operator answers a visitor message.
*/
'operator:message': {
name: 'operator:message'
message: ClientAPI.ConversationItem
}
/**
* Triggered when an operator closes a conversation.
*/
'operator:close-conversation': {
name: 'operator:close-conversation'
conversation: ClientAPI.Conversation
}
/**
* Triggered when an operator moves a conversation to a new inbox.
*/
'operator:move-conversation': {
name: 'operator:move-conversation'
from: ClientAPI.Inbox
to: ClientAPI.Inbox
conversation: ClientAPI.Conversation
}
/**
* Triggered when a visitor clicks a button that has a callback.
*/
'visitor:clicked-button': {
name: 'visitor:clicked-button'
conversation: ClientAPI.Conversation
message: ClientAPI.ConversationItem
button: ClientAPI.ConversationItem['buttons'][0]
}
}