chore: Enforce stricter TypeScript directives (#37709)

Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz>
pull/37723/head
Tasso Evangelista 5 months ago committed by GitHub
parent b802430fbf
commit d77894ce26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      apps/meteor/app/api/server/router.ts
  2. 4
      apps/meteor/app/api/server/v1/integrations.ts
  3. 2
      apps/meteor/app/apple/server/AppleCustomOAuth.ts
  4. 2
      apps/meteor/app/file-upload/server/config/GridFS.ts
  5. 2
      apps/meteor/app/importer-csv/server/CsvImporter.ts
  6. 2
      apps/meteor/app/importer-omnichannel-contacts/server/ContactImporter.ts
  7. 2
      apps/meteor/app/importer-pending-avatars/server/PendingAvatarImporter.ts
  8. 2
      apps/meteor/app/importer-pending-files/server/PendingFileImporter.ts
  9. 2
      apps/meteor/app/importer-slack-users/server/SlackUsersImporter.ts
  10. 2
      apps/meteor/app/importer-slack/server/SlackImporter.ts
  11. 4
      apps/meteor/app/importer/server/classes/converters/ContactConverter.ts
  12. 6
      apps/meteor/app/importer/server/classes/converters/MessageConverter.ts
  13. 4
      apps/meteor/app/importer/server/classes/converters/RoomConverter.ts
  14. 6
      apps/meteor/app/importer/server/classes/converters/UserConverter.ts
  15. 10
      apps/meteor/app/integrations/server/api/api.ts
  16. 2
      apps/meteor/app/livechat/server/roomAccessValidator.internalService.ts
  17. 2
      apps/meteor/app/notifications/server/lib/Presence.ts
  18. 2
      apps/meteor/app/search/server/search.internalService.ts
  19. 2
      apps/meteor/app/settings/server/CachedSettings.ts
  20. 2
      apps/meteor/app/utils/client/lib/RestApiClient.ts
  21. 2
      apps/meteor/client/cachedStores/RoomsCachedStore.ts
  22. 2
      apps/meteor/client/cachedStores/SubscriptionsCachedStore.ts
  23. 4
      apps/meteor/client/lib/lists/DiscussionsList.ts
  24. 2
      apps/meteor/client/lib/lists/FilesList.ts
  25. 2
      apps/meteor/client/lib/lists/ImagesList.ts
  26. 4
      apps/meteor/client/lib/lists/MessageList.ts
  27. 4
      apps/meteor/client/lib/lists/ThreadsList.ts
  28. 4
      apps/meteor/client/lib/rooms/roomCoordinator.tsx
  29. 6
      apps/meteor/client/lib/voip/EEVoipClient.ts
  30. 2
      apps/meteor/client/lib/voip/RemoteStream.ts
  31. 2
      apps/meteor/client/meteor/minimongo/ObserveHandle.ts
  32. 4
      apps/meteor/client/views/admin/subscription/surface/UiKitSubscriptionLicenseSurface.tsx
  33. 2
      apps/meteor/client/views/room/contextualBar/VideoConference/VideoConfList/VideoConfRecordList.ts
  34. 2
      apps/meteor/ee/app/license/server/license.internalService.ts
  35. 2
      apps/meteor/ee/app/livechat-enterprise/server/business-hour/Multiple.ts
  36. 2
      apps/meteor/ee/app/livechat-enterprise/server/services/omnichannel.internalService.ts
  37. 2
      apps/meteor/ee/app/settings/server/settings.internalService.ts
  38. 2
      apps/meteor/ee/server/apps/communication/endpoints/appLogsExportHandler.ts
  39. 8
      apps/meteor/ee/server/local-services/instance/service.ts
  40. 2
      apps/meteor/ee/server/local-services/voip-freeswitch/service.ts
  41. 6
      apps/meteor/ee/server/models/raw/CannedResponse.ts
  42. 25
      apps/meteor/ee/server/models/raw/LivechatDepartment.ts
  43. 2
      apps/meteor/ee/server/models/raw/LivechatDepartmentAgents.ts
  44. 16
      apps/meteor/ee/server/models/raw/LivechatInquiry.ts
  45. 64
      apps/meteor/ee/server/models/raw/LivechatRooms.ts
  46. 4
      apps/meteor/ee/server/models/raw/LivechatTag.ts
  47. 4
      apps/meteor/ee/server/models/raw/LivechatUnit.ts
  48. 2
      apps/meteor/ee/server/models/raw/LivechatUnitMonitors.ts
  49. 2
      apps/meteor/ee/server/models/raw/ReadReceipts.ts
  50. 2
      apps/meteor/ee/server/models/raw/ServiceLevelAgreements.ts
  51. 2
      apps/meteor/ee/server/models/raw/Users.ts
  52. 2
      apps/meteor/ee/tests/unit/server/airgappedRestrictions/airgappedRestrictions.spec.ts
  53. 2
      apps/meteor/ee/tests/unit/server/hooks/messages/BeforeSaveCannedResponse.tests.ts
  54. 2
      apps/meteor/lib/errors/InvalidCloudAnnouncementInteractionError.ts
  55. 2
      apps/meteor/lib/errors/InvalidCoreAppInteractionError.ts
  56. 2
      apps/meteor/server/database/utils.ts
  57. 1
      apps/meteor/server/lib/i18n.ts
  58. 4
      apps/meteor/server/lib/ldap/UserConverter.ts
  59. 4
      apps/meteor/server/modules/core-apps/cloudSubscriptionCommunication.module.ts
  60. 2
      apps/meteor/server/modules/streamer/streamer.module.ts
  61. 2
      apps/meteor/server/services/authorization/service.ts
  62. 2
      apps/meteor/server/services/messages/service.ts
  63. 2
      apps/meteor/server/services/meteor/service.ts
  64. 4
      apps/meteor/server/services/omnichannel/service.ts
  65. 2
      apps/meteor/server/services/settings/service.ts
  66. 2
      apps/meteor/server/services/voip-asterisk/connector/asterisk/ami/ACDQueue.ts
  67. 4
      apps/meteor/server/services/voip-asterisk/connector/asterisk/ami/ContinuousMonitor.ts
  68. 2
      apps/meteor/server/services/voip-asterisk/connector/asterisk/ami/PJSIPEndpoint.ts
  69. 2
      apps/meteor/server/ufs/ufs-local.ts
  70. 2
      apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  71. 2
      apps/meteor/tests/end-to-end/api/LDAP.ts
  72. 14
      apps/meteor/tests/end-to-end/api/roles.ts
  73. 11
      apps/meteor/tests/end-to-end/apps/video-conferences.ts
  74. 2
      apps/meteor/tests/unit/server/services/banner/service.tests.ts
  75. 2
      apps/uikit-playground/src/Components/Preview/Wrapper.tsx
  76. 30
      apps/uikit-playground/src/hooks/useHorizontalScroll.ts
  77. 2
      ee/apps/account-service/src/Account.ts
  78. 1
      ee/apps/account-service/tsconfig.json
  79. 6
      ee/apps/ddp-streamer/src/DDPStreamer.ts
  80. 2
      ee/apps/ddp-streamer/src/Streamer.ts
  81. 2
      ee/apps/ddp-streamer/src/configureServer.ts
  82. 2
      ee/apps/stream-hub-service/src/StreamHub.ts
  83. 2
      ee/packages/federation-matrix/src/FederationMatrix.ts
  84. 3
      ee/packages/license/package.json
  85. 2
      ee/packages/license/src/deprecated.ts
  86. 2
      ee/packages/license/src/license.ts
  87. 2
      ee/packages/license/src/pendingLicense.ts
  88. 4
      ee/packages/license/src/validation/validateLicenseUrl.ts
  89. 4
      ee/packages/media-calls/package.json
  90. 5
      ee/packages/media-calls/src/server/MediaCallServer.ts
  91. 2
      ee/packages/media-calls/src/sip/providers/BaseSipCall.ts
  92. 2
      ee/packages/media-calls/src/sip/providers/IncomingSipCall.ts
  93. 2
      ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts
  94. 8
      ee/packages/network-broker/src/index.ts
  95. 3
      ee/packages/omnichannel-services/package.json
  96. 4
      ee/packages/omnichannel-services/src/QueueWorker.ts
  97. 4
      ee/packages/presence/src/Presence.ts
  98. 10
      packages/agenda/src/Agenda.ts
  99. 3
      packages/base64/tsconfig.json
  100. 3
      packages/core-services/package.json
  101. Some files were not shown because too many files have changed in this diff Show More

@ -31,7 +31,7 @@ export class RocketChatAPIRouter<
[x: string]: unknown;
} = NonNullable<unknown>,
> extends Router<TBasePath, TOperations, APIActionHandler> {
protected convertActionToHandler(action: APIActionHandler): (c: HonoContext) => Promise<ResponseSchema<TypedOptions>> {
protected override convertActionToHandler(action: APIActionHandler): (c: HonoContext) => Promise<ResponseSchema<TypedOptions>> {
return async (c: HonoContext): Promise<ResponseSchema<TypedOptions>> => {
const { req, res } = c;
const queryParams = this.parseQueryParams(req);

@ -36,9 +36,9 @@ API.v1.addRoute(
return API.v1.success({ integration: await addOutgoingIntegration(this.userId, this.bodyParams as INewOutgoingIntegration) });
case 'webhook-incoming':
return API.v1.success({ integration: await addIncomingIntegration(this.userId, this.bodyParams as INewIncomingIntegration) });
default:
return API.v1.failure('Invalid integration type.');
}
return API.v1.failure('Invalid integration type.');
},
},
);

@ -5,7 +5,7 @@ import { CustomOAuth } from '../../custom-oauth/server/custom_oauth_server';
import { handleIdentityToken } from '../lib/handleIdentityToken';
export class AppleCustomOAuth extends CustomOAuth {
async getIdentity(_accessToken: string, query: Record<string, any>): Promise<any> {
override async getIdentity(_accessToken: string, query: Record<string, any>): Promise<any> {
const { id_token: identityToken, user: userStr = '' } = query;
let usrObj = {} as any;

@ -28,7 +28,7 @@ class ExtractRange extends stream.Transform {
this.bytes_read = 0;
}
_transform(chunk: any, _enc: BufferEncoding, cb: TransformCallback) {
override _transform(chunk: any, _enc: BufferEncoding, cb: TransformCallback) {
if (this.bytes_read > this.stop) {
// done reading
this.end();

@ -19,7 +19,7 @@ export class CsvImporter extends Importer {
this.csvParser = parse;
}
async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
override async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
this.logger.debug('start preparing import operation');
await this.converter.clearImportData();

@ -18,7 +18,7 @@ export class ContactImporter extends Importer {
this.csvParser = parse;
}
async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
override async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
this.logger.debug('start preparing import operation');
await this.converter.clearImportData();

@ -33,7 +33,7 @@ export class PendingAvatarImporter extends Importer {
return fileCount;
}
async startImport(importSelection: IImporterShortSelection): Promise<ImporterProgress> {
override async startImport(importSelection: IImporterShortSelection): Promise<ImporterProgress> {
const pendingFileUserList = Users.findAllUsersWithPendingAvatar();
try {
for await (const user of pendingFileUserList) {

@ -43,7 +43,7 @@ export class PendingFileImporter extends Importer {
return fileCount;
}
async startImport(importSelection: IImporterShortSelection): Promise<ImporterProgress> {
override async startImport(importSelection: IImporterShortSelection): Promise<ImporterProgress> {
const downloadedFileIds: string[] = [];
const maxFileCount = 10;
const maxFileSize = 1024 * 1024 * 500;

@ -20,7 +20,7 @@ export class SlackUsersImporter extends Importer {
this.csvParser = parse;
}
async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
override async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
this.logger.debug('start preparing import operation');
await this.converter.clearImportData();

@ -267,7 +267,7 @@ export class SlackImporter extends Importer {
return data.length;
}
async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
override async prepareUsingLocalFile(fullFilePath: string): Promise<ImporterProgress> {
this.logger.debug('start preparing import operation');
await this.converter.clearImportData();

@ -16,7 +16,7 @@ export class ContactConverter extends RecordConverter<IImportContactRecord> {
return validateCustomFields(allowedCustomFields, customFields, { ignoreAdditionalFields: true });
}
protected async convertRecord(record: IImportContactRecord): Promise<boolean> {
protected override async convertRecord(record: IImportContactRecord): Promise<boolean> {
const { data } = record;
await createContact({
@ -36,7 +36,7 @@ export class ContactConverter extends RecordConverter<IImportContactRecord> {
return LivechatVisitors.getNextVisitorUsername();
}
protected getDataType(): 'contact' {
protected override getDataType(): 'contact' {
return 'contact';
}
}

@ -27,7 +27,7 @@ type IMessageReactions = Record<string, IMessageReaction>;
export class MessageConverter extends RecordConverter<IImportMessageRecord> {
private rids: string[] = [];
async convertData({ afterImportAllMessagesFn, ...callbacks }: MessageConversionCallbacks = {}): Promise<void> {
override async convertData({ afterImportAllMessagesFn, ...callbacks }: MessageConversionCallbacks = {}): Promise<void> {
this.rids = [];
await super.convertData(callbacks);
@ -76,7 +76,7 @@ export class MessageConverter extends RecordConverter<IImportMessageRecord> {
}
}
protected async convertRecord(record: IImportMessageRecord): Promise<boolean> {
protected override async convertRecord(record: IImportMessageRecord): Promise<boolean> {
await this.insertMessage(record.data);
return true;
}
@ -257,7 +257,7 @@ export class MessageConverter extends RecordConverter<IImportMessageRecord> {
}
}
protected getDataType(): 'message' {
protected override getDataType(): 'message' {
return 'message';
}
}

@ -20,7 +20,7 @@ export class RoomConverter extends RecordConverter<IImportChannelRecord> {
return this.convertData(callbacks);
}
protected async convertRecord(record: IImportChannelRecord): Promise<boolean> {
protected override async convertRecord(record: IImportChannelRecord): Promise<boolean> {
const { data } = record;
if (!data.name && data.t !== 'd') {
@ -193,7 +193,7 @@ export class RoomConverter extends RecordConverter<IImportChannelRecord> {
throw new Error('importer-channel-invalid-creator');
}
protected getDataType(): 'channel' {
protected override getDataType(): 'channel' {
return 'channel';
}
}

@ -32,7 +32,7 @@ export class UserConverter extends RecordConverter<IImportUserRecord, UserConver
private updatedIds = new Set<IUser['_id']>();
protected async convertRecord(record: IImportUserRecord): Promise<boolean | undefined> {
protected override async convertRecord(record: IImportUserRecord): Promise<boolean | undefined> {
const { data, _id } = record;
data.importIds = data.importIds.filter((item) => item);
@ -55,7 +55,7 @@ export class UserConverter extends RecordConverter<IImportUserRecord, UserConver
return !existingUser;
}
async convertData(userCallbacks: IConversionCallbacks = {}): Promise<void> {
override async convertData(userCallbacks: IConversionCallbacks = {}): Promise<void> {
this.insertedIds.clear();
this.updatedIds.clear();
@ -424,7 +424,7 @@ export class UserConverter extends RecordConverter<IImportUserRecord, UserConver
.replace(/^\w/, (u) => u.toUpperCase());
}
protected getDataType(): 'user' {
protected override getDataType(): 'user' {
return 'user';
}
}

@ -187,7 +187,7 @@ async function executeIntegrationRest(
});
return API.v1.success();
}
if (result && result.error) {
if (result?.error) {
return API.v1.failure(result.error);
}
@ -312,7 +312,7 @@ function integrationInfoRest(): { statusCode: number; body: { success: boolean }
}
class WebHookAPI extends APIClass<'/hooks'> {
async authenticatedRoute(this: IntegrationThis): Promise<IUser | null> {
override async authenticatedRoute(this: IntegrationThis): Promise<IUser | null> {
const { integrationId, token } = this.urlParams;
const integration = await Integrations.findOneByIdAndToken<IIncomingIntegration>(integrationId, decodeURIComponent(token));
@ -327,7 +327,7 @@ class WebHookAPI extends APIClass<'/hooks'> {
return Users.findOneById(this.request.integration.userId);
}
shouldAddRateLimitToRoute(options: { rateLimiterOptions?: RateLimiterOptions | boolean }): boolean {
override shouldAddRateLimitToRoute(options: { rateLimiterOptions?: RateLimiterOptions | boolean }): boolean {
const { rateLimiterOptions } = options;
return (
(typeof rateLimiterOptions === 'object' || rateLimiterOptions === undefined) &&
@ -336,14 +336,14 @@ class WebHookAPI extends APIClass<'/hooks'> {
);
}
async shouldVerifyRateLimit(): Promise<boolean> {
override async shouldVerifyRateLimit(): Promise<boolean> {
return (
settings.get('API_Enable_Rate_Limiter') === true &&
(process.env.NODE_ENV !== 'development' || settings.get('API_Enable_Rate_Limiter_Dev') === true)
);
}
async enforceRateLimit(
override async enforceRateLimit(
objectForRateLimitMatch: RateLimiterOptionsToCheck,
request: Request,
response: Response,

@ -7,7 +7,7 @@ import { validators } from './roomAccessValidator.compatibility';
export class AuthorizationLivechat extends ServiceClassInternal implements IAuthorizationLivechat {
protected name = 'authorization-livechat';
protected internal = true;
protected override internal = true;
async canAccessRoom(room: IOmnichannelRoom, user?: Pick<IUser, '_id'>, extraData?: object): Promise<boolean> {
for await (const validator of validators) {

@ -73,7 +73,7 @@ export class StreamPresence {
// eslint-disable-next-line @typescript-eslint/naming-convention
static getInstance(Streamer: IStreamerConstructor, name = 'user-presence'): IStreamer<'user-presence'> {
return new (class StreamPresence extends Streamer<'user-presence'> {
async _publish(
override async _publish(
publication: IPublication,
_eventName: string,
options: boolean | { useCollection?: boolean; args?: any } = false,

@ -8,7 +8,7 @@ import { settings } from '../../settings/server';
class Search extends ServiceClassInternal {
protected name = 'search';
protected internal = true;
protected override internal = true;
constructor() {
super();

@ -106,7 +106,7 @@ export class CachedSettings
* @param _id - The setting id
* @returns {boolean}
*/
public has(_id: ISetting['_id']): boolean {
public override has(_id: ISetting['_id']): boolean {
if (!this.ready && warn) {
SystemLogger.warn(`Settings not initialized yet. getting: ${_id}`);
}

@ -6,7 +6,7 @@ import { invokeTwoFactorModal } from '../../../../client/lib/2fa/process2faRetur
import { baseURI } from '../../../../client/lib/baseURI';
class RestApiClient extends RestClient {
getCredentials():
override getCredentials():
| {
'X-User-Id': string;
'X-Auth-Token': string;

@ -103,7 +103,7 @@ class RoomsCachedStore extends PrivateCachedStore<IRoom> {
);
}
protected deserializeFromCache(record: unknown) {
protected override deserializeFromCache(record: unknown) {
const deserialized = super.deserializeFromCache(record);
if (deserialized?.lastMessage?._updatedAt) {

@ -79,7 +79,7 @@ class SubscriptionsCachedStore extends PrivateCachedStore<SubscriptionWithRoom,
return this.handleRecordEvent('changed', record);
}
protected deserializeFromCache(record: unknown) {
protected override deserializeFromCache(record: unknown) {
const deserialized = super.deserializeFromCache(record);
if (deserialized?.lastMessage?._updatedAt) {

@ -29,7 +29,7 @@ export class DiscussionsList extends MessageList<IDiscussionMessage> {
this.clear();
}
protected filter(message: IMessage): boolean {
protected override filter(message: IMessage): boolean {
const { rid } = this._options;
if (!isDiscussionMessageInRoom(message, rid)) {
@ -46,7 +46,7 @@ export class DiscussionsList extends MessageList<IDiscussionMessage> {
return true;
}
protected compare(a: IMessage, b: IMessage): number {
protected override compare(a: IMessage, b: IMessage): number {
return (b.tlm ?? b.ts).getTime() - (a.tlm ?? a.ts).getTime();
}
}

@ -26,7 +26,7 @@ export class FilesList extends RecordList<IUpload> {
this.clear();
}
protected filter(message: IUpload): boolean {
protected override filter(message: IUpload): boolean {
const { rid } = this._options;
if (!isFileMessageInRoom(message, rid)) {

@ -27,7 +27,7 @@ export class ImagesList extends RecordList<IUpload> {
this.clear();
}
protected filter(message: IUpload): boolean {
protected override filter(message: IUpload): boolean {
const { roomId } = this._options;
if (!isFileMessageInRoom(message, roomId)) {

@ -3,11 +3,11 @@ import type { IMessage } from '@rocket.chat/core-typings';
import { RecordList } from './RecordList';
export class MessageList<T extends IMessage = IMessage> extends RecordList<T> {
protected filter(message: T): boolean {
protected override filter(message: T): boolean {
return message._hidden !== true;
}
protected compare(a: T, b: T): number {
protected override compare(a: T, b: T): number {
return a.ts.getTime() - b.ts.getTime();
}
}

@ -46,7 +46,7 @@ export class ThreadsList extends MessageList<IThreadMainMessage> {
this.clear();
}
protected filter(message: IThreadMainMessage): boolean {
protected override filter(message: IThreadMainMessage): boolean {
const { rid } = this._options;
if (!isThreadMessageInRoom(message, rid)) {
@ -77,7 +77,7 @@ export class ThreadsList extends MessageList<IThreadMainMessage> {
return true;
}
protected compare(a: IThreadMainMessage, b: IThreadMainMessage): number {
protected override compare(a: IThreadMainMessage, b: IThreadMainMessage): number {
return (b.tlm ?? b.ts).getTime() - (a.tlm ?? a.ts).getTime();
}
}

@ -156,7 +156,7 @@ class RoomCoordinatorClient extends RoomCoordinator {
}
}
protected validateRoomConfig(roomConfig: IRoomTypeClientConfig): void {
protected override validateRoomConfig(roomConfig: IRoomTypeClientConfig): void {
super.validateRoomConfig(roomConfig);
const { route, label } = roomConfig;
@ -170,7 +170,7 @@ class RoomCoordinatorClient extends RoomCoordinator {
}
}
protected addRoomType(roomConfig: IRoomTypeClientConfig, directives: IRoomTypeClientDirectives): void {
protected override addRoomType(roomConfig: IRoomTypeClientConfig, directives: IRoomTypeClientDirectives): void {
super.addRoomType(roomConfig, directives);
if (roomConfig.route?.path && roomConfig.route.name && directives.extractOpenRoomParams) {

@ -10,7 +10,7 @@ export class EEVoipClient extends VoIPUser {
super(config, mediaRenderer);
}
async makeCallURI(calleeURI: string, mediaRenderer?: IMediaStreamRenderer): Promise<void> {
override async makeCallURI(calleeURI: string, mediaRenderer?: IMediaStreamRenderer): Promise<void> {
if (mediaRenderer) {
this.mediaStreamRendered = mediaRenderer;
}
@ -62,14 +62,14 @@ export class EEVoipClient extends VoIPUser {
this.emit('stateChanged');
}
async makeCall(calleeNumber: string): Promise<void> {
override async makeCall(calleeNumber: string): Promise<void> {
const hasPlusChar = calleeNumber.includes('+');
const digits = calleeNumber.replace('+', '');
this.makeCallURI(`sip:${hasPlusChar ? '*' : ''}${digits}@${this.userConfig.sipRegistrarHostnameOrIP}`);
}
static async create(config: VoIPUserConfiguration, mediaRenderer?: IMediaStreamRenderer): Promise<VoIPUser> {
static override async create(config: VoIPUserConfiguration, mediaRenderer?: IMediaStreamRenderer): Promise<VoIPUser> {
const voip = new EEVoipClient(config, mediaRenderer);
await voip.init();
return voip;

@ -65,7 +65,7 @@ export default class RemoteStream extends Stream {
this.renderingMediaElement?.pause();
}
clear(): void {
override clear(): void {
super.clear();
if (this.renderingMediaElement) {
this.renderingMediaElement.pause();

@ -34,7 +34,7 @@ export class ReactiveObserveHandle<T extends { _id: string }> extends ObserveHan
}
}
stop() {
override stop() {
this.collection.queries.delete(this.query);
}
}

@ -22,9 +22,9 @@ export class SubscriptionLicenseSurfaceRenderer extends FuselageSurfaceRenderer
super(['context', 'divider', 'image', 'section', 'callout']);
}
plain_text = renderTextObject;
override plain_text = renderTextObject;
mrkdwn = renderTextObject;
override mrkdwn = renderTextObject;
}
export default SubscriptionLicenseSurface;

@ -3,7 +3,7 @@ import type { VideoConference } from '@rocket.chat/core-typings';
import { RecordList } from '../../../../../lib/lists/RecordList';
export class VideoConfRecordList extends RecordList<VideoConference> {
protected compare(a: VideoConference, b: VideoConference): number {
protected override compare(a: VideoConference, b: VideoConference): number {
return b.createdAt.getTime() - a.createdAt.getTime();
}
}

@ -30,7 +30,7 @@ export class LicenseService extends ServiceClassInternal implements ILicense {
this.onEvent('license.sync', () => License.sync());
}
async started(): Promise<void> {
override async started(): Promise<void> {
if (!License.hasValidLicense()) {
return;
}

@ -229,7 +229,7 @@ export class MultipleBusinessHoursBehavior extends AbstractBusinessHourBehavior
return this.onDepartmentDisabled(department);
}
allowAgentChangeServiceStatus(agentId: string): Promise<boolean> {
override allowAgentChangeServiceStatus(agentId: string): Promise<boolean> {
return this.UsersRepository.isAgentWithinBusinessHours(agentId);
}

@ -19,7 +19,7 @@ import { callbacks } from '../../../../../lib/callbacks';
export class OmnichannelEE extends ServiceClassInternal implements IOmnichannelEEService {
protected name = 'omnichannel-ee';
protected internal = true;
protected override internal = true;
logger: Logger;

@ -7,7 +7,7 @@ import { changeSettingValue } from './settings';
export class EnterpriseSettings extends ServiceClassInternal implements IEnterpriseSettings {
protected name = 'ee-settings';
protected internal = true;
protected override internal = true;
changeSettingValue(record: ISetting): undefined | ISetting['value'] {
return changeSettingValue(record);

@ -25,7 +25,7 @@ const isErrorResponse = ajv.compile<{
});
class ExportHandlerAPI extends APIClass {
protected async authenticatedRoute(req: Request): Promise<IUser | null> {
protected override async authenticatedRoute(req: Request): Promise<IUser | null> {
const { rc_uid, rc_token } = parse(req.headers.get('cookie') || '');
if (rc_uid) {

@ -21,11 +21,11 @@ const hostIP = process.env.INSTANCE_IP ? String(process.env.INSTANCE_IP).trim()
const { Base } = Serializers;
class EJSONSerializer extends Base {
serialize(obj: any): Buffer {
override serialize(obj: any): Buffer {
return Buffer.from(EJSON.stringify(obj));
}
deserialize(buf: Buffer): any {
override deserialize(buf: Buffer): any {
return EJSON.parse(buf.toString());
}
}
@ -72,7 +72,7 @@ export class InstanceService extends ServiceClassInternal implements IInstanceSe
});
}
async created() {
override async created() {
const transporter = getTransporter({
transporter: process.env.TRANSPORTER,
port: process.env.TCP_PORT,
@ -162,7 +162,7 @@ export class InstanceService extends ServiceClassInternal implements IInstanceSe
(this.broker.transit?.tx as any).nodes.nodes.delete(nodeId);
}
async started() {
override async started() {
await this.broker.start();
const instance = {

@ -78,7 +78,7 @@ export class VoipFreeSwitchService extends ServiceClassInternal implements IVoip
});
}
public async started(): Promise<void> {
public override async started(): Promise<void> {
void this.serviceStarter.start();
}

@ -9,7 +9,7 @@ export class CannedResponseRaw extends BaseRaw<IOmnichannelCannedResponse> imple
super(db, 'canned_response');
}
protected modelIndexes(): IndexDescription[] {
protected override modelIndexes(): IndexDescription[] {
return [
{
key: {
@ -64,7 +64,7 @@ export class CannedResponseRaw extends BaseRaw<IOmnichannelCannedResponse> imple
return Object.assign(record, { _id });
}
findOneById(_id: string, options?: FindOptions<IOmnichannelCannedResponse>): Promise<IOmnichannelCannedResponse | null> {
override findOneById(_id: string, options?: FindOptions<IOmnichannelCannedResponse>): Promise<IOmnichannelCannedResponse | null> {
const query = { _id };
return this.findOne(query, options);
@ -100,7 +100,7 @@ export class CannedResponseRaw extends BaseRaw<IOmnichannelCannedResponse> imple
}
// REMOVE
removeById(_id: string): Promise<DeleteResult> {
override removeById(_id: string): Promise<DeleteResult> {
const query = { _id };
return this.deleteOne(query);

@ -40,19 +40,22 @@ export class LivechatDepartmentEE extends LivechatDepartmentRaw implements ILive
super(db, trash);
}
async removeDepartmentFromForwardListById(departmentId: string): Promise<void> {
override async removeDepartmentFromForwardListById(departmentId: string): Promise<void> {
await this.updateMany({ departmentsAllowedToForward: departmentId }, { $pull: { departmentsAllowedToForward: departmentId } });
}
unfilteredFind(query: Filter<ILivechatDepartment>, options: FindOptions<ILivechatDepartment>): FindCursor<ILivechatDepartment> {
override unfilteredFind(query: Filter<ILivechatDepartment>, options: FindOptions<ILivechatDepartment>): FindCursor<ILivechatDepartment> {
return this.col.find(query, options);
}
unfilteredFindOne(query: Filter<ILivechatDepartment>, options: FindOptions<ILivechatDepartment>): Promise<ILivechatDepartment | null> {
override unfilteredFindOne(
query: Filter<ILivechatDepartment>,
options: FindOptions<ILivechatDepartment>,
): Promise<ILivechatDepartment | null> {
return this.col.findOne(query, options);
}
unfilteredUpdate(
override unfilteredUpdate(
query: Filter<ILivechatDepartment>,
update: UpdateFilter<ILivechatDepartment>,
options: FindOptions<ILivechatDepartment>,
@ -60,19 +63,19 @@ export class LivechatDepartmentEE extends LivechatDepartmentRaw implements ILive
return this.col.updateOne(query, update, options);
}
unfilteredRemove(query: Filter<ILivechatDepartment>): Promise<DeleteResult> {
override unfilteredRemove(query: Filter<ILivechatDepartment>): Promise<DeleteResult> {
return this.col.deleteOne(query);
}
createOrUpdateDepartment(_id: string | null, data: LivechatDepartmentDTO): Promise<ILivechatDepartment> {
override createOrUpdateDepartment(_id: string | null, data: LivechatDepartmentDTO): Promise<ILivechatDepartment> {
return super.createOrUpdateDepartment(_id, { ...data, type: 'd' });
}
removeParentAndAncestorById(id: string): Promise<UpdateResult | Document> {
override removeParentAndAncestorById(id: string): Promise<UpdateResult | Document> {
return this.updateMany({ parentId: id }, { $unset: { parentId: 1 }, $pull: { ancestors: id } });
}
findActiveByUnitIds<T extends Document = ILivechatDepartment>(unitIds: string[], options: FindOptions<T> = {}): FindCursor<T> {
override findActiveByUnitIds<T extends Document = ILivechatDepartment>(unitIds: string[], options: FindOptions<T> = {}): FindCursor<T> {
const query = {
enabled: true,
numAgents: { $gt: 0 },
@ -85,7 +88,7 @@ export class LivechatDepartmentEE extends LivechatDepartmentRaw implements ILive
return this.find<T>(query, options);
}
findEnabledWithAgentsAndBusinessUnit<T extends Document = ILivechatDepartment>(
override findEnabledWithAgentsAndBusinessUnit<T extends Document = ILivechatDepartment>(
businessUnit?: string,
projection?: FindOptions<T>['projection'],
): FindCursor<T> {
@ -96,11 +99,11 @@ export class LivechatDepartmentEE extends LivechatDepartmentRaw implements ILive
return this.findActiveByUnitIds<T>([businessUnit], { projection });
}
findByParentId(parentId: string, options?: FindOptions<ILivechatDepartment>): FindCursor<ILivechatDepartment> {
override findByParentId(parentId: string, options?: FindOptions<ILivechatDepartment>): FindCursor<ILivechatDepartment> {
return this.col.find({ parentId }, options);
}
findAgentsByBusinessHourId(businessHourId: string): AggregationCursor<{ agentIds: string[] }> {
override findAgentsByBusinessHourId(businessHourId: string): AggregationCursor<{ agentIds: string[] }> {
return this.col.aggregate<{ agentIds: string[] }>([
[
{

@ -2,7 +2,7 @@ import type { ILivechatDepartmentAgents } from '@rocket.chat/core-typings';
import { LivechatDepartmentAgentsRaw } from '@rocket.chat/models';
export class LivechatDepartmentAgents extends LivechatDepartmentAgentsRaw {
findAgentsByAgentIdAndBusinessHourId(agentId: string, businessHourId: string): Promise<ILivechatDepartmentAgents[]> {
override findAgentsByAgentIdAndBusinessHourId(agentId: string, businessHourId: string): Promise<ILivechatDepartmentAgents[]> {
const match = {
$match: { agentId },
};

@ -16,7 +16,10 @@ declare module '@rocket.chat/model-typings' {
// Note: Expect a circular dependency error here 😓
export class LivechatInquiryRawEE extends LivechatInquiryRaw implements ILivechatInquiryModel {
setSlaForRoom(rid: string, sla: { estimatedWaitingTimeQueue: number; slaId: string }): Promise<null | WithId<ILivechatInquiryRecord>> {
override setSlaForRoom(
rid: string,
sla: { estimatedWaitingTimeQueue: number; slaId: string },
): Promise<null | WithId<ILivechatInquiryRecord>> {
const { estimatedWaitingTimeQueue, slaId } = sla;
return this.findOneAndUpdate(
@ -30,7 +33,7 @@ export class LivechatInquiryRawEE extends LivechatInquiryRaw implements ILivecha
);
}
unsetSlaForRoom(rid: string): Promise<null | WithId<ILivechatInquiryRecord>> {
override unsetSlaForRoom(rid: string): Promise<null | WithId<ILivechatInquiryRecord>> {
return this.findOneAndUpdate(
{ rid },
{
@ -44,7 +47,7 @@ export class LivechatInquiryRawEE extends LivechatInquiryRaw implements ILivecha
);
}
bulkUnsetSla(roomIds: string[]): Promise<Document | UpdateResult> {
override bulkUnsetSla(roomIds: string[]): Promise<Document | UpdateResult> {
return this.updateMany(
{
rid: { $in: roomIds },
@ -60,7 +63,10 @@ export class LivechatInquiryRawEE extends LivechatInquiryRaw implements ILivecha
);
}
setPriorityForRoom(rid: string, priority: Pick<ILivechatPriority, '_id' | 'sortItem'>): Promise<null | WithId<ILivechatInquiryRecord>> {
override setPriorityForRoom(
rid: string,
priority: Pick<ILivechatPriority, '_id' | 'sortItem'>,
): Promise<null | WithId<ILivechatInquiryRecord>> {
return this.findOneAndUpdate(
{ rid },
{
@ -72,7 +78,7 @@ export class LivechatInquiryRawEE extends LivechatInquiryRaw implements ILivecha
);
}
unsetPriorityForRoom(rid: string): Promise<null | WithId<ILivechatInquiryRecord>> {
override unsetPriorityForRoom(rid: string): Promise<null | WithId<ILivechatInquiryRecord>> {
return this.findOneAndUpdate(
{ rid },
{

@ -80,19 +80,19 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
super(db, trash);
}
countPrioritizedRooms(): Promise<number> {
override countPrioritizedRooms(): Promise<number> {
return this.countDocuments({ priorityId: { $exists: true } });
}
countRoomsWithSla(): Promise<number> {
override countRoomsWithSla(): Promise<number> {
return this.countDocuments({ slaId: { $exists: true } });
}
countRoomsWithTranscriptSent(): Promise<number> {
override countRoomsWithTranscriptSent(): Promise<number> {
return this.countDocuments({ pdfTranscriptFileId: { $exists: true } });
}
async unsetAllPredictedVisitorAbandonment(): Promise<void> {
override async unsetAllPredictedVisitorAbandonment(): Promise<void> {
return this.updateMany(
{
'open': true,
@ -105,15 +105,15 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
).then();
}
setOnHoldByRoomId(roomId: string): Promise<UpdateResult> {
override setOnHoldByRoomId(roomId: string): Promise<UpdateResult> {
return this.updateOne({ _id: roomId }, { $set: { onHold: true } });
}
unsetOnHoldByRoomId(roomId: string): Promise<UpdateResult> {
override unsetOnHoldByRoomId(roomId: string): Promise<UpdateResult> {
return this.updateOne({ _id: roomId }, { $unset: { onHold: 1 } });
}
unsetOnHoldAndPredictedVisitorAbandonmentByRoomId(roomId: string): Promise<UpdateResult> {
override unsetOnHoldAndPredictedVisitorAbandonmentByRoomId(roomId: string): Promise<UpdateResult> {
return this.updateOne(
{
_id: roomId,
@ -127,7 +127,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
setSlaForRoomById(
override setSlaForRoomById(
roomId: string,
sla: Pick<IOmnichannelServiceLevelAgreements, '_id' | 'dueTimeInMinutes'>,
): Promise<UpdateResult | Document> {
@ -146,7 +146,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
removeSlaFromRoomById(roomId: string): Promise<UpdateResult | Document> {
override removeSlaFromRoomById(roomId: string): Promise<UpdateResult | Document> {
return this.updateOne(
{
_id: roomId,
@ -162,7 +162,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
bulkRemoveSlaFromRoomsById(slaId: string): Promise<UpdateResult | Document> {
override bulkRemoveSlaFromRoomsById(slaId: string): Promise<UpdateResult | Document> {
return this.updateMany(
{
open: true,
@ -178,7 +178,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
findOpenBySlaId(
override findOpenBySlaId(
slaId: string,
options: FindOptions<IOmnichannelRoom>,
extraQuery?: Filter<IOmnichannelRoom>,
@ -193,13 +193,13 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
return this.find(query, options);
}
async setPriorityByRoomId(roomId: string, priority: Pick<ILivechatPriority, '_id' | 'sortItem'>): Promise<UpdateResult> {
override async setPriorityByRoomId(roomId: string, priority: Pick<ILivechatPriority, '_id' | 'sortItem'>): Promise<UpdateResult> {
const { _id: priorityId, sortItem: priorityWeight } = priority;
return this.updateOne({ _id: roomId }, { $set: { priorityId, priorityWeight } });
}
async unsetPriorityByRoomId(roomId: string): Promise<UpdateResult> {
override async unsetPriorityByRoomId(roomId: string): Promise<UpdateResult> {
return this.updateOne(
{ _id: roomId },
{
@ -213,14 +213,14 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
getPredictedVisitorAbandonmentByRoomIdUpdateQuery(
override getPredictedVisitorAbandonmentByRoomIdUpdateQuery(
date: Date,
roomUpdater: Updater<IOmnichannelRoom> = this.getUpdater(),
): Updater<IOmnichannelRoom> {
return roomUpdater.set('omnichannel.predictedVisitorAbandonmentAt', date);
}
setPredictedVisitorAbandonmentByRoomId(rid: string, willBeAbandonedAt: Date): Promise<UpdateResult> {
override setPredictedVisitorAbandonmentByRoomId(rid: string, willBeAbandonedAt: Date): Promise<UpdateResult> {
const query = {
_id: rid,
};
@ -233,7 +233,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
return this.updateOne(query, update);
}
findAbandonedOpenRooms(date: Date, extraQuery?: Filter<IOmnichannelRoom>): FindCursor<IOmnichannelRoom> {
override findAbandonedOpenRooms(date: Date, extraQuery?: Filter<IOmnichannelRoom>): FindCursor<IOmnichannelRoom> {
return this.find({
'omnichannel.predictedVisitorAbandonmentAt': { $lte: date },
'waitingResponse': { $exists: false },
@ -243,7 +243,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
});
}
async unsetPredictedVisitorAbandonmentByRoomId(roomId: string): Promise<UpdateResult> {
override async unsetPredictedVisitorAbandonmentByRoomId(roomId: string): Promise<UpdateResult> {
return this.updateOne(
{
_id: roomId,
@ -254,7 +254,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
async associateRoomsWithDepartmentToUnit(departments: string[], unitId: string): Promise<void> {
override async associateRoomsWithDepartmentToUnit(departments: string[], unitId: string): Promise<void> {
const query = {
$and: [
{
@ -290,7 +290,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
await this.updateMany(queryToDisassociateOldRoomsConnectedToUnit, updateToDisassociateRooms);
}
async removeUnitAssociationFromRooms(unitId: string): Promise<void> {
override async removeUnitAssociationFromRooms(unitId: string): Promise<void> {
const query = {
departmentAncestors: unitId,
};
@ -298,7 +298,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
await this.updateMany(query, update);
}
async updateDepartmentAncestorsById(rid: string, departmentAncestors?: string[]) {
override async updateDepartmentAncestorsById(rid: string, departmentAncestors?: string[]) {
const query = {
_id: rid,
};
@ -306,7 +306,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
return this.updateOne(query, update);
}
getConversationsBySource(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): AggregationCursor<ReportResult> {
override getConversationsBySource(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): AggregationCursor<ReportResult> {
return this.col.aggregate(
[
{
@ -358,7 +358,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
getConversationsByStatus(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): AggregationCursor<ReportResult> {
override getConversationsByStatus(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): AggregationCursor<ReportResult> {
return this.col.aggregate(
[
{
@ -465,7 +465,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
getConversationsByDepartment(
override getConversationsByDepartment(
start: Date,
end: Date,
sort: Record<string, 1 | -1>,
@ -542,7 +542,11 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
getTotalConversationsWithoutDepartmentBetweenDates(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): Promise<number> {
override getTotalConversationsWithoutDepartmentBetweenDates(
start: Date,
end: Date,
extraQuery: Filter<IOmnichannelRoom>,
): Promise<number> {
return this.countDocuments({
t: 'l',
departmentId: {
@ -556,7 +560,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
});
}
getConversationsByTags(
override getConversationsByTags(
start: Date,
end: Date,
sort: Record<string, 1 | -1>,
@ -620,7 +624,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
getConversationsWithoutTagsBetweenDate(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): Promise<number> {
override getConversationsWithoutTagsBetweenDate(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): Promise<number> {
return this.countDocuments({
t: 'l',
ts: {
@ -643,7 +647,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
});
}
getConversationsByAgents(
override getConversationsByAgents(
start: Date,
end: Date,
sort: Record<string, 1 | -1>,
@ -715,7 +719,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
);
}
getTotalConversationsWithoutAgentsBetweenDate(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): Promise<number> {
override getTotalConversationsWithoutAgentsBetweenDate(start: Date, end: Date, extraQuery: Filter<IOmnichannelRoom>): Promise<number> {
return this.countDocuments({
t: 'l',
ts: {
@ -729,7 +733,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
});
}
updateMergedContactIds(
override updateMergedContactIds(
contactIdsThatWereMerged: ILivechatContact['_id'][],
newContactId: ILivechatContact['_id'],
options?: UpdateOptions,
@ -737,7 +741,7 @@ export class LivechatRoomsRawEE extends LivechatRoomsRaw implements ILivechatRoo
return this.updateMany({ contactId: { $in: contactIdsThatWereMerged } }, { $set: { contactId: newContactId } }, options);
}
findClosedRoomsByContactAndSourcePaginated({
override findClosedRoomsByContactAndSourcePaginated({
contactId,
source,
options = {},

@ -8,7 +8,7 @@ export class LivechatTagRaw extends BaseRaw<ILivechatTag> implements ILivechatTa
super(db, 'livechat_tag');
}
protected modelIndexes(): IndexDescription[] {
protected override modelIndexes(): IndexDescription[] {
return [
{
key: {
@ -47,7 +47,7 @@ export class LivechatTagRaw extends BaseRaw<ILivechatTag> implements ILivechatTa
}
// REMOVE
removeById(_id: string): Promise<DeleteResult> {
override removeById(_id: string): Promise<DeleteResult> {
const query = { _id };
return this.deleteOne(query);

@ -38,7 +38,7 @@ export class LivechatUnitRaw extends BaseRaw<IOmnichannelBusinessUnit> implement
return this.col.findOne<P>(query, options);
}
async findOneById<P extends Document = IOmnichannelBusinessUnit>(
override async findOneById<P extends Document = IOmnichannelBusinessUnit>(
_id: IOmnichannelBusinessUnit['_id'],
options: FindOptions<IOmnichannelBusinessUnit>,
extra?: Record<string, any>,
@ -144,7 +144,7 @@ export class LivechatUnitRaw extends BaseRaw<IOmnichannelBusinessUnit> implement
return this.updateOne({ _id }, { $inc: { numDepartments: -1 } });
}
async removeById(_id: string): Promise<DeleteResult> {
override async removeById(_id: string): Promise<DeleteResult> {
await LivechatUnitMonitors.removeByUnitId(_id);
await this.removeParentAndAncestorById(_id);
await LivechatRooms.removeUnitAssociationFromRooms(_id);

@ -8,7 +8,7 @@ export class LivechatUnitMonitorsRaw extends BaseRaw<ILivechatUnitMonitor> imple
super(db, 'livechat_unit_monitors');
}
protected modelIndexes(): IndexDescription[] {
protected override modelIndexes(): IndexDescription[] {
return [
{
key: {

@ -10,7 +10,7 @@ export class ReadReceiptsRaw extends BaseRaw<IReadReceipt> implements IReadRecei
super(db, 'read_receipts', trash);
}
protected modelIndexes(): IndexDescription[] {
protected override modelIndexes(): IndexDescription[] {
return [{ key: { roomId: 1, userId: 1, messageId: 1 }, unique: true }, { key: { messageId: 1 } }, { key: { userId: 1 } }];
}

@ -8,7 +8,7 @@ export class ServiceLevelAgreements extends BaseRaw<IOmnichannelServiceLevelAgre
super(db, 'omnichannel_service_level_agreements');
}
protected modelIndexes(): IndexDescription[] {
protected override modelIndexes(): IndexDescription[] {
return [
{ key: { name: 1 }, unique: true },
{ key: { dueTimeInMinutes: 1 }, unique: true },

@ -18,7 +18,7 @@ export class UsersEE extends UsersRaw {
super(db, trash);
}
getUnavailableAgents(
override getUnavailableAgents(
departmentId: string,
customFilter: Filter<AvailableAgentsAggregation>,
): Promise<Pick<AvailableAgentsAggregation, 'username'>[]> {

@ -11,7 +11,7 @@ class AirgappedRestriction extends Emitter<{ remainingDays: { days: number } }>
isWarningPeriod = sinon.stub();
on(type: any, cb: any): any {
override on(type: any, cb: any): any {
const newCb = (...args: any) => {
promises.push(cb(...args));
};

@ -39,7 +39,7 @@ class LivechatVisitorsModel extends BaseRaw<any> {
}
class UsersModel extends BaseRaw<any> {
async findOneById() {
override async findOneById() {
return {
name: 'John Doe Agent',
};

@ -1,3 +1,3 @@
export class InvalidCloudAnnouncementInteractionError extends Error {
name = InvalidCloudAnnouncementInteractionError.name;
override name = InvalidCloudAnnouncementInteractionError.name;
}

@ -1,3 +1,3 @@
export class InvalidCoreAppInteractionError extends Error {
name = InvalidCoreAppInteractionError.name;
override name = InvalidCoreAppInteractionError.name;
}

@ -55,7 +55,7 @@ const getExtendedSession = (session: ClientSession, onceSuccesfulCommit: Extende
};
class UnsuccessfulTransactionError extends Error {
name = UnsuccessfulTransactionError.name;
override name = UnsuccessfulTransactionError.name;
constructor(message?: string) {
super(message || 'Something went wrong while trying to commit changes. Please try again.');

@ -6,6 +6,7 @@ import { i18n } from '../../app/utils/lib/i18n';
// Meteor bundler is incredible (derogatory)
// eslint-disable-next-line no-constant-condition
if (false) {
// @ts-expect-error unreachable code
import('@rocket.chat/i18n/dist/resources/af.i18n.json');
import('@rocket.chat/i18n/dist/resources/ar.i18n.json');
import('@rocket.chat/i18n/dist/resources/az.i18n.json');

@ -22,7 +22,7 @@ export class LDAPUserConverter extends UserConverter {
this.mergeExistingUsers = settings.get<boolean>('LDAP_Merge_Existing_Users') ?? true;
}
async findExistingUser(data: IImportUser): Promise<IUser | undefined | null> {
override async findExistingUser(data: IImportUser): Promise<IUser | undefined | null> {
if (data.services?.ldap?.id) {
const importedUser = await Users.findOneByLDAPId(data.services.ldap.id, data.services.ldap.idAttribute);
if (importedUser) {
@ -47,7 +47,7 @@ export class LDAPUserConverter extends UserConverter {
}
}
async insertUser(userData: IImportUser): Promise<IUser['_id']> {
override async insertUser(userData: IImportUser): Promise<IUser['_id']> {
if (!userData.deleted) {
// #TODO: Change the LDAP sync process to split the inserts and updates into two stages so that we can validate this only once for all insertions
if (await License.shouldPreventAction('activeUsers')) {

@ -4,9 +4,9 @@ import type * as UiKit from '@rocket.chat/ui-kit';
import { CloudAnnouncementsModule } from './cloudAnnouncements.module';
export class CloudSubscriptionCommunication extends CloudAnnouncementsModule {
appId = 'cloud-communication-core';
override appId = 'cloud-communication-core';
async viewClosed(payload: UiKitCoreAppPayload): Promise<UiKit.ServerInteraction> {
override async viewClosed(payload: UiKitCoreAppPayload): Promise<UiKit.ServerInteraction> {
const {
payload: { view: { viewId } = {} },
user: { _id: userId } = {},

@ -305,7 +305,7 @@ export abstract class Streamer<N extends keyof StreamerEvents> extends EventEmit
});
}
emit(eventName: string | symbol, ...args: any[]): boolean {
override emit(eventName: string | symbol, ...args: any[]): boolean {
return this._emit(eventName as string, args, undefined, true);
}

@ -39,7 +39,7 @@ export class Authorization extends ServiceClass implements IAuthorization {
});
}
async started(): Promise<void> {
override async started(): Promise<void> {
try {
if (!(await License.hasValidLicense())) {
return;

@ -43,7 +43,7 @@ export class MessageService extends ServiceClassInternal implements IMessageServ
private checkMAC: BeforeSaveCheckMAC;
async created() {
override async created() {
this.preventMention = new BeforeSavePreventMention();
this.badWords = new BeforeSaveBadWords();
this.spotify = new BeforeSaveSpotify();

@ -233,7 +233,7 @@ export class MeteorService extends ServiceClassInternal implements IMeteor {
}
}
async started(): Promise<void> {
override async started(): Promise<void> {
// Even after server startup, client versions might not be updated yet, the only way
// to make sure we can send the most up to date versions is using the publication below.
// Since it receives each document one at a time, we have to store them to be able to send

@ -19,7 +19,7 @@ export class OmnichannelService extends ServiceClassInternal implements IOmnicha
this.queueWorker = new OmnichannelQueue();
}
async created() {
override async created() {
this.onEvent('presence.status', async ({ user }): Promise<void> => {
if (!user?._id) {
return;
@ -32,7 +32,7 @@ export class OmnichannelService extends ServiceClassInternal implements IOmnicha
});
}
async started() {
override async started() {
settings.watchMultiple(['Livechat_enabled', 'Livechat_Routing_Method'], () => {
this.queueWorker.shouldStart();
});

@ -12,7 +12,7 @@ export class SettingsService extends ServiceClassInternal implements ISettingsSe
return settings.get<T>(settingId);
}
async started() {
override async started() {
settings.change('Site_Url', () => {
void verifyFingerPrint();
});

@ -198,7 +198,7 @@ export class ACDQueue extends Command {
}
}
async executeCommand(data: any): Promise<IVoipConnectorResult> {
override async executeCommand(data: any): Promise<IVoipConnectorResult> {
let amiCommand = {};
// set up the specific action based on the value of |Commands|
if (this.commandText === Commands.queue_summary.toString()) {

@ -382,7 +382,7 @@ export class ContinuousMonitor extends Command {
this.connection.off('dialstate', this);
}
initMonitor(_data: any): boolean {
override initMonitor(_data: any): boolean {
/**
* See the implementation of |call| function in CallbackContext to understand
* why we are using regex here.
@ -392,7 +392,7 @@ export class ContinuousMonitor extends Command {
return true;
}
cleanMonitor(): boolean {
override cleanMonitor(): boolean {
this.resetEventHandlers();
return true;
}

@ -246,7 +246,7 @@ export class PJSIPEndpoint extends Command {
}
}
async executeCommand(data: any): Promise<IVoipConnectorResult> {
override async executeCommand(data: any): Promise<IVoipConnectorResult> {
let amiCommand = {};
// set up the specific action based on the value of |Commands|
if (this.commandText === Commands.extension_list.toString()) {

@ -101,7 +101,7 @@ export class LocalStore extends Store {
};
}
async getFilePath(fileId: string, fileParam?: IUpload): Promise<string> {
override async getFilePath(fileId: string, fileParam?: IUpload): Promise<string> {
const file = fileParam || (await this.getCollection().findOne(fileId, { projection: { extension: 1 } }));
return (file && this.getPath(fileId + (file.extension ? `.${file.extension}` : ''))) || '';
}

@ -35,7 +35,7 @@ export class HomeOmnichannelContent extends HomeContent {
return this.page.locator('role=button[name="Take it!"]');
}
get inputMessage(): Locator {
override get inputMessage(): Locator {
return this.page.locator('[name="msg"]');
}

@ -15,7 +15,6 @@ describe('LDAP', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (process.env.IS_EE) {
this.skip();
return;
}
await request
.post(api('ldap.syncNow'))
@ -31,7 +30,6 @@ describe('LDAP', function () {
it('should throw an error of LDAP disabled when running EE', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
.post(api('ldap.syncNow'))

@ -21,7 +21,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (isEnterprise) {
this.skip();
return;
}
await request
.post(api('roles.create'))
@ -43,7 +42,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
.post(api('roles.create'))
@ -101,7 +99,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (isEnterprise) {
this.skip();
return;
}
await request
.post(api('roles.update'))
@ -124,7 +121,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -189,7 +185,6 @@ describe('[Roles]', function () {
it('should successfully get an empty list of users in a role if no user has been assigned to it', async function () {
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -210,7 +205,6 @@ describe('[Roles]', function () {
it('should successfully get a list of users in a role', async function () {
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -245,7 +239,6 @@ describe('[Roles]', function () {
it('should fail getting a list of users in a role in case an invalid role is provided', async function () {
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -320,7 +313,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -342,7 +334,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -365,7 +356,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -452,7 +442,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -476,7 +465,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -500,7 +488,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request
@ -524,7 +511,6 @@ describe('[Roles]', function () {
// ideally we should have a single CI job that adds a license and runs both CE and EE tests.
if (!isEnterprise) {
this.skip();
return;
}
await request

@ -251,7 +251,6 @@ describe('Apps - Video Conferences', () => {
it('should start a call successfully when using a provider that supports persistent chat', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await updateSetting('VideoConf_Default_Provider', 'persistentchat');
@ -276,7 +275,6 @@ describe('Apps - Video Conferences', () => {
it('should start a call successfully when using a provider that supports persistent chat with the feature disabled', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await updateSetting('VideoConf_Default_Provider', 'persistentchat');
@ -301,7 +299,6 @@ describe('Apps - Video Conferences', () => {
it('should start a call successfully when using a provider that supports persistent chat with discussions disabled', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await updateSetting('VideoConf_Default_Provider', 'persistentchat');
@ -481,7 +478,6 @@ describe('Apps - Video Conferences', () => {
it('should load the video conference data successfully', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -535,7 +531,6 @@ describe('Apps - Video Conferences', () => {
it('should include a discussion room id on the response', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -560,7 +555,6 @@ describe('Apps - Video Conferences', () => {
it('should have created the discussion room using the configured name', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -585,7 +579,6 @@ describe('Apps - Video Conferences', () => {
it('should have created a subscription with open = false', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -635,7 +628,6 @@ describe('Apps - Video Conferences', () => {
it('should include a discussion room id on the response', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -660,7 +652,6 @@ describe('Apps - Video Conferences', () => {
it('should have created the discussion room using the configured name', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -739,7 +730,6 @@ describe('Apps - Video Conferences', () => {
it('should not include a discussion room id on the response', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request
@ -861,7 +851,6 @@ describe('Apps - Video Conferences', () => {
it('should load the list of video conferences sorted by new', async function () {
if (!process.env.IS_EE) {
this.skip();
return;
}
await request

@ -26,7 +26,7 @@ class BannerDismissModel extends BaseRaw<any> {
}
class UserModel extends BaseRaw<any> {
findOneById(): Promise<any> {
override findOneById(): Promise<any> {
return Promise.resolve({});
}
}

@ -24,6 +24,8 @@ const Wrapper = () => {
transition: 0.5s ease;
left: -100%;
`;
default:
return undefined;
}
};

@ -5,20 +5,22 @@ export function useHorizontalScroll() {
useEffect(() => {
const el = elRef.current;
if (el) {
const onWheel = (e: WheelEvent) => {
if (e.deltaY === 0) {
return;
}
if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
e.preventDefault();
el.scrollLeft += e.deltaX;
}
el.scrollTo({ left: el.scrollLeft + e.deltaY });
};
el.addEventListener('wheel', onWheel);
return () => el.removeEventListener('wheel', onWheel);
}
if (!el) return;
const onWheel = (e: WheelEvent) => {
if (e.deltaY === 0) {
return;
}
if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
e.preventDefault();
el.scrollLeft += e.deltaX;
}
el.scrollTo({ left: el.scrollLeft + e.deltaY });
};
el.addEventListener('wheel', onWheel);
return () => el.removeEventListener('wheel', onWheel);
}, []);
return elRef;
}

@ -44,7 +44,7 @@ export class Account extends ServiceClass implements IAccount {
return removeSession(userId, token);
}
async started(): Promise<void> {
override async started(): Promise<void> {
const expiry = await Settings.findOne({ _id: 'Accounts_LoginExpiration' }, { projection: { value: 1 } });
this.loginExpiration = getLoginExpirationInDays(expiry?.value as number);

@ -8,7 +8,6 @@
"strictFunctionTypes": false,
/* Additional Checks */
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": false,
"outDir": "./dist/ee/apps/account-service/src",

@ -69,7 +69,7 @@ export class DDPStreamer extends ServiceClass {
InstanceStatus.updateConnections(this.wss?.clients.size ?? 0);
}, 30000);
async created(): Promise<void> {
override async created(): Promise<void> {
if (!this.context) {
return;
}
@ -217,7 +217,7 @@ export class DDPStreamer extends ServiceClass {
});
}
async started(): Promise<void> {
override async started(): Promise<void> {
// TODO this call creates a dependency to MeteorService, should it be a hard dependency? or can this call fail and be ignored?
try {
const versions = await MeteorService.getAutoUpdateClientVersions();
@ -265,7 +265,7 @@ export class DDPStreamer extends ServiceClass {
}
}
async stopped(): Promise<void> {
override async stopped(): Promise<void> {
this.wss?.clients.forEach(function (client) {
client.terminate();
});

@ -33,7 +33,7 @@ export class Stream<N extends StreamNames> extends Streamer<N> {
);
}
async sendToManySubscriptions(
override async sendToManySubscriptions(
subscriptions: Set<DDPSubscription>,
origin: Connection | undefined,
eventName: string,

@ -152,5 +152,7 @@ server.methods({
await MeteorService.notifyGuestStatusChanged(token, 'offline');
});
}
return undefined;
},
});

@ -20,7 +20,7 @@ export class StreamHub extends ServiceClass implements IServiceClass {
this.logger = new loggerClass('StreamHub');
}
async created(): Promise<void> {
override async created(): Promise<void> {
if (!this.api) {
return;
}

@ -145,7 +145,7 @@ export class FederationMatrix extends ServiceClass implements IFederationMatrixS
private readonly logger = new Logger(this.name);
async created(): Promise<void> {
override async created(): Promise<void> {
// although this is async function, it is not awaited, so we need to register the listeners before everything else
this.onEvent('watch.settings', async ({ clientAction, setting }): Promise<void> => {
if (clientAction === 'removed') {

@ -13,7 +13,8 @@
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
"test": "jest",
"testunit": "jest"
"testunit": "jest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@rocket.chat/core-typings": "workspace:^",

@ -34,4 +34,6 @@ export function getUnmodifiedLicenseAndModules(this: LicenseManager) {
modules: getModules.call(this),
};
}
return undefined;
}

@ -384,6 +384,8 @@ export abstract class LicenseManager extends Emitter<LicenseEvents> {
if (this._valid && this._license) {
return this._license;
}
return undefined;
}
public syncShouldPreventActionResults(actions: Record<LicenseLimitKind, boolean>): void {

@ -11,7 +11,7 @@ export function setPendingLicense(this: LicenseManager, encryptedLicense: string
export async function applyPendingLicense(this: LicenseManager) {
if (this.pendingLicense) {
logger.info('Applying pending license.');
return this.setLicense(this.pendingLicense);
await this.setLicense(this.pendingLicense);
}
}

@ -50,9 +50,9 @@ export function validateLicenseUrl(this: LicenseManager, license: ILicenseV3, op
return !validateHash(url.value, workspaceUrl);
case 'url':
return !validateUrl(url.value, workspaceUrl);
default:
return false;
}
return false;
})
.map((url) => {
if (!options.suppressLog) {

@ -13,7 +13,7 @@
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
"test": "jest"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@rocket.chat/core-typings": "workspace:^",
@ -24,11 +24,9 @@
"drachtio-srf": "patch:drachtio-srf@npm%3A5.0.12#~/.yarn/patches/drachtio-srf-npm-5.0.12-b0b1afaad6.patch"
},
"devDependencies": {
"@rocket.chat/jest-presets": "workspace:~",
"@rocket.chat/tsconfig": "workspace:*",
"@types/jest": "~30.0.0",
"eslint": "~8.45.0",
"jest": "~30.2.0",
"typescript": "~5.9.3"
}
}

@ -240,8 +240,9 @@ export class MediaCallServer implements IMediaCallServer {
return {
preferredType: 'sip',
};
}
return {};
default:
return {};
}
}
}

@ -20,7 +20,7 @@ export abstract class BaseSipCall extends BaseCallProvider {
this.lastCallState = 'none';
}
public async reactToCallChanges(params: { dtmf?: ClientMediaSignalBody<'dtmf'> }): Promise<void> {
public override async reactToCallChanges(params: { dtmf?: ClientMediaSignalBody<'dtmf'> }): Promise<void> {
// If we already knew this call was over, there's nothing more to reflect
if (this.lastCallState === 'hangup') {
return;

@ -37,7 +37,7 @@ export class IncomingSipCall extends BaseSipCall {
constructor(
session: SipServerSession,
call: IMediaCall,
protected readonly agent: BroadcastActorAgent,
protected override readonly agent: BroadcastActorAgent,
channel: IMediaCallChannel,
private readonly srf: Srf,
private readonly req: SrfRequest,

@ -33,7 +33,7 @@ export class OutgoingSipCall extends BaseSipCall {
constructor(
session: SipServerSession,
call: IMediaCall,
protected readonly agent: BroadcastActorAgent,
protected override readonly agent: BroadcastActorAgent,
channel: IMediaCallChannel,
) {
super(session, call, agent, channel);

@ -34,7 +34,7 @@ const {
const { Base } = Serializers;
class CustomRegenerator extends Errors.Regenerator {
restoreCustomError(plainError: any): Error | undefined {
override restoreCustomError(plainError: any): Error | undefined {
const { message, reason, details, errorType, isClientSafe } = plainError;
if (errorType === 'Meteor.Error') {
@ -48,7 +48,7 @@ class CustomRegenerator extends Errors.Regenerator {
return undefined;
}
extractPlainError(err: Error | MeteorError): Errors.PlainMoleculerError {
override extractPlainError(err: Error | MeteorError): Errors.PlainMoleculerError {
return {
...super.extractPlainError(err),
...(isMeteorError(err) && {
@ -62,11 +62,11 @@ class CustomRegenerator extends Errors.Regenerator {
}
class EJSONSerializer extends Base {
serialize(obj: any): Buffer {
override serialize(obj: any): Buffer {
return Buffer.from(EJSON.stringify(obj));
}
deserialize(buf: Buffer): any {
override deserialize(buf: Buffer): any {
return EJSON.parse(buf.toString());
}
}

@ -13,7 +13,8 @@
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
"test": "jest",
"testunit": "jest"
"testunit": "jest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@rocket.chat/core-services": "workspace:^",

@ -37,7 +37,7 @@ export class QueueWorker extends ServiceClass implements IQueueWorkerService {
return message.includes('retry');
}
async created(): Promise<void> {
override async created(): Promise<void> {
this.queue.databasePromise = () => {
return Promise.resolve(this.db);
};
@ -62,7 +62,7 @@ export class QueueWorker extends ServiceClass implements IQueueWorkerService {
await this.db.collection(this.queue.collectionName).createIndex({ receivedTime: 1 }, { sparse: true });
}
async stopped(): Promise<void> {
override async stopped(): Promise<void> {
this.logger.info('Stopping queue worker');
this.queue.stopPolling();
}

@ -72,7 +72,7 @@ export class Presence extends ServiceClass implements IPresence {
return affectedUsers.forEach((uid) => this.updateUserPresence(uid));
}
async started(): Promise<void> {
override async started(): Promise<void> {
this.lostConTimeout = setTimeout(async () => {
const affectedUsers = await this.removeLostConnections();
return affectedUsers.forEach((uid) => this.updateUserPresence(uid));
@ -89,7 +89,7 @@ export class Presence extends ServiceClass implements IPresence {
}
}
async stopped(): Promise<void> {
override async stopped(): Promise<void> {
if (!this.lostConTimeout) {
return;
}

@ -185,7 +185,6 @@ export class Agenda extends EventEmitter {
this.dbInit(collection);
} catch (error) {
debug('error connecting to MongoDB using collection: [%s]', collection);
return error;
}
}
@ -356,6 +355,7 @@ export class Agenda extends EventEmitter {
return Promise.all(jobs);
} catch (error) {
debug('every() -> error creating one or more of the jobs', error);
return undefined;
}
}
@ -623,11 +623,11 @@ export class Agenda extends EventEmitter {
// Continue processing but notify that Agenda has lost the connection
debug('Missing MongoDB connection, not attempting to find and lock a job');
this.emit('error', new Error('Lost MongoDB connection'));
} else {
// No longer recoverable
debug('topology.autoReconnect: %s, topology.isDestroyed(): %s', client.topology.autoReconnect, client.topology.isDestroyed?.());
throw new Error('MongoDB connection is not recoverable, application restart required');
return undefined;
}
// No longer recoverable
debug('topology.autoReconnect: %s, topology.isDestroyed(): %s', client.topology.autoReconnect, client.topology.isDestroyed?.());
throw new Error('MongoDB connection is not recoverable, application restart required');
} else {
// /**
// * Query used to find job to run

@ -3,9 +3,6 @@
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"noImplicitAny": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
},
"include": ["src"]

@ -12,7 +12,8 @@
"dev": "tsc --watch --preserveWatchOutput",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"lint:fix": "eslint --ext .js,.jsx,.ts,.tsx . --fix",
"testunit": "jest"
"testunit": "jest",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@rocket.chat/core-typings": "workspace:^",

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save