-
Notifications
You must be signed in to change notification settings - Fork 13k
chore: Adds deprecation warning on livechat:addMonitor with new endpoint to replace it
#37061
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 all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7b20fa8
chore: adds deprecation warning to livechat:addMonitor
lucas-a-pelegrino d30f6dc
chore: adds new endpoint for adding monitors
lucas-a-pelegrino 34f96d7
tests: updates tests to use monitors.save endpoint
lucas-a-pelegrino 28ce1bf
chore: updates client to use monitors.save endpoint instead of the de…
lucas-a-pelegrino ec6ff33
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into chor…
lucas-a-pelegrino 673eebd
docs: adds changeset
lucas-a-pelegrino 22a7719
fix: lint error
lucas-a-pelegrino a927186
Merge branch 'chore/v7/CTZ-74' of github.com:RocketChat/Rocket.Chat i…
lucas-a-pelegrino 4c4ab4b
fix: import order
lucas-a-pelegrino 85d7a42
tests: updates createMonitor helper
lucas-a-pelegrino b8a4520
tests: fixes createMonitor helper url
lucas-a-pelegrino 4b63861
chore: adds i18n for the error-adding-monitor message
lucas-a-pelegrino 368d6ea
fix: merge conflicts
lucas-a-pelegrino cb5d823
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into chor…
lucas-a-pelegrino a5ffac4
chore: adds improvements to LivechatEnterprise.addMonitor() function …
lucas-a-pelegrino 4dc4eea
chore: fix wrong message assertion on integration test
lucas-a-pelegrino 497677f
chore: renames livechat/monitors.save to livechat/monitors.create
lucas-a-pelegrino b0fd14a
chore: renames leftovers from monitors.save action suffix
lucas-a-pelegrino 7b08a37
Merge branch 'develop' into chore/v7/CTZ-74
kodiakhq[bot] 4049425
Merge branch 'develop' into chore/v7/CTZ-74
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
Some comments aren't visible on the classic Files Changed page.
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,6 @@ | ||
| --- | ||
| "@rocket.chat/meteor": patch | ||
| "@rocket.chat/rest-typings": patch | ||
| --- | ||
|
|
||
| Adds deprecation warning on `livechat:addMonitor` with new endpoint replacing it; `livechat/monitors.create` |
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
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,30 +1,22 @@ | ||
| import { parseMeteorResponse } from '../parseMeteorResponse'; | ||
| import type { BaseTest } from '../test'; | ||
|
|
||
| const removeMonitor = async (api: BaseTest['api'], id: string) => | ||
| api.post('/method.call/livechat:removeMonitor', { | ||
| message: JSON.stringify({ msg: 'method', id: '33', method: 'livechat:removeMonitor', params: [id] }), | ||
| }); | ||
|
|
||
| export const createMonitor = async (api: BaseTest['api'], id: string) => { | ||
| const response = await api.post('/method.call/livechat:addMonitor', { | ||
| message: JSON.stringify({ | ||
| msg: 'method', | ||
| id: '17', | ||
| method: 'livechat:addMonitor', | ||
| params: [id], | ||
| }), | ||
| }); | ||
| export const createMonitor = async (api: BaseTest['api'], username: string) => { | ||
| const response = await api.post('/livechat/monitors.create', { username }); | ||
|
|
||
| if (response.status() !== 200) { | ||
| throw new Error(`Failed to create monitor [http status: ${response.status()}]`); | ||
| } | ||
|
|
||
| const monitor = await parseMeteorResponse<{ _id: string; username: string }>(response); | ||
| const data = await response.json(); | ||
|
|
||
| return { | ||
| response, | ||
| data: monitor, | ||
| delete: async () => removeMonitor(api, monitor._id), | ||
| data, | ||
| delete: async () => removeMonitor(api, data.username), | ||
| }; | ||
| }; |
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
Oops, something went wrong.
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.