
- Complete NestJS TypeScript implementation with WebSocket support - Direct messaging (DM) and group chat functionality - End-to-end encryption with AES encryption and key pairs - Media file support (images, videos, audio, documents) up to 100MB - Push notifications with Firebase Cloud Messaging integration - Mention alerts and real-time typing indicators - User authentication with JWT and Passport - SQLite database with TypeORM entities and relationships - Comprehensive API documentation with Swagger/OpenAPI - File upload handling with secure access control - Online/offline status tracking and presence management - Message editing, deletion, and reply functionality - Notification management with automatic cleanup - Health check endpoint for monitoring - CORS configuration for cross-origin requests - Environment-based configuration management - Structured for Flutter SDK integration Features implemented: ✅ Real-time messaging with Socket.IO ✅ User registration and authentication ✅ Direct messages and group chats ✅ Media file uploads and management ✅ End-to-end encryption ✅ Push notifications ✅ Mention alerts ✅ Typing indicators ✅ Message read receipts ✅ Online status tracking ✅ File access control ✅ Comprehensive API documentation Ready for Flutter SDK development and production deployment.
81 lines
4.0 KiB
JavaScript
81 lines
4.0 KiB
JavaScript
"use strict";
|
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
if (k2 === undefined) k2 = k;
|
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
}
|
|
Object.defineProperty(o, k2, desc);
|
|
}) : (function(o, m, k, k2) {
|
|
if (k2 === undefined) k2 = k;
|
|
o[k2] = m[k];
|
|
}));
|
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.registerSchema = exports.validateSync = exports.validateOrReject = exports.validate = void 0;
|
|
const MetadataStorage_1 = require("./metadata/MetadataStorage");
|
|
const Validator_1 = require("./validation/Validator");
|
|
const container_1 = require("./container");
|
|
// -------------------------------------------------------------------------
|
|
// Export everything api users needs
|
|
// -------------------------------------------------------------------------
|
|
__exportStar(require("./container"), exports);
|
|
__exportStar(require("./decorator/decorators"), exports);
|
|
__exportStar(require("./decorator/ValidationOptions"), exports);
|
|
__exportStar(require("./validation/ValidatorConstraintInterface"), exports);
|
|
__exportStar(require("./validation/ValidationError"), exports);
|
|
__exportStar(require("./validation/ValidatorOptions"), exports);
|
|
__exportStar(require("./validation/ValidationArguments"), exports);
|
|
__exportStar(require("./validation/ValidationTypes"), exports);
|
|
__exportStar(require("./validation/Validator"), exports);
|
|
__exportStar(require("./validation-schema/ValidationSchema"), exports);
|
|
__exportStar(require("./register-decorator"), exports);
|
|
__exportStar(require("./metadata/MetadataStorage"), exports);
|
|
/**
|
|
* Validates given object by object's decorators or given validation schema.
|
|
*/
|
|
function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) {
|
|
if (typeof schemaNameOrObject === 'string') {
|
|
return (0, container_1.getFromContainer)(Validator_1.Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions);
|
|
}
|
|
else {
|
|
return (0, container_1.getFromContainer)(Validator_1.Validator).validate(schemaNameOrObject, objectOrValidationOptions);
|
|
}
|
|
}
|
|
exports.validate = validate;
|
|
/**
|
|
* Validates given object by object's decorators or given validation schema and reject on error.
|
|
*/
|
|
function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) {
|
|
if (typeof schemaNameOrObject === 'string') {
|
|
return (0, container_1.getFromContainer)(Validator_1.Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions);
|
|
}
|
|
else {
|
|
return (0, container_1.getFromContainer)(Validator_1.Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions);
|
|
}
|
|
}
|
|
exports.validateOrReject = validateOrReject;
|
|
/**
|
|
* Validates given object by object's decorators or given validation schema.
|
|
* Note that this method completely ignores async validations.
|
|
* If you want to properly perform validation you need to call validate method instead.
|
|
*/
|
|
function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) {
|
|
if (typeof schemaNameOrObject === 'string') {
|
|
return (0, container_1.getFromContainer)(Validator_1.Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions);
|
|
}
|
|
else {
|
|
return (0, container_1.getFromContainer)(Validator_1.Validator).validateSync(schemaNameOrObject, objectOrValidationOptions);
|
|
}
|
|
}
|
|
exports.validateSync = validateSync;
|
|
/**
|
|
* Registers a new validation schema.
|
|
*/
|
|
function registerSchema(schema) {
|
|
(0, MetadataStorage_1.getMetadataStorage)().addValidationSchema(schema);
|
|
}
|
|
exports.registerSchema = registerSchema;
|
|
//# sourceMappingURL=index.js.map
|