From c89a926aa9a83d53794f6c5f9a389d1d1f9e1c92 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 26 Sep 2024 14:29:21 +0530 Subject: [PATCH 1/2] chore!: removed deprecated livechat:getCustomFields method Signed-off-by: Abhinav Kumar --- .changeset/tender-readers-run.md | 5 +++++ apps/meteor/app/livechat/server/index.ts | 1 - .../server/methods/getCustomFields.ts | 20 ------------------- 3 files changed, 5 insertions(+), 21 deletions(-) create mode 100644 .changeset/tender-readers-run.md delete mode 100644 apps/meteor/app/livechat/server/methods/getCustomFields.ts diff --git a/.changeset/tender-readers-run.md b/.changeset/tender-readers-run.md new file mode 100644 index 000000000000..55d08d7b6c85 --- /dev/null +++ b/.changeset/tender-readers-run.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +This adjustment removes deprecated `livechat:getCustomFields` method. Moving forward use the `livechat/custom-fields` endpoint. diff --git a/apps/meteor/app/livechat/server/index.ts b/apps/meteor/app/livechat/server/index.ts index 37a7705136ec..1f3f7a061c83 100644 --- a/apps/meteor/app/livechat/server/index.ts +++ b/apps/meteor/app/livechat/server/index.ts @@ -20,7 +20,6 @@ import './hooks/afterSaveOmnichannelMessage'; import './methods/changeLivechatStatus'; import './methods/closeRoom'; import './methods/discardTranscript'; -import './methods/getCustomFields'; import './methods/getAgentData'; import './methods/getAgentOverviewData'; import './methods/getAnalyticsChartData'; diff --git a/apps/meteor/app/livechat/server/methods/getCustomFields.ts b/apps/meteor/app/livechat/server/methods/getCustomFields.ts deleted file mode 100644 index 36dca08f0859..000000000000 --- a/apps/meteor/app/livechat/server/methods/getCustomFields.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { ILivechatCustomField } from '@rocket.chat/core-typings'; -import type { ServerMethods } from '@rocket.chat/ddp-client'; -import { LivechatCustomField } from '@rocket.chat/models'; -import { Meteor } from 'meteor/meteor'; - -import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; - -declare module '@rocket.chat/ddp-client' { - // eslint-disable-next-line @typescript-eslint/naming-convention - interface ServerMethods { - 'livechat:getCustomFields'(): ILivechatCustomField[]; - } -} - -Meteor.methods({ - async 'livechat:getCustomFields'() { - methodDeprecationLogger.method('livechat:getCustomFields', '7.0.0'); - return LivechatCustomField.find().toArray(); - }, -}); From 43e704e431b0760028873e6f9b749979fea815f5 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 30 Sep 2024 21:21:01 -0400 Subject: [PATCH 2/2] Update .changeset/tender-readers-run.md --- .changeset/tender-readers-run.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/tender-readers-run.md b/.changeset/tender-readers-run.md index 55d08d7b6c85..d8bcfaf3e1a6 100644 --- a/.changeset/tender-readers-run.md +++ b/.changeset/tender-readers-run.md @@ -1,5 +1,5 @@ --- -'@rocket.chat/meteor': patch +'@rocket.chat/meteor': major --- This adjustment removes deprecated `livechat:getCustomFields` method. Moving forward use the `livechat/custom-fields` endpoint.