From a96a2ae9d1c9e1d7160203670a03957e642e382a Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Wed, 2 Oct 2024 00:12:18 +0530 Subject: [PATCH] chore!: remove livechat:getCustomFields method (#33371) Signed-off-by: Abhinav Kumar Co-authored-by: Guilherme Gazzo --- .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..d8bcfaf3e1a6 --- /dev/null +++ b/.changeset/tender-readers-run.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': major +--- + +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 0405d6fb6609..38462ef56c84 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(); - }, -});