-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters