-
Notifications
You must be signed in to change notification settings - Fork 13.8k
feat: Livechat department removed/disabled events for apps #35280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5d2f3aa
department events
KevLehman 630cdc8
ts
KevLehman 4c6c80c
fix event
KevLehman 111e8b1
Create big-tips-greet.md
KevLehman 6e6f96a
Apply suggestions from code review
KevLehman 8a83708
Merge branch 'develop' into feat/department-app-events
KevLehman d567042
doug
KevLehman e68364d
Merge branch 'develop' into feat/department-app-events
sampaiodiego c4b83aa
Merge branch 'develop' into feat/department-app-events
scuciatto 4aebc74
Merge branch 'develop' into feat/department-app-events
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,7 @@ | ||
| --- | ||
| "@rocket.chat/meteor": minor | ||
| "@rocket.chat/apps-engine": minor | ||
| "@rocket.chat/apps": minor | ||
| --- | ||
|
|
||
| Allows apps to react to department status changes. |
This file contains hidden or 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 hidden or 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
5 changes: 5 additions & 0 deletions
5
packages/apps-engine/src/definition/livechat/ILivechatEventContext.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| import type { IUser } from '../users'; | ||
| import type { IDepartment } from './IDepartment'; | ||
| import type { ILivechatRoom } from './ILivechatRoom'; | ||
|
|
||
| export interface ILivechatEventContext { | ||
| agent: IUser; | ||
| room: ILivechatRoom; | ||
| } | ||
|
|
||
| export interface ILivechatDepartmentStatusContext { | ||
| department: IDepartment; | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
packages/apps-engine/src/definition/livechat/IPostLivechatDepartmentDisabled.ts
This file contains hidden or 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,25 @@ | ||
| import type { IHttp, IModify, IPersistence, IRead } from '../accessors'; | ||
| import { AppMethod } from '../metadata'; | ||
| import type { ILivechatDepartmentStatusContext } from './ILivechatEventContext'; | ||
|
|
||
| /** | ||
| * Handler called after the disablement of a livechat department. | ||
| */ | ||
| export interface IPostLivechatDepartmentDisabled { | ||
| /** | ||
| * Handler called *after* the disablement of a livechat department. | ||
| * | ||
| * @param data the livechat context data which contains the department disabled | ||
| * @param read An accessor to the environment | ||
| * @param http An accessor to the outside world | ||
| * @param persis An accessor to the App's persistence | ||
| * @param modify An accessor to the modifier | ||
| */ | ||
| [AppMethod.EXECUTE_POST_LIVECHAT_DEPARTMENT_DISABLED]( | ||
| context: ILivechatDepartmentStatusContext, | ||
| read: IRead, | ||
| http: IHttp, | ||
| persis: IPersistence, | ||
| modify?: IModify, | ||
| ): Promise<void>; | ||
| } |
25 changes: 25 additions & 0 deletions
25
packages/apps-engine/src/definition/livechat/IPostLivechatDepartmentRemoved.ts
This file contains hidden or 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,25 @@ | ||
| import type { IHttp, IModify, IPersistence, IRead } from '../accessors'; | ||
| import { AppMethod } from '../metadata'; | ||
| import type { ILivechatDepartmentStatusContext } from './ILivechatEventContext'; | ||
|
|
||
| /** | ||
| * Handler called after the removal of a livechat department. | ||
| */ | ||
| export interface IPostLivechatDepartmentRemoved { | ||
| /** | ||
| * Handler called *after* the removal of a livechat department. | ||
| * | ||
| * @param data the livechat context data which contains the department removed | ||
| * @param read An accessor to the environment | ||
| * @param http An accessor to the outside world | ||
| * @param persis An accessor to the App's persistence | ||
| * @param modify An accessor to the modifier | ||
| */ | ||
| [AppMethod.EXECUTE_POST_LIVECHAT_DEPARTMENT_REMOVED]( | ||
| context: ILivechatDepartmentStatusContext, | ||
| read: IRead, | ||
| http: IHttp, | ||
| persis: IPersistence, | ||
| modify?: IModify, | ||
| ): Promise<void>; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.