;
findByNameRegexWithExceptionsAndConditions(
searchTerm: string,
exceptions: string[],
@@ -77,4 +76,5 @@ export interface ILivechatVisitorsModel extends IBaseModel {
data: { name?: string; username?: string; email?: string; phone?: string; livechatData: { [k: string]: any } },
): Promise;
setLastChatById(_id: string, lastChat: Required): Promise;
+ countVisitorsBetweenDate({ start, end, department }: { start: Date; end: Date; department?: string }): Promise;
}
diff --git a/packages/model-typings/src/models/IMessagesModel.ts b/packages/model-typings/src/models/IMessagesModel.ts
index 986a50c8cd29..116b00fc6fee 100644
--- a/packages/model-typings/src/models/IMessagesModel.ts
+++ b/packages/model-typings/src/models/IMessagesModel.ts
@@ -291,4 +291,6 @@ export interface IMessagesModel extends IBaseModel {
findThreadsByRoomId(rid: string, skip: number, limit: number): FindCursor;
decreaseReplyCountById(_id: string, inc?: number): Promise;
+ countPinned(options?: CountDocumentsOptions): Promise;
+ countStarred(options?: CountDocumentsOptions): Promise;
}
diff --git a/packages/model-typings/src/models/IRolesModel.ts b/packages/model-typings/src/models/IRolesModel.ts
index f039253f7bc3..84d49ef6baee 100644
--- a/packages/model-typings/src/models/IRolesModel.ts
+++ b/packages/model-typings/src/models/IRolesModel.ts
@@ -1,5 +1,5 @@
import type { IRole, IUser, IRoom } from '@rocket.chat/core-typings';
-import type { FindCursor, FindOptions } from 'mongodb';
+import type { FindCursor, FindOptions, CountDocumentsOptions } from 'mongodb';
import type { IBaseModel } from './IBaseModel';
@@ -62,4 +62,6 @@ export interface IRolesModel extends IBaseModel {
canAddUserToRole(uid: IUser['_id'], roleId: IRole['_id'], scope?: IRoom['_id']): Promise;
countUsersInRole(roleId: IRole['_id'], scope?: IRoom['_id']): Promise;
+ countByScope(scope: IRole['scope'], options?: CountDocumentsOptions): Promise;
+ countCustomRoles(options?: CountDocumentsOptions): Promise;
}
diff --git a/packages/model-typings/src/models/IRoomsModel.ts b/packages/model-typings/src/models/IRoomsModel.ts
index d1235fc58958..83932626ed6e 100644
--- a/packages/model-typings/src/models/IRoomsModel.ts
+++ b/packages/model-typings/src/models/IRoomsModel.ts
@@ -8,6 +8,7 @@ import type {
UpdateOptions,
UpdateResult,
ModifyResult,
+ CountDocumentsOptions,
} from 'mongodb';
import type { Updater } from '../updater';
@@ -309,4 +310,7 @@ export interface IRoomsModel extends IBaseModel {
e2eQueue?: IRoom['usersWaitingForE2EKeys'],
): Promise>;
countGroupDMsByUids(uids: NonNullable): Promise;
+ countByCreatedOTR(options?: CountDocumentsOptions): Promise;
+ countByBroadcast(options?: CountDocumentsOptions): Promise;
+ countByE2E(options?: CountDocumentsOptions): Promise;
}
diff --git a/packages/model-typings/src/models/IUsersModel.ts b/packages/model-typings/src/models/IUsersModel.ts
index 6029b4913f2d..a2863aba8fe5 100644
--- a/packages/model-typings/src/models/IUsersModel.ts
+++ b/packages/model-typings/src/models/IUsersModel.ts
@@ -224,6 +224,7 @@ export interface IUsersModel extends IBaseModel {
countFederatedExternalUsers(): Promise;
findOnlineUserFromList(userList: string[], isLivechatEnabledWhenAgentIdle?: boolean): FindCursor;
+ countOnlineUserFromList(userList: string[], isLivechatEnabledWhenAgentIdle?: boolean): Promise;
getUnavailableAgents(
departmentId?: string,
extraQuery?: Document,
@@ -244,6 +245,7 @@ export interface IUsersModel extends IBaseModel {
): Promise;
findBotAgents(usernameList?: string[]): FindCursor;
+ countBotAgents(usernameList?: string[]): Promise;
removeAllRoomsByUserId(userId: string): Promise;
removeRoomByUserId(userId: string, rid: string): Promise;
addRoomByUserId(userId: string, rid: string): Promise;
diff --git a/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts b/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts
index 58b9a8a5049d..fa13dfa82977 100644
--- a/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts
+++ b/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts
@@ -5,7 +5,6 @@ import type { IBaseModel } from './IBaseModel';
export interface IWorkspaceCredentialsModel extends IBaseModel {
getCredentialByScope(scope?: string): Promise;
- unsetCredentialByScope(scope?: string): Promise;
updateCredentialByScope(credentials: { scope: string; accessToken: string; expirationDate: Date }): Promise;
removeAllCredentials(): Promise;
}
diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md
index 897dbca44163..9778f5366e8e 100644
--- a/packages/models/CHANGELOG.md
+++ b/packages/models/CHANGELOG.md
@@ -1,5 +1,14 @@
# @rocket.chat/models
+## 1.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/model-typings@1.0.0-rc.3
+
+
## 1.0.0-rc.2
### Patch Changes
diff --git a/packages/models/package.json b/packages/models/package.json
index f138766a4dd3..58c96184b345 100644
--- a/packages/models/package.json
+++ b/packages/models/package.json
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/models",
- "version": "1.0.0-rc.2",
+ "version": "1.0.0-rc.3",
"private": true,
"devDependencies": {
"@rocket.chat/jest-presets": "workspace:~",
diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md
index b10699809231..9c320da06e8b 100644
--- a/packages/rest-typings/CHANGELOG.md
+++ b/packages/rest-typings/CHANGELOG.md
@@ -1,5 +1,14 @@
# @rocket.chat/rest-typings
+## 7.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/core-typings@7.0.0-rc.3
+
+
## 7.0.0-rc.2
### Patch Changes
diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.ts
index 8e97dabc63c5..95e726fd4420 100644
--- a/packages/tracing/src/index.ts
+++ b/packages/tracing/src/index.ts
@@ -2,8 +2,9 @@ import { context, propagation, SpanStatusCode, trace } from '@opentelemetry/api'
import type { Span, SpanOptions, Tracer } from '@opentelemetry/api';
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc';
import { NodeSDK } from '@opentelemetry/sdk-node';
+import type { MongoClient } from 'mongodb';
-export { initDatabaseTracing } from './traceDatabaseCalls';
+import { initDatabaseTracing } from './traceDatabaseCalls';
let tracer: Tracer | undefined;
@@ -11,7 +12,11 @@ export function isTracingEnabled() {
return ['yes', 'true'].includes(String(process.env.TRACING_ENABLED).toLowerCase());
}
-export const startTracing = ({ service }: { service: string }) => {
+export const startTracing = ({ service, db }: { service: string; db: MongoClient }) => {
+ if (!isTracingEnabled()) {
+ return;
+ }
+
const exporter = new OTLPTraceExporter();
const sdk = new NodeSDK({
@@ -22,6 +27,8 @@ export const startTracing = ({ service }: { service: string }) => {
sdk.start();
tracer = trace.getTracer(service);
+
+ initDatabaseTracing(tracer, db);
};
export function tracerSpan ReturnType>(
diff --git a/packages/tracing/src/traceDatabaseCalls.ts b/packages/tracing/src/traceDatabaseCalls.ts
index 6ddde0b39753..8f5f2ba4a7bd 100644
--- a/packages/tracing/src/traceDatabaseCalls.ts
+++ b/packages/tracing/src/traceDatabaseCalls.ts
@@ -1,15 +1,8 @@
+import type { Tracer } from '@opentelemetry/api';
import { trace, context, SpanStatusCode } from '@opentelemetry/api';
import type { MongoClient } from 'mongodb';
-import { isTracingEnabled } from '.';
-
-const tracer = trace.getTracer('core');
-
-export const initDatabaseTracing = (client: MongoClient) => {
- if (!isTracingEnabled()) {
- return;
- }
-
+export const initDatabaseTracing = (tracer: Tracer, client: MongoClient) => {
const DurationStart = new Map();
client.on('commandStarted', (event) => {
diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md
index 69b982da2b70..a8931e77564f 100644
--- a/packages/ui-avatar/CHANGELOG.md
+++ b/packages/ui-avatar/CHANGELOG.md
@@ -1,5 +1,14 @@
# @rocket.chat/ui-avatar
+## 8.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/ui-contexts@12.0.0-rc.3
+
+
## 8.0.0-rc.2
### Patch Changes
diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json
index 4eeeb05e9956..188b5cba0e47 100644
--- a/packages/ui-avatar/package.json
+++ b/packages/ui-avatar/package.json
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/ui-avatar",
- "version": "8.0.0-rc.2",
+ "version": "8.0.0-rc.3",
"private": true,
"devDependencies": {
"@babel/core": "~7.25.8",
@@ -30,7 +30,7 @@
],
"peerDependencies": {
"@rocket.chat/fuselage": "*",
- "@rocket.chat/ui-contexts": "12.0.0-rc.2",
+ "@rocket.chat/ui-contexts": "12.0.0-rc.3",
"react": "~17.0.2"
},
"volta": {
diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md
index 2c467a91aff2..cee0baffbac0 100644
--- a/packages/ui-client/CHANGELOG.md
+++ b/packages/ui-client/CHANGELOG.md
@@ -1,5 +1,15 @@
# @rocket.chat/ui-client
+## 12.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/ui-contexts@12.0.0-rc.3
+ - @rocket.chat/ui-avatar@8.0.0-rc.3
+
+
## 12.0.0-rc.2
### Patch Changes
diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json
index 4811cdbd44b5..94684b465d05 100644
--- a/packages/ui-client/package.json
+++ b/packages/ui-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/ui-client",
- "version": "12.0.0-rc.2",
+ "version": "12.0.0-rc.3",
"private": true,
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
@@ -60,8 +60,8 @@
"@rocket.chat/fuselage": "*",
"@rocket.chat/fuselage-hooks": "*",
"@rocket.chat/icons": "*",
- "@rocket.chat/ui-avatar": "8.0.0-rc.2",
- "@rocket.chat/ui-contexts": "12.0.0-rc.2",
+ "@rocket.chat/ui-avatar": "8.0.0-rc.3",
+ "@rocket.chat/ui-contexts": "12.0.0-rc.3",
"react": "*",
"react-i18next": "*"
},
diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md
index cd3a2999445d..674ccf92fa78 100644
--- a/packages/ui-contexts/CHANGELOG.md
+++ b/packages/ui-contexts/CHANGELOG.md
@@ -1,5 +1,16 @@
# @rocket.chat/ui-contexts
+## 12.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/core-typings@7.0.0-rc.3
+ - @rocket.chat/rest-typings@7.0.0-rc.3
+ - @rocket.chat/ddp-client@0.3.9-rc.3
+
+
## 12.0.0-rc.2
### Patch Changes
diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json
index 2be1327ded89..82d74e0e221e 100644
--- a/packages/ui-contexts/package.json
+++ b/packages/ui-contexts/package.json
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/ui-contexts",
- "version": "12.0.0-rc.2",
+ "version": "12.0.0-rc.3",
"private": true,
"devDependencies": {
"@rocket.chat/core-typings": "workspace:^",
diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md
index ea3fb9a440eb..78fb1ed355db 100644
--- a/packages/ui-video-conf/CHANGELOG.md
+++ b/packages/ui-video-conf/CHANGELOG.md
@@ -1,5 +1,15 @@
# @rocket.chat/ui-video-conf
+## 12.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/ui-contexts@12.0.0-rc.3
+ - @rocket.chat/ui-avatar@8.0.0-rc.3
+
+
## 12.0.0-rc.2
### Patch Changes
diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json
index 4d15b5745c12..9b063ed2dd20 100644
--- a/packages/ui-video-conf/package.json
+++ b/packages/ui-video-conf/package.json
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/ui-video-conf",
- "version": "12.0.0-rc.2",
+ "version": "12.0.0-rc.3",
"private": true,
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
@@ -58,8 +58,8 @@
"@rocket.chat/fuselage-hooks": "*",
"@rocket.chat/icons": "*",
"@rocket.chat/styled": "*",
- "@rocket.chat/ui-avatar": "8.0.0-rc.2",
- "@rocket.chat/ui-contexts": "12.0.0-rc.2",
+ "@rocket.chat/ui-avatar": "8.0.0-rc.3",
+ "@rocket.chat/ui-contexts": "12.0.0-rc.3",
"react": "~17.0.2",
"react-dom": "^17.0.2"
},
diff --git a/packages/ui-voip/CHANGELOG.md b/packages/ui-voip/CHANGELOG.md
index 5bb5779af93e..08dcddb94073 100644
--- a/packages/ui-voip/CHANGELOG.md
+++ b/packages/ui-voip/CHANGELOG.md
@@ -1,5 +1,16 @@
# @rocket.chat/ui-voip
+## 2.0.0-rc.3
+
+### Patch Changes
+
+- Updated dependencies []:
+
+ - @rocket.chat/ui-contexts@12.0.0-rc.3
+ - @rocket.chat/ui-avatar@8.0.0-rc.3
+ - @rocket.chat/ui-client@12.0.0-rc.3
+
+
## 2.0.0-rc.2
### Patch Changes
diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json
index f1e79d3352ed..ff25c6795899 100644
--- a/packages/ui-voip/package.json
+++ b/packages/ui-voip/package.json
@@ -1,6 +1,6 @@
{
"name": "@rocket.chat/ui-voip",
- "version": "2.0.0-rc.2",
+ "version": "2.0.0-rc.3",
"private": true,
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
@@ -67,9 +67,9 @@
"@rocket.chat/fuselage-hooks": "*",
"@rocket.chat/icons": "*",
"@rocket.chat/styled": "*",
- "@rocket.chat/ui-avatar": "8.0.0-rc.2",
- "@rocket.chat/ui-client": "12.0.0-rc.2",
- "@rocket.chat/ui-contexts": "12.0.0-rc.2",
+ "@rocket.chat/ui-avatar": "8.0.0-rc.3",
+ "@rocket.chat/ui-client": "12.0.0-rc.3",
+ "@rocket.chat/ui-contexts": "12.0.0-rc.3",
"react": "~17.0.2",
"react-aria": "~3.23.1",
"react-dom": "^17.0.2"
diff --git a/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx b/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx
index a10084934cd4..249582107b5f 100644
--- a/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx
+++ b/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx
@@ -11,9 +11,9 @@ type ActionButtonProps = Pick, 'clas
const VoipActionButton = ({ disabled, label, pressed, icon, danger, success, className, onClick }: ActionButtonProps) => (
}
title={label}
diff --git a/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap b/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap
index 2f4b29aa9de8..516c82d68465 100644
--- a/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap
+++ b/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap
@@ -25,7 +25,7 @@ exports[`renders NeutralButton without crashing 1`] = `