Skip to content

Commit e7687f5

Browse files
committed
chore: annotate orphan Meteor methods with @deprecated JSDoc
Adds a JSDoc `@deprecated` block above every Meteor.methods({...}) entry that the audit flagged as an orphan (no caller found in the repository). The message also explains the rationale — these methods remain registered for external DDP consumers (mobile SDK, custom integrations) but should not be picked up as new dependencies inside the monorepo. 110 entries annotated across 101 files. 2 entries already had a `@deprecated` block from earlier and were left untouched. scripts/add-orphan-jsdoc.mjs reads docs/ddp-audit.json and walks every `Meteor.methods({...})` body (skipping the `declare module '@rocket.chat/ddp-client'` interface blocks above) so the comment lands on the implementation, not the type augmentation.
1 parent 9e01720 commit e7687f5

102 files changed

Lines changed: 511 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/meteor/app/authorization/server/streamer/permissions/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export const permissionsGetMethod = async (
3232
};
3333

3434
Meteor.methods<ServerMethods>({
35+
/**
36+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
37+
*/
3538
async 'permissions/get'(updatedAt?: Date) {
3639
methodDeprecationLogger.method('permissions/get', '9.0.0', []);
3740
check(updatedAt, Match.Maybe(Date));

apps/meteor/app/autotranslate/server/methods/saveSettings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ declare module '@rocket.chat/ddp-client' {
1212
}
1313

1414
Meteor.methods<ServerMethods>({
15+
/**
16+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
17+
*/
1518
async 'autoTranslate.saveSettings'(rid, field, value, options) {
1619
methodDeprecationLogger.method('autoTranslate.saveSettings', '9.0.0', []);
1720
const userId = Meteor.userId();

apps/meteor/app/bot-helpers/server/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ declare module '@rocket.chat/ddp-client' {
205205
}
206206

207207
Meteor.methods<ServerMethods>({
208+
/**
209+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
210+
*/
208211
async botRequest(...args) {
209212
methodDeprecationLogger.method('botRequest', '9.0.0', []);
210213
const userID = Meteor.userId();

apps/meteor/app/cloud/server/methods.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ Meteor.methods<ServerMethods>({
7575

7676
return Buffer.from(JSON.stringify(await buildWorkspaceRegistrationData(undefined))).toString('base64');
7777
},
78+
/**
79+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
80+
*/
7881
async 'cloud:registerWorkspace'() {
7982
methodDeprecationLogger.method('cloud:registerWorkspace', '9.0.0', []);
8083
const uid = Meteor.userId();
@@ -139,6 +142,9 @@ Meteor.methods<ServerMethods>({
139142
return connectWorkspace(token);
140143
},
141144
// Currently unused but will link local account to Rocket.Chat Cloud account.
145+
/**
146+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
147+
*/
142148
async 'cloud:getOAuthAuthorizationUrl'() {
143149
methodDeprecationLogger.method('cloud:getOAuthAuthorizationUrl', '9.0.0', []);
144150
const uid = Meteor.userId();
@@ -156,6 +162,9 @@ Meteor.methods<ServerMethods>({
156162

157163
return getOAuthAuthorizationUrl();
158164
},
165+
/**
166+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
167+
*/
159168
async 'cloud:finishOAuthAuthorization'(code, state) {
160169
methodDeprecationLogger.method('cloud:finishOAuthAuthorization', '9.0.0', []);
161170
check(code, String);
@@ -177,6 +186,9 @@ Meteor.methods<ServerMethods>({
177186

178187
return finishOAuthAuthorization(code, state);
179188
},
189+
/**
190+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
191+
*/
180192
async 'cloud:checkUserLoggedIn'() {
181193
methodDeprecationLogger.method('cloud:checkUserLoggedIn', '9.0.0', []);
182194
const uid = Meteor.userId();
@@ -194,6 +206,9 @@ Meteor.methods<ServerMethods>({
194206

195207
return checkUserHasCloudLogin(uid);
196208
},
209+
/**
210+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
211+
*/
197212
async 'cloud:logout'() {
198213
methodDeprecationLogger.method('cloud:logout', '9.0.0', []);
199214
const uid = Meteor.userId();

apps/meteor/app/crowd/server/methods.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ declare module '@rocket.chat/ddp-client' {
1717
}
1818

1919
Meteor.methods<ServerMethods>({
20+
/**
21+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
22+
*/
2023
async crowd_test_connection() {
2124
methodDeprecationLogger.method('crowd_test_connection', '9.0.0', []);
2225
const user = await Meteor.userAsync();
@@ -52,6 +55,9 @@ Meteor.methods<ServerMethods>({
5255
throw new Meteor.Error('Invalid connection details', '', { method: 'crowd_test_connection' });
5356
}
5457
},
58+
/**
59+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
60+
*/
5561
async crowd_sync_users() {
5662
methodDeprecationLogger.method('crowd_sync_users', '9.0.0', []);
5763
const user = await Meteor.userAsync();

apps/meteor/app/custom-sounds/server/methods/insertOrUpdateSound.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ declare module '@rocket.chat/ddp-client' {
2727
}
2828

2929
Meteor.methods<ServerMethods>({
30+
/**
31+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
32+
*/
3033
async insertOrUpdateSound(soundData) {
3134
methodDeprecationLogger.method('insertOrUpdateSound', '9.0.0', ['/v1/custom-sounds.create', '/v1/custom-sounds.update']);
3235
if (!this.userId || !(await hasPermissionAsync(this.userId, 'manage-sounds'))) {

apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ declare module '@rocket.chat/ddp-client' {
1515
}
1616

1717
Meteor.methods<ServerMethods>({
18+
/**
19+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
20+
*/
1821
async uploadCustomSound(binaryContent, contentType, soundData) {
1922
methodDeprecationLogger.method('uploadCustomSound', '9.0.0', ['/v1/custom-sounds.create', '/v1/custom-sounds.update']);
2023
if (!this.userId || !(await hasPermissionAsync(this.userId, 'manage-sounds'))) {

apps/meteor/app/discussion/server/methods/createDiscussion.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ Meteor.methods<ServerMethods>({
247247
* @param {string[]} users - users to be added
248248
* @param {boolean} encrypted - if the discussion's e2e encryption should be enabled.
249249
*/
250+
/**
251+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
252+
*/
250253
async createDiscussion({ prid, pmid, t_name: discussionName, reply, users, encrypted }: CreateDiscussionProperties) {
251254
methodDeprecationLogger.method('createDiscussion', '9.0.0', '/v1/rooms.createDiscussion');
252255
check(prid, Match.Maybe(String));

apps/meteor/app/e2e/server/methods/fetchMyKeys.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ declare module '@rocket.chat/ddp-client' {
1212
}
1313

1414
Meteor.methods<ServerMethods>({
15+
/**
16+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
17+
*/
1518
async 'e2e.fetchMyKeys'() {
1619
methodDeprecationLogger.method('e2e.fetchMyKeys', '9.0.0', '/v1/e2e.fetchMyKeys');
1720
const userId = Meteor.userId();

apps/meteor/app/e2e/server/methods/setUserPublicAndPrivateKeys.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export const setUserPublicAndPrivateKeysMethod = async (
4242
};
4343

4444
Meteor.methods<ServerMethods>({
45+
/**
46+
* @deprecated Scheduled for removal in 9.0.0. No caller found in this repository — kept for external DDP clients only.
47+
*/
4548
async 'e2e.setUserPublicAndPrivateKeys'(keyPair) {
4649
methodDeprecationLogger.method('e2e.setUserPublicAndPrivateKeys', '9.0.0', '/v1/e2e.setUserPublicAndPrivateKeys');
4750
const userId = Meteor.userId();

0 commit comments

Comments
 (0)