snapshot of https://github.com/RocketChat/Rocket.Chat.git (develop, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
Some checks failed
Create issues from TODOs / todos (push) Failing after 3s
Close inactive issues / close-issues (push) Has been cancelled
Deploy GitHub Pages / deploy-preview (push) Has been cancelled
CI / ⚙️ Variables Setup (push) Has been cancelled
CI / ⚙️ Test Guard (push) Has been cancelled
CI / 🚀 Notify external services - draft (push) Has been cancelled
CI / 📦 Build Packages (push) Has been cancelled
CI / 📦 Meteor Build (coverage) (push) Has been cancelled
CI / 📦 Meteor Build (production) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [account-service presence-service omnichannel-transcript-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [authorization-service queue-worker-service ddp-streamer-service], fips) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Build Docker (amd64, [rocketchat], fips) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [account-service presence-service omnichannel-transcript-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [authorization-service queue-worker-service ddp-streamer-service], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], ${{ (github.event_name != 'release' && github.ref != 'refs/heads/develop') && 'coverage' || 'production' }}) (push) Has been cancelled
CI / 🚢 Build Docker (arm64, [rocketchat], coverage) (push) Has been cancelled
CI / 🚢 Publish Docker Images (ghcr.io) (push) Has been cancelled
CI / 📦 Track Image Sizes (push) Has been cancelled
CI / 🔎 Code Check - Action Lint (push) Has been cancelled
CI / 🔎 Code Check (push) Has been cancelled
CI / 🔨 Test Storybook (push) Has been cancelled
CI / 🔨 Test Unit (push) Has been cancelled
CI / 🔨 Test API (CE) (push) Has been cancelled
CI / 🔨 Test API Livechat (CE) (push) Has been cancelled
CI / 🔨 Test UI (CE) (push) Has been cancelled
CI / 🔨 Test API (EE) (push) Has been cancelled
CI / 🔨 Test API Livechat (EE) (push) Has been cancelled
CI / 🔨 Test API Apps (deno-runtime - EE) (push) Has been cancelled
CI / 🔨 Test UI (EE) (push) Has been cancelled
CI / 🔨 Test API (FIPS) (push) Has been cancelled
CI / 🔨 Test API Livechat (FIPS) (push) Has been cancelled
CI / 🔨 Test UI (FIPS) (push) Has been cancelled
CI / 🔨 Test Federation Matrix (push) Has been cancelled
CI / 📊 Report Coverage (push) Has been cancelled
CI / ✅ Tests Done (push) Has been cancelled
CI / 🚀 Publish build assets (push) Has been cancelled
CI / 🚀 Publish Docker Images (DockerHub) (push) Has been cancelled
CI / 🚀 Notify external services (push) Has been cancelled
CI / Update Version Durability (push) Has been cancelled
Release / Release (push) Has been cancelled
Auto-close duplicate issues / auto-close-duplicates (push) Failing after 1s
Code scanning - action / CodeQL-Build (push) Failing after 1s
This commit is contained in:
3
apps/meteor/definition/externals/atlassian-crowd-patched.d.ts
vendored
Normal file
3
apps/meteor/definition/externals/atlassian-crowd-patched.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'atlassian-crowd-patched' {
|
||||
export = any;
|
||||
}
|
||||
8
apps/meteor/definition/externals/csv-parse.d.ts
vendored
Normal file
8
apps/meteor/definition/externals/csv-parse.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// The Meteor bundler resolves npm requires by physical path and doesn't support
|
||||
// package `exports` subpaths, so runtime code must keep importing the real file
|
||||
// 'csv-parse/lib/sync'. That path isn't in csv-parse's exports map, which newer
|
||||
// TypeScript resolution modes enforce — bridge the types to the exports-declared
|
||||
// entry point.
|
||||
declare module 'csv-parse/lib/sync' {
|
||||
export * from 'csv-parse/sync';
|
||||
}
|
||||
7
apps/meteor/definition/externals/express-session.d.ts
vendored
Normal file
7
apps/meteor/definition/externals/express-session.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import 'express-session';
|
||||
|
||||
declare module 'express-session' {
|
||||
interface SessionData {
|
||||
loginClient?: string;
|
||||
}
|
||||
}
|
||||
17
apps/meteor/definition/externals/express.d.ts
vendored
Normal file
17
apps/meteor/definition/externals/express.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'express';
|
||||
|
||||
import type { IUser } from '@rocket.chat/core-typings';
|
||||
|
||||
declare module 'express' {
|
||||
interface Request {
|
||||
userId?: string;
|
||||
user?: IUser;
|
||||
unauthorized?: boolean;
|
||||
}
|
||||
}
|
||||
declare global {
|
||||
namespace Express {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- merges with Passport's Express.User
|
||||
interface User extends IUser {}
|
||||
}
|
||||
}
|
||||
29
apps/meteor/definition/externals/global.d.ts
vendored
Normal file
29
apps/meteor/definition/externals/global.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { Server } from 'net';
|
||||
|
||||
declare global {
|
||||
interface Navigator {
|
||||
/** @deprecated */
|
||||
readonly userLanguage?: string;
|
||||
}
|
||||
|
||||
const __meteor_runtime_config__: {
|
||||
ROOT_URL_PATH_PREFIX: string;
|
||||
ROOT_URL: string;
|
||||
};
|
||||
|
||||
interface Window {
|
||||
defaultUserLanguage?: () => string;
|
||||
DISABLE_ANIMATION?: boolean;
|
||||
ServiceConfiguration?: unknown;
|
||||
__meteor_runtime_config__: {
|
||||
ROOT_URL_PATH_PREFIX: string;
|
||||
ROOT_URL: string;
|
||||
};
|
||||
}
|
||||
|
||||
namespace NodeJS {
|
||||
interface Process {
|
||||
emit(event: 'message', message: any, sendHandle?: Server | Socket): boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
4
apps/meteor/definition/externals/ldap-escape.d.ts
vendored
Normal file
4
apps/meteor/definition/externals/ldap-escape.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare module 'ldap-escape' {
|
||||
export function filter(strings: TemplateStringsArray, ...values: string[]): string;
|
||||
export function dn(strings: TemplateStringsArray, ...values: string[]): string;
|
||||
}
|
||||
70
apps/meteor/definition/externals/meteor/accounts-base.d.ts
vendored
Normal file
70
apps/meteor/definition/externals/meteor/accounts-base.d.ts
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
declare module 'meteor/accounts-base' {
|
||||
import type { Meteor } from 'meteor/meteor';
|
||||
|
||||
namespace Accounts {
|
||||
const storageLocation: Window['localStorage'];
|
||||
|
||||
function _expireTokens(oldestValidDate?: Date, userId?: string): Promise<void>;
|
||||
|
||||
function _bcryptRounds(): number;
|
||||
|
||||
function _getLoginToken(connectionId: string): string | undefined;
|
||||
|
||||
function insertUserDoc(options: Record<string, any>, user: Record<string, any>): string;
|
||||
|
||||
function _generateStampedLoginToken(): { token: string; when: Date };
|
||||
|
||||
function _insertLoginToken(userId: string, token: { token: string; when: Date }): Promise<void>;
|
||||
|
||||
function _runLoginHandlers<T>(methodInvocation: T, loginRequest: Record<string, any>): Promise<LoginMethodResult>;
|
||||
|
||||
function registerLoginHandler(name: string, handler: (options: any) => undefined | object): void;
|
||||
|
||||
function _setAccountData(connectionId: string, key: string, token: string): void;
|
||||
|
||||
function _checkPasswordAsync(user: Meteor.User, password: Password): Promise<{ userId: string; error?: any }>;
|
||||
|
||||
function updateOrCreateUserFromExternalService(
|
||||
serviceName: string,
|
||||
serviceData: Record<string, unknown>,
|
||||
options: Record<string, unknown>,
|
||||
): Promise<Record<string, unknown> | undefined>;
|
||||
|
||||
function addAutopublishFields(options: Record<string, unknown>): void;
|
||||
|
||||
function _clearAllLoginTokens(userId: string | null): void;
|
||||
|
||||
function config(options: { clientStorage: 'session' | 'local' }): void;
|
||||
|
||||
class ConfigError extends Error {}
|
||||
|
||||
class LoginCancelledError extends Error {
|
||||
public static readonly numericError: number;
|
||||
}
|
||||
|
||||
const _accountData: Record<string, any>;
|
||||
|
||||
interface AccountsServerOptions {
|
||||
ambiguousErrorMessages?: boolean;
|
||||
restrictCreationByEmailDomain?: string | (() => string);
|
||||
forbidClientAccountCreation?: boolean | undefined;
|
||||
}
|
||||
|
||||
export const _options: AccountsServerOptions;
|
||||
|
||||
namespace oauth {
|
||||
function credentialRequestCompleteHandler(
|
||||
callback?: (error?: globalThis.Error | Meteor.Error | Meteor.TypedError) => void,
|
||||
totpCode?: string,
|
||||
): (credentialTokenOrError?: string | globalThis.Error | Meteor.Error | Meteor.TypedError) => void;
|
||||
|
||||
function registerService(name: string): void;
|
||||
|
||||
function serviceNames(): string[];
|
||||
}
|
||||
|
||||
const connection: {
|
||||
userId(): string | null;
|
||||
};
|
||||
}
|
||||
}
|
||||
7
apps/meteor/definition/externals/meteor/check.d.ts
vendored
Normal file
7
apps/meteor/definition/externals/meteor/check.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import 'meteor/check';
|
||||
|
||||
declare module 'meteor/check' {
|
||||
namespace Match {
|
||||
function Where<T, U extends T>(condition: (val: T) => val is U): Matcher<U>;
|
||||
}
|
||||
}
|
||||
24
apps/meteor/definition/externals/meteor/ddp-common.d.ts
vendored
Normal file
24
apps/meteor/definition/externals/meteor/ddp-common.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
declare module 'meteor/ddp-common' {
|
||||
namespace DDPCommon {
|
||||
function stringifyDDP(msg: EJSONable): string;
|
||||
function parseDDP(msg: string): EJSONable;
|
||||
class MethodInvocation {
|
||||
constructor(options: {
|
||||
connection: {
|
||||
id: string;
|
||||
close: () => void;
|
||||
clientAddress: string;
|
||||
httpHeaders: Record<string, any>;
|
||||
};
|
||||
isSimulation?: boolean;
|
||||
userId?: string;
|
||||
});
|
||||
}
|
||||
|
||||
class Heartbeat {
|
||||
_seenPacket: boolean;
|
||||
|
||||
messageReceived(): void;
|
||||
}
|
||||
}
|
||||
}
|
||||
10
apps/meteor/definition/externals/meteor/ddp-rate-limiter.d.ts
vendored
Normal file
10
apps/meteor/definition/externals/meteor/ddp-rate-limiter.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
declare module 'meteor/ddp-rate-limiter' {
|
||||
namespace DDPRateLimiter {
|
||||
function _increment(number: DDPRateLimiter.Matcher): void;
|
||||
function _check(number: DDPRateLimiter.Matcher): {
|
||||
allowed: boolean;
|
||||
timeToReset: number;
|
||||
};
|
||||
function getErrorMessage(result: { allowed: boolean }): string;
|
||||
}
|
||||
}
|
||||
9
apps/meteor/definition/externals/meteor/ddp.d.ts
vendored
Normal file
9
apps/meteor/definition/externals/meteor/ddp.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { DDPCommon } from 'meteor/ddp-common';
|
||||
|
||||
declare module 'meteor/ddp' {
|
||||
namespace DDP {
|
||||
const _CurrentInvocation: {
|
||||
withValue(invocation: DDPCommon.MethodInvocation, func: () => Promise<any>): Promise<any>;
|
||||
};
|
||||
}
|
||||
}
|
||||
15
apps/meteor/definition/externals/meteor/ejson.d.ts
vendored
Normal file
15
apps/meteor/definition/externals/meteor/ejson.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'meteor/ejson';
|
||||
|
||||
declare module 'meteor/ejson' {
|
||||
namespace EJSON {
|
||||
function stringify(
|
||||
val: EJSONableProperty,
|
||||
options?: {
|
||||
indent?: boolean | number | string | undefined;
|
||||
canonical?: boolean | undefined;
|
||||
},
|
||||
): string;
|
||||
|
||||
function parse<T>(str: string): EJSONableProperty & T;
|
||||
}
|
||||
}
|
||||
3
apps/meteor/definition/externals/meteor/facebook-oauth.d.ts
vendored
Normal file
3
apps/meteor/definition/externals/meteor/facebook-oauth.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'meteor/facebook-oauth' {
|
||||
export const Facebook: any;
|
||||
}
|
||||
5
apps/meteor/definition/externals/meteor/facts-base.d.ts
vendored
Normal file
5
apps/meteor/definition/externals/meteor/facts-base.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare module 'meteor/facts-base' {
|
||||
namespace Facts {
|
||||
function incrementServerFact(pkg: 'pkg' | 'fact', fact: string | number, increment: number): void;
|
||||
}
|
||||
}
|
||||
3
apps/meteor/definition/externals/meteor/google-oauth.d.ts
vendored
Normal file
3
apps/meteor/definition/externals/meteor/google-oauth.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'meteor/google-oauth' {
|
||||
export const Google: any;
|
||||
}
|
||||
54
apps/meteor/definition/externals/meteor/http.d.ts
vendored
Normal file
54
apps/meteor/definition/externals/meteor/http.d.ts
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
import 'meteor/http';
|
||||
import type { Meteor } from 'meteor/meteor';
|
||||
|
||||
declare module 'meteor/http' {
|
||||
namespace HTTP {
|
||||
interface HTTPRequest {
|
||||
content?: string | undefined;
|
||||
data?: any;
|
||||
query?: string | undefined;
|
||||
params?: { [id: string]: string } | undefined;
|
||||
auth?: string | undefined;
|
||||
headers?: { [id: string]: string } | undefined;
|
||||
timeout?: number | undefined;
|
||||
followRedirects?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface HTTPResponse {
|
||||
statusCode?: number | undefined;
|
||||
headers?: { [id: string]: string } | undefined;
|
||||
content?: string | undefined;
|
||||
data?: any;
|
||||
}
|
||||
|
||||
type AsyncCallback = (error: Meteor.Error | null, result?: HTTPResponse) => void;
|
||||
|
||||
function del(url: string, callOptions?: HTTP.HTTPRequest, asyncCallback?: AsyncCallback): HTTP.HTTPResponse;
|
||||
|
||||
function get(url: string, callOptions?: HTTP.HTTPRequest, asyncCallback?: AsyncCallback): HTTP.HTTPResponse;
|
||||
|
||||
function post(url: string, callOptions?: HTTP.HTTPRequest, asyncCallback?: AsyncCallback): HTTP.HTTPResponse;
|
||||
|
||||
function put(url: string, callOptions?: HTTP.HTTPRequest, asyncCallback?: AsyncCallback): HTTP.HTTPResponse;
|
||||
|
||||
function call(method: string, url: string, options?: HTTP.HTTPRequest, asyncCallback?: AsyncCallback): HTTP.HTTPResponse;
|
||||
|
||||
function call(
|
||||
method: string,
|
||||
url: string,
|
||||
options?: {
|
||||
content?: string;
|
||||
data?: object;
|
||||
query?: string;
|
||||
params?: object;
|
||||
auth?: string;
|
||||
headers?: object;
|
||||
timeout?: number;
|
||||
followRedirects?: boolean;
|
||||
npmRequestOptions?: object;
|
||||
beforeSend?: (xhr: XMLHttpRequest) => void;
|
||||
},
|
||||
asyncCallback?: AsyncCallback,
|
||||
): HTTP.HTTPResponse;
|
||||
}
|
||||
}
|
||||
3
apps/meteor/definition/externals/meteor/meteor-developer-oauth.d.ts
vendored
Normal file
3
apps/meteor/definition/externals/meteor/meteor-developer-oauth.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'meteor/meteor-developer-oauth' {
|
||||
export const MeteorDeveloperAccounts: any;
|
||||
}
|
||||
197
apps/meteor/definition/externals/meteor/meteor.d.ts
vendored
Normal file
197
apps/meteor/definition/externals/meteor/meteor.d.ts
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
import 'meteor/meteor';
|
||||
import type { IUser } from '@rocket.chat/core-typings';
|
||||
import type { ServerMethods } from '@rocket.chat/ddp-client';
|
||||
import type { DDPCommon, IStreamerConstructor, IStreamer } from 'meteor/ddp-common';
|
||||
|
||||
type StringifyBuffers<T extends unknown[]> = {
|
||||
[P in keyof T]: T[P] extends Buffer ? string : T[P];
|
||||
};
|
||||
|
||||
declare global {
|
||||
namespace Assets {
|
||||
function getBinaryAsync(assetPath: string): Promise<Uint8Array | undefined>;
|
||||
|
||||
function getTextAsync(assetPath: string): Promise<string | undefined>;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'meteor/meteor' {
|
||||
namespace Meteor {
|
||||
const Streamer: IStreamerConstructor & IStreamer;
|
||||
|
||||
namespace StreamerCentral {
|
||||
const instances: {
|
||||
[name: string]: IStreamer;
|
||||
};
|
||||
|
||||
function on(name: string, callback: (...args: any[]) => void): void;
|
||||
}
|
||||
|
||||
interface ErrorStatic {
|
||||
new (error: string | number, reason?: string, details?: any): Error;
|
||||
}
|
||||
|
||||
interface Error extends globalThis.Error {
|
||||
error: string | number;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
interface Device {
|
||||
isDesktop(): boolean;
|
||||
isPhone(): boolean;
|
||||
}
|
||||
|
||||
const server: {
|
||||
sessions: Map<string, { userId: string; heartbeat: DDPCommon.Heartbeat; connectionHandle: Meteor.Connection }>;
|
||||
publish_handlers: {
|
||||
meteor_autoupdate_clientVersions(): void;
|
||||
};
|
||||
};
|
||||
|
||||
const runAsUser: <T>(userId: string, scope: () => T) => T;
|
||||
|
||||
function userAsync(): Promise<IUser | null>;
|
||||
|
||||
interface MethodThisType {
|
||||
twoFactorChecked: boolean | undefined;
|
||||
}
|
||||
|
||||
interface IDDPMessage {
|
||||
msg: 'method';
|
||||
method: string;
|
||||
params: EJSON[];
|
||||
id: string;
|
||||
}
|
||||
|
||||
interface IDDPUpdatedMessage {
|
||||
msg: 'updated';
|
||||
methods: string[];
|
||||
}
|
||||
|
||||
interface IDDPStream {
|
||||
eventCallbacks: {
|
||||
message: Array<(data: string) => void>;
|
||||
reset: Array<() => void>;
|
||||
disconnect: Array<() => void>;
|
||||
};
|
||||
socket?: {
|
||||
onmessage: (data: { type: string; data: string }) => void;
|
||||
_didMessage: (data: string) => void;
|
||||
send: (data: string) => void;
|
||||
};
|
||||
_launchConnectionAsync?: () => void;
|
||||
on: {
|
||||
(key: 'message', callback: (data: string) => void): void;
|
||||
(key: 'reset', callback: () => void): void;
|
||||
(key: 'disconnect', callback: () => void): void;
|
||||
};
|
||||
disconnect(options?: { _permanent?: boolean; _error?: unknown }): void;
|
||||
|
||||
currentStatus: {
|
||||
status: string;
|
||||
connected: boolean;
|
||||
retryCount: number;
|
||||
retryTime?: number;
|
||||
reason?: string;
|
||||
};
|
||||
statusListeners?: { changed(): void };
|
||||
forEachCallback(name: string, cb: (callback: (...args: unknown[]) => void) => void): void;
|
||||
send(data: string): void;
|
||||
status(): IDDPStream['currentStatus'];
|
||||
statusChanged(): void;
|
||||
reconnect(options?: unknown): void;
|
||||
disconnect(options?: { _permanent?: boolean; _error?: unknown }): void;
|
||||
_lostConnection(error?: unknown): void;
|
||||
}
|
||||
|
||||
interface IMeteorConnection {
|
||||
httpHeaders: Record<string, any>;
|
||||
referer: string;
|
||||
clientAddress: string;
|
||||
_send(message: IDDPMessage): void;
|
||||
|
||||
_methodInvokers: Record<string, any>;
|
||||
_subsBeingRevived: Record<string, unknown>;
|
||||
_methodsBlockingQuiescence: Record<string, unknown>;
|
||||
_messagesBufferedUntilQuiescence: unknown[];
|
||||
_outstandingMethodBlocks: unknown[];
|
||||
|
||||
_livedata_data(message: IDDPUpdatedMessage): void;
|
||||
|
||||
_stream: IDDPStream | undefined;
|
||||
|
||||
// Updated: onMessage is now inside _streamHandlers
|
||||
_streamHandlers: {
|
||||
onMessage(message: string): void;
|
||||
onReset(): void;
|
||||
};
|
||||
|
||||
status(): {
|
||||
connected: boolean;
|
||||
retryCount?: number;
|
||||
retryTime?: number;
|
||||
status: 'connected' | 'connecting' | 'failed' | 'waiting' | 'offline';
|
||||
reconnect: () => void;
|
||||
};
|
||||
|
||||
subscribe(
|
||||
id: string,
|
||||
name: string,
|
||||
...args: [
|
||||
...unknown,
|
||||
callbacks?: {
|
||||
onReady?: (...args: any[]) => void;
|
||||
onStop?: (error?: Error) => void;
|
||||
onError?: (error: Error) => void;
|
||||
},
|
||||
]
|
||||
): SubscriptionHandle;
|
||||
|
||||
call(methodName: string, ...args: [...unknown, callback?: (error: Error | null, result: unknown) => void]): void;
|
||||
|
||||
setUserId(uid: string | null): void;
|
||||
}
|
||||
|
||||
const connection: IMeteorConnection;
|
||||
|
||||
function _relativeToSiteRootUrl(path: string): string;
|
||||
const _localStorage: Window['localStorage'];
|
||||
|
||||
function methods<TServerMethods extends ServerMethods>(methods: {
|
||||
[TMethodName in keyof TServerMethods]?: (
|
||||
this: MethodThisType,
|
||||
...args: StringifyBuffers<Parameters<TServerMethods[TMethodName]>>
|
||||
) => ReturnType<TServerMethods[TMethodName]> | Promise<ReturnType<TServerMethods[TMethodName]>>;
|
||||
}): void;
|
||||
|
||||
const AppCache:
|
||||
| {
|
||||
config: (config: { onlineOnly: string[] }) => void;
|
||||
}
|
||||
| undefined;
|
||||
|
||||
function _isPromise(obj: unknown): obj is Promise<unknown>;
|
||||
|
||||
function _runFresh(func: () => void): void;
|
||||
|
||||
class _SynchronousQueue {
|
||||
queueTask(arg0: () => void): void;
|
||||
|
||||
drain(): unknown;
|
||||
}
|
||||
|
||||
interface UserServices {
|
||||
totp?: {
|
||||
enabled: boolean;
|
||||
hashedBackup: string[];
|
||||
secret: string;
|
||||
tempSecret?: string;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var Meteor: {
|
||||
[key: `loginWith${string}`]: any;
|
||||
};
|
||||
}
|
||||
6
apps/meteor/definition/externals/meteor/meteorhacks-inject-initial.d.ts
vendored
Normal file
6
apps/meteor/definition/externals/meteor/meteorhacks-inject-initial.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
declare module 'meteor/meteorhacks:inject-initial' {
|
||||
namespace Inject {
|
||||
function rawBody(key: string, value: string): void;
|
||||
function rawModHtml(key: string, value: (html: string) => string): void;
|
||||
}
|
||||
}
|
||||
44
apps/meteor/definition/externals/meteor/mongo.d.ts
vendored
Normal file
44
apps/meteor/definition/externals/meteor/mongo.d.ts
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import type * as mongodb from 'mongodb';
|
||||
|
||||
declare module 'meteor/mongo' {
|
||||
interface RemoteCollectionDriver {
|
||||
mongo: MongoConnection;
|
||||
}
|
||||
|
||||
interface OplogHandle {
|
||||
stop(): void;
|
||||
onOplogEntry(trigger: Record<string, any>, callback: (notification: unknown) => void): void;
|
||||
onSkippedEntries(callback: () => void): void;
|
||||
waitUntilCaughtUp(): void;
|
||||
_defineTooFarBehind(value: number): void;
|
||||
_entryQueue?: unknown[];
|
||||
}
|
||||
|
||||
interface MongoConnection {
|
||||
db: mongodb.Db;
|
||||
client: mongodb.MongoClient;
|
||||
_oplogHandle: OplogHandle;
|
||||
rawCollection(name: string): mongodb.Collection;
|
||||
}
|
||||
|
||||
namespace MongoInternals {
|
||||
function defaultRemoteCollectionDriver(): RemoteCollectionDriver;
|
||||
|
||||
class ConnectionClass {}
|
||||
|
||||
function Connection(): ConnectionClass;
|
||||
}
|
||||
|
||||
namespace Mongo {
|
||||
interface CollectionStatic {
|
||||
new <T>(
|
||||
name: string | null,
|
||||
options?: {
|
||||
connection?: object | null;
|
||||
idGeneration?: string;
|
||||
transform?: (<T>(doc: T) => T) | null;
|
||||
},
|
||||
): Collection<T>;
|
||||
}
|
||||
}
|
||||
}
|
||||
4
apps/meteor/definition/externals/meteor/npm-mongo.d.ts
vendored
Normal file
4
apps/meteor/definition/externals/meteor/npm-mongo.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare module 'meteor/npm-mongo' {
|
||||
// The npm-mongo Meteor package re-exports the mongodb driver under this name.
|
||||
export * as NpmModuleMongodb from 'mongodb';
|
||||
}
|
||||
54
apps/meteor/definition/externals/meteor/oauth.d.ts
vendored
Normal file
54
apps/meteor/definition/externals/meteor/oauth.d.ts
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
declare module 'meteor/oauth' {
|
||||
import type { IRocketChatRecord } from '@rocket.chat/core-typings';
|
||||
import type { Meteor } from 'meteor/meteor';
|
||||
import type { Mongo } from 'meteor/mongo';
|
||||
|
||||
// These functions may only be used on the client's Mongo.Collection
|
||||
type MeteorServerMongoCollection<T extends MongoNpmModule.Document, U = T> = Omit<
|
||||
Mongo.Collection<T, U>,
|
||||
'remove' | 'findOne' | 'insert' | 'update' | 'upsert'
|
||||
>;
|
||||
|
||||
interface IOauthCredentials extends IRocketChatRecord {
|
||||
key: string;
|
||||
credentialSecret: string;
|
||||
credential:
|
||||
| {
|
||||
error: Error;
|
||||
}
|
||||
| string;
|
||||
}
|
||||
|
||||
namespace OAuth {
|
||||
function _retrievePendingCredential(key: string, ...args: string[]): Promise<string | Error | void>;
|
||||
function openSecret(secret: string): string;
|
||||
function retrieveCredential(credentialToken: string, credentialSecret: string);
|
||||
function _retrieveCredentialSecret(credentialToken: string): string | null;
|
||||
// luckily we don't have any reference to this collection on the client code, so let's type it according to what can be used on the server
|
||||
const _pendingCredentials: MeteorServerMongoCollection<IOauthCredentials>;
|
||||
const _storageTokenPrefix: string;
|
||||
|
||||
function launchLogin(options: {
|
||||
loginService: string;
|
||||
loginStyle: string;
|
||||
loginUrl: string;
|
||||
credentialRequestCompleteCallback?: (credentialTokenOrError?: string | Error) => void;
|
||||
credentialToken: string;
|
||||
popupOptions?: {
|
||||
width?: number;
|
||||
height?: number;
|
||||
};
|
||||
}): void;
|
||||
|
||||
function _stateParam(loginStyle: string, credentialToken: string, redirectUrl?: string): string;
|
||||
|
||||
function _redirectUri(
|
||||
serviceName: string,
|
||||
config: { loginStyle?: string },
|
||||
params?: Record<string, any>,
|
||||
absoluteUrlOptions?: Record<string, any>,
|
||||
): string;
|
||||
|
||||
function _loginStyle(serviceName: string, config: { loginStyle?: string }, options?: Meteor.LoginWithExternalServiceOptions): string;
|
||||
}
|
||||
}
|
||||
14
apps/meteor/definition/externals/meteor/ostrio-cookies.d.ts
vendored
Normal file
14
apps/meteor/definition/externals/meteor/ostrio-cookies.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
declare module 'meteor/ostrio:cookies' {
|
||||
class Cookies {
|
||||
constructor(opts?: {
|
||||
TTL?: number | false;
|
||||
auto?: boolean;
|
||||
handler?: (cookies: Cookies) => void;
|
||||
runOnServer?: boolean;
|
||||
allowQueryStringCookies?: boolean;
|
||||
allowedCordovaOrigins?: RegExp | boolean;
|
||||
});
|
||||
|
||||
get(key: string, _tmp?: string): string | undefined;
|
||||
}
|
||||
}
|
||||
25
apps/meteor/definition/externals/meteor/rate-limit.d.ts
vendored
Normal file
25
apps/meteor/definition/externals/meteor/rate-limit.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
declare module 'meteor/rate-limit' {
|
||||
type RateLimiterOptionsToCheck = {
|
||||
IPAddr: string;
|
||||
route: string;
|
||||
};
|
||||
|
||||
type RateLimiterCheckResult = {
|
||||
allowed: boolean;
|
||||
timeToReset: number;
|
||||
numInvocationsLeft: number;
|
||||
};
|
||||
|
||||
class RateLimiter {
|
||||
public check(input: RateLimiterOptionsToCheck): Promise<RateLimiterCheckResult>;
|
||||
|
||||
public increment(input: RateLimiterOptionsToCheck);
|
||||
|
||||
public addRule(
|
||||
rule: { IPAddr: (input: any) => any; route: string },
|
||||
numRequestsAllowed: number,
|
||||
intervalTime: number,
|
||||
callback?: () => void,
|
||||
): void;
|
||||
}
|
||||
}
|
||||
5
apps/meteor/definition/externals/meteor/routepolicy.d.ts
vendored
Normal file
5
apps/meteor/definition/externals/meteor/routepolicy.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare module 'meteor/routepolicy' {
|
||||
class RoutePolicy {
|
||||
static declare(urlPrefix: string, type: string): void;
|
||||
}
|
||||
}
|
||||
14
apps/meteor/definition/externals/meteor/service-configuration.d.ts
vendored
Normal file
14
apps/meteor/definition/externals/meteor/service-configuration.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
declare module 'meteor/service-configuration' {
|
||||
interface Configuration {
|
||||
appId: string;
|
||||
secret: string;
|
||||
service: string;
|
||||
|
||||
buttonLabelText?: string;
|
||||
buttonLabelColor?: string;
|
||||
buttonColor?: string;
|
||||
|
||||
clientConfig: unknown;
|
||||
clientId?: string;
|
||||
}
|
||||
}
|
||||
5
apps/meteor/definition/externals/meteor/tracker.d.ts
vendored
Normal file
5
apps/meteor/definition/externals/meteor/tracker.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare module 'meteor/tracker' {
|
||||
namespace Tracker {
|
||||
function nonreactive<T>(func: () => T): T;
|
||||
}
|
||||
}
|
||||
3
apps/meteor/definition/externals/meteor/twitter-oauth.d.ts
vendored
Normal file
3
apps/meteor/definition/externals/meteor/twitter-oauth.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'meteor/twitter-oauth' {
|
||||
export const Twitter: any;
|
||||
}
|
||||
5
apps/meteor/definition/externals/meteor/url.d.ts
vendored
Normal file
5
apps/meteor/definition/externals/meteor/url.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare module 'meteor/url' {
|
||||
const URL: typeof window.URL & {
|
||||
_constructUrl(url: string, query?: string, paramsForUrl?: Record<string, string>): string;
|
||||
};
|
||||
}
|
||||
15
apps/meteor/definition/externals/meteor/webapp.d.ts
vendored
Normal file
15
apps/meteor/definition/externals/meteor/webapp.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
declare module 'meteor/webapp' {
|
||||
import type { IncomingMessage } from 'node:http';
|
||||
import type { UrlWithParsedQuery } from 'node:url';
|
||||
|
||||
import type * as express from 'express';
|
||||
|
||||
namespace WebApp {
|
||||
// Present in Meteor 3's generated types but missing from @types/meteor.
|
||||
const rawHandlers: express.Application;
|
||||
|
||||
function setInlineScriptsAllowed(allowed: boolean): Promise<void>;
|
||||
|
||||
function categorizeRequest(req: IncomingMessage): { arch: string; path: string; url: UrlWithParsedQuery } & Record<string, unknown>;
|
||||
}
|
||||
}
|
||||
5
apps/meteor/definition/externals/xml-encryption.d.ts
vendored
Normal file
5
apps/meteor/definition/externals/xml-encryption.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import 'xml-encryption';
|
||||
|
||||
declare module 'xml-encryption' {
|
||||
export function decrypt(xml: Element, options: DecryptOptions, callback: (err: Error, result: any) => void): string;
|
||||
}
|
||||
48
apps/meteor/definition/externals/yaqrcode.d.ts
vendored
Normal file
48
apps/meteor/definition/externals/yaqrcode.d.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
type TypeNumber =
|
||||
| 1
|
||||
| 2
|
||||
| 3
|
||||
| 4
|
||||
| 5
|
||||
| 6
|
||||
| 7
|
||||
| 8
|
||||
| 9
|
||||
| 10
|
||||
| 11
|
||||
| 12
|
||||
| 13
|
||||
| 14
|
||||
| 15
|
||||
| 16
|
||||
| 17
|
||||
| 18
|
||||
| 19
|
||||
| 20
|
||||
| 21
|
||||
| 22
|
||||
| 23
|
||||
| 24
|
||||
| 25
|
||||
| 26
|
||||
| 27
|
||||
| 28
|
||||
| 29
|
||||
| 30
|
||||
| 31
|
||||
| 32
|
||||
| 33
|
||||
| 34
|
||||
| 35
|
||||
| 36
|
||||
| 37
|
||||
| 38
|
||||
| 39;
|
||||
interface Params {
|
||||
size?: number;
|
||||
errorCorrectLevel?: 'L' | 'M' | 'Q' | 'H';
|
||||
typeNumber?: TypeNumber;
|
||||
}
|
||||
declare module 'yaqrcode' {
|
||||
export default function qrcode(source: string, params?: Params): string;
|
||||
}
|
||||
Reference in New Issue
Block a user