diff --git a/.gitignore b/.gitignore index 47bc4ad1..66c01b75 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,7 @@ Archive_* #ignore each folder that starts with Archive_ Archive_*/** #ignore node_modules folder -**/node_modules/ \ No newline at end of file +**/node_modules/** + +#ignore dist folder +**/dist/** \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/index.d.ts b/SerpentRace_Backend/dist/Api/index.d.ts deleted file mode 100644 index 1108984e..00000000 --- a/SerpentRace_Backend/dist/Api/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { WebSocketService } from '../Application/Services/WebSocketService'; -declare let webSocketService: WebSocketService; -export { webSocketService }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/index.d.ts.map b/SerpentRace_Backend/dist/Api/index.d.ts.map deleted file mode 100644 index a93618ad..00000000 --- a/SerpentRace_Backend/dist/Api/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Api/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAmJ5E,QAAA,IAAI,gBAAgB,EAAE,gBAAgB,CAAC;AAyFvC,OAAO,EAAE,gBAAgB,EAAE,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/index.js b/SerpentRace_Backend/dist/Api/index.js deleted file mode 100644 index 3713015c..00000000 --- a/SerpentRace_Backend/dist/Api/index.js +++ /dev/null @@ -1,225 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.webSocketService = void 0; -const express_1 = __importDefault(require("express")); -const http_1 = require("http"); -const cookie_parser_1 = __importDefault(require("cookie-parser")); -const helmet_1 = __importDefault(require("helmet")); -const ormconfig_1 = require("../Infrastructure/ormconfig"); -const userRouter_1 = __importDefault(require("./routers/userRouter")); -const organizationRouter_1 = __importDefault(require("./routers/organizationRouter")); -const deckRouter_1 = __importDefault(require("./routers/deckRouter")); -const chatRouter_1 = __importDefault(require("./routers/chatRouter")); -const contactRouter_1 = __importDefault(require("./routers/contactRouter")); -const adminRouter_1 = __importDefault(require("./routers/adminRouter")); -const deckImportExportRouter_1 = __importDefault(require("./routers/deckImportExportRouter")); -const Logger_1 = require("../Application/Services/Logger"); -const WebSocketService_1 = require("../Application/Services/WebSocketService"); -const swaggerUiSetup_1 = require("./swagger/swaggerUiSetup"); -const app = (0, express_1.default)(); -const httpServer = (0, http_1.createServer)(app); -const PORT = process.env.PORT || 3000; -const isDevelopment = process.env.NODE_ENV === 'development'; -const loggingService = Logger_1.LoggingService.getInstance(); -(0, Logger_1.logStartup)('SerpentRace Backend starting up', { - environment: process.env.NODE_ENV || 'development', - port: PORT, - nodeVersion: process.version, - chatInactivityTimeout: process.env.CHAT_INACTIVITY_TIMEOUT_MINUTES || '30' -}); -app.use((0, helmet_1.default)({ - contentSecurityPolicy: isDevelopment ? false : undefined -})); -app.use(express_1.default.json({ limit: '10mb' })); -app.use(express_1.default.urlencoded({ extended: true, limit: '10mb' })); -app.use((0, cookie_parser_1.default)()); -app.use(loggingService.requestLoggingMiddleware()); -app.use((req, res, next) => { - const origin = req.headers.origin; - const allowedOrigins = ['http://localhost:3000', 'http://localhost:3001', 'http://localhost:8080']; - if (!origin || allowedOrigins.includes(origin)) { - res.setHeader('Access-Control-Allow-Origin', origin || '*'); - } - res.setHeader('Access-Control-Allow-Credentials', 'true'); - res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, PATCH, OPTIONS'); - res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization, Cookie'); - if (req.method === 'OPTIONS') { - res.status(200).end(); - return; - } - next(); -}); -if (isDevelopment) { - app.use((req, res, next) => { - (0, Logger_1.logRequest)(`${req.method} ${req.path}`, req, res); - next(); - }); -} -// Setup Swagger documentation -(0, swaggerUiSetup_1.setupSwagger)(app); -app.get('/', (req, res) => { - res.json({ - service: 'SerpentRace Backend API', - status: 'running', - version: '1.0.0', - endpoints: { - swagger: '/api-docs', - users: '/api/users', - organizations: '/api/organizations', - decks: '/api/decks', - chats: '/api/chats', - contacts: '/api/contacts', - admin: '/api/admin', - deckImportExport: '/api/deck-import-export', - health: '/health' - }, - websocket: { - enabled: true, - events: [ - 'chat:join', 'chat:leave', 'message:send', - 'group:create', 'chat:direct', 'game:chat:create', - 'chat:history' - ] - } - }); -}); -app.get('/health', async (req, res) => { - try { - const isDbConnected = ormconfig_1.AppDataSource.isInitialized; - res.json({ - status: 'healthy', - timestamp: new Date().toISOString(), - service: 'SerpentRace Backend API', - version: '1.0.0', - environment: process.env.NODE_ENV || 'development', - database: { - connected: isDbConnected, - type: ormconfig_1.AppDataSource.options.type - }, - websocket: { - enabled: true - }, - uptime: process.uptime() - }); - } - catch (error) { - res.status(503).json({ - status: 'unhealthy', - timestamp: new Date().toISOString(), - error: 'Service health check failed' - }); - } -}); -// API Routes -app.use('/api/users', userRouter_1.default); -app.use('/api/organizations', organizationRouter_1.default); -app.use('/api/decks', deckRouter_1.default); -app.use('/api/chats', chatRouter_1.default); -app.use('/api/contacts', contactRouter_1.default); -app.use('/api/admin', adminRouter_1.default); -app.use('/api/deck-import-export', deckImportExportRouter_1.default); -// Global error handler (must be after routes) -app.use(loggingService.errorLoggingMiddleware()); -app.use((error, req, res, next) => { - (0, Logger_1.logError)('Global error handler caught unhandled error', error, req, res); - // Don't expose internal error details in production - const isDevelopment = process.env.NODE_ENV === 'development'; - res.status(500).json({ - error: 'Internal server error', - timestamp: new Date().toISOString(), - ...(isDevelopment && { details: error.message, stack: error.stack }) - }); -}); -// Handle 404 routes -app.use((req, res) => { - res.status(404).json({ - error: 'Route not found', - path: req.originalUrl, - method: req.method, - timestamp: new Date().toISOString() - }); -}); -// Initialize WebSocket service after database connection -let webSocketService; -// Initialize database connection -ormconfig_1.AppDataSource.initialize() - .then(() => { - const dbOptions = ormconfig_1.AppDataSource.options; - (0, Logger_1.logConnection)('Database connection established', 'postgresql', 'success', { - type: dbOptions.type, - host: dbOptions.host, - database: dbOptions.database - }); - // Initialize WebSocket service after database is connected - exports.webSocketService = webSocketService = new WebSocketService_1.WebSocketService(httpServer); - (0, Logger_1.logStartup)('WebSocket service initialized', { - chatInactivityTimeout: process.env.CHAT_INACTIVITY_TIMEOUT_MINUTES || '30' - }); -}) - .catch((error) => { - const dbOptions = ormconfig_1.AppDataSource.options; - (0, Logger_1.logConnection)('Database connection failed', 'postgresql', 'failure', { - error: error.message, - type: dbOptions.type, - host: dbOptions.host, - database: dbOptions.database - }); - process.exit(1); -}); -// Start server with WebSocket support -const server = httpServer.listen(PORT, () => { - (0, Logger_1.logStartup)('Server started successfully', { - port: PORT, - environment: process.env.NODE_ENV || 'development', - timestamp: new Date().toISOString(), - endpoints: { - health: `/health`, - swagger: `/api-docs`, - users: `/api/users`, - organizations: `/api/organizations`, - decks: `/api/decks`, - chats: `/api/chats` - }, - websocket: { - enabled: true, - chatInactivityTimeout: `${process.env.CHAT_INACTIVITY_TIMEOUT_MINUTES || '30'} minutes` - } - }); -}); -// Graceful shutdown -const gracefulShutdown = async (signal) => { - (0, Logger_1.logStartup)(`Received ${signal}. Shutting down gracefully...`); - server.close(() => { - (0, Logger_1.logStartup)('HTTP server closed'); - if (ormconfig_1.AppDataSource.isInitialized) { - ormconfig_1.AppDataSource.destroy() - .then(() => { - (0, Logger_1.logConnection)('Database connection closed', 'postgresql', 'success'); - process.exit(0); - }) - .catch((error) => { - (0, Logger_1.logError)('Error during database shutdown', error); - process.exit(1); - }); - } - else { - process.exit(0); - } - }); -}; -process.on('SIGTERM', () => gracefulShutdown('SIGTERM')); -process.on('SIGINT', () => gracefulShutdown('SIGINT')); -// Handle uncaught exceptions -process.on('uncaughtException', (error) => { - (0, Logger_1.logError)('Uncaught Exception - Server will shut down', error); - process.exit(1); -}); -// Handle unhandled promise rejections -process.on('unhandledRejection', (reason, promise) => { - (0, Logger_1.logError)('Unhandled Rejection - Server will shut down', new Error(String(reason)), undefined, undefined); - process.exit(1); -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/index.js.map b/SerpentRace_Backend/dist/Api/index.js.map deleted file mode 100644 index 3c806547..00000000 --- a/SerpentRace_Backend/dist/Api/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Api/index.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA8B;AAC9B,+BAAoC;AACpC,kEAAyC;AACzC,oDAA4B;AAC5B,2DAA4D;AAC5D,sEAA8C;AAC9C,sFAA8D;AAC9D,sEAA8C;AAC9C,sEAA8C;AAC9C,4EAAoD;AACpD,wEAAgD;AAChD,8FAAsE;AACtE,2DAAiH;AACjH,+EAA4E;AAC5E,6DAAwD;AAExD,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;AACtB,MAAM,UAAU,GAAG,IAAA,mBAAY,EAAC,GAAG,CAAC,CAAC;AACrC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAE7D,MAAM,cAAc,GAAG,uBAAc,CAAC,WAAW,EAAE,CAAC;AAEpD,IAAA,mBAAU,EAAC,iCAAiC,EAAE;IAC5C,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa;IAClD,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,OAAO,CAAC,OAAO;IAC5B,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,IAAI;CAC3E,CAAC,CAAC;AAEH,GAAG,CAAC,GAAG,CAAC,IAAA,gBAAM,EAAC;IACX,qBAAqB,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,C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AAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/adminRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/adminRouter.d.ts deleted file mode 100644 index 58a39b8e..00000000 --- a/SerpentRace_Backend/dist/Api/routers/adminRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare global { - namespace Express { - interface Request { - file?: Express.Multer.File; - } - } -} -declare const router: import("express-serve-static-core").Router; -export default router; -//# sourceMappingURL=adminRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/adminRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/adminRouter.d.ts.map deleted file mode 100644 index 1782b0b7..00000000 --- a/SerpentRace_Backend/dist/Api/routers/adminRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"adminRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/adminRouter.ts"],"names":[],"mappings":"AAYA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;QACd,UAAU,OAAO;YACb,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;SAC9B;KACJ;CACJ;AAED,QAAA,MAAM,MAAM,4CAAmB,CAAC;AA4kChC,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/adminRouter.js b/SerpentRace_Backend/dist/Api/routers/adminRouter.js deleted file mode 100644 index d7e006da..00000000 --- a/SerpentRace_Backend/dist/Api/routers/adminRouter.js +++ /dev/null @@ -1,932 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const multer_1 = __importDefault(require("multer")); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const AuthMiddleware_1 = require("../../Application/Services/AuthMiddleware"); -const ValidationMiddleware_1 = require("../../Application/Services/ValidationMiddleware"); -const AdminBypassService_1 = require("../../Application/Services/AdminBypassService"); -const Logger_1 = require("../../Application/Services/Logger"); -const router = express_1.default.Router(); -const container = DIContainer_1.DIContainer.getInstance(); -// Configure multer for file uploads -const upload = (0, multer_1.default)({ - storage: multer_1.default.memoryStorage(), - limits: { - fileSize: 10 * 1024 * 1024, // 10MB limit - }, - fileFilter: (req, file, cb) => { - if (file.mimetype === 'application/json' || file.originalname.endsWith('.spr')) { - cb(null, true); - } - else { - cb(new Error('Only JSON and .spr files are allowed')); - } - } -}); -// Helper function to extract language from Accept-Language header -function extractLanguageFromAcceptHeader(acceptLanguage) { - if (!acceptLanguage) - return null; - const languages = acceptLanguage.split(','); - if (languages.length > 0) { - const primaryLanguage = languages[0].split(';')[0].trim().substring(0, 2); - return primaryLanguage; - } - return null; -} -// ============================================================================= -// USER MANAGEMENT ROUTES -// ============================================================================= -// Get users with pagination (RECOMMENDED) -router.get('/users/page/:from/:to', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - const includeDeleted = req.query.includeDeleted === 'true'; - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ - error: 'Invalid pagination parameters. From and to must be valid numbers with from <= to.' - }); - } - const limit = to - from + 1; - if (limit > 100) { - return res.status(400).json({ - error: 'Page size too large. Maximum 100 records per request.' - }); - } - (0, Logger_1.logRequest)('Admin paginated users endpoint accessed', req, res, { from, to, includeDeleted }); - const result = await container.getUsersByPageQueryHandler.execute({ - from, - to, - includeDeleted - }); - const response = { - users: result.users, - pagination: { - from, - to, - returned: result.users.length, - totalCount: result.totalCount, - includeDeleted - } - }; - (0, Logger_1.logRequest)('Admin users retrieved successfully', req, res, { - returnedUsers: result.users.length, - totalCount: result.totalCount, - from, - to, - includeDeleted - }); - return res.status(200).json(response); - } - catch (error) { - (0, Logger_1.logError)('Error in admin get users endpoint', error, req, res); - return res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get users by page (admin only) - RECOMMENDED -router.get('/users/page/:from/:to', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - const includeDeleted = req.query.includeDeleted === 'true'; - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ error: 'Invalid page parameters. "from" and "to" must be valid numbers with to >= from >= 0' }); - } - (0, Logger_1.logRequest)('Admin get users by page endpoint accessed', req, res, { from, to, includeDeleted }); - const result = includeDeleted - ? await container.userRepository.findByPageIncludingDeleted(from, to) - : await container.userRepository.findByPage(from, to); - (0, Logger_1.logRequest)('Admin users page retrieved successfully', req, res, { - from, - to, - count: result.users.length, - total: result.totalCount, - includeDeleted - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin get users by page endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get user by ID including soft-deleted ones -router.get('/users/:userId', AuthMiddleware_1.adminRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['userId']), async (req, res) => { - try { - const targetUserId = req.params.userId; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin get user by id endpoint accessed', req, res, { targetUserId, includeDeleted }); - const user = includeDeleted - ? await container.userRepository.findByIdIncludingDeleted(targetUserId) - : await container.userRepository.findById(targetUserId); - if (!user) { - (0, Logger_1.logWarning)('User not found', { targetUserId, includeDeleted }, req, res); - return res.status(404).json({ error: 'User not found' }); - } - (0, Logger_1.logRequest)('Admin user retrieved successfully', req, res, { - targetUserId, - username: user.username, - includeDeleted - }); - res.json(user); - } - catch (error) { - (0, Logger_1.logError)('Admin get user by id endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Search users including soft-deleted ones -router.get('/users/search/:searchTerm', AuthMiddleware_1.adminRequired, ValidationMiddleware_1.ValidationMiddleware.validateStringLength({ searchTerm: { min: 2, max: 100 } }), async (req, res) => { - try { - const { searchTerm } = req.params; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin search users endpoint accessed', req, res, { searchTerm, includeDeleted }); - const users = includeDeleted - ? await container.userRepository.searchIncludingDeleted(searchTerm) - : await container.userRepository.search(searchTerm); - (0, Logger_1.logRequest)('Admin user search completed', req, res, { - searchTerm, - resultCount: Array.isArray(users) ? users.length : (users.totalCount || 0), - includeDeleted - }); - res.json(users); - } - catch (error) { - (0, Logger_1.logError)('Admin search users endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Update any user (admin only) -router.patch('/users/:userId', AuthMiddleware_1.adminRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['userId']), async (req, res) => { - try { - const targetUserId = req.params.userId; - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Admin update user endpoint accessed', req, res, { - adminUserId, - targetUserId, - fieldsToUpdate: Object.keys(req.body) - }); - const result = await container.updateUserCommandHandler.execute({ id: targetUserId, ...req.body }); - if (!result) { - return res.status(404).json({ error: 'User not found' }); - } - (0, Logger_1.logRequest)('User updated by admin', req, res, { - adminUserId, - targetUserId, - username: result.username - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin update user endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('already exists')) { - return res.status(409).json({ error: error.message }); - } - if (error.message.includes('validation')) { - return res.status(400).json({ error: error.message }); - } - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Deactivate user (admin only) -router.post('/users/:userId/deactivate', AuthMiddleware_1.adminRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['userId']), async (req, res) => { - try { - const targetUserId = req.params.userId; - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Deactivate user endpoint accessed', req, res, { adminUserId, targetUserId }); - const result = await container.deactivateUserCommandHandler.execute({ id: targetUserId }); - if (!result) { - return res.status(404).json({ error: 'User not found' }); - } - (0, Logger_1.logAuth)('User deactivated by admin', targetUserId, { adminUserId }, req, res); - res.json({ message: 'User deactivated successfully', user: result }); - } - catch (error) { - (0, Logger_1.logError)('Deactivate user endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Delete user (admin only) -router.delete('/users/:userId', AuthMiddleware_1.adminRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['userId']), async (req, res) => { - try { - const targetUserId = req.params.userId; - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Delete user endpoint accessed', req, res, { adminUserId, targetUserId }); - const result = await container.deleteUserCommandHandler.execute({ id: targetUserId }); - if (!result) { - return res.status(404).json({ error: 'User not found' }); - } - (0, Logger_1.logAuth)('User deleted by admin', targetUserId, { adminUserId }, req, res); - res.json({ message: 'User deleted successfully' }); - } - catch (error) { - (0, Logger_1.logError)('Delete user endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// ============================================================================= -// DECK MANAGEMENT ROUTES -// ============================================================================= -// Get decks by page (admin only) - RECOMMENDED -router.get('/decks/page/:from/:to', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - const includeDeleted = req.query.includeDeleted === 'true'; - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ error: 'Invalid page parameters. "from" and "to" must be valid numbers with to >= from >= 0' }); - } - (0, Logger_1.logRequest)('Admin get decks by page endpoint accessed', req, res, { from, to, includeDeleted }); - // For admin, we need to pass admin context to get unrestricted decks - const adminUserId = req.user.userId; - const result = await container.getDecksByPageQueryHandler.execute({ - userId: adminUserId, - userOrgId: undefined, - isAdmin: true, - from, - to, - includeDeleted - }); - (0, Logger_1.logRequest)('Admin decks page retrieved successfully', req, res, { - from, - to, - count: result.decks.length, - total: result.totalCount, - includeDeleted - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin get decks by page endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get deck by ID including soft-deleted ones -router.get('/decks/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const { id } = req.params; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin get deck by id endpoint accessed', req, res, { deckId: id, includeDeleted }); - const deck = includeDeleted - ? await container.deckRepository.findByIdIncludingDeleted(id) - : await container.deckRepository.findById(id); - if (!deck) { - (0, Logger_1.logWarning)('Deck not found', { deckId: id, includeDeleted }, req, res); - return res.status(404).json({ error: 'Deck not found' }); - } - (0, Logger_1.logRequest)('Admin deck retrieved successfully', req, res, { deckId: id, includeDeleted }); - res.json(deck); - } - catch (error) { - (0, Logger_1.logError)('Admin get deck by id endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Search decks including soft-deleted ones -router.get('/decks/search/:searchTerm', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const { searchTerm } = req.params; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin search decks endpoint accessed', req, res, { searchTerm, includeDeleted }); - const decks = includeDeleted - ? await container.deckRepository.searchIncludingDeleted(searchTerm) - : await container.deckRepository.search(searchTerm); - (0, Logger_1.logRequest)('Admin deck search completed', req, res, { - searchTerm, - resultCount: Array.isArray(decks) ? decks.length : (decks.totalCount || 0), - includeDeleted - }); - res.json(decks); - } - catch (error) { - (0, Logger_1.logError)('Admin search decks endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Hard delete deck (admin only) -router.delete('/decks/:id/hard', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const deckId = req.params.id; - (0, Logger_1.logRequest)('Admin hard delete deck endpoint accessed', req, res, { deckId }); - const result = await container.deleteDeckCommandHandler.execute({ id: deckId, soft: false }); - (0, Logger_1.logRequest)('Admin deck hard delete successful', req, res, { deckId, success: result }); - res.json({ success: result }); - } - catch (error) { - (0, Logger_1.logError)('Admin hard delete deck endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Deck not found' }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// ============================================================================= -// ORGANIZATION MANAGEMENT ROUTES -// ============================================================================= -// Create organization (admin only) -router.post('/organizations', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Admin create organization endpoint accessed', req, res, { name: req.body.name, adminUserId }); - const result = await container.createOrganizationCommandHandler.execute(req.body); - AdminBypassService_1.AdminAuditService.logAdminAction('CREATE_ORGANIZATION', adminUserId, { - targetType: 'organization', - targetId: result.id, - operation: 'create', - changes: req.body - }, req, res); - (0, Logger_1.logRequest)('Admin organization created successfully', req, res, { organizationId: result.id, name: req.body.name, adminUserId }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin create organization endpoint error', error, req, res); - if (error instanceof Error && (error.message.includes('duplicate') || error.message.includes('unique constraint'))) { - return res.status(409).json({ error: 'Organization with this name already exists' }); - } - if (error instanceof Error && error.message.includes('validation')) { - return res.status(400).json({ error: 'Invalid input data', details: error.message }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Update organization (admin only) - NEW ENDPOINT -router.patch('/organizations/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const organizationId = req.params.id; - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Admin update organization endpoint accessed', req, res, { - adminUserId, - organizationId, - fieldsToUpdate: Object.keys(req.body) - }); - const result = await container.updateOrganizationCommandHandler.execute({ - id: organizationId, - ...req.body - }); - if (!result) { - return res.status(404).json({ error: 'Organization not found' }); - } - AdminBypassService_1.AdminAuditService.logAdminAction('UPDATE_ORGANIZATION', adminUserId, { - targetType: 'organization', - targetId: organizationId, - operation: 'update', - changes: req.body, - sensitive: req.body.maxOrganizationalDecks !== undefined - }, req, res); - (0, Logger_1.logRequest)('Organization updated by admin', req, res, { - adminUserId, - organizationId, - organizationName: result.name - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin update organization endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('already exists')) { - return res.status(409).json({ error: error.message }); - } - if (error.message.includes('validation')) { - return res.status(400).json({ error: error.message }); - } - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get organizations by page (admin only) - RECOMMENDED -router.get('/organizations/page/:from/:to', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - const includeDeleted = req.query.includeDeleted === 'true'; - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ error: 'Invalid page parameters. "from" and "to" must be valid numbers with to >= from >= 0' }); - } - (0, Logger_1.logRequest)('Admin get organizations by page endpoint accessed', req, res, { from, to, includeDeleted }); - const result = await container.getOrganizationsByPageQueryHandler.execute({ - from, - to, - includeDeleted - }); - (0, Logger_1.logRequest)('Admin organizations page retrieved successfully', req, res, { - from, - to, - count: result.organizations.length, - total: result.totalCount, - includeDeleted - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin get organizations by page endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get organization by ID including soft-deleted ones -router.get('/organizations/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const organizationId = req.params.id; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin get organization by id endpoint accessed', req, res, { organizationId, includeDeleted }); - const organization = includeDeleted - ? await container.organizationRepository.findByIdIncludingDeleted(organizationId) - : await container.organizationRepository.findById(organizationId); - if (!organization) { - (0, Logger_1.logWarning)('Organization not found', { organizationId, includeDeleted }, req, res); - return res.status(404).json({ error: 'Organization not found' }); - } - (0, Logger_1.logRequest)('Admin organization retrieved successfully', req, res, { organizationId, includeDeleted }); - res.json(organization); - } - catch (error) { - (0, Logger_1.logError)('Admin get organization by id endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Search organizations including soft-deleted ones -router.get('/organizations/search/:searchTerm', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const { searchTerm } = req.params; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin search organizations endpoint accessed', req, res, { searchTerm, includeDeleted }); - const organizations = includeDeleted - ? await container.organizationRepository.searchIncludingDeleted(searchTerm) - : await container.organizationRepository.search(searchTerm); - (0, Logger_1.logRequest)('Admin organization search completed', req, res, { - searchTerm, - resultCount: Array.isArray(organizations) ? organizations.length : (organizations.totalCount || 0), - includeDeleted - }); - res.json(organizations); - } - catch (error) { - (0, Logger_1.logError)('Admin search organizations endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Soft delete organization (admin only) -router.delete('/organizations/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const organizationId = req.params.id; - (0, Logger_1.logRequest)('Admin soft delete organization endpoint accessed', req, res, { organizationId }); - const result = await container.deleteOrganizationCommandHandler.execute({ id: organizationId, soft: true }); - (0, Logger_1.logRequest)('Admin organization soft delete successful', req, res, { organizationId, success: result }); - res.json({ success: result }); - } - catch (error) { - (0, Logger_1.logError)('Admin soft delete organization endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Organization not found' }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Hard delete organization (admin only) -router.delete('/organizations/:id/hard', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const organizationId = req.params.id; - (0, Logger_1.logRequest)('Admin hard delete organization endpoint accessed', req, res, { organizationId }); - const result = await container.deleteOrganizationCommandHandler.execute({ id: organizationId, soft: false }); - (0, Logger_1.logRequest)('Admin organization hard delete successful', req, res, { organizationId, success: result }); - res.json({ success: result }); - } - catch (error) { - (0, Logger_1.logError)('Admin hard delete organization endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Organization not found' }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// ============================================================================= -// CHAT MANAGEMENT ROUTES -// ============================================================================= -// Get chats with pagination (RECOMMENDED) -router.get('/chats/page/:from/:to', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - const includeDeleted = req.query.includeDeleted === 'true'; - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ - error: 'Invalid pagination parameters. From and to must be valid numbers with from <= to.' - }); - } - const limit = to - from + 1; - if (limit > 100) { - return res.status(400).json({ - error: 'Page size too large. Maximum 100 records per request.' - }); - } - (0, Logger_1.logRequest)('Admin paginated chats endpoint accessed', req, res, { from, to, includeDeleted }); - const result = await container.getChatsByPageQueryHandler.execute({ - from, - to, - includeDeleted - }); - const response = { - chats: result.chats, - pagination: { - from, - to, - returned: result.chats.length, - totalCount: result.totalCount, - includeDeleted - } - }; - (0, Logger_1.logRequest)('Admin chats retrieved successfully', req, res, { - returnedChats: result.chats.length, - totalCount: result.totalCount, - from, - to, - includeDeleted - }); - return res.status(200).json(response); - } - catch (error) { - (0, Logger_1.logError)('Error in admin get chats endpoint', error, req, res); - return res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get chat by ID including soft-deleted ones -router.get('/chats/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const { id } = req.params; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin get chat by id endpoint accessed', req, res, { chatId: id, includeDeleted }); - const chat = includeDeleted - ? await container.chatRepository.findByIdIncludingDeleted(id) - : await container.chatRepository.findById(id); - if (!chat) { - (0, Logger_1.logWarning)('Chat not found', { chatId: id, includeDeleted }, req, res); - return res.status(404).json({ error: 'Chat not found' }); - } - (0, Logger_1.logRequest)('Admin chat retrieved successfully', req, res, { chatId: id, includeDeleted }); - res.json(chat); - } - catch (error) { - (0, Logger_1.logError)('Admin get chat by id endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// ============================================================================= -// CONTACT MANAGEMENT ROUTES -// ============================================================================= -// Get contacts by page (admin only) - RECOMMENDED (already exists, enhanced) -router.get('/contacts/page/:from/:to', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - const includeDeleted = req.query.includeDeleted === 'true'; - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ error: 'Invalid page parameters. "from" and "to" must be valid numbers with to >= from >= 0' }); - } - (0, Logger_1.logRequest)('Admin get contacts by page endpoint accessed', req, res, { from, to, includeDeleted }); - const result = includeDeleted - ? await container.contactRepository.findByPageIncludingDeleted(from, to) - : await container.contactRepository.findByPage(from, to); - (0, Logger_1.logRequest)('Admin contacts page retrieved successfully', req, res, { - from, - to, - count: result.contacts.length, - total: result.totalCount, - includeDeleted - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin get contacts by page endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get contact by ID (admin only) -router.get('/contacts/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const contactId = req.params.id; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin get contact by ID endpoint accessed', req, res, { contactId, includeDeleted }); - const result = includeDeleted - ? await container.contactRepository.findByIdIncludingDeleted(contactId) - : await container.getContactByIdQueryHandler.execute({ id: contactId }); - if (!result) { - (0, Logger_1.logRequest)('Contact not found', req, res, { contactId, includeDeleted }); - return res.status(404).json({ error: 'Contact not found' }); - } - (0, Logger_1.logRequest)('Admin contact retrieved successfully', req, res, { contactId, includeDeleted }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Admin get contact by ID endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Search contacts including soft-deleted ones (admin only) -router.get('/contacts/search/:searchTerm', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const { searchTerm } = req.params; - const includeDeleted = req.query.includeDeleted === 'true'; - (0, Logger_1.logRequest)('Admin search contacts endpoint accessed', req, res, { searchTerm, includeDeleted }); - const contacts = includeDeleted - ? await container.contactRepository.searchIncludingDeleted(searchTerm) - : await container.contactRepository.search(searchTerm); - (0, Logger_1.logRequest)('Admin contact search completed', req, res, { - searchTerm, - resultCount: contacts.length, - includeDeleted - }); - res.json(contacts); - } - catch (error) { - (0, Logger_1.logError)('Admin search contacts endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Respond to contact (admin only) -router.put('/contacts/:id/respond', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const contactId = req.params.id; - const adminUserId = req.user.userId; - const { adminResponse, sendEmail, language } = req.body; - if (!adminResponse) { - return res.status(400).json({ error: 'Admin response is required' }); - } - // Determine language from body, headers, or default to English - let selectedLanguage = language; - if (!selectedLanguage) { - // Try to get language from Accept-Language header - const acceptLanguage = req.headers['accept-language']; - // Try to get language from custom headers (common frontend patterns) - const regionHeader = req.headers['x-region']; - const languageHeader = req.headers['x-language']; - const localeHeader = req.headers['x-locale']; - selectedLanguage = languageHeader || - localeHeader || - regionHeader || - extractLanguageFromAcceptHeader(acceptLanguage) || - 'en'; - } - // Validate and normalize language parameter - if (!['en', 'hu', 'de'].includes(selectedLanguage.toLowerCase())) { - selectedLanguage = 'en'; // Fallback to English for unsupported languages - } - else { - selectedLanguage = selectedLanguage.toLowerCase(); - } - (0, Logger_1.logRequest)('Admin respond to contact endpoint accessed', req, res, { - contactId, - adminUserId, - sendEmail, - language: selectedLanguage, - headerLanguage: req.headers['accept-language'] || req.headers['x-language'] || 'none' - }); - // Update contact with response - const result = await container.updateContactCommandHandler.execute({ - id: contactId, - adminResponse, - respondedBy: adminUserId - }); - if (!result) { - (0, Logger_1.logWarning)('Contact not found for response', { contactId }, req, res); - return res.status(404).json({ error: 'Contact not found' }); - } - // Send email if requested - let emailSent = false; - let emailError = null; - if (sendEmail === true && adminResponse) { - try { - await container.contactEmailService.sendResponse({ - to: result.email, - message: adminResponse, - contactId: contactId, - adminUserId: adminUserId, - contactName: result.name, - contactType: result.type, - originalMessage: result.txt, - language: selectedLanguage - }); - emailSent = true; - (0, Logger_1.logRequest)('Contact response email sent successfully', req, res, { - contactId, - recipientEmail: result.email, - language: selectedLanguage - }); - } - catch (emailErr) { - emailError = emailErr instanceof Error ? emailErr.message : 'Email sending failed'; - (0, Logger_1.logError)('Contact response email failed', emailErr, req, res); - } - } - AdminBypassService_1.AdminAuditService.logAdminAction('RESPOND_TO_CONTACT', adminUserId, { - targetType: 'contact', - targetId: contactId, - operation: 'update', - changes: { adminResponse, sendEmail, language: selectedLanguage }, - metadata: { emailSent, emailError } - }, req, res); - (0, Logger_1.logRequest)('Admin contact response saved successfully', req, res, { - contactId, - sendEmail, - emailSent, - language: selectedLanguage - }); - res.json({ - success: true, - message: 'Response saved successfully', - contact: result, - emailSent, - emailError: emailSent ? null : emailError - }); - } - catch (error) { - (0, Logger_1.logError)('Admin respond to contact endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Contact not found' }); - } - if (error instanceof Error && error.message.includes('validation')) { - return res.status(400).json({ error: 'Invalid input data', details: error.message }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Resend contact email (admin only) - NEW ENDPOINT -router.post('/contacts/:id/resend-email', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const contactId = req.params.id; - const adminUserId = req.user.userId; - const { language } = req.body; - (0, Logger_1.logRequest)('Admin resend contact email endpoint accessed', req, res, { - contactId, - adminUserId, - language - }); - // Get contact details - const contact = await container.getContactByIdQueryHandler.execute({ id: contactId }); - if (!contact) { - return res.status(404).json({ error: 'Contact not found' }); - } - if (!contact.adminResponse) { - return res.status(400).json({ error: 'No admin response found to resend' }); - } - const selectedLanguage = language || 'en'; - try { - await container.contactEmailService.sendResponse({ - to: contact.email, - message: contact.adminResponse, - contactId: contactId, - adminUserId: adminUserId, - contactName: contact.name, - contactType: contact.type, - originalMessage: contact.txt, - language: selectedLanguage - }); - AdminBypassService_1.AdminAuditService.logAdminAction('RESEND_CONTACT_EMAIL', adminUserId, { - targetType: 'contact', - targetId: contactId, - operation: 'create', - metadata: { language: selectedLanguage, action: 'resend' } - }, req, res); - (0, Logger_1.logRequest)('Contact email resent successfully', req, res, { - contactId, - recipientEmail: contact.email, - language: selectedLanguage - }); - res.json({ - success: true, - message: 'Email resent successfully' - }); - } - catch (emailErr) { - (0, Logger_1.logError)('Contact email resend failed', emailErr, req, res); - res.status(500).json({ - error: 'Failed to resend email', - details: emailErr instanceof Error ? emailErr.message : 'Unknown error' - }); - } - } - catch (error) { - (0, Logger_1.logError)('Admin resend contact email endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Soft delete contact (admin only) - NEW ENDPOINT -router.delete('/contacts/:id', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const contactId = req.params.id; - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Admin soft delete contact endpoint accessed', req, res, { contactId, adminUserId }); - const result = await container.deleteContactCommandHandler.execute({ - id: contactId, - hard: false - }); - AdminBypassService_1.AdminAuditService.logAdminAction('SOFT_DELETE_CONTACT', adminUserId, { - targetType: 'contact', - targetId: contactId, - operation: 'update' - }, req, res); - (0, Logger_1.logAuth)('Contact soft deleted by admin', contactId, { adminUserId }, req, res); - res.json({ success: result }); - } - catch (error) { - (0, Logger_1.logError)('Admin soft delete contact endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Contact not found' }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Hard delete contact (admin only) - NEW ENDPOINT -router.delete('/contacts/:id/hard', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const contactId = req.params.id; - const adminUserId = req.user.userId; - (0, Logger_1.logRequest)('Admin hard delete contact endpoint accessed', req, res, { contactId, adminUserId }); - const result = await container.deleteContactCommandHandler.execute({ - id: contactId, - hard: true - }); - AdminBypassService_1.AdminAuditService.logAdminAction('HARD_DELETE_CONTACT', adminUserId, { - targetType: 'contact', - targetId: contactId, - operation: 'delete', - sensitive: true - }, req, res); - (0, Logger_1.logAuth)('Contact hard deleted by admin', contactId, { adminUserId }, req, res); - res.json({ success: result }); - } - catch (error) { - (0, Logger_1.logError)('Admin hard delete contact endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Contact not found' }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -// ============================================================================= -// DECK IMPORT/EXPORT ROUTES (ADMIN) -// ============================================================================= -// Import deck from JSON file (unencrypted, admin only) -router.post('/decks/import', AuthMiddleware_1.adminRequired, upload.single('file'), async (req, res) => { - try { - if (!req.file) { - return res.status(400).json({ error: 'No file uploaded' }); - } - const userId = req.user.userId; - const fileContent = req.file.buffer.toString('utf-8'); - (0, Logger_1.logRequest)('Admin deck import from JSON endpoint accessed', req, res, { fileName: req.file.originalname }); - let jsonData; - try { - jsonData = JSON.parse(fileContent); - } - catch (parseError) { - return res.status(400).json({ error: 'Invalid JSON format' }); - } - // For admin import, we need to specify both target user and admin user - // Let's assume the deck will be owned by the admin user doing the import - const result = await container.deckImportExportService.adminImportFromJson(jsonData, userId, userId); - (0, Logger_1.logRequest)('Admin deck import successful', req, res, { deckId: result.id, fileName: req.file.originalname }); - res.json({ - success: true, - message: 'Deck imported successfully', - deckId: result.id - }); - } - catch (error) { - (0, Logger_1.logError)('Admin deck import from JSON error', error, req, res); - if (error instanceof Error && error.message.includes('Invalid')) { - res.status(400).json({ error: 'Invalid deck data structure' }); - } - else { - res.status(500).json({ error: 'Internal server error' }); - } - } -}); -// Export deck as JSON (unencrypted, admin only) -router.get('/decks/:deckId/export', AuthMiddleware_1.adminRequired, async (req, res) => { - try { - const { deckId } = req.params; - (0, Logger_1.logRequest)('Admin deck export as JSON endpoint accessed', req, res, { deckId }); - const deck = await container.deckRepository.findById(deckId); - if (!deck) { - (0, Logger_1.logWarning)('Deck not found for export', { deckId }, req, res); - return res.status(404).json({ error: 'Deck not found' }); - } - (0, Logger_1.logRequest)('Admin deck export successful', req, res, { deckId, deckName: deck.name }); - // Return deck as JSON for admin export - res.setHeader('Content-Type', 'application/json'); - res.setHeader('Content-Disposition', `attachment; filename="${deck.name || 'deck'}.json"`); - res.json(deck); - } - catch (error) { - (0, Logger_1.logError)('Admin deck export as JSON error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -exports.default = router; -//# sourceMappingURL=adminRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/adminRouter.js.map b/SerpentRace_Backend/dist/Api/routers/adminRouter.js.map deleted file mode 100644 index 54ea9bdd..00000000 --- a/SerpentRace_Backend/dist/Api/routers/adminRouter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"adminRouter.js","sourceRoot":"","sources":["../../../src/Api/routers/adminRouter.ts"],"names":[],"mappings":";;;;;AAAA,sDAAqD;AACrD,oDAA4B;AAC5B,wEAAqE;AACrE,8EAA0E;AAE1E,0FAAuF;AAEvF,sFAAkF;AAElF,8DAA8F;AAW9F,MAAM,MAAM,GAAG,iBAAO,CAAC,MAAM,EAAE,CAAC;AAChC,MAAM,SAAS,GAAG,yBAAW,CAAC,WAAW,EAAE,CAAC;AAE5C,oCAAoC;AACpC,MAAM,MAAM,GAAG,IAAA,gBAAM,EAAC;IAClB,OAAO,EAAE,gBAAM,CAAC,aAAa,EAAE;IAC/B,MAAM,EAAE;QACJ,QAAQ,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,aAAa;KAC5C;IACD,UAAU,EAAE,CAAC,GAAQ,EAAE,IAAS,EAAE,EAAO,EAAE,EAAE;QACzC,IAAI,IAAI,CAAC,QAAQ,KAAK,kBAAkB,IAAI,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7E,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACJ,EAAE,CAAC,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC,CAAC;QAC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AAI,CAAC,CAAC;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAA,iBAAQ,EAAC,iCAAiC,EAAE,KAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACtE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;IAC7D,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/chatRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/chatRouter.d.ts deleted file mode 100644 index 8c1ccb21..00000000 --- a/SerpentRace_Backend/dist/Api/routers/chatRouter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const chatRouter: import("express-serve-static-core").Router; -export default chatRouter; -//# sourceMappingURL=chatRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/chatRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/chatRouter.d.ts.map deleted file mode 100644 index 27bbdc10..00000000 --- a/SerpentRace_Backend/dist/Api/routers/chatRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chatRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/chatRouter.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,UAAU,4CAAmB,CAAC;AAuRpC,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/chatRouter.js b/SerpentRace_Backend/dist/Api/routers/chatRouter.js deleted file mode 100644 index 73133194..00000000 --- a/SerpentRace_Backend/dist/Api/routers/chatRouter.js +++ /dev/null @@ -1,231 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const AuthMiddleware_1 = require("../../Application/Services/AuthMiddleware"); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const ErrorResponseService_1 = require("../../Application/Services/ErrorResponseService"); -const ValidationMiddleware_1 = require("../../Application/Services/ValidationMiddleware"); -const Logger_1 = require("../../Application/Services/Logger"); -const chatRouter = express_1.default.Router(); -// Get user's chats -chatRouter.get('/user-chats', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - const includeArchived = req.query.includeArchived === 'true'; - (0, Logger_1.logRequest)('Get user chats endpoint accessed', req, res, { userId, includeArchived }); - const chats = await DIContainer_1.container.getUserChatsQueryHandler.execute({ - userId, - includeArchived - }); - (0, Logger_1.logRequest)('User chats retrieved successfully', req, res, { - userId, - chatCount: chats.length - }); - res.json(chats); - } - catch (error) { - (0, Logger_1.logError)('Get user chats endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Get chat history -chatRouter.get('/history/:chatId', AuthMiddleware_1.authRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['chatId']), async (req, res) => { - try { - const userId = req.user.userId; - const chatId = req.params.chatId; - (0, Logger_1.logRequest)('Get chat history endpoint accessed', req, res, { userId, chatId }); - const history = await DIContainer_1.container.getChatHistoryQueryHandler.execute({ - chatId, - userId - }); - if (!history) { - (0, Logger_1.logWarning)('Chat history not found or unauthorized', { userId, chatId }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'Chat not found or unauthorized'); - } - (0, Logger_1.logRequest)('Chat history retrieved successfully', req, res, { - userId, - chatId, - messageCount: history.messages.length, - isArchived: history.isArchived - }); - res.json(history); - } - catch (error) { - (0, Logger_1.logError)('Get chat history endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Create new chat (direct/group) -chatRouter.post('/create', AuthMiddleware_1.authRequired, ValidationMiddleware_1.ValidationMiddleware.combine([ - ValidationMiddleware_1.ValidationMiddleware.validateRequiredFields(['type', 'userIds']), - ValidationMiddleware_1.ValidationMiddleware.validateAllowedValues({ type: ['direct', 'group'] }), - ValidationMiddleware_1.ValidationMiddleware.validateNonEmptyArrays(['userIds']) -]), async (req, res) => { - try { - const userId = req.user.userId; - const { type, name, userIds } = req.body; - (0, Logger_1.logRequest)('Create chat endpoint accessed', req, res, { - userId, - type, - targetUserCount: userIds?.length || 0 - }); - if (type === 'group' && !name?.trim()) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Group name is required'); - } - const chat = await DIContainer_1.container.createChatCommandHandler.execute({ - type, - name: name?.trim(), - createdBy: userId, - userIds - }); - if (!chat) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Failed to create chat'); - } - (0, Logger_1.logRequest)('Chat created successfully', req, res, { - userId, - chatId: chat.id, - chatType: chat.type - }); - res.json({ - id: chat.id, - type: chat.type, - name: chat.name, - users: chat.users, - messages: chat.messages - }); - } - catch (error) { - (0, Logger_1.logError)('Create chat endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('Premium subscription required')) { - return ErrorResponseService_1.ErrorResponseService.sendForbidden(res, 'Premium subscription required to create groups'); - } - if (error.message.includes('not found')) { - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'One or more users not found'); - } - } - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Send message (REST endpoint - mainly for testing, real messaging is via WebSocket) -chatRouter.post('/message', AuthMiddleware_1.authRequired, ValidationMiddleware_1.ValidationMiddleware.combine([ - ValidationMiddleware_1.ValidationMiddleware.validateRequiredFields(['chatId', 'message']), - ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['chatId']), - ValidationMiddleware_1.ValidationMiddleware.validateStringLength({ message: { min: 1, max: 2000 } }) -]), async (req, res) => { - try { - const userId = req.user.userId; - const { chatId, message } = req.body; - (0, Logger_1.logRequest)('Send message endpoint accessed', req, res, { - userId, - chatId, - messageLength: message?.length || 0 - }); - const sentMessage = await DIContainer_1.container.sendMessageCommandHandler.execute({ - chatId, - userId, - message - }); - if (!sentMessage) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Failed to send message'); - } - (0, Logger_1.logRequest)('Message sent successfully', req, res, { - userId, - chatId, - messageId: sentMessage.id - }); - res.json(sentMessage); - } - catch (error) { - (0, Logger_1.logError)('Send message endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('Chat not found')) { - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'Chat not found'); - } - if (error.message.includes('not a member')) { - return ErrorResponseService_1.ErrorResponseService.sendForbidden(res, 'Not authorized to send messages to this chat'); - } - if (error.message.includes('non-empty string')) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Message must be a non-empty string'); - } - } - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Archive chat manually -chatRouter.post('/archive/:chatId', AuthMiddleware_1.authRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['chatId']), async (req, res) => { - try { - const userId = req.user.userId; - const chatId = req.params.chatId; - (0, Logger_1.logRequest)('Archive chat endpoint accessed', req, res, { userId, chatId }); - // Check if user has access to this chat - const chat = await DIContainer_1.container.chatRepository.findById(chatId); - if (!chat) { - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'Chat not found'); - } - if (!chat.users.includes(userId)) { - return ErrorResponseService_1.ErrorResponseService.sendForbidden(res, 'Not authorized to archive this chat'); - } - const success = await DIContainer_1.container.archiveChatCommandHandler.execute({ chatId }); - if (!success) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Failed to archive chat'); - } - (0, Logger_1.logRequest)('Chat archived successfully', req, res, { userId, chatId }); - res.json({ success: true, message: 'Chat archived successfully' }); - } - catch (error) { - (0, Logger_1.logError)('Archive chat endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Restore chat from archive -chatRouter.post('/restore/:chatId', AuthMiddleware_1.authRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['chatId']), async (req, res) => { - try { - const userId = req.user.userId; - const chatId = req.params.chatId; - (0, Logger_1.logRequest)('Restore chat endpoint accessed', req, res, { userId, chatId }); - // Check if user has access to this archived chat - const archive = await DIContainer_1.container.chatArchiveRepository.findByChatId(chatId); - const userArchive = archive.find((a) => a.participants.includes(userId)); - if (!userArchive) { - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'Archived chat not found or unauthorized'); - } - const success = await DIContainer_1.container.restoreChatCommandHandler.execute({ chatId }); - if (!success) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Failed to restore chat (game chats cannot be restored)'); - } - (0, Logger_1.logRequest)('Chat restored successfully', req, res, { userId, chatId }); - res.json({ success: true, message: 'Chat restored successfully' }); - } - catch (error) { - (0, Logger_1.logError)('Restore chat endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Get archived chats for a game -chatRouter.get('/archived/game/:gameId', AuthMiddleware_1.authRequired, ValidationMiddleware_1.ValidationMiddleware.validateUUIDFormat(['gameId']), async (req, res) => { - try { - const userId = req.user.userId; - const gameId = req.params.gameId; - (0, Logger_1.logRequest)('Get archived game chats endpoint accessed', req, res, { userId, gameId }); - const archivedChats = await DIContainer_1.container.getArchivedChatsQueryHandler.execute({ - userId, - gameId - }); - (0, Logger_1.logRequest)('Archived game chats retrieved successfully', req, res, { - userId, - gameId, - chatCount: archivedChats.length - }); - res.json(archivedChats); - } - catch (error) { - (0, Logger_1.logError)('Get archived game chats endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -exports.default = chatRouter; -//# sourceMappingURL=chatRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/chatRouter.js.map b/SerpentRace_Backend/dist/Api/routers/chatRouter.js.map deleted file mode 100644 index 00e5fc0e..00000000 --- a/SerpentRace_Backend/dist/Api/routers/chatRouter.js.map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AM;YACN,SAAS,EAAE,aAAa,CAAC,MAAM;SAClC,CAAC,CAAC;QAEH,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAA,iBAAQ,EAAC,wCAAwC,EAAE,KAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAC7E,OAAO,2CAAoB,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/contactRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/contactRouter.d.ts deleted file mode 100644 index 4383ff22..00000000 --- a/SerpentRace_Backend/dist/Api/routers/contactRouter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const contactRouter: import("express-serve-static-core").Router; -export default contactRouter; -//# sourceMappingURL=contactRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/contactRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/contactRouter.d.ts.map deleted file mode 100644 index b3084169..00000000 --- a/SerpentRace_Backend/dist/Api/routers/contactRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"contactRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/contactRouter.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa,4CAAW,CAAC;AA+C/B,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/contactRouter.js b/SerpentRace_Backend/dist/Api/routers/contactRouter.js deleted file mode 100644 index 1b0b35e7..00000000 --- a/SerpentRace_Backend/dist/Api/routers/contactRouter.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = require("express"); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const Logger_1 = require("../../Application/Services/Logger"); -const ContactAggregate_1 = require("../../Domain/Contact/ContactAggregate"); -const contactRouter = (0, express_1.Router)(); -// Public endpoint - anyone can create a contact -contactRouter.post('/', async (req, res) => { - try { - // Get user ID if authenticated (optional) - const userId = req.user?.userId || null; - const { name, email, type, txt } = req.body; - // Validate required fields - if (!name || !email || type === undefined || !txt) { - return res.status(400).json({ - error: 'Missing required fields: name, email, type, and txt are required' - }); - } - // Validate type - if (!Object.values(ContactAggregate_1.ContactType).includes(Number(type))) { - return res.status(400).json({ - error: 'Invalid contact type. Must be one of: 0 (Bug), 1 (Problem), 2 (Question), 3 (Sales), 4 (Other)' - }); - } - (0, Logger_1.logRequest)('Create contact endpoint accessed', req, res, { name, email, type, userId }); - const result = await DIContainer_1.container.createContactCommandHandler.execute({ - name, - email, - userid: userId, - type: Number(type), - txt - }); - (0, Logger_1.logRequest)('Contact created successfully', req, res, { contactId: result.id, name, email, type }); - res.status(201).json(result); - } - catch (error) { - (0, Logger_1.logError)('Create contact endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('validation')) { - return res.status(400).json({ error: 'Invalid input data', details: error.message }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -exports.default = contactRouter; -//# sourceMappingURL=contactRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/contactRouter.js.map b/SerpentRace_Backend/dist/Api/routers/contactRouter.js.map deleted file mode 100644 index 2aabdb45..00000000 --- a/SerpentRace_Backend/dist/Api/routers/contactRouter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"contactRouter.js","sourceRoot":"","sources":["../../../src/Api/routers/contactRouter.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AACjC,wEAAmE;AACnE,8DAAyE;AACzE,4EAAoE;AAEpE,MAAM,aAAa,GAAG,IAAA,gBAAM,GAAE,CAAC;AAE/B,gDAAgD;AAChD,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE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C,MAAM,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAA,iBAAQ,EAAC,+BAA+B,EAAE,KAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAEpE,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YACpE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACtF,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;IAC1D,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,kBAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.d.ts deleted file mode 100644 index 527ab56b..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare global { - namespace Express { - interface Request { - file?: Express.Multer.File; - } - } -} -declare const router: import("express-serve-static-core").Router; -export default router; -//# sourceMappingURL=deckImportExportRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.d.ts.map deleted file mode 100644 index 3e9d0f6d..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deckImportExportRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/deckImportExportRouter.ts"],"names":[],"mappings":"AAOA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,OAAO,CAAC;QACd,UAAU,OAAO;YACb,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;SAC9B;KACJ;CACJ;AAED,QAAA,MAAM,MAAM,4CAAmB,CAAC;AA4GhC,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.js b/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.js deleted file mode 100644 index 20274117..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = __importDefault(require("express")); -const multer_1 = __importDefault(require("multer")); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const AuthMiddleware_1 = require("../../Application/Services/AuthMiddleware"); -const Logger_1 = require("../../Application/Services/Logger"); -const router = express_1.default.Router(); -const container = DIContainer_1.DIContainer.getInstance(); -// Configure multer for file uploads -const upload = (0, multer_1.default)({ - storage: multer_1.default.memoryStorage(), - limits: { - fileSize: 10 * 1024 * 1024, // 10MB limit - }, - fileFilter: (req, file, cb) => { - if (file.mimetype === 'application/json' || file.originalname.endsWith('.spr')) { - cb(null, true); - } - else { - cb(new Error('Only JSON and .spr files are allowed')); - } - } -}); -// Export deck to .spr file (encrypted) - users can only export their own decks -router.get('/export/:deckId', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const { deckId } = req.params; - const userId = req.user.userId; - (0, Logger_1.logRequest)('Export deck endpoint accessed', req, res, { deckId, userId }); - // Check if user owns the deck - const deck = await container.deckRepository.findById(deckId); - if (!deck) { - (0, Logger_1.logWarning)('Deck not found for export', { deckId, userId }, req, res); - return res.status(404).json({ error: 'Deck not found' }); - } - // Users can only export their own decks - if (deck.userid !== userId) { - (0, Logger_1.logWarning)('Access denied - user attempted to export deck they do not own', { - deckId, - userId, - deckOwnerId: deck.userid - }, req, res); - return res.status(403).json({ error: 'Access denied - you can only export your own decks' }); - } - const sprData = await container.deckImportExportService.exportDeckToSpr(deckId, userId); - res.setHeader('Content-Type', 'application/octet-stream'); - res.setHeader('Content-Disposition', `attachment; filename="${deck.name || 'deck'}.spr"`); - (0, Logger_1.logRequest)('Deck exported successfully', req, res, { - deckId, - userId, - deckName: deck.name, - fileSize: sprData.length - }); - res.send(sprData); - } - catch (error) { - (0, Logger_1.logError)('Export deck endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Import deck from .spr file (encrypted) - imported deck will be owned by the importing user -router.post('/import', AuthMiddleware_1.authRequired, upload.single('file'), async (req, res) => { - try { - const userId = req.user.userId; - (0, Logger_1.logRequest)('Import deck endpoint accessed', req, res, { - userId, - hasFile: !!req.file, - fileName: req.file?.originalname, - fileSize: req.file?.size - }); - if (!req.file) { - (0, Logger_1.logWarning)('No file uploaded for deck import', { userId }, req, res); - return res.status(400).json({ error: 'No file uploaded' }); - } - const fileBuffer = req.file.buffer; - // Import the deck and assign ownership to the current user - const result = await container.deckImportExportService.importDeckFromSpr(fileBuffer, userId); - (0, Logger_1.logRequest)('Deck imported successfully', req, res, { - userId, - deckId: result.id, - deckName: result.name || 'Unknown', - fileName: req.file.originalname, - fileSize: req.file.size - }); - res.json({ - success: true, - message: 'Deck imported successfully and added to your collection', - deckId: result.id - }); - } - catch (error) { - (0, Logger_1.logError)('Import deck endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('Invalid')) { - return res.status(400).json({ error: 'Invalid file format or corrupted data' }); - } - else { - res.status(500).json({ error: 'Internal server error' }); - } - } -}); -exports.default = router; -//# sourceMappingURL=deckImportExportRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.js.map b/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter.js.map deleted file mode 100644 index c72f94bc..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckImportExportRouter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C,EAAE;YACjB,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,SAAS;YAClC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY;YAC/B,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI;SAC1B,CAAC,CAAC;QAEH,GAAG,CAAC,IAAI,CAAC;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,yDAAyD;YAClE,MAAM,EAAE,MAAM,CAAC,EAAE;SACpB,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAA,iBAAQ,EAAC,4BAA4B,EAAE,KAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAEjE,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9D,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uCAAuC,EAAE,CAAC,CAAC;QACpF,CAAC;aAAM,CAAC;YACJ,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;QAC7D,CAAC;IACL,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/deckRouter.d.ts deleted file mode 100644 index c5fa9fe8..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckRouter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const deckRouter: import("express-serve-static-core").Router; -export default deckRouter; -//# sourceMappingURL=deckRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/deckRouter.d.ts.map deleted file mode 100644 index 147b9f46..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deckRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/deckRouter.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,UAAU,4CAAW,CAAC;AAwL5B,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckRouter.js b/SerpentRace_Backend/dist/Api/routers/deckRouter.js deleted file mode 100644 index 690ae2dc..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckRouter.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = require("express"); -const AuthMiddleware_1 = require("../../Application/Services/AuthMiddleware"); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const Generalsearch_1 = require("../../Application/Search/Generalsearch"); -const Logger_1 = require("../../Application/Services/Logger"); -const deckRouter = (0, express_1.Router)(); -// Create search service that isn't in the container yet -const searchService = new Generalsearch_1.GeneralSearchService(DIContainer_1.container.userRepository, DIContainer_1.container.organizationRepository, DIContainer_1.container.deckRepository); -// Authenticated routes - Get decks with pagination (RECOMMENDED) -deckRouter.get('/page/:from/:to', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - const userOrgId = req.user.orgId; - const isAdmin = req.user.authLevel === 1; - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ error: 'Invalid page parameters. "from" and "to" must be valid numbers with to >= from >= 0' }); - } - (0, Logger_1.logRequest)('Get decks by page endpoint accessed', req, res, { - userId, - userOrgId, - isAdmin, - from, - to - }); - // Use paginated query handler for memory efficiency - const result = await DIContainer_1.container.getDecksByPageQueryHandler.execute({ - userId, - userOrgId, - isAdmin, - from, - to - }); - (0, Logger_1.logRequest)('Get decks page completed successfully', req, res, { - userId, - from, - to, - returnedCount: result.decks.length, - totalCount: result.totalCount - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Get decks by page endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -deckRouter.post('/', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - (0, Logger_1.logRequest)('Create deck endpoint accessed', req, res, { name: req.body.name, userId }); - const result = await DIContainer_1.container.createDeckCommandHandler.execute(req.body); - (0, Logger_1.logRequest)('Deck created successfully', req, res, { deckId: result.id, name: req.body.name, userId }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Create deck endpoint error', error, req, res); - if (error instanceof Error && (error.message.includes('duplicate') || error.message.includes('unique constraint'))) { - return res.status(409).json({ error: 'Deck with this name already exists' }); - } - if (error instanceof Error && error.message.includes('validation')) { - return res.status(400).json({ error: 'Invalid input data', details: error.message }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -deckRouter.get('/search', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const { q: query, limit, offset } = req.query; - (0, Logger_1.logRequest)('Search decks endpoint accessed', req, res, { query, limit, offset }); - if (!query || typeof query !== 'string') { - (0, Logger_1.logWarning)('Deck search attempted without query', { query, hasQuery: !!query }, req, res); - return res.status(400).json({ error: 'Search query is required' }); - } - const searchQuery = { - query: query.trim(), - limit: limit ? parseInt(limit) : 20, - offset: offset ? parseInt(offset) : 0 - }; - // Validate pagination parameters - if (searchQuery.limit < 1 || searchQuery.limit > 100) { - (0, Logger_1.logWarning)('Invalid deck search limit parameter', { limit: searchQuery.limit }, req, res); - return res.status(400).json({ error: 'Limit must be between 1 and 100' }); - } - if (searchQuery.offset < 0) { - (0, Logger_1.logWarning)('Invalid deck search offset parameter', { offset: searchQuery.offset }, req, res); - return res.status(400).json({ error: 'Offset must be non-negative' }); - } - const result = await searchService.searchFromUrl(req.originalUrl, searchQuery); - (0, Logger_1.logRequest)('Deck search completed successfully', req, res, { - query: searchQuery.query, - resultCount: Array.isArray(result) ? result.length : 0 - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Search decks endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -deckRouter.get('/:id', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const deckId = req.params.id; - (0, Logger_1.logRequest)('Get deck by id endpoint accessed', req, res, { deckId }); - const result = await DIContainer_1.container.getDeckByIdQueryHandler.execute({ id: deckId }); - if (!result) { - (0, Logger_1.logWarning)('Deck not found', { deckId }, req, res); - return res.status(404).json({ error: 'Deck not found' }); - } - (0, Logger_1.logRequest)('Deck retrieved successfully', req, res, { deckId }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Get deck by id endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -deckRouter.put('/:id', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const deckId = req.params.id; - const userId = req.user.userId; - (0, Logger_1.logRequest)('Update deck endpoint accessed', req, res, { deckId, userId, updateFields: Object.keys(req.body) }); - const result = await DIContainer_1.container.updateDeckCommandHandler.execute({ id: deckId, ...req.body }); - (0, Logger_1.logRequest)('Deck updated successfully', req, res, { deckId, userId }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Update deck endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Deck not found' }); - } - if (error instanceof Error && (error.message.includes('duplicate') || error.message.includes('unique constraint'))) { - return res.status(409).json({ error: 'Deck with this name already exists' }); - } - if (error instanceof Error && error.message.includes('validation')) { - return res.status(400).json({ error: 'Invalid input data', details: error.message }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -deckRouter.delete('/:id', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const deckId = req.params.id; - const userId = req.user.userId; - (0, Logger_1.logRequest)('Soft delete deck endpoint accessed', req, res, { deckId, userId }); - const result = await DIContainer_1.container.deleteDeckCommandHandler.execute({ id: deckId, soft: true }); - (0, Logger_1.logRequest)('Deck soft delete successful', req, res, { deckId, userId, success: result }); - res.json({ success: result }); - } - catch (error) { - (0, Logger_1.logError)('Soft delete deck endpoint error', error, req, res); - if (error instanceof Error && error.message.includes('not found')) { - return res.status(404).json({ error: 'Deck not found' }); - } - res.status(500).json({ error: 'Internal server error' }); - } -}); -exports.default = deckRouter; -//# sourceMappingURL=deckRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/deckRouter.js.map b/SerpentRace_Backend/dist/Api/routers/deckRouter.js.map deleted file mode 100644 index b73d333a..00000000 --- a/SerpentRace_Backend/dist/Api/routers/deckRouter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deckRouter.js","sourceRoot":"","sources":["../../../src/Api/routers/deckRouter.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AACjC,8EAAyE;AACzE,wEAAmE;AAGnE,0EAA8E;AAC9E,8DAAqF;AAErF,MAAM,UAAU,GAAG,IAAA,gBAAM,GAAE,CAAC;AAE5B,wDAAwD;AACxD,MAAM,aAAa,GAAG,IAAI,oCAAoB,CAAC,uBAAS,CAAC,cAAc,EAAE,uBAAS,CAAC,sBAAsB,EAAE,uBAAS,CAAC,cAAc,CAAC,CAAC;AAErI,iEAAiE;AACjE,UAAU,CAAC,GAAG,CAAC,iBAAiB,EAAE,6BAAY,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAClE,IAAI,CAAC;QACJ,MAAM,MAAM,GAAI,GAAW,CAAC,IAAI,CAAC,MAAM,CAAC;QACxC,MAAM,SAAS,GAAI,GAAW,CAAC,IAAI,CAAC,KAAK,CAAC;QAC1C,MAAM,OAAO,GAAI,GAAW,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC;QAClD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEnC,IAAI,KAAK,CAAC,IAAI,CA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C;AACF,CAAC,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/organizationRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/organizationRouter.d.ts deleted file mode 100644 index 1a753f15..00000000 --- a/SerpentRace_Backend/dist/Api/routers/organizationRouter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const organizationRouter: import("express-serve-static-core").Router; -export default organizationRouter; -//# sourceMappingURL=organizationRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/organizationRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/organizationRouter.d.ts.map deleted file mode 100644 index d626760f..00000000 --- a/SerpentRace_Backend/dist/Api/routers/organizationRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"organizationRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/organizationRouter.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,kBAAkB,4CAAW,CAAC;AAmMpC,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/organizationRouter.js b/SerpentRace_Backend/dist/Api/routers/organizationRouter.js deleted file mode 100644 index 0877a92e..00000000 --- a/SerpentRace_Backend/dist/Api/routers/organizationRouter.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = require("express"); -const AuthMiddleware_1 = require("../../Application/Services/AuthMiddleware"); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const ErrorResponseService_1 = require("../../Application/Services/ErrorResponseService"); -const Generalsearch_1 = require("../../Application/Search/Generalsearch"); -const Logger_1 = require("../../Application/Services/Logger"); -const organizationRouter = (0, express_1.Router)(); -// Create search service that isn't in the container yet -const searchService = new Generalsearch_1.GeneralSearchService(DIContainer_1.container.userRepository, DIContainer_1.container.organizationRepository, DIContainer_1.container.deckRepository); -// Auth routes - Get organizations with pagination (RECOMMENDED) -organizationRouter.get('/page/:from/:to', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const from = parseInt(req.params.from); - const to = parseInt(req.params.to); - if (isNaN(from) || isNaN(to) || from < 0 || to < from) { - return res.status(400).json({ error: 'Invalid page parameters. "from" and "to" must be valid numbers with to >= from >= 0' }); - } - (0, Logger_1.logRequest)('Get organizations by page endpoint accessed', req, res, { from, to }); - const result = await DIContainer_1.container.getOrganizationsByPageQueryHandler.execute({ from, to }); - (0, Logger_1.logRequest)('Organizations page retrieved successfully', req, res, { - from, - to, - count: result.organizations.length, - totalCount: result.totalCount - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Get organizations by page endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -organizationRouter.get('/search', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const { q: query, limit, offset } = req.query; - (0, Logger_1.logRequest)('Search organizations endpoint accessed', req, res, { query, limit, offset }); - if (!query || typeof query !== 'string') { - (0, Logger_1.logWarning)('Organization search attempted without query', { query, hasQuery: !!query }, req, res); - return res.status(400).json({ error: 'Search query is required' }); - } - const searchQuery = { - query: query.trim(), - limit: limit ? parseInt(limit) : 20, - offset: offset ? parseInt(offset) : 0 - }; - // Validate pagination parameters - if (searchQuery.limit < 1 || searchQuery.limit > 100) { - (0, Logger_1.logWarning)('Invalid organization search limit parameter', { limit: searchQuery.limit }, req, res); - return res.status(400).json({ error: 'Limit must be between 1 and 100' }); - } - if (searchQuery.offset < 0) { - (0, Logger_1.logWarning)('Invalid organization search offset parameter', { offset: searchQuery.offset }, req, res); - return res.status(400).json({ error: 'Offset must be non-negative' }); - } - const result = await searchService.searchFromUrl(req.originalUrl, searchQuery); - (0, Logger_1.logRequest)('Organization search completed successfully', req, res, { - query: searchQuery.query, - resultCount: Array.isArray(result) ? result.length : 0 - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Search organizations endpoint error', error, req, res); - res.status(500).json({ error: 'Internal server error' }); - } -}); -// Get organization login URL -organizationRouter.get('/:orgId/login-url', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - const { orgId } = req.params; - (0, Logger_1.logRequest)('Get organization login URL endpoint accessed', req, res, { - userId, - organizationId: orgId - }); - const result = await DIContainer_1.container.getOrganizationLoginUrlQueryHandler.execute({ - organizationId: orgId - }); - if (!result) { - (0, Logger_1.logWarning)('Organization login URL not found', { - organizationId: orgId, - userId - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'Organization login URL not found'); - } - (0, Logger_1.logRequest)('Organization login URL retrieved successfully', req, res, { - organizationId: orgId, - organizationName: result.organizationName, - hasUrl: !!result.loginUrl, - userId - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Get organization login URL endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Process third-party authentication callback -organizationRouter.post('/auth-callback', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - const { organizationId, status, authToken } = req.body; - (0, Logger_1.logRequest)('Organization auth callback endpoint accessed', req, res, { - userId, - organizationId, - status, - hasAuthToken: !!authToken - }); - // Validate required fields - if (!organizationId || !status) { - (0, Logger_1.logWarning)('Missing required fields for organization auth callback', { - organizationId: !!organizationId, - status: !!status, - userId - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'organizationId and status are required'); - } - if (status !== 'ok' && status !== 'not_ok') { - (0, Logger_1.logWarning)('Invalid status value for organization auth callback', { - status, - userId, - organizationId - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'status must be either "ok" or "not_ok"'); - } - const result = await DIContainer_1.container.processOrgAuthCallbackCommandHandler.execute({ - organizationId, - userId, - status, - authToken - }); - if (!result.success) { - if (result.message.includes('not found')) { - (0, Logger_1.logWarning)('Organization auth callback failed - entity not found', { - userId, - organizationId, - message: result.message - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, result.message); - } - if (result.message.includes('does not belong')) { - (0, Logger_1.logWarning)('Organization auth callback failed - authorization error', { - userId, - organizationId, - message: result.message - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendForbidden(res, result.message); - } - if (result.message.includes('authentication failed')) { - (0, Logger_1.logAuth)('Organization authentication failed via callback', userId, { - organizationId, - status - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendUnauthorized(res, result.message); - } - (0, Logger_1.logError)('Organization auth callback internal error', new Error(result.message), req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } - (0, Logger_1.logAuth)('Organization auth callback processed successfully', userId, { - organizationId, - status, - updatedFields: result.updatedFields - }, req, res); - res.json({ - success: result.success, - message: result.message, - updatedFields: result.updatedFields - }); - } - catch (error) { - (0, Logger_1.logError)('Organization auth callback endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -exports.default = organizationRouter; -//# sourceMappingURL=organizationRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/organizationRouter.js.map b/SerpentRace_Backend/dist/Api/routers/organizationRouter.js.map deleted file mode 100644 index e6106000..00000000 --- a/SerpentRace_Backend/dist/Api/routers/organizationRouter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"organizationRouter.js","sourceRoot":"","sources":["../../../src/Api/routers/organizationRouter.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AACjC,8EAAyE;AACzE,wEAAmE;AACnE,0FAAuF;AAEvF,0EAA8E;AAC9E,8DAA8F;AAE9F,MAAM,kBAAkB,GAAG,IAAA,gBAAM,GAAE,CAAC;AAEpC,wDAAwD;AACxD,MAAM,aAAa,GAAG,IAAI,oCAAoB,CAAC,uBAAS,CAAC,cAAc,EAAE,uBAAS,CAAC,sBAAsB,EAAE,uBAAS,CAAC,cAAc,CAAC,CAAC;AAErI,gEAAgE;AAChE,kBAAkB,CAAC,GAAG,CAAC,iBAAiB,EAAE,6BAAY,EAAE,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AAC;IAC1D,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,kBAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/userRouter.d.ts b/SerpentRace_Backend/dist/Api/routers/userRouter.d.ts deleted file mode 100644 index 23df20cc..00000000 --- a/SerpentRace_Backend/dist/Api/routers/userRouter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const userRouter: import("express-serve-static-core").Router; -export default userRouter; -//# sourceMappingURL=userRouter.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/userRouter.d.ts.map b/SerpentRace_Backend/dist/Api/routers/userRouter.d.ts.map deleted file mode 100644 index 0cb1b195..00000000 --- a/SerpentRace_Backend/dist/Api/routers/userRouter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userRouter.d.ts","sourceRoot":"","sources":["../../../src/Api/routers/userRouter.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,UAAU,4CAAW,CAAC;AA+J5B,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/userRouter.js b/SerpentRace_Backend/dist/Api/routers/userRouter.js deleted file mode 100644 index f0f27126..00000000 --- a/SerpentRace_Backend/dist/Api/routers/userRouter.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const express_1 = require("express"); -const AuthMiddleware_1 = require("../../Application/Services/AuthMiddleware"); -const DIContainer_1 = require("../../Application/Services/DIContainer"); -const ErrorResponseService_1 = require("../../Application/Services/ErrorResponseService"); -const ValidationMiddleware_1 = require("../../Application/Services/ValidationMiddleware"); -const Generalsearch_1 = require("../../Application/Search/Generalsearch"); -const Logger_1 = require("../../Application/Services/Logger"); -const userRouter = (0, express_1.Router)(); -// Create search service that isn't in the container yet -const searchService = new Generalsearch_1.GeneralSearchService(DIContainer_1.container.userRepository, DIContainer_1.container.organizationRepository, DIContainer_1.container.deckRepository); -// Login endpoint -userRouter.post('/login', ValidationMiddleware_1.ValidationMiddleware.combine([ - ValidationMiddleware_1.ValidationMiddleware.validateRequiredFields(['username', 'password']), - ValidationMiddleware_1.ValidationMiddleware.validateStringLength({ - username: { min: 3, max: 50 }, - password: { min: 6, max: 100 } - }) -]), async (req, res) => { - try { - (0, Logger_1.logRequest)('Login endpoint accessed', req, res, { username: req.body.username }); - const { username, password } = req.body; - const result = await DIContainer_1.container.loginCommandHandler.execute({ username, password }); - if (result) { - (0, Logger_1.logAuth)('User login successful', result.user.id, { username: result.user.username }, req, res); - res.json(result); - } - else { - return ErrorResponseService_1.ErrorResponseService.sendUnauthorized(res, 'Invalid username or password'); - } - } - catch (error) { - (0, Logger_1.logError)('Login endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('Invalid username')) { - return ErrorResponseService_1.ErrorResponseService.sendUnauthorized(res, 'Invalid username or password'); - } - if (error.message.includes('Invalid password')) { - return ErrorResponseService_1.ErrorResponseService.sendUnauthorized(res, 'Invalid username or password'); - } - if (error.message.includes('not verified')) { - return ErrorResponseService_1.ErrorResponseService.sendUnauthorized(res, 'Please verify your email address'); - } - if (error.message.includes('deactivated')) { - return ErrorResponseService_1.ErrorResponseService.sendUnauthorized(res, 'Account has been deactivated'); - } - } - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Create user endpoint -userRouter.post('/create', ValidationMiddleware_1.ValidationMiddleware.combine([ - ValidationMiddleware_1.ValidationMiddleware.validateRequiredFields(['username', 'email', 'password']), - ValidationMiddleware_1.ValidationMiddleware.validateEmailFormat(['email']), - ValidationMiddleware_1.ValidationMiddleware.validateStringLength({ - username: { min: 3, max: 50 }, - password: { min: 6, max: 100 } - }) -]), async (req, res) => { - try { - (0, Logger_1.logRequest)('Create user endpoint accessed', req, res, { - username: req.body.username, - email: req.body.email - }); - const result = await DIContainer_1.container.createUserCommandHandler.execute(req.body); - (0, Logger_1.logRequest)('User created successfully', req, res, { - userId: result.id, - username: result.username - }); - res.status(201).json(result); - } - catch (error) { - (0, Logger_1.logError)('Create user endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('already exists')) { - return ErrorResponseService_1.ErrorResponseService.sendConflict(res, error.message); - } - if (error.message.includes('validation')) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, error.message); - } - } - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Get user profile (current user) -userRouter.get('/profile', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - (0, Logger_1.logRequest)('Get user profile endpoint accessed', req, res, { userId }); - const result = await DIContainer_1.container.getUserByIdQueryHandler.execute({ id: userId }); - if (!result) { - (0, Logger_1.logWarning)('User profile not found', { userId }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'User not found'); - } - (0, Logger_1.logRequest)('User profile retrieved successfully', req, res, { - userId, - username: result.username - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Get user profile endpoint error', error, req, res); - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -// Update user profile (current user) -userRouter.patch('/profile', AuthMiddleware_1.authRequired, async (req, res) => { - try { - const userId = req.user.userId; - (0, Logger_1.logRequest)('Update user profile endpoint accessed', req, res, { - userId, - fieldsToUpdate: Object.keys(req.body) - }); - const result = await DIContainer_1.container.updateUserCommandHandler.execute({ id: userId, ...req.body }); - if (!result) { - return ErrorResponseService_1.ErrorResponseService.sendNotFound(res, 'User not found'); - } - (0, Logger_1.logRequest)('User profile updated successfully', req, res, { - userId, - username: result.username - }); - res.json(result); - } - catch (error) { - (0, Logger_1.logError)('Update user profile endpoint error', error, req, res); - if (error instanceof Error) { - if (error.message.includes('already exists')) { - return ErrorResponseService_1.ErrorResponseService.sendConflict(res, error.message); - } - if (error.message.includes('validation')) { - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, error.message); - } - } - return ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } -}); -exports.default = userRouter; -//# sourceMappingURL=userRouter.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/routers/userRouter.js.map b/SerpentRace_Backend/dist/Api/routers/userRouter.js.map deleted file mode 100644 index ecb8d61b..00000000 --- a/SerpentRace_Backend/dist/Api/routers/userRouter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"userRouter.js","sourceRoot":"","sources":["../../../src/Api/routers/userRouter.ts"],"names":[],"mappings":";;AAAA,qCAAiC;AACjC,8EAAyE;AACzE,wEAAmE;AACnE,0FAAuF;AACvF,0FAAuF;AACvF,0EAA8E;AAC9E,8DAA8F;AAE9F,MAAM,UAAU,GAAG,IAAA,gBAAM,GAAE,CAAC;AAE5B,wDAAwD;AACxD,MAAM,aAAa,GAAG,IAAI,oCAAoB,CAAC,uBAAS,CAAC,cAAc,EAAE,uBAAS,CAAC,sBAAsB,EAAE,uBAAS,CAAC,cAAc,CAAC,CAAC;AAErI,iBAAiB;AACjB,UAAU,CAAC,IAAI,CAAC,QAAQ,EACvB,2CAAoB,CAAC,OAAO,CAAC;IAC5B,2CAAoB,CAAC,sBAAsB,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACrE,2CAAoB,CAAC,oBAAoB,CAAC;QACzC,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;QAC7B,QAAQ,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE;KAC9B,CAAC;CACF,CAAC,EACF,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACnB,IAAI,CAAC;QACJ,IAAA,mBAAU,EAAC,yBAAyB,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEjF,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;QAExC,MAA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AAC,CAAC;QAEzE,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC5B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBAC9C,OAAO,2CAAoB,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YAC9D,CAAC;YACD,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC1C,OAAO,2CAAoB,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YAChE,CAAC;QACF,CAAC;QAED,OAAO,2CAAoB,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC1D,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,kBAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.d.ts b/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.d.ts deleted file mode 100644 index 8e49e1f4..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export declare const swaggerOptions: { - definition: { - openapi: string; - info: { - title: string; - version: string; - description: string; - contact: { - name: string; - email: string; - }; - license: { - name: string; - url: string; - }; - }; - servers: { - url: string; - description: string; - }[]; - components: { - securitySchemes: { - bearerAuth: { - type: string; - scheme: string; - bearerFormat: string; - description: string; - }; - }; - }; - security: { - bearerAuth: never[]; - }[]; - tags: { - name: string; - description: string; - }[]; - }; - apis: string[]; -}; -export declare const swaggerSpec: object; -//# sourceMappingURL=swaggerConfig.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.d.ts.map b/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.d.ts.map deleted file mode 100644 index 0b4705ac..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swaggerConfig.d.ts","sourceRoot":"","sources":["../../../src/Api/swagger/swaggerConfig.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmE1B,CAAC;AAEF,eAAO,MAAM,WAAW,QAA+B,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.js b/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.js deleted file mode 100644 index d7f11ee7..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.swaggerSpec = exports.swaggerOptions = void 0; -const swagger_jsdoc_1 = __importDefault(require("swagger-jsdoc")); -exports.swaggerOptions = { - definition: { - openapi: '3.0.0', - info: { - title: 'SerpentRace API', - version: '1.0.0', - description: 'Comprehensive API documentation for SerpentRace Backend', - contact: { - name: 'SerpentRace Development Team', - email: 'dev@serpentrace.com' - }, - license: { - name: 'MIT', - url: 'https://opensource.org/licenses/MIT' - } - }, - servers: [ - { - url: 'http://localhost:3000', - description: 'Local development server' - }, - { - url: 'https://api.serpentrace.com', - description: 'Production server' - } - ], - components: { - securitySchemes: { - bearerAuth: { - type: 'http', - scheme: 'bearer', - bearerFormat: 'JWT', - description: 'Enter JWT token obtained from /api/users/login' - } - } - }, - security: [{ bearerAuth: [] }], - tags: [ - { - name: 'Users', - description: 'User authentication and profile management' - }, - { - name: 'Organizations', - description: 'Organization management and authentication' - }, - { - name: 'Decks', - description: 'Deck creation, management, and gameplay' - }, - { - name: 'Chats', - description: 'Real-time chat and messaging system' - }, - { - name: 'Contacts', - description: 'Contact form and support requests' - }, - { - name: 'Deck Import/Export', - description: 'Import and export deck functionality' - } - ] - }, - apis: [ - './src/Api/swagger/swaggerDefinitions.ts' - ], -}; -exports.swaggerSpec = (0, swagger_jsdoc_1.default)(exports.swaggerOptions); -//# sourceMappingURL=swaggerConfig.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.js.map b/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.js.map deleted file mode 100644 index 4a5a5ff5..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerConfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swaggerConfig.js","sourceRoot":"","sources":["../../../src/Api/swagger/swaggerConfig.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAyC;AAE5B,QAAA,cAAc,GAAG;IAC5B,UAAU,EAAE;QACV,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE;YACJ,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,yDAAyD;YACtE,OAAO,EAAE;gBACP,IAAI,EAAE,8BAA8B;gBACpC,KAAK,EAAE,qBAAqB;aAC7B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,KAAK;gBACX,GAAG,EAAE,qCAAqC;aAC3C;SACF;QACD,OAAO,EAAE;YACP;gBACE,GAAG,EAAE,uBAAuB;gBAC5B,WAAW,EAAE,0BAA0B;aACxC;YACD;gBACE,GAAG,EAAE,6BAA6B;gBAClC,WAAW,EAAE,mBAAmB;aACjC;SACF;QACD,UAAU,EAAE;YACV,eAAe,EAAE;gBACf,UAAU,EAAE;oBACV,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,QAAQ;oBAChB,YAAY,EAAE,KAAK;oBACnB,WAAW,EAAE,gDAAgD;iBAC9D;aACF;SACF;QACD,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;QAC9B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,yCAAyC;aACvD;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,qCAAqC;aACnD;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,mCAAmC;aACjD;YACD;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,sCAAsC;aACpD;SACF;KACF;IACD,IAAI,EAAE;QACJ,yCAAyC;KAC1C;CACF,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,uBAAY,EAAC,sBAAc,CAAC,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.d.ts b/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.d.ts deleted file mode 100644 index 64290d9d..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.d.ts +++ /dev/null @@ -1,1377 +0,0 @@ -/** - * @swagger - * components: - * securitySchemes: - * bearerAuth: - * type: http - * scheme: bearer - * bearerFormat: JWT - * schemas: - * User: - * type: object - * properties: - * id: - * type: string - * format: uuid - * username: - * type: string - * email: - * type: string - * format: email - * fname: - * type: string - * lname: - * type: string - * phone: - * type: string - * nullable: true - * type: - * type: string - * state: - * type: integer - * regdate: - * type: string - * format: date-time - * updatedate: - * type: string - * format: date-time - * orgid: - * type: string - * nullable: true - * - * CreateUserRequest: - * type: object - * required: - * - username - * - email - * - password - * - fname - * - lname - * - type - * properties: - * username: - * type: string - * email: - * type: string - * format: email - * password: - * type: string - * format: password - * fname: - * type: string - * lname: - * type: string - * phone: - * type: string - * type: - * type: string - * - * LoginRequest: - * type: object - * required: - * - username - * - password - * properties: - * username: - * type: string - * password: - * type: string - * format: password - * - * LoginResponse: - * type: object - * properties: - * token: - * type: string - * user: - * $ref: '#/components/schemas/User' - * requiresOrgReauth: - * type: boolean - * orgLoginUrl: - * type: string - * organizationName: - * type: string - * - * UpdateProfileRequest: - * type: object - * properties: - * fname: - * type: string - * lname: - * type: string - * phone: - * type: string - * email: - * type: string - * format: email - * - * Organization: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * contactfname: - * type: string - * contactlname: - * type: string - * contactphone: - * type: string - * contactemail: - * type: string - * format: email - * state: - * type: integer - * regdate: - * type: string - * format: date-time - * updatedate: - * type: string - * format: date-time - * url: - * type: string - * nullable: true - * userinorg: - * type: integer - * maxOrganizationalDecks: - * type: integer - * - * Deck: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * type: - * type: integer - * enum: [0, 1, 2, 3] - * description: 0=JOKER, 1=LUCK, 2=QUESTION, 3=GENERAL - * userid: - * type: string - * format: uuid - * creationdate: - * type: string - * format: date-time - * cards: - * type: array - * items: - * type: object - * playedNumber: - * type: integer - * ctype: - * type: integer - * enum: [0, 1, 2] - * description: 0=PUBLIC, 1=ORGANIZATIONAL, 2=PRIVATE - * updatedate: - * type: string - * format: date-time - * state: - * type: integer - * enum: [0, 1, 2] - * description: 0=ACTIVE, 1=INACTIVE, 2=SOFT_DELETE - * organization: - * $ref: '#/components/schemas/Organization' - * nullable: true - * - * CreateDeckRequest: - * type: object - * required: - * - name - * - type - * - cards - * properties: - * name: - * type: string - * type: - * type: integer - * cards: - * type: array - * items: - * type: object - * ctype: - * type: integer - * - * Contact: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * email: - * type: string - * format: email - * userid: - * type: string - * format: uuid - * nullable: true - * type: - * type: integer - * enum: [0, 1, 2] - * description: 0=QUESTION, 1=BUG_REPORT, 2=SUGGESTION - * txt: - * type: string - * state: - * type: integer - * createDate: - * type: string - * format: date-time - * updateDate: - * type: string - * format: date-time - * adminResponse: - * type: string - * nullable: true - * responseDate: - * type: string - * format: date-time - * nullable: true - * respondedBy: - * type: string - * nullable: true - * - * CreateContactRequest: - * type: object - * required: - * - name - * - email - * - type - * - txt - * properties: - * name: - * type: string - * email: - * type: string - * format: email - * type: - * type: integer - * txt: - * type: string - * - * Chat: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * type: - * type: integer - * participants: - * type: array - * items: - * type: string - * creatorId: - * type: string - * gameId: - * type: string - * nullable: true - * createDate: - * type: string - * format: date-time - * updateDate: - * type: string - * format: date-time - * state: - * type: integer - * - * ChatMessage: - * type: object - * properties: - * id: - * type: string - * format: uuid - * senderId: - * type: string - * senderName: - * type: string - * message: - * type: string - * timestamp: - * type: string - * format: date-time - * chatId: - * type: string - * - * Error: - * type: object - * properties: - * error: - * type: string - * timestamp: - * type: string - * format: date-time - * details: - * type: string - * - * paths: - * /api/users/login: - * post: - * tags: [Users] - * summary: User login - * description: Authenticate user and return JWT token - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/LoginRequest' - * responses: - * 200: - * description: Login successful - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/LoginResponse' - * 401: - * description: Invalid credentials - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Error' - * - * /api/users/create: - * post: - * tags: [Users] - * summary: Create new user - * description: Register a new user account - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateUserRequest' - * responses: - * 201: - * description: User created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * 400: - * description: Validation error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Error' - * - * /api/users/profile: - * get: - * tags: [Users] - * summary: Get user profile - * description: Get current user's profile information - * security: - * - bearerAuth: [] - * responses: - * 200: - * description: User profile data - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * 401: - * description: Unauthorized - * patch: - * tags: [Users] - * summary: Update user profile - * description: Update current user's profile information - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/UpdateProfileRequest' - * responses: - * 200: - * description: Profile updated successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * 400: - * description: Validation error - * 401: - * description: Unauthorized - * - * /api/organizations/page/{from}/{to}: - * get: - * tags: [Organizations] - * summary: Get organizations by page - * description: Retrieve paginated list of organizations - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated organizations - * content: - * application/json: - * schema: - * type: object - * properties: - * organizations: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * totalCount: - * type: integer - * - * /api/organizations/search: - * get: - * tags: [Organizations] - * summary: Search organizations - * description: Search organizations by term - * security: - * - bearerAuth: [] - * parameters: - * - name: term - * in: query - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: object - * properties: - * results: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * totalCount: - * type: integer - * - * /api/organizations/{orgId}/login-url: - * get: - * tags: [Organizations] - * summary: Get organization login URL - * description: Get OAuth login URL for organization - * security: - * - bearerAuth: [] - * parameters: - * - name: orgId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Login URL - * content: - * application/json: - * schema: - * type: object - * properties: - * loginUrl: - * type: string - * - * /api/organizations/auth-callback: - * post: - * tags: [Organizations] - * summary: OAuth callback - * description: Handle OAuth callback from organization - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * properties: - * code: - * type: string - * state: - * type: string - * responses: - * 200: - * description: Authentication successful - * 400: - * description: Invalid callback data - * - * /api/decks/page/{from}/{to}: - * get: - * tags: [Decks] - * summary: Get decks by page - * description: Retrieve paginated list of decks - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated decks - * content: - * application/json: - * schema: - * type: object - * properties: - * decks: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * totalCount: - * type: integer - * - * /api/decks: - * post: - * tags: [Decks] - * summary: Create deck - * description: Create a new deck - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateDeckRequest' - * responses: - * 201: - * description: Deck created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * - * /api/decks/search: - * get: - * tags: [Decks] - * summary: Search decks - * description: Search decks by term - * security: - * - bearerAuth: [] - * parameters: - * - name: term - * in: query - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: object - * properties: - * results: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * totalCount: - * type: integer - * - * /api/decks/{id}: - * get: - * tags: [Decks] - * summary: Get deck by ID - * description: Retrieve a specific deck by ID - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Deck details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * 404: - * description: Deck not found - * put: - * tags: [Decks] - * summary: Update deck - * description: Update an existing deck - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateDeckRequest' - * responses: - * 200: - * description: Deck updated successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * delete: - * tags: [Decks] - * summary: Delete deck - * description: Delete a deck (soft delete) - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Deck deleted successfully - * 404: - * description: Deck not found - * - * /api/chats/user-chats: - * get: - * tags: [Chats] - * summary: Get user chats - * description: Get all chats for the current user - * security: - * - bearerAuth: [] - * responses: - * 200: - * description: User chats - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Chat' - * - * /api/chats/history/{chatId}: - * get: - * tags: [Chats] - * summary: Get chat history - * description: Get message history for a chat - * security: - * - bearerAuth: [] - * parameters: - * - name: chatId - * in: path - * required: true - * schema: - * type: string - * - name: page - * in: query - * schema: - * type: integer - * - name: limit - * in: query - * schema: - * type: integer - * responses: - * 200: - * description: Chat history - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/ChatMessage' - * - * /api/chats/create: - * post: - * tags: [Chats] - * summary: Create chat - * description: Create a new chat room - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * required: - * - name - * - gameId - * properties: - * name: - * type: string - * gameId: - * type: string - * password: - * type: string - * nullable: true - * responses: - * 201: - * description: Chat created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Chat' - * - * /api/chats/message: - * post: - * tags: [Chats] - * summary: Send message - * description: Send a message to a chat - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * required: - * - chatId - * - message - * properties: - * chatId: - * type: string - * message: - * type: string - * responses: - * 201: - * description: Message sent successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ChatMessage' - * - * /api/chats/archive/{chatId}: - * post: - * tags: [Chats] - * summary: Archive chat - * description: Archive a chat room - * security: - * - bearerAuth: [] - * parameters: - * - name: chatId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Chat archived successfully - * 404: - * description: Chat not found - * - * /api/chats/restore/{chatId}: - * post: - * tags: [Chats] - * summary: Restore chat - * description: Restore an archived chat room - * security: - * - bearerAuth: [] - * parameters: - * - name: chatId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Chat restored successfully - * 404: - * description: Chat not found - * - * /api/chats/archived/game/{gameId}: - * get: - * tags: [Chats] - * summary: Get archived chats by game - * description: Get all archived chats for a specific game - * security: - * - bearerAuth: [] - * parameters: - * - name: gameId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Archived chats - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Chat' - * - * /api/deck-import-export/export/{deckId}: - * get: - * tags: [Import/Export] - * summary: Export deck - * description: Export a deck as JSON or .spr file - * security: - * - bearerAuth: [] - * parameters: - * - name: deckId - * in: path - * required: true - * schema: - * type: string - * - name: format - * in: query - * schema: - * type: string - * enum: [json, spr] - * default: json - * responses: - * 200: - * description: Deck exported successfully - * content: - * application/json: - * schema: - * type: object - * application/octet-stream: - * schema: - * type: string - * format: binary - * - * /api/deck-import-export/import: - * post: - * tags: [Import/Export] - * summary: Import deck - * description: Import a deck from JSON or .spr file - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * multipart/form-data: - * schema: - * type: object - * properties: - * file: - * type: string - * format: binary - * responses: - * 201: - * description: Deck imported successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * - * /api/admin/users/page/{from}/{to}: - * get: - * tags: [Admin - Users] - * summary: Get users by page (Admin) - * description: Admin endpoint to retrieve paginated list of users - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated users - * content: - * application/json: - * schema: - * type: object - * properties: - * users: - * type: array - * items: - * $ref: '#/components/schemas/User' - * totalCount: - * type: integer - * - * /api/admin/users/{userId}: - * get: - * tags: [Admin - Users] - * summary: Get user by ID (Admin) - * description: Admin endpoint to get specific user details - * security: - * - bearerAuth: [] - * parameters: - * - name: userId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: User details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * delete: - * tags: [Admin - Users] - * summary: Delete user (Admin) - * description: Admin endpoint to delete a user - * security: - * - bearerAuth: [] - * parameters: - * - name: userId - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: User deleted successfully - * - * /api/admin/users/search/{searchTerm}: - * get: - * tags: [Admin - Users] - * summary: Search users (Admin) - * description: Admin endpoint to search users - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/User' - * - * /api/admin/users/{userId}/deactivate: - * post: - * tags: [Admin - Users] - * summary: Deactivate user (Admin) - * description: Admin endpoint to deactivate a user - * security: - * - bearerAuth: [] - * parameters: - * - name: userId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: User deactivated successfully - * - * /api/admin/decks/page/{from}/{to}: - * get: - * tags: [Admin - Decks] - * summary: Get decks by page (Admin) - * description: Admin endpoint to retrieve paginated list of decks - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated decks - * content: - * application/json: - * schema: - * type: object - * properties: - * decks: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * totalCount: - * type: integer - * - * /api/admin/decks/{id}: - * get: - * tags: [Admin - Decks] - * summary: Get deck by ID (Admin) - * description: Admin endpoint to get specific deck details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Deck details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * - * /api/admin/decks/search/{searchTerm}: - * get: - * tags: [Admin - Decks] - * summary: Search decks (Admin) - * description: Admin endpoint to search decks - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * - * /api/admin/decks/{id}/hard: - * delete: - * tags: [Admin - Decks] - * summary: Hard delete deck (Admin) - * description: Admin endpoint to permanently delete a deck - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Deck permanently deleted - * - * /api/admin/organizations: - * post: - * tags: [Admin - Organizations] - * summary: Create organization (Admin) - * description: Admin endpoint to create a new organization - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * required: - * - name - * properties: - * name: - * type: string - * description: - * type: string - * responses: - * 201: - * description: Organization created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Organization' - * - * /api/admin/organizations/page/{from}/{to}: - * get: - * tags: [Admin - Organizations] - * summary: Get organizations by page (Admin) - * description: Admin endpoint to retrieve paginated list of organizations - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated organizations - * content: - * application/json: - * schema: - * type: object - * properties: - * organizations: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * totalCount: - * type: integer - * - * /api/admin/organizations/{id}: - * get: - * tags: [Admin - Organizations] - * summary: Get organization by ID (Admin) - * description: Admin endpoint to get specific organization details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Organization details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Organization' - * delete: - * tags: [Admin - Organizations] - * summary: Delete organization (Admin) - * description: Admin endpoint to soft delete an organization - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Organization deleted successfully - * - * /api/admin/organizations/search/{searchTerm}: - * get: - * tags: [Admin - Organizations] - * summary: Search organizations (Admin) - * description: Admin endpoint to search organizations - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * - * /api/admin/organizations/{id}/hard: - * delete: - * tags: [Admin - Organizations] - * summary: Hard delete organization (Admin) - * description: Admin endpoint to permanently delete an organization - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Organization permanently deleted - * - * /api/admin/chats/page/{from}/{to}: - * get: - * tags: [Admin - Chats] - * summary: Get chats by page (Admin) - * description: Admin endpoint to retrieve paginated list of chats - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated chats - * content: - * application/json: - * schema: - * type: object - * properties: - * chats: - * type: array - * items: - * $ref: '#/components/schemas/Chat' - * totalCount: - * type: integer - * - * /api/admin/chats/{id}: - * get: - * tags: [Admin - Chats] - * summary: Get chat by ID (Admin) - * description: Admin endpoint to get specific chat details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Chat details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Chat' - * - * /api/admin/contacts/page/{from}/{to}: - * get: - * tags: [Admin - Contacts] - * summary: Get contacts by page (Admin) - * description: Admin endpoint to retrieve paginated list of contacts - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated contacts - * content: - * application/json: - * schema: - * type: object - * properties: - * contacts: - * type: array - * items: - * $ref: '#/components/schemas/Contact' - * totalCount: - * type: integer - * - * /api/admin/contacts/{id}: - * get: - * tags: [Admin - Contacts] - * summary: Get contact by ID (Admin) - * description: Admin endpoint to get specific contact details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Contact details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Contact' - * - * /api/admin/contacts/search/{searchTerm}: - * get: - * tags: [Admin - Contacts] - * summary: Search contacts (Admin) - * description: Admin endpoint to search contacts - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Contact' - * - * /api/contacts: - * post: - * tags: [Contacts] - * summary: Create contact - * description: Create a new contact message - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateContactRequest' - * responses: - * 201: - * description: Contact created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Contact' - */ -export {}; -//# sourceMappingURL=swaggerDefinitions.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.d.ts.map b/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.d.ts.map deleted file mode 100644 index 9f932502..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swaggerDefinitions.d.ts","sourceRoot":"","sources":["../../../src/Api/swagger/swaggerDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA81CG;AAEH,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.js b/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.js deleted file mode 100644 index e9b1be5d..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.js +++ /dev/null @@ -1,1378 +0,0 @@ -"use strict"; -/** - * @swagger - * components: - * securitySchemes: - * bearerAuth: - * type: http - * scheme: bearer - * bearerFormat: JWT - * schemas: - * User: - * type: object - * properties: - * id: - * type: string - * format: uuid - * username: - * type: string - * email: - * type: string - * format: email - * fname: - * type: string - * lname: - * type: string - * phone: - * type: string - * nullable: true - * type: - * type: string - * state: - * type: integer - * regdate: - * type: string - * format: date-time - * updatedate: - * type: string - * format: date-time - * orgid: - * type: string - * nullable: true - * - * CreateUserRequest: - * type: object - * required: - * - username - * - email - * - password - * - fname - * - lname - * - type - * properties: - * username: - * type: string - * email: - * type: string - * format: email - * password: - * type: string - * format: password - * fname: - * type: string - * lname: - * type: string - * phone: - * type: string - * type: - * type: string - * - * LoginRequest: - * type: object - * required: - * - username - * - password - * properties: - * username: - * type: string - * password: - * type: string - * format: password - * - * LoginResponse: - * type: object - * properties: - * token: - * type: string - * user: - * $ref: '#/components/schemas/User' - * requiresOrgReauth: - * type: boolean - * orgLoginUrl: - * type: string - * organizationName: - * type: string - * - * UpdateProfileRequest: - * type: object - * properties: - * fname: - * type: string - * lname: - * type: string - * phone: - * type: string - * email: - * type: string - * format: email - * - * Organization: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * contactfname: - * type: string - * contactlname: - * type: string - * contactphone: - * type: string - * contactemail: - * type: string - * format: email - * state: - * type: integer - * regdate: - * type: string - * format: date-time - * updatedate: - * type: string - * format: date-time - * url: - * type: string - * nullable: true - * userinorg: - * type: integer - * maxOrganizationalDecks: - * type: integer - * - * Deck: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * type: - * type: integer - * enum: [0, 1, 2, 3] - * description: 0=JOKER, 1=LUCK, 2=QUESTION, 3=GENERAL - * userid: - * type: string - * format: uuid - * creationdate: - * type: string - * format: date-time - * cards: - * type: array - * items: - * type: object - * playedNumber: - * type: integer - * ctype: - * type: integer - * enum: [0, 1, 2] - * description: 0=PUBLIC, 1=ORGANIZATIONAL, 2=PRIVATE - * updatedate: - * type: string - * format: date-time - * state: - * type: integer - * enum: [0, 1, 2] - * description: 0=ACTIVE, 1=INACTIVE, 2=SOFT_DELETE - * organization: - * $ref: '#/components/schemas/Organization' - * nullable: true - * - * CreateDeckRequest: - * type: object - * required: - * - name - * - type - * - cards - * properties: - * name: - * type: string - * type: - * type: integer - * cards: - * type: array - * items: - * type: object - * ctype: - * type: integer - * - * Contact: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * email: - * type: string - * format: email - * userid: - * type: string - * format: uuid - * nullable: true - * type: - * type: integer - * enum: [0, 1, 2] - * description: 0=QUESTION, 1=BUG_REPORT, 2=SUGGESTION - * txt: - * type: string - * state: - * type: integer - * createDate: - * type: string - * format: date-time - * updateDate: - * type: string - * format: date-time - * adminResponse: - * type: string - * nullable: true - * responseDate: - * type: string - * format: date-time - * nullable: true - * respondedBy: - * type: string - * nullable: true - * - * CreateContactRequest: - * type: object - * required: - * - name - * - email - * - type - * - txt - * properties: - * name: - * type: string - * email: - * type: string - * format: email - * type: - * type: integer - * txt: - * type: string - * - * Chat: - * type: object - * properties: - * id: - * type: string - * format: uuid - * name: - * type: string - * type: - * type: integer - * participants: - * type: array - * items: - * type: string - * creatorId: - * type: string - * gameId: - * type: string - * nullable: true - * createDate: - * type: string - * format: date-time - * updateDate: - * type: string - * format: date-time - * state: - * type: integer - * - * ChatMessage: - * type: object - * properties: - * id: - * type: string - * format: uuid - * senderId: - * type: string - * senderName: - * type: string - * message: - * type: string - * timestamp: - * type: string - * format: date-time - * chatId: - * type: string - * - * Error: - * type: object - * properties: - * error: - * type: string - * timestamp: - * type: string - * format: date-time - * details: - * type: string - * - * paths: - * /api/users/login: - * post: - * tags: [Users] - * summary: User login - * description: Authenticate user and return JWT token - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/LoginRequest' - * responses: - * 200: - * description: Login successful - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/LoginResponse' - * 401: - * description: Invalid credentials - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Error' - * - * /api/users/create: - * post: - * tags: [Users] - * summary: Create new user - * description: Register a new user account - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateUserRequest' - * responses: - * 201: - * description: User created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * 400: - * description: Validation error - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Error' - * - * /api/users/profile: - * get: - * tags: [Users] - * summary: Get user profile - * description: Get current user's profile information - * security: - * - bearerAuth: [] - * responses: - * 200: - * description: User profile data - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * 401: - * description: Unauthorized - * patch: - * tags: [Users] - * summary: Update user profile - * description: Update current user's profile information - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/UpdateProfileRequest' - * responses: - * 200: - * description: Profile updated successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * 400: - * description: Validation error - * 401: - * description: Unauthorized - * - * /api/organizations/page/{from}/{to}: - * get: - * tags: [Organizations] - * summary: Get organizations by page - * description: Retrieve paginated list of organizations - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated organizations - * content: - * application/json: - * schema: - * type: object - * properties: - * organizations: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * totalCount: - * type: integer - * - * /api/organizations/search: - * get: - * tags: [Organizations] - * summary: Search organizations - * description: Search organizations by term - * security: - * - bearerAuth: [] - * parameters: - * - name: term - * in: query - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: object - * properties: - * results: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * totalCount: - * type: integer - * - * /api/organizations/{orgId}/login-url: - * get: - * tags: [Organizations] - * summary: Get organization login URL - * description: Get OAuth login URL for organization - * security: - * - bearerAuth: [] - * parameters: - * - name: orgId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Login URL - * content: - * application/json: - * schema: - * type: object - * properties: - * loginUrl: - * type: string - * - * /api/organizations/auth-callback: - * post: - * tags: [Organizations] - * summary: OAuth callback - * description: Handle OAuth callback from organization - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * properties: - * code: - * type: string - * state: - * type: string - * responses: - * 200: - * description: Authentication successful - * 400: - * description: Invalid callback data - * - * /api/decks/page/{from}/{to}: - * get: - * tags: [Decks] - * summary: Get decks by page - * description: Retrieve paginated list of decks - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated decks - * content: - * application/json: - * schema: - * type: object - * properties: - * decks: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * totalCount: - * type: integer - * - * /api/decks: - * post: - * tags: [Decks] - * summary: Create deck - * description: Create a new deck - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateDeckRequest' - * responses: - * 201: - * description: Deck created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * - * /api/decks/search: - * get: - * tags: [Decks] - * summary: Search decks - * description: Search decks by term - * security: - * - bearerAuth: [] - * parameters: - * - name: term - * in: query - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: object - * properties: - * results: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * totalCount: - * type: integer - * - * /api/decks/{id}: - * get: - * tags: [Decks] - * summary: Get deck by ID - * description: Retrieve a specific deck by ID - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Deck details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * 404: - * description: Deck not found - * put: - * tags: [Decks] - * summary: Update deck - * description: Update an existing deck - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateDeckRequest' - * responses: - * 200: - * description: Deck updated successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * delete: - * tags: [Decks] - * summary: Delete deck - * description: Delete a deck (soft delete) - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Deck deleted successfully - * 404: - * description: Deck not found - * - * /api/chats/user-chats: - * get: - * tags: [Chats] - * summary: Get user chats - * description: Get all chats for the current user - * security: - * - bearerAuth: [] - * responses: - * 200: - * description: User chats - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Chat' - * - * /api/chats/history/{chatId}: - * get: - * tags: [Chats] - * summary: Get chat history - * description: Get message history for a chat - * security: - * - bearerAuth: [] - * parameters: - * - name: chatId - * in: path - * required: true - * schema: - * type: string - * - name: page - * in: query - * schema: - * type: integer - * - name: limit - * in: query - * schema: - * type: integer - * responses: - * 200: - * description: Chat history - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/ChatMessage' - * - * /api/chats/create: - * post: - * tags: [Chats] - * summary: Create chat - * description: Create a new chat room - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * required: - * - name - * - gameId - * properties: - * name: - * type: string - * gameId: - * type: string - * password: - * type: string - * nullable: true - * responses: - * 201: - * description: Chat created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Chat' - * - * /api/chats/message: - * post: - * tags: [Chats] - * summary: Send message - * description: Send a message to a chat - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * required: - * - chatId - * - message - * properties: - * chatId: - * type: string - * message: - * type: string - * responses: - * 201: - * description: Message sent successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/ChatMessage' - * - * /api/chats/archive/{chatId}: - * post: - * tags: [Chats] - * summary: Archive chat - * description: Archive a chat room - * security: - * - bearerAuth: [] - * parameters: - * - name: chatId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Chat archived successfully - * 404: - * description: Chat not found - * - * /api/chats/restore/{chatId}: - * post: - * tags: [Chats] - * summary: Restore chat - * description: Restore an archived chat room - * security: - * - bearerAuth: [] - * parameters: - * - name: chatId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Chat restored successfully - * 404: - * description: Chat not found - * - * /api/chats/archived/game/{gameId}: - * get: - * tags: [Chats] - * summary: Get archived chats by game - * description: Get all archived chats for a specific game - * security: - * - bearerAuth: [] - * parameters: - * - name: gameId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Archived chats - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Chat' - * - * /api/deck-import-export/export/{deckId}: - * get: - * tags: [Import/Export] - * summary: Export deck - * description: Export a deck as JSON or .spr file - * security: - * - bearerAuth: [] - * parameters: - * - name: deckId - * in: path - * required: true - * schema: - * type: string - * - name: format - * in: query - * schema: - * type: string - * enum: [json, spr] - * default: json - * responses: - * 200: - * description: Deck exported successfully - * content: - * application/json: - * schema: - * type: object - * application/octet-stream: - * schema: - * type: string - * format: binary - * - * /api/deck-import-export/import: - * post: - * tags: [Import/Export] - * summary: Import deck - * description: Import a deck from JSON or .spr file - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * multipart/form-data: - * schema: - * type: object - * properties: - * file: - * type: string - * format: binary - * responses: - * 201: - * description: Deck imported successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * - * /api/admin/users/page/{from}/{to}: - * get: - * tags: [Admin - Users] - * summary: Get users by page (Admin) - * description: Admin endpoint to retrieve paginated list of users - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated users - * content: - * application/json: - * schema: - * type: object - * properties: - * users: - * type: array - * items: - * $ref: '#/components/schemas/User' - * totalCount: - * type: integer - * - * /api/admin/users/{userId}: - * get: - * tags: [Admin - Users] - * summary: Get user by ID (Admin) - * description: Admin endpoint to get specific user details - * security: - * - bearerAuth: [] - * parameters: - * - name: userId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: User details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/User' - * delete: - * tags: [Admin - Users] - * summary: Delete user (Admin) - * description: Admin endpoint to delete a user - * security: - * - bearerAuth: [] - * parameters: - * - name: userId - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: User deleted successfully - * - * /api/admin/users/search/{searchTerm}: - * get: - * tags: [Admin - Users] - * summary: Search users (Admin) - * description: Admin endpoint to search users - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/User' - * - * /api/admin/users/{userId}/deactivate: - * post: - * tags: [Admin - Users] - * summary: Deactivate user (Admin) - * description: Admin endpoint to deactivate a user - * security: - * - bearerAuth: [] - * parameters: - * - name: userId - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: User deactivated successfully - * - * /api/admin/decks/page/{from}/{to}: - * get: - * tags: [Admin - Decks] - * summary: Get decks by page (Admin) - * description: Admin endpoint to retrieve paginated list of decks - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated decks - * content: - * application/json: - * schema: - * type: object - * properties: - * decks: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * totalCount: - * type: integer - * - * /api/admin/decks/{id}: - * get: - * tags: [Admin - Decks] - * summary: Get deck by ID (Admin) - * description: Admin endpoint to get specific deck details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Deck details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Deck' - * - * /api/admin/decks/search/{searchTerm}: - * get: - * tags: [Admin - Decks] - * summary: Search decks (Admin) - * description: Admin endpoint to search decks - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Deck' - * - * /api/admin/decks/{id}/hard: - * delete: - * tags: [Admin - Decks] - * summary: Hard delete deck (Admin) - * description: Admin endpoint to permanently delete a deck - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Deck permanently deleted - * - * /api/admin/organizations: - * post: - * tags: [Admin - Organizations] - * summary: Create organization (Admin) - * description: Admin endpoint to create a new organization - * security: - * - bearerAuth: [] - * requestBody: - * required: true - * content: - * application/json: - * schema: - * type: object - * required: - * - name - * properties: - * name: - * type: string - * description: - * type: string - * responses: - * 201: - * description: Organization created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Organization' - * - * /api/admin/organizations/page/{from}/{to}: - * get: - * tags: [Admin - Organizations] - * summary: Get organizations by page (Admin) - * description: Admin endpoint to retrieve paginated list of organizations - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated organizations - * content: - * application/json: - * schema: - * type: object - * properties: - * organizations: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * totalCount: - * type: integer - * - * /api/admin/organizations/{id}: - * get: - * tags: [Admin - Organizations] - * summary: Get organization by ID (Admin) - * description: Admin endpoint to get specific organization details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Organization details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Organization' - * delete: - * tags: [Admin - Organizations] - * summary: Delete organization (Admin) - * description: Admin endpoint to soft delete an organization - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Organization deleted successfully - * - * /api/admin/organizations/search/{searchTerm}: - * get: - * tags: [Admin - Organizations] - * summary: Search organizations (Admin) - * description: Admin endpoint to search organizations - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Organization' - * - * /api/admin/organizations/{id}/hard: - * delete: - * tags: [Admin - Organizations] - * summary: Hard delete organization (Admin) - * description: Admin endpoint to permanently delete an organization - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 204: - * description: Organization permanently deleted - * - * /api/admin/chats/page/{from}/{to}: - * get: - * tags: [Admin - Chats] - * summary: Get chats by page (Admin) - * description: Admin endpoint to retrieve paginated list of chats - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated chats - * content: - * application/json: - * schema: - * type: object - * properties: - * chats: - * type: array - * items: - * $ref: '#/components/schemas/Chat' - * totalCount: - * type: integer - * - * /api/admin/chats/{id}: - * get: - * tags: [Admin - Chats] - * summary: Get chat by ID (Admin) - * description: Admin endpoint to get specific chat details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Chat details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Chat' - * - * /api/admin/contacts/page/{from}/{to}: - * get: - * tags: [Admin - Contacts] - * summary: Get contacts by page (Admin) - * description: Admin endpoint to retrieve paginated list of contacts - * security: - * - bearerAuth: [] - * parameters: - * - name: from - * in: path - * required: true - * schema: - * type: integer - * - name: to - * in: path - * required: true - * schema: - * type: integer - * responses: - * 200: - * description: Paginated contacts - * content: - * application/json: - * schema: - * type: object - * properties: - * contacts: - * type: array - * items: - * $ref: '#/components/schemas/Contact' - * totalCount: - * type: integer - * - * /api/admin/contacts/{id}: - * get: - * tags: [Admin - Contacts] - * summary: Get contact by ID (Admin) - * description: Admin endpoint to get specific contact details - * security: - * - bearerAuth: [] - * parameters: - * - name: id - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Contact details - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Contact' - * - * /api/admin/contacts/search/{searchTerm}: - * get: - * tags: [Admin - Contacts] - * summary: Search contacts (Admin) - * description: Admin endpoint to search contacts - * security: - * - bearerAuth: [] - * parameters: - * - name: searchTerm - * in: path - * required: true - * schema: - * type: string - * responses: - * 200: - * description: Search results - * content: - * application/json: - * schema: - * type: array - * items: - * $ref: '#/components/schemas/Contact' - * - * /api/contacts: - * post: - * tags: [Contacts] - * summary: Create contact - * description: Create a new contact message - * requestBody: - * required: true - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/CreateContactRequest' - * responses: - * 201: - * description: Contact created successfully - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Contact' - */ -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=swaggerDefinitions.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.js.map b/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.js.map deleted file mode 100644 index 0e80d3c0..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerDefinitions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swaggerDefinitions.js","sourceRoot":"","sources":["../../../src/Api/swagger/swaggerDefinitions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA81CG"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.d.ts b/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.d.ts deleted file mode 100644 index 4a14beb8..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import express from 'express'; -export declare function setupSwagger(app: express.Application): void; -//# sourceMappingURL=swaggerUiSetup.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.d.ts.map b/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.d.ts.map deleted file mode 100644 index ab391802..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swaggerUiSetup.d.ts","sourceRoot":"","sources":["../../../src/Api/swagger/swaggerUiSetup.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAI9B,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,WAAW,QAEpD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.js b/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.js deleted file mode 100644 index a1541133..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.setupSwagger = setupSwagger; -const swagger_ui_express_1 = __importDefault(require("swagger-ui-express")); -const swaggerConfig_1 = require("./swaggerConfig"); -function setupSwagger(app) { - app.use('/api-docs', swagger_ui_express_1.default.serve, swagger_ui_express_1.default.setup(swaggerConfig_1.swaggerSpec)); -} -//# sourceMappingURL=swaggerUiSetup.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.js.map b/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.js.map deleted file mode 100644 index 16589fe2..00000000 --- a/SerpentRace_Backend/dist/Api/swagger/swaggerUiSetup.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"swaggerUiSetup.js","sourceRoot":"","sources":["../../../src/Api/swagger/swaggerUiSetup.ts"],"names":[],"mappings":";;;;;AAIA,oCAEC;AALD,4EAA2C;AAC3C,mDAA8C;AAE9C,SAAgB,YAAY,CAAC,GAAwB;IACnD,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,4BAAS,CAAC,KAAK,EAAE,4BAAS,CAAC,KAAK,CAAC,2BAAW,CAAC,CAAC,CAAC;AACtE,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.d.ts b/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.d.ts deleted file mode 100644 index 21a41381..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ArchiveChatCommand, RestoreChatCommand } from './ChatCommands'; -import { IChatRepository } from '../../../Domain/IRepository/IChatRepository'; -export declare class ArchiveChatCommandHandler { - private chatRepository; - constructor(chatRepository: IChatRepository); - execute(command: ArchiveChatCommand): Promise; -} -export declare class RestoreChatCommandHandler { - private chatRepository; - constructor(chatRepository: IChatRepository); - execute(command: RestoreChatCommand): Promise; -} -//# sourceMappingURL=ChatArchiveCommandHandlers.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.d.ts.map deleted file mode 100644 index 55adda6d..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatArchiveCommandHandlers.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/ChatArchiveCommandHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAI9E,qBAAa,yBAAyB;IACtB,OAAO,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAE7C,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;CAsB/D;AAED,qBAAa,yBAAyB;IACtB,OAAO,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAE7C,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;CAiC/D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.js b/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.js deleted file mode 100644 index 2c7ee234..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RestoreChatCommandHandler = exports.ArchiveChatCommandHandler = void 0; -const ChatAggregate_1 = require("../../../Domain/Chat/ChatAggregate"); -const Logger_1 = require("../../Services/Logger"); -class ArchiveChatCommandHandler { - constructor(chatRepository) { - this.chatRepository = chatRepository; - } - async execute(command) { - try { - const chat = await this.chatRepository.findById(command.chatId); - if (!chat) { - throw new Error('Chat not found'); - } - await this.chatRepository.archiveChat(chat); - (0, Logger_1.logAuth)('Chat archived manually', undefined, { - chatId: command.chatId, - chatType: chat.type, - messageCount: chat.messages.length - }); - return true; - } - catch (error) { - (0, Logger_1.logError)('ArchiveChatCommandHandler error', error); - return false; - } - } -} -exports.ArchiveChatCommandHandler = ArchiveChatCommandHandler; -class RestoreChatCommandHandler { - constructor(chatRepository) { - this.chatRepository = chatRepository; - } - async execute(command) { - try { - const archive = await this.chatRepository.getArchivedChat(command.chatId); - if (!archive) { - throw new Error('Archived chat not found'); - } - // Game chats cannot be restored, only viewed - if (archive.chatType === ChatAggregate_1.ChatType.GAME) { - (0, Logger_1.logWarning)('Attempt to restore game chat blocked', { - chatId: command.chatId, - chatType: archive.chatType - }); - return false; - } - const restoredChat = await this.chatRepository.restoreFromArchive(command.chatId); - if (!restoredChat) { - throw new Error('Failed to restore chat from archive'); - } - (0, Logger_1.logAuth)('Chat restored from archive', undefined, { - chatId: command.chatId, - messageCount: archive.archivedMessages.length - }); - return true; - } - catch (error) { - (0, Logger_1.logError)('RestoreChatCommandHandler error', error); - return false; - } - } -} -exports.RestoreChatCommandHandler = RestoreChatCommandHandler; -//# sourceMappingURL=ChatArchiveCommandHandlers.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.js.map b/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.js.map deleted file mode 100644 index f93b9380..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatArchiveCommandHandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatArchiveCommandHandlers.js","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/ChatArchiveCommandHandlers.ts"],"names":[],"mappings":";;;AAEA,sEAA8D;AAC9D,kDAAsE;AAEtE,MAAa,yBAAyB;IAClC,YAAoB,cAA+B;QAA/B,mBAAc,GAAd,cAAc,CAAiB;IAAG,CAAC;IAEvD,KAAK,CAAC,OAA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7B,CAAC,CAAC;gBACH,OAAO,KAAK,CAAC;YACjB,CAAC;YAED,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAClF,IAAI,CAAC,YAAY,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YAC3D,CAAC;YAED,IAAA,gBAAO,EAAC,4BAA4B,EAAE,SAAS,EAAE;gBAC7C,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM;aAChD,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QAEhB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,iCAAiC,EAAE,KAAc,CAAC,CAAC;YAC5D,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ;AApCD,8DAoCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.d.ts b/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.d.ts deleted file mode 100644 index da701535..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface CreateChatCommand { - type: 'direct' | 'group' | 'game'; - name?: string; - gameId?: string; - createdBy: string; - userIds: string[]; -} -export interface SendMessageCommand { - chatId: string; - userId: string; - message: string; -} -export interface ArchiveChatCommand { - chatId: string; -} -export interface RestoreChatCommand { - chatId: string; -} -//# sourceMappingURL=ChatCommands.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.d.ts.map deleted file mode 100644 index a8f458da..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatCommands.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/ChatCommands.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.js b/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.js deleted file mode 100644 index fd9c2dae..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ChatCommands.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.js.map b/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.js.map deleted file mode 100644 index d964c636..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/ChatCommands.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatCommands.js","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/ChatCommands.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.d.ts deleted file mode 100644 index 9c3e1331..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CreateChatCommand } from './ChatCommands'; -import { IChatRepository } from '../../../Domain/IRepository/IChatRepository'; -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { ChatAggregate } from '../../../Domain/Chat/ChatAggregate'; -export declare class CreateChatCommandHandler { - private chatRepository; - private userRepository; - constructor(chatRepository: IChatRepository, userRepository: IUserRepository); - execute(command: CreateChatCommand): Promise; -} -//# sourceMappingURL=CreateChatCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.d.ts.map deleted file mode 100644 index 54e7f299..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateChatCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/CreateChatCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAY,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAI7E,qBAAa,wBAAwB;IAE7B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,cAAc;gBADd,cAAc,EAAE,eAAe,EAC/B,cAAc,EAAE,eAAe;IAGrC,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAuE3E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.js b/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.js deleted file mode 100644 index 48a3460c..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateChatCommandHandler = void 0; -const ChatAggregate_1 = require("../../../Domain/Chat/ChatAggregate"); -const UserAggregate_1 = require("../../../Domain/User/UserAggregate"); -const Logger_1 = require("../../Services/Logger"); -class CreateChatCommandHandler { - constructor(chatRepository, userRepository) { - this.chatRepository = chatRepository; - this.userRepository = userRepository; - } - async execute(command) { - try { - // Validate creator exists - const creator = await this.userRepository.findById(command.createdBy); - if (!creator) { - throw new Error('Creator not found'); - } - // For group chats, check if creator is premium - if (command.type === 'group' && creator.state !== UserAggregate_1.UserState.VERIFIED_PREMIUM) { - throw new Error('Premium subscription required to create groups'); - } - // Validate all target users exist - const targetUsers = await Promise.all(command.userIds.map(id => this.userRepository.findById(id))); - if (targetUsers.some(user => !user)) { - throw new Error('One or more target users not found'); - } - // For direct chats, check if already exists - if (command.type === 'direct' && command.userIds.length === 1) { - const existingChats = await this.chatRepository.findByUserId(command.createdBy); - const existingDirectChat = existingChats.find(chat => chat.type === ChatAggregate_1.ChatType.DIRECT && - chat.users.length === 2 && - chat.users.includes(command.userIds[0])); - if (existingDirectChat) { - return existingDirectChat; - } - } - // For game chats, check if already exists - if (command.type === 'game' && command.gameId) { - const existingGameChat = await this.chatRepository.findByGameId(command.gameId); - if (existingGameChat) { - return existingGameChat; - } - } - // Create chat - const chatData = { - type: command.type, - name: command.name, - gameId: command.gameId, - createdBy: command.createdBy, - users: [command.createdBy, ...command.userIds], - messages: [], - lastActivity: new Date() - }; - const chat = await this.chatRepository.create(chatData); - (0, Logger_1.logAuth)('Chat created successfully', command.createdBy, { - chatId: chat.id, - chatType: command.type, - participantCount: chat.users.length, - gameId: command.gameId - }); - return chat; - } - catch (error) { - (0, Logger_1.logError)('CreateChatCommandHandler error', error); - return null; - } - } -} -exports.CreateChatCommandHandler = CreateChatCommandHandler; -//# sourceMappingURL=CreateChatCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.js.map deleted file mode 100644 index 6a9cc580..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/CreateChatCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateChatCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/CreateChatCommandHandler.ts"],"names":[],"mappings":";;;AAGA,sEAA6E;AAC7E,sEAA+D;AAC/D,kDAA0D;AAE1D,MAAa,wBAAwB;IACjC,YACY,cAA+B,EAC/B,cAA+B;QAD/B,mBAAc,GAAd,cAAc,CAAiB;QAC/B,mBAAc,GAAd,cAAc,CAAiB;IACxC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,OAA0B;QACpC,IAAI,CAAC;YACD,0BAA0B;YAC1B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACtE,IAAI,CAAC,OAAO,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACzC,CAAC;YAED,+CAA+C;YAC/C,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,yBAAS,CAAC,gBAAgB,EAAE,CAAC;gBAC3E,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;YACtE,CAAC;YAED,kCAAkC;YAClC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CACjC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAC9D,CAAC;YAEF,IAAI,WAAW,CAAC,IAAI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C,OAAO,CAAC;gBAC9C,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,IAAI,IAAI,EAAE;aAC3B,CAAC;YAEF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAExD,IAAA,gBAAO,EAAC,2BAA2B,EAAE,OAAO,CAAC,SAAS,EAAE;gBACpD,MAAM,EAAE,IAAI,CAAC,EAAE;gBACf,QAAQ,EAAE,OAAO,CAAC,IAAI;gBACtB,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;gBACnC,MAAM,EAAE,OAAO,CAAC,MAAM;aACzB,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QAEhB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,gCAAgC,EAAE,KAAc,CAAC,CAAC;YAC3D,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AA7ED,4DA6EC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.d.ts deleted file mode 100644 index 55f64f92..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { SendMessageCommand } from './ChatCommands'; -import { IChatRepository } from '../../../Domain/IRepository/IChatRepository'; -import { Message } from '../../../Domain/Chat/ChatAggregate'; -export declare class SendMessageCommandHandler { - private chatRepository; - constructor(chatRepository: IChatRepository); - execute(command: SendMessageCommand): Promise; - private pruneMessages; -} -//# sourceMappingURL=SendMessageCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.d.ts.map deleted file mode 100644 index 5a11e9cf..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SendMessageCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/SendMessageCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAI7D,qBAAa,yBAAyB;IACtB,OAAO,CAAC,cAAc;gBAAd,cAAc,EAAE,eAAe;IAE7C,OAAO,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAiDnE,OAAO,CAAC,aAAa;CAyBxB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.js b/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.js deleted file mode 100644 index 8dd9d499..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SendMessageCommandHandler = void 0; -const Logger_1 = require("../../Services/Logger"); -const uuid_1 = require("uuid"); -class SendMessageCommandHandler { - constructor(chatRepository) { - this.chatRepository = chatRepository; - } - async execute(command) { - try { - // Validate message is non-empty string - if (typeof command.message !== 'string' || !command.message.trim()) { - throw new Error('Message must be a non-empty string'); - } - const chat = await this.chatRepository.findById(command.chatId); - if (!chat) { - throw new Error('Chat not found'); - } - // Check if user is member of this chat - if (!chat.users.includes(command.userId)) { - throw new Error('User is not a member of this chat'); - } - // Create message - const message = { - id: (0, uuid_1.v4)(), - date: new Date(), - userid: command.userId, - text: command.message.trim() - }; - // Manage message history (keep last 10 per user, up to 2 weeks) - let updatedMessages = [...chat.messages, message]; - updatedMessages = this.pruneMessages(updatedMessages); - // Update chat - await this.chatRepository.update(command.chatId, { - messages: updatedMessages, - lastActivity: new Date() - }); - (0, Logger_1.logAuth)('Message sent successfully', command.userId, { - chatId: command.chatId, - messageLength: command.message.length, - totalMessages: updatedMessages.length - }); - return message; - } - catch (error) { - (0, Logger_1.logError)('SendMessageCommandHandler error', error); - return null; - } - } - pruneMessages(messages) { - const twoWeeksAgo = new Date(Date.now() - 14 * 24 * 60 * 60 * 1000); - // Remove messages older than 2 weeks - let prunedMessages = messages.filter(msg => new Date(msg.date) > twoWeeksAgo); - // Group by user and keep last 10 messages per user - const messagesByUser = new Map(); - prunedMessages.forEach(msg => { - if (!messagesByUser.has(msg.userid)) { - messagesByUser.set(msg.userid, []); - } - messagesByUser.get(msg.userid).push(msg); - }); - // Keep only last 10 messages per user - const finalMessages = []; - messagesByUser.forEach((userMessages, userId) => { - const last10 = userMessages.slice(-10); - finalMessages.push(...last10); - }); - // Sort by date - return finalMessages.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); - } -} -exports.SendMessageCommandHandler = SendMessageCommandHandler; -//# sourceMappingURL=SendMessageCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.js.map deleted file mode 100644 index 495c34bc..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SendMessageCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SendMessageCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/SendMessageCommandHandler.ts"],"names":[],"mappings":";;;AAGA,kDAA0D;AAC1D,+BAAoC;AAEpC,MAAa,yBAAyB;IAClC,YAAoB,cAA+B;QAA/B,mBAAc,GAAd,cAAc,CAAiB;IAAG,CAAC;IAEvD,KAAK,CAAC,OAAO,CAAC,OAA2B;QACrC,IAAI,CAAC;YACD,uCAAuC;YACvC,IAAI,OAAO,OA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AC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACJ;AA7ED,8DA6EC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.d.ts b/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.d.ts deleted file mode 100644 index 8291e50f..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.d.ts +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=SoftDeleteCommandHandlers.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.d.ts.map deleted file mode 100644 index 877f04d0..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SoftDeleteCommandHandlers.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/SoftDeleteCommandHandlers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.js b/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.js deleted file mode 100644 index ecfdffa3..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -//# sourceMappingURL=SoftDeleteCommandHandlers.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.js.map b/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.js.map deleted file mode 100644 index 269abadf..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/commands/SoftDeleteCommandHandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SoftDeleteCommandHandlers.js","sourceRoot":"","sources":["../../../../src/Application/Chat/commands/SoftDeleteCommandHandlers.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.d.ts b/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.d.ts deleted file mode 100644 index 812acfbb..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { GetChatHistoryQuery, GetArchivedChatsQuery } from './ChatQueries'; -import { IChatRepository } from '../../../Domain/IRepository/IChatRepository'; -import { IChatArchiveRepository } from '../../../Domain/IRepository/IChatArchiveRepository'; -import { Message } from '../../../Domain/Chat/ChatAggregate'; -interface ChatHistoryResult { - chatId: string; - messages: Message[]; - isArchived: boolean; - chatInfo: { - type: string; - name: string | null; - gameId: string | null; - users: string[]; - }; -} -export declare class GetChatHistoryQueryHandler { - private chatRepository; - private chatArchiveRepository; - constructor(chatRepository: IChatRepository, chatArchiveRepository: IChatArchiveRepository); - execute(query: GetChatHistoryQuery): Promise; -} -export declare class GetArchivedChatsQueryHandler { - private chatArchiveRepository; - constructor(chatArchiveRepository: IChatArchiveRepository); - execute(query: GetArchivedChatsQuery): Promise; -} -export {}; -//# sourceMappingURL=ChatHistoryQueryHandlers.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.d.ts.map deleted file mode 100644 index a374f29b..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatHistoryQueryHandlers.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/ChatHistoryQueryHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAG7D,UAAU,iBAAiB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,KAAK,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;CACL;AAED,qBAAa,0BAA0B;IAE/B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,qBAAqB;gBADrB,cAAc,EAAE,eAAe,EAC/B,qBAAqB,EAAE,sBAAsB;IAGnD,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAwE/E;AAED,qBAAa,4BAA4B;IACzB,OAAO,CAAC,qBAAqB;gBAArB,qBAAqB,EAAE,sBAAsB;IAE3D,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAuC5E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.js b/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.js deleted file mode 100644 index c9f6106d..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetArchivedChatsQueryHandler = exports.GetChatHistoryQueryHandler = void 0; -const Logger_1 = require("../../Services/Logger"); -class GetChatHistoryQueryHandler { - constructor(chatRepository, chatArchiveRepository) { - this.chatRepository = chatRepository; - this.chatArchiveRepository = chatArchiveRepository; - } - async execute(query) { - try { - // First try to find active chat - const chat = await this.chatRepository.findById(query.chatId); - if (chat) { - // Check authorization - if (!chat.users.includes(query.userId)) { - (0, Logger_1.logWarning)('Unauthorized chat history access attempt', { - chatId: query.chatId, - userId: query.userId - }); - return null; - } - (0, Logger_1.logAuth)('Chat history retrieved', query.userId, { - chatId: query.chatId, - messageCount: chat.messages.length, - isArchived: false - }); - return { - chatId: query.chatId, - messages: chat.messages, - isArchived: false, - chatInfo: { - type: chat.type, - name: chat.name, - gameId: chat.gameId, - users: chat.users - } - }; - } - // Try to find in archives - const archives = await this.chatArchiveRepository.findByChatId(query.chatId); - const userArchive = archives.find(archive => archive.participants.includes(query.userId)); - if (userArchive) { - (0, Logger_1.logAuth)('Archived chat history retrieved', query.userId, { - chatId: query.chatId, - messageCount: userArchive.archivedMessages.length, - isArchived: true - }); - return { - chatId: query.chatId, - messages: userArchive.archivedMessages, - isArchived: true, - chatInfo: { - type: userArchive.chatType, - name: userArchive.chatName, - gameId: userArchive.gameId, - users: userArchive.participants - } - }; - } - (0, Logger_1.logWarning)('Chat history not found', { - chatId: query.chatId, - userId: query.userId - }); - return null; - } - catch (error) { - (0, Logger_1.logError)('GetChatHistoryQueryHandler error', error); - return null; - } - } -} -exports.GetChatHistoryQueryHandler = GetChatHistoryQueryHandler; -class GetArchivedChatsQueryHandler { - constructor(chatArchiveRepository) { - this.chatArchiveRepository = chatArchiveRepository; - } - async execute(query) { - try { - let archives = []; - if (query.gameId) { - // Get archived game chats - archives = await this.chatArchiveRepository.findByGameId(query.gameId); - } - else { - // Get all archived chats for user (would need different query) - // For now, return empty - this would need a new repository method - archives = []; - } - const result = archives - .filter(archive => archive.participants.includes(query.userId)) - .map(archive => ({ - chatId: archive.chatId, - messages: archive.archivedMessages, - isArchived: true, - chatInfo: { - type: archive.chatType, - name: archive.chatName, - gameId: archive.gameId, - users: archive.participants - } - })); - (0, Logger_1.logAuth)('Archived chats retrieved', query.userId, { - count: result.length, - gameId: query.gameId - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('GetArchivedChatsQueryHandler error', error); - return []; - } - } -} -exports.GetArchivedChatsQueryHandler = GetArchivedChatsQueryHandler; -//# sourceMappingURL=ChatHistoryQueryHandlers.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.js.map b/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.js.map deleted file mode 100644 index 35e52566..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatHistoryQueryHandlers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatHistoryQueryHandlers.js","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/ChatHistoryQueryHandlers.ts"],"names":[],"mappings":";;;AAIA,kDAAsE;AActE,MAAa,0BAA0B;IACnC,YACY,cAA+B,EAC/B,qBAA6C;QAD7C,mBAAc,GAAd,cAAc,CAAiB;QAC/B,0BAAqB,GAArB,qBAAqB,CAAwB;IACtD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,KAA0B;QACpC,IAAI,CAAC;YACD,gCAAgC;YAChC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAE9D,IAAI,IAAI,EAAE,CAAC;gBACP,sBAAsB;gBACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;oBACrC,IAAA,mBAAU,EAAC,0CAA0C,EAAE;wBACnD,MAAM,EAAE,KAAK,CAAC,MAAM;wBACpB,MAAM,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ChB,QAAQ,EAAE;oBACN,IAAI,EAAE,OAAO,CAAC,QAAQ;oBACtB,IAAI,EAAE,OAAO,CAAC,QAAQ;oBACtB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,KAAK,EAAE,OAAO,CAAC,YAAY;iBAC9B;aACJ,CAAC,CAAC,CAAC;YAER,IAAA,gBAAO,EAAC,0BAA0B,EAAE,KAAK,CAAC,MAAM,EAAE;gBAC9C,KAAK,EAAE,MAAM,CAAC,MAAM;gBACpB,MAAM,EAAE,KAAK,CAAC,MAAM;aACvB,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAElB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,oCAAoC,EAAE,KAAc,CAAC,CAAC;YAC/D,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC;CACJ;AA1CD,oEA0CC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.d.ts b/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.d.ts deleted file mode 100644 index 7244b852..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface GetUserChatsQuery { - userId: string; - includeArchived?: boolean; -} -export interface GetChatHistoryQuery { - chatId: string; - userId: string; -} -export interface GetArchivedChatsQuery { - userId: string; - gameId?: string; -} -//# sourceMappingURL=ChatQueries.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.d.ts.map deleted file mode 100644 index 245cf578..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatQueries.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/ChatQueries.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.js b/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.js deleted file mode 100644 index 622e755b..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ChatQueries.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.js.map b/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.js.map deleted file mode 100644 index 4b5a3201..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/ChatQueries.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatQueries.js","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/ChatQueries.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.d.ts b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.d.ts deleted file mode 100644 index 31fcd951..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetChatsByPageQuery { - from: number; - to: number; - includeDeleted?: boolean; -} -//# sourceMappingURL=GetChatsByPageQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.d.ts.map deleted file mode 100644 index ca227a8d..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetChatsByPageQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/GetChatsByPageQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.js b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.js deleted file mode 100644 index dfd56cff..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetChatsByPageQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.js.map b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.js.map deleted file mode 100644 index 9c361c58..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetChatsByPageQuery.js","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/GetChatsByPageQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.d.ts deleted file mode 100644 index cb055057..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IChatRepository } from '../../../Domain/IRepository/IChatRepository'; -import { GetChatsByPageQuery } from './GetChatsByPageQuery'; -import { ShortChatDto } from '../../DTOs/ChatDto'; -export declare class GetChatsByPageQueryHandler { - private readonly chatRepo; - constructor(chatRepo: IChatRepository); - execute(query: GetChatsByPageQuery): Promise<{ - chats: ShortChatDto[]; - totalCount: number; - }>; -} -//# sourceMappingURL=GetChatsByPageQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.d.ts.map deleted file mode 100644 index 679c0718..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetChatsByPageQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/GetChatsByPageQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,qBAAa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CA6ClG"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.js b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.js deleted file mode 100644 index ccea6d95..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetChatsByPageQueryHandler = void 0; -const ChatMapper_1 = require("../../DTOs/Mappers/ChatMapper"); -const Logger_1 = require("../../Services/Logger"); -class GetChatsByPageQueryHandler { - constructor(chatRepo) { - this.chatRepo = chatRepo; - } - async execute(query) { - try { - // Validate pagination parameters - if (query.from < 0 || query.to < query.from) { - throw new Error('Invalid pagination parameters'); - } - const limit = query.to - query.from + 1; - if (limit > 100) { - throw new Error('Page size too large. Maximum 100 records per request'); - } - (0, Logger_1.logRequest)('Get chats by page query started', undefined, undefined, { - from: query.from, - to: query.to, - includeDeleted: query.includeDeleted || false - }); - const result = query.includeDeleted - ? await this.chatRepo.findByPageIncludingDeleted(query.from, query.to) - : await this.chatRepo.findByPage(query.from, query.to); - (0, Logger_1.logRequest)('Get chats by page query completed', undefined, undefined, { - from: query.from, - to: query.to, - returned: result.chats.length, - totalCount: result.totalCount, - includeDeleted: query.includeDeleted || false - }); - return { - chats: ChatMapper_1.ChatMapper.toShortDtoList(result.chats), - totalCount: result.totalCount - }; - } - catch (error) { - (0, Logger_1.logError)('GetChatsByPageQueryHandler error', error instanceof Error ? error : new Error(String(error))); - // Re-throw validation errors as-is - if (error instanceof Error && (error.message.includes('Invalid pagination') || error.message.includes('Page size'))) { - throw error; - } - throw new Error('Failed to retrieve chats page'); - } - } -} -exports.GetChatsByPageQueryHandler = GetChatsByPageQueryHandler; -//# sourceMappingURL=GetChatsByPageQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.js.map deleted file mode 100644 index 9ada84b1..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetChatsByPageQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetChatsByPageQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/GetChatsByPageQueryHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,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BAC7B,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,KAAK;aAC9C,CAAC,CAAC;YAEH,OAAO;gBACL,KAAK,EAAE,uBAAU,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC;gBAC9C,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,kCAAkC,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAExG,mCAAmC;YACnC,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;gBACpH,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AAhDD,gEAgDC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.d.ts deleted file mode 100644 index 3bcfcddd..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { GetUserChatsQuery } from './ChatQueries'; -import { IChatRepository } from '../../../Domain/IRepository/IChatRepository'; -import { IChatArchiveRepository } from '../../../Domain/IRepository/IChatArchiveRepository'; -interface ChatWithMetadata { - id: string; - type: string; - name: string | null; - gameId: string | null; - users: string[]; - lastActivity: Date | null; - isArchived: boolean; - messageCount: number; - unreadCount?: number; -} -export declare class GetUserChatsQueryHandler { - private chatRepository; - private chatArchiveRepository; - constructor(chatRepository: IChatRepository, chatArchiveRepository: IChatArchiveRepository); - execute(query: GetUserChatsQuery): Promise; - private calculateUnreadMessages; -} -export {}; -//# sourceMappingURL=GetUserChatsQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.d.ts.map deleted file mode 100644 index 5b3079de..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUserChatsQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/GetUserChatsQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAK5F,UAAU,gBAAgB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,wBAAwB;IAE7B,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,qBAAqB;gBADrB,cAAc,EAAE,eAAe,EAC/B,qBAAqB,EAAE,sBAAsB;IAGnD,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAkEpE,OAAO,CAAC,uBAAuB;CAKlC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.js b/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.js deleted file mode 100644 index d302dd51..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetUserChatsQueryHandler = void 0; -const Logger_1 = require("../../Services/Logger"); -class GetUserChatsQueryHandler { - constructor(chatRepository, chatArchiveRepository) { - this.chatRepository = chatRepository; - this.chatArchiveRepository = chatArchiveRepository; - } - async execute(query) { - try { - const result = []; - // Get active chats - const activeChats = await this.chatRepository.findActiveChatsForUser(query.userId); - result.push(...activeChats.map(chat => ({ - id: chat.id, - type: chat.type, - name: chat.name, - gameId: chat.gameId, - users: chat.users, - lastActivity: chat.lastActivity, - isArchived: false, - messageCount: chat.messages.length, - unreadCount: this.calculateUnreadMessages(chat, query.userId) - }))); - // Get archived chats if requested - if (query.includeArchived) { - const userActiveChats = await this.chatRepository.findByUserId(query.userId); - const archivedChatIds = userActiveChats - .filter(chat => chat.archiveDate !== null) - .map(chat => chat.id); - const archives = await Promise.all(archivedChatIds.map(id => this.chatArchiveRepository.findByChatId(id))); - archives.forEach(archiveArray => { - archiveArray.forEach(archive => { - if (archive.participants.includes(query.userId)) { - result.push({ - id: archive.chatId, - type: archive.chatType, - name: archive.chatName, - gameId: archive.gameId, - users: archive.participants, - lastActivity: archive.archivedAt, - isArchived: true, - messageCount: archive.archivedMessages.length, - unreadCount: 0 // Archived chats have no unread messages - }); - } - }); - }); - } - (0, Logger_1.logAuth)('User chats retrieved', query.userId, { - activeCount: activeChats.length, - totalCount: result.length, - includeArchived: query.includeArchived - }); - return result.sort((a, b) => { - if (!a.lastActivity) - return 1; - if (!b.lastActivity) - return -1; - return new Date(b.lastActivity).getTime() - new Date(a.lastActivity).getTime(); - }); - } - catch (error) { - (0, Logger_1.logError)('GetUserChatsQueryHandler error', error); - return []; - } - } - calculateUnreadMessages(chat, userId) { - // Simple implementation - count messages from other users - // In production, you'd store lastSeen timestamp per user per chat - return chat.messages.filter(msg => msg.userid !== userId).length; - } -} -exports.GetUserChatsQueryHandler = GetUserChatsQueryHandler; -//# sourceMappingURL=GetUserChatsQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.js.map deleted file mode 100644 index b939397f..00000000 --- a/SerpentRace_Backend/dist/Application/Chat/queries/GetUserChatsQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUserChatsQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Chat/queries/GetUserChatsQueryHandler.ts"],"names":[],"mappings":";;;AAKA,kDAA0D;AAc1D,MAAa,wBAAwB;IACjC,YACY,cAA+B,EAC/B,qBAA6C;QAD7C,mBAAc,GAAd,cAAc,CAAiB;QAC/B,0BAAqB,GAArB,qBAAqB,CAAwB;IACtD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,KAAwB;QAClC,IAAI,CAAC;YACD,MAAM,MAAM,GAAuB,EAAE,CAAC;YAEtC,mBAAmB;YACnB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACnF,MAAM,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACpC,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,UAAU,EAAE,KAAK;gBACjB,YAAY,EA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3D,CAAC,CAAC;wBACP,CAAC;oBACL,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACP,CAAC;YAED,IAAA,gBAAO,EAAC,sBAAsB,EAAE,KAAK,CAAC,MAAM,EAAE;gBAC1C,WAAW,EAAE,WAAW,CAAC,MAAM;gBAC/B,UAAU,EAAE,MAAM,CAAC,MAAM;gBACzB,eAAe,EAAE,KAAK,CAAC,eAAe;aACzC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBACxB,IAAI,CAAC,CAAC,CAAC,YAAY;oBAAE,OAAO,CAAC,CAAC;gBAC9B,IAAI,CAAC,CAAC,CAAC,YAAY;oBAAE,OAAO,CAAC,CAAC,CAAC;gBAC/B,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YACnF,CAAC,CAAC,CAAC;QAEP,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,gCAAgC,EAAE,KAAc,CAAC,CAAC;YAC3D,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC;IAEO,uBAAuB,CAAC,IAAmB,EAAE,MAAc;QAC/D,0DAA0D;QAC1D,kEAAkE;QAClE,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IACrE,CAAC;CACJ;AA7ED,4DA6EC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.d.ts b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.d.ts deleted file mode 100644 index 33515c4f..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ContactType } from '../../../Domain/Contact/ContactAggregate'; -export interface CreateContactCommand { - name: string; - email: string; - userid?: string; - type: ContactType; - txt: string; -} -//# sourceMappingURL=CreateContactCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.d.ts.map deleted file mode 100644 index 38bac24a..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateContactCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/CreateContactCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.js b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.js deleted file mode 100644 index 8d0ca702..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=CreateContactCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.js.map b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.js.map deleted file mode 100644 index 8beee645..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateContactCommand.js","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/CreateContactCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.d.ts deleted file mode 100644 index 57d16361..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IContactRepository } from '../../../Domain/IRepository/IContactRepository'; -import { CreateContactCommand } from './CreateContactCommand'; -import { ShortContactDto } from '../../DTOs/ContactDto'; -export declare class CreateContactCommandHandler { - private readonly contactRepo; - constructor(contactRepo: IContactRepository); - execute(cmd: CreateContactCommand): Promise; -} -//# sourceMappingURL=CreateContactCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.d.ts.map deleted file mode 100644 index 69befbef..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateContactCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/CreateContactCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAEtD,OAAO,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;CAgBnE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.js b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.js deleted file mode 100644 index 279334d9..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateContactCommandHandler = void 0; -const ContactAggregate_1 = require("../../../Domain/Contact/ContactAggregate"); -const ContactMapper_1 = require("../../DTOs/Mappers/ContactMapper"); -class CreateContactCommandHandler { - constructor(contactRepo) { - this.contactRepo = contactRepo; - } - async execute(cmd) { - try { - const contact = new ContactAggregate_1.ContactAggregate(); - contact.name = cmd.name; - contact.email = cmd.email; - contact.userid = cmd.userid || null; - contact.type = cmd.type; - contact.txt = cmd.txt; - contact.state = ContactAggregate_1.ContactState.ACTIVE; - const created = await this.contactRepo.create(contact); - return ContactMapper_1.ContactMapper.toShortDto(created); - } - catch (error) { - throw new Error('Failed to create contact'); - } - } -} -exports.CreateContactCommandHandler = CreateContactCommandHandler; -//# sourceMappingURL=CreateContactCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.js.map deleted file mode 100644 index 1928b324..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/CreateContactCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateContactCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/CreateContactCommandHandler.ts"],"names":[],"mappings":";;;AAGA,+EAA0F;AAC1F,oEAAiE;AAEjE,MAAa,2BAA2B;IACtC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAEhE,KAAK,CAAC,OAAO,CAAC,GAAyB;QACrC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,mCAAgB,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACxB,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAC1B,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC;YACpC,OAAO,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACxB,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;YACtB,OAAO,CAAC,KAAK,GAAG,+BAAY,CAAC,MAAM,CAAC;YAEpC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACvD,OAAO,6BAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AAnBD,kEAmBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.d.ts b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.d.ts deleted file mode 100644 index a393bfbd..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface DeleteContactCommand { - id: string; - hard?: boolean; -} -//# sourceMappingURL=DeleteContactCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.d.ts.map deleted file mode 100644 index 2103d80f..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteContactCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/DeleteContactCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.js b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.js deleted file mode 100644 index 46d8a55f..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DeleteContactCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.js.map b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.js.map deleted file mode 100644 index 7f62eba9..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteContactCommand.js","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/DeleteContactCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.d.ts deleted file mode 100644 index a377da0b..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IContactRepository } from '../../../Domain/IRepository/IContactRepository'; -import { DeleteContactCommand } from './DeleteContactCommand'; -export declare class DeleteContactCommandHandler { - private readonly contactRepo; - constructor(contactRepo: IContactRepository); - execute(cmd: DeleteContactCommand): Promise; -} -//# sourceMappingURL=DeleteContactCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.d.ts.map deleted file mode 100644 index 07006824..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteContactCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/DeleteContactCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAEtD,OAAO,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;CAiC3D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.js b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.js deleted file mode 100644 index 40c8f7e5..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteContactCommandHandler = void 0; -const Logger_1 = require("../../Services/Logger"); -class DeleteContactCommandHandler { - constructor(contactRepo) { - this.contactRepo = contactRepo; - } - async execute(cmd) { - try { - const existingContact = await this.contactRepo.findById(cmd.id); - if (!existingContact) { - throw new Error('Contact not found'); - } - if (cmd.hard) { - // Permanent delete - await this.contactRepo.delete(cmd.id); - (0, Logger_1.logRequest)('Contact hard deleted', undefined, undefined, { - contactId: cmd.id, - contactEmail: existingContact.email, - deleteType: 'hard' - }); - } - else { - // Soft delete (default) - await this.contactRepo.softDelete(cmd.id); - (0, Logger_1.logRequest)('Contact soft deleted', undefined, undefined, { - contactId: cmd.id, - contactEmail: existingContact.email, - deleteType: 'soft' - }); - } - return true; - } - catch (error) { - if (error instanceof Error && error.message === 'Contact not found') { - throw error; - } - throw new Error('Failed to delete contact'); - } - } -} -exports.DeleteContactCommandHandler = DeleteContactCommandHandler; -//# sourceMappingURL=DeleteContactCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.js.map deleted file mode 100644 index 88d2104e..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/DeleteContactCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteContactCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/DeleteContactCommandHandler.ts"],"names":[],"mappings":";;;AAGA,kDAAmD;AAEnD,MAAa,2BAA2B;IACtC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAEhE,KAAK,CAAC,OAAO,CAAC,GAAyB;QACrC,IAAI,CAAC;YACH,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,eAAe,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YAED,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;gBACb,mBAAmB;gBACnB,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACtC,IAAA,mBAAU,EAAC,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAAE;oBACvD,SAAS,EAAE,GAAG,CAAC,EAAE;oBACjB,YAAY,EAAE,eAAe,CAAC,KAAK;oBACnC,UAAU,EAAE,MAAM;iBACnB,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,wBAAwB;gBACxB,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC1C,IAAA,mBAAU,EAAC,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAAE;oBACvD,SAAS,EAAE,GAAG,CAAC,EAAE;oBACjB,YAAY,EAAE,eAAe,CAAC,KAAK;oBACnC,UAAU,EAAE,MAAM;iBACnB,CAAC,CAAC;YACL,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,mBAAmB,EAAE,CAAC;gBACpE,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AApCD,kEAoCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.d.ts b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.d.ts deleted file mode 100644 index ca3a9fe8..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface UpdateContactCommand { - id: string; - adminResponse?: string; - state?: number; - respondedBy?: string; -} -//# sourceMappingURL=UpdateContactCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.d.ts.map deleted file mode 100644 index 7c55ddfa..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateContactCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/UpdateContactCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.js b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.js deleted file mode 100644 index a451a3de..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UpdateContactCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.js.map b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.js.map deleted file mode 100644 index e0d3eb7a..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateContactCommand.js","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/UpdateContactCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.d.ts deleted file mode 100644 index c594958d..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IContactRepository } from '../../../Domain/IRepository/IContactRepository'; -import { UpdateContactCommand } from './UpdateContactCommand'; -import { DetailContactDto } from '../../DTOs/ContactDto'; -export declare class UpdateContactCommandHandler { - private readonly contactRepo; - constructor(contactRepo: IContactRepository); - execute(cmd: UpdateContactCommand): Promise; -} -//# sourceMappingURL=UpdateContactCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.d.ts.map deleted file mode 100644 index 8ebe1611..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateContactCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/UpdateContactCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAEtD,OAAO,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAmCpE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.js b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.js deleted file mode 100644 index 8a8232ab..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateContactCommandHandler = void 0; -const ContactMapper_1 = require("../../DTOs/Mappers/ContactMapper"); -class UpdateContactCommandHandler { - constructor(contactRepo) { - this.contactRepo = contactRepo; - } - async execute(cmd) { - try { - const existingContact = await this.contactRepo.findById(cmd.id); - if (!existingContact) { - throw new Error('Contact not found'); - } - const updateData = {}; - if (cmd.adminResponse !== undefined) { - updateData.adminResponse = cmd.adminResponse; - updateData.responseDate = new Date(); - } - if (cmd.state !== undefined) { - updateData.state = cmd.state; - } - if (cmd.respondedBy !== undefined) { - updateData.respondedBy = cmd.respondedBy; - } - const updated = await this.contactRepo.update(cmd.id, updateData); - if (!updated) { - throw new Error('Failed to update contact'); - } - return ContactMapper_1.ContactMapper.toDetailDto(updated); - } - catch (error) { - if (error instanceof Error && error.message === 'Contact not found') { - throw error; - } - throw new Error('Failed to update contact'); - } - } -} -exports.UpdateContactCommandHandler = UpdateContactCommandHandler; -//# sourceMappingURL=UpdateContactCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.js.map deleted file mode 100644 index 8b894d25..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/commands/UpdateContactCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateContactCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Contact/commands/UpdateContactCommandHandler.ts"],"names":[],"mappings":";;;AAGA,oEAAiE;AAGjE,MAAa,2BAA2B;IACtC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAEhE,KAAK,CAAC,OAAO,CAAC,GAAyB;QACrC,IAAI,CAAC;YACH,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,eAAe,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YAED,MAAM,UAAU,GAAQ,EAAE,CAAC;YAE3B,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;gBACpC,UAAU,CAAC,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC;gBAC7C,UAAU,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC;YACvC,CAAC;YAED,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC5B,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAC/B,CAAC;YAED,IAAI,GAAG,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;gBAClC,UAAU,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;YAC3C,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAC9C,CAAC;YAED,OAAO,6BAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,mBAAmB,EAAE,CAAC;gBACpE,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AAtCD,kEAsCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.d.ts b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.d.ts deleted file mode 100644 index f6269910..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetContactByIdQuery { - id: string; -} -//# sourceMappingURL=GetContactByIdQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.d.ts.map deleted file mode 100644 index 7e9b1a87..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactByIdQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactByIdQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.js b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.js deleted file mode 100644 index c059abbf..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetContactByIdQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.js.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.js.map deleted file mode 100644 index 5ef049e8..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactByIdQuery.js","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactByIdQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.d.ts deleted file mode 100644 index b781ba6a..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IContactRepository } from '../../../Domain/IRepository/IContactRepository'; -import { GetContactByIdQuery } from './GetContactByIdQuery'; -import { DetailContactDto } from '../../DTOs/ContactDto'; -export declare class GetContactByIdQueryHandler { - private readonly contactRepo; - constructor(contactRepo: IContactRepository); - execute(query: GetContactByIdQuery): Promise; -} -//# sourceMappingURL=GetContactByIdQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.d.ts.map deleted file mode 100644 index 34d4626f..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactByIdQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactByIdQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,qBAAa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAEtD,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAO5E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.js b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.js deleted file mode 100644 index d4c39503..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetContactByIdQueryHandler = void 0; -const ContactMapper_1 = require("../../DTOs/Mappers/ContactMapper"); -class GetContactByIdQueryHandler { - constructor(contactRepo) { - this.contactRepo = contactRepo; - } - async execute(query) { - const contact = await this.contactRepo.findById(query.id); - if (!contact) { - return null; - } - return ContactMapper_1.ContactMapper.toDetailDto(contact); - } -} -exports.GetContactByIdQueryHandler = GetContactByIdQueryHandler; -//# sourceMappingURL=GetContactByIdQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.js.map deleted file mode 100644 index 664977df..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactByIdQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactByIdQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactByIdQueryHandler.ts"],"names":[],"mappings":";;;AAGA,oEAAiE;AAEjE,MAAa,0BAA0B;IACrC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAEhE,KAAK,CAAC,OAAO,CAAC,KAA0B;QACtC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,6BAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF;AAVD,gEAUC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.d.ts b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.d.ts deleted file mode 100644 index 75fee6bd..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface GetContactsByPageQuery { - from: number; - to: number; -} -//# sourceMappingURL=GetContactsByPageQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.d.ts.map deleted file mode 100644 index 4de84935..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactsByPageQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactsByPageQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.js b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.js deleted file mode 100644 index bbe184c4..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetContactsByPageQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.js.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.js.map deleted file mode 100644 index 99198905..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactsByPageQuery.js","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactsByPageQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.d.ts deleted file mode 100644 index f6f06744..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IContactRepository } from '../../../Domain/IRepository/IContactRepository'; -import { GetContactsByPageQuery } from './GetContactsByPageQuery'; -import { ContactPageDto } from '../../DTOs/ContactDto'; -export declare class GetContactsByPageQueryHandler { - private readonly contactRepo; - constructor(contactRepo: IContactRepository); - execute(query: GetContactsByPageQuery): Promise; -} -//# sourceMappingURL=GetContactsByPageQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.d.ts.map deleted file mode 100644 index a9173b8d..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactsByPageQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactsByPageQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,kBAAkB;IAEtD,OAAO,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC;CAStE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.js b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.js deleted file mode 100644 index dbf44f1c..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetContactsByPageQueryHandler = void 0; -const ContactMapper_1 = require("../../DTOs/Mappers/ContactMapper"); -class GetContactsByPageQueryHandler { - constructor(contactRepo) { - this.contactRepo = contactRepo; - } - async execute(query) { - const result = await this.contactRepo.findByPage(query.from, query.to); - return { - contacts: ContactMapper_1.ContactMapper.toShortDtoList(result.contacts), - totalCount: result.totalCount, - from: query.from, - to: query.to, - }; - } -} -exports.GetContactsByPageQueryHandler = GetContactsByPageQueryHandler; -//# sourceMappingURL=GetContactsByPageQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.js.map deleted file mode 100644 index 06996c63..00000000 --- a/SerpentRace_Backend/dist/Application/Contact/queries/GetContactsByPageQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetContactsByPageQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Contact/queries/GetContactsByPageQueryHandler.ts"],"names":[],"mappings":";;;AAGA,oEAAiE;AAEjE,MAAa,6BAA6B;IACxC,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;IAAG,CAAC;IAEhE,KAAK,CAAC,OAAO,CAAC,KAA6B;QACzC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO;YACL,QAAQ,EAAE,6BAAa,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC;YACvD,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,EAAE,EAAE,KAAK,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;CACF;AAZD,sEAYC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.d.ts b/SerpentRace_Backend/dist/Application/DTOs/ChatDto.d.ts deleted file mode 100644 index 856a5853..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export interface CreateChatDto { - users: string[]; - messages: import('../../Domain/Chat/ChatAggregate').Message[]; - state?: number; -} -export interface UpdateChatDto { - id: string; - users?: string[]; - messages?: import('../../Domain/Chat/ChatAggregate').Message[]; - state?: number; -} -export interface ShortChatDto { - id: string; - userCount: number; - state: number; -} -export interface DetailChatDto { - id: string; - users: string[]; - messages: import('../../Domain/Chat/ChatAggregate').Message[]; - updateDate: Date; - state: number; -} -//# sourceMappingURL=ChatDto.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/ChatDto.d.ts.map deleted file mode 100644 index 08d7153c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatDto.d.ts","sourceRoot":"","sources":["../../../src/Application/DTOs/ChatDto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,OAAO,iCAAiC,EAAE,OAAO,EAAE,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,iCAAiC,EAAE,OAAO,EAAE,CAAC;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,OAAO,iCAAiC,EAAE,OAAO,EAAE,CAAC;IAC9D,UAAU,EAAE,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.js b/SerpentRace_Backend/dist/Application/DTOs/ChatDto.js deleted file mode 100644 index 66612d4c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ChatDto.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.js.map b/SerpentRace_Backend/dist/Application/DTOs/ChatDto.js.map deleted file mode 100644 index 9ad2a09e..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ChatDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatDto.js","sourceRoot":"","sources":["../../../src/Application/DTOs/ChatDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.d.ts b/SerpentRace_Backend/dist/Application/DTOs/ContactDto.d.ts deleted file mode 100644 index 76642bb7..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ContactType } from '../../Domain/Contact/ContactAggregate'; -export interface CreateContactDto { - name: string; - email: string; - userid?: string; - type: ContactType; - txt: string; -} -export interface UpdateContactDto { - id: string; - adminResponse?: string; - state?: number; - respondedBy?: string; -} -export interface ShortContactDto { - id: string; - name: string; - email: string; - type: ContactType; - createDate: Date; - state: number; -} -export interface DetailContactDto { - id: string; - name: string; - email: string; - userid: string | null; - type: ContactType; - txt: string; - state: number; - createDate: Date; - updateDate: Date; - adminResponse: string | null; - responseDate: Date | null; - respondedBy: string | null; -} -export interface ContactPageDto { - contacts: ShortContactDto[]; - totalCount: number; - from: number; - to: number; -} -//# sourceMappingURL=ContactDto.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/ContactDto.d.ts.map deleted file mode 100644 index 5153996f..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactDto.d.ts","sourceRoot":"","sources":["../../../src/Application/DTOs/ContactDto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.js b/SerpentRace_Backend/dist/Application/DTOs/ContactDto.js deleted file mode 100644 index 19a65016..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ContactDto.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.js.map b/SerpentRace_Backend/dist/Application/DTOs/ContactDto.js.map deleted file mode 100644 index 07c89b6f..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/ContactDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactDto.js","sourceRoot":"","sources":["../../../src/Application/DTOs/ContactDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.d.ts b/SerpentRace_Backend/dist/Application/DTOs/DeckDto.d.ts deleted file mode 100644 index f5f8c84e..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export interface CreateDeckDto { - name: string; - description?: string; -} -export interface UpdateDeckDto { - id: string; - name?: string; - description?: string; -} -export interface ShortDeckDto { - id: string; - name: string; - type: number; - playedNumber: number; - ctype: number; -} -export interface DetailDeckDto { - id: string; - name: string; - type: number; - userid: string; - creationdate: Date; - cards: any[]; - playedNumber: number; - ctype: number; -} -//# sourceMappingURL=DeckDto.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/DeckDto.d.ts.map deleted file mode 100644 index 57609901..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckDto.d.ts","sourceRoot":"","sources":["../../../src/Application/DTOs/DeckDto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,IAAI,CAAC;IACnB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.js b/SerpentRace_Backend/dist/Application/DTOs/DeckDto.js deleted file mode 100644 index 3a0ee416..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DeckDto.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.js.map b/SerpentRace_Backend/dist/Application/DTOs/DeckDto.js.map deleted file mode 100644 index cd04d743..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/DeckDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckDto.js","sourceRoot":"","sources":["../../../src/Application/DTOs/DeckDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.d.ts b/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.d.ts deleted file mode 100644 index 42c677c3..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare abstract class BaseMapper { - abstract toShortDto(entity: TEntity): TShortDto; - abstract toDetailDto(entity: TEntity): TDetailDto; - toShortDtoList(entities: TEntity[]): TShortDto[]; - toDetailDtoList(entities: TEntity[]): TDetailDto[]; - static toShortDtoListStatic(entities: T[], mapperFn: (entity: T) => TDto): TDto[]; -} -//# sourceMappingURL=BaseMapper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.d.ts.map deleted file mode 100644 index 98170754..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseMapper.d.ts","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/BaseMapper.ts"],"names":[],"mappings":"AAAA,8BAAsB,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU;IAC7D,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS;IAC/C,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU;IAEjD,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE;IAIhD,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE;IAIlD,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,EACjC,QAAQ,EAAE,CAAC,EAAE,EACb,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAC5B,IAAI,EAAE;CAGV"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.js b/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.js deleted file mode 100644 index 14543c51..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseMapper = void 0; -class BaseMapper { - toShortDtoList(entities) { - return entities.map(entity => this.toShortDto(entity)); - } - toDetailDtoList(entities) { - return entities.map(entity => this.toDetailDto(entity)); - } - static toShortDtoListStatic(entities, mapperFn) { - return entities.map(mapperFn); - } -} -exports.BaseMapper = BaseMapper; -//# sourceMappingURL=BaseMapper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.js.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.js.map deleted file mode 100644 index 330c2fdb..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/BaseMapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseMapper.js","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/BaseMapper.ts"],"names":[],"mappings":";;;AAAA,MAAsB,UAAU;IAI9B,cAAc,CAAC,QAAmB;QAChC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACzD,CAAC;IAED,eAAe,CAAC,QAAmB;QACjC,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,oBAAoB,CACzB,QAAa,EACb,QAA6B;QAE7B,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AAlBD,gCAkBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.d.ts b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.d.ts deleted file mode 100644 index 970ab773..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ChatAggregate } from '../../../Domain/Chat/ChatAggregate'; -import { ShortChatDto, DetailChatDto } from '../ChatDto'; -export declare class ChatMapper { - static toShortDto(chat: ChatAggregate): ShortChatDto; - static toDetailDto(chat: ChatAggregate): DetailChatDto; - static toShortDtoList(chats: ChatAggregate[]): ShortChatDto[]; -} -//# sourceMappingURL=ChatMapper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.d.ts.map deleted file mode 100644 index 13f2ae4f..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatMapper.d.ts","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/ChatMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzD,qBAAa,UAAU;IACrB,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY;IAQpD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa;IAUtD,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE;CAG9D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.js b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.js deleted file mode 100644 index 378ccd6c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChatMapper = void 0; -class ChatMapper { - static toShortDto(chat) { - return { - id: chat.id, - userCount: chat.users?.length ?? 0, - state: chat.state, - }; - } - static toDetailDto(chat) { - return { - id: chat.id, - users: chat.users ?? [], - messages: chat.messages, - updateDate: chat.updateDate, - state: chat.state, - }; - } - static toShortDtoList(chats) { - return chats.map(this.toShortDto); - } -} -exports.ChatMapper = ChatMapper; -//# sourceMappingURL=ChatMapper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.js.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.js.map deleted file mode 100644 index c1c773b5..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ChatMapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatMapper.js","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/ChatMapper.ts"],"names":[],"mappings":";;;AAGA,MAAa,UAAU;IACrB,MAAM,CAAC,UAAU,CAAC,IAAmB;QACnC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;YAClC,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAmB;QACpC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAsB;QAC1C,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;CACF;AAtBD,gCAsBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.d.ts b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.d.ts deleted file mode 100644 index 8b4ca8a1..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ContactAggregate } from '../../../Domain/Contact/ContactAggregate'; -import { ShortContactDto, DetailContactDto } from '../ContactDto'; -export declare class ContactMapper { - static toShortDto(contact: ContactAggregate): ShortContactDto; - static toDetailDto(contact: ContactAggregate): DetailContactDto; - static toShortDtoList(contacts: ContactAggregate[]): ShortContactDto[]; -} -//# sourceMappingURL=ContactMapper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.d.ts.map deleted file mode 100644 index 113bb87c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactMapper.d.ts","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/ContactMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAsC,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtG,qBAAa,aAAa;IACxB,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe;IAW7D,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;IAiB/D,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,eAAe,EAAE;CAGvE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js deleted file mode 100644 index 05e1d115..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContactMapper = void 0; -class ContactMapper { - static toShortDto(contact) { - return { - id: contact.id, - name: contact.name, - email: contact.email, - type: contact.type, - createDate: contact.createDate, - state: contact.state, - }; - } - static toDetailDto(contact) { - return { - id: contact.id, - name: contact.name, - email: contact.email, - userid: contact.userid, - type: contact.type, - txt: contact.txt, - state: contact.state, - createDate: contact.createDate, - updateDate: contact.updateDate, - adminResponse: contact.adminResponse, - responseDate: contact.responseDate, - respondedBy: contact.respondedBy, - }; - } - static toShortDtoList(contacts) { - return contacts.map(this.toShortDto); - } -} -exports.ContactMapper = ContactMapper; -//# sourceMappingURL=ContactMapper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js.map deleted file mode 100644 index 5c339b2b..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/ContactMapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactMapper.js","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/ContactMapper.ts"],"names":[],"mappings":";;;AAGA,MAAa,aAAa;IACxB,MAAM,CAAC,UAAU,CAAC,OAAyB;QACzC,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,OAAyB;QAC1C,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,QAA4B;QAChD,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACF;AAhCD,sCAgCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.d.ts b/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.d.ts deleted file mode 100644 index 65d7c56f..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { DeckAggregate } from '../../../Domain/Deck/DeckAggregate'; -import { ShortDeckDto, DetailDeckDto } from '../DeckDto'; -export declare class DeckMapper { - static toShortDto(deck: DeckAggregate): ShortDeckDto; - static toDetailDto(deck: DeckAggregate): DetailDeckDto; - static toShortDtoList(decks: DeckAggregate[]): ShortDeckDto[]; -} -//# sourceMappingURL=DeckMapper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.d.ts.map deleted file mode 100644 index a3cd73da..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckMapper.d.ts","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/DeckMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAgC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvF,qBAAa,UAAU;IACrB,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY;IAUpD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa;IAatD,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE;CAG9D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.js b/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.js deleted file mode 100644 index 3633551c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeckMapper = void 0; -class DeckMapper { - static toShortDto(deck) { - return { - id: deck.id, - name: deck.name, - type: deck.type, - playedNumber: deck.playedNumber, - ctype: deck.ctype, - }; - } - static toDetailDto(deck) { - return { - id: deck.id, - name: deck.name, - type: deck.type, - userid: deck.userid, - creationdate: deck.creationdate, - cards: deck.cards, - playedNumber: deck.playedNumber, - ctype: deck.ctype, - }; - } - static toShortDtoList(decks) { - return decks.map(this.toShortDto); - } -} -exports.DeckMapper = DeckMapper; -//# sourceMappingURL=DeckMapper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.js.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.js.map deleted file mode 100644 index 8a6da43c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/DeckMapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckMapper.js","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/DeckMapper.ts"],"names":[],"mappings":";;;AAGA,MAAa,UAAU;IACrB,MAAM,CAAC,UAAU,CAAC,IAAmB;QACnC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAmB;QACpC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAsB;QAC1C,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;CACF;AA3BD,gCA2BC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.d.ts b/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.d.ts deleted file mode 100644 index 4193d2dc..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { OrganizationAggregate } from '../../../Domain/Organization/OrganizationAggregate'; -import { ShortOrganizationDto, DetailOrganizationDto } from '../OrganizationDto'; -export declare class OrganizationMapper { - static toShortDto(org: OrganizationAggregate): ShortOrganizationDto; - static toDetailDto(org: OrganizationAggregate): DetailOrganizationDto; - static toShortDtoList(orgs: OrganizationAggregate[]): ShortOrganizationDto[]; -} -//# sourceMappingURL=OrganizationMapper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.d.ts.map deleted file mode 100644 index 2e4ad5c7..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationMapper.d.ts","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/OrganizationMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAgD,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE/H,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,qBAAqB,GAAG,oBAAoB;IAUnE,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,qBAAqB,GAAG,qBAAqB;IAkBrE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,oBAAoB,EAAE;CAG7E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.js b/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.js deleted file mode 100644 index c24c7f66..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrganizationMapper = void 0; -class OrganizationMapper { - static toShortDto(org) { - return { - id: org.id, - name: org.name, - state: org.state, - userinorg: org.userinorg, - maxOrganizationalDecks: org.maxOrganizationalDecks, - }; - } - static toDetailDto(org) { - return { - id: org.id, - name: org.name, - contactfname: org.contactfname, - contactlname: org.contactlname, - contactphone: org.contactphone, - contactemail: org.contactemail, - state: org.state, - regdate: org.regdate, - updatedate: org.updatedate, - url: org.url, - userinorg: org.userinorg, - maxOrganizationalDecks: org.maxOrganizationalDecks, - users: org.users?.map(u => u.id) ?? [], - }; - } - static toShortDtoList(orgs) { - return orgs.map(this.toShortDto); - } -} -exports.OrganizationMapper = OrganizationMapper; -//# sourceMappingURL=OrganizationMapper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.js.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.js.map deleted file mode 100644 index b20d58cf..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/OrganizationMapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationMapper.js","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/OrganizationMapper.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAC7B,MAAM,CAAC,UAAU,CAAC,GAA0B;QAC1C,OAAO;YACL,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,sBAAsB,EAAE,GAAG,CAAC,sBAAsB;SACnD,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,GAA0B;QAC3C,OAAO;YACL,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,GAAG,EAAE,GAAG,CAAC,GAAG;YACZ,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,sBAAsB,EAAE,GAAG,CAAC,sBAAsB;YAClD,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE;SACvC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,IAA6B;QACjD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;CACF;AAhCD,gDAgCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.d.ts b/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.d.ts deleted file mode 100644 index b4602706..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { UserAggregate } from '../../../Domain/User/UserAggregate'; -import { ShortUserDto, DetailUserDto } from '../UserDto'; -export declare class UserMapper { - static toShortDto(user: UserAggregate): ShortUserDto; - static toDetailDto(user: UserAggregate): DetailUserDto; - static toShortDtoList(users: UserAggregate[]): ShortUserDto[]; -} -//# sourceMappingURL=UserMapper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.d.ts.map deleted file mode 100644 index ee4b1b0d..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserMapper.d.ts","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/UserMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAgC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGvF,qBAAa,UAAU;IACrB,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY;IASpD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa;IAetD,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE;CAG9D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.js b/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.js deleted file mode 100644 index d1f8d283..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserMapper = void 0; -const UserAggregate_1 = require("../../../Domain/User/UserAggregate"); -const BaseMapper_1 = require("./BaseMapper"); -class UserMapper { - static toShortDto(user) { - return { - id: user.id, - username: user.username, - state: user.state, - authLevel: (user.state === UserAggregate_1.UserState.ADMIN ? 1 : 0), - }; - } - static toDetailDto(user) { - return { - id: user.id, - orgid: user.orgid, - username: user.username, - email: user.email, - fname: user.fname, - lname: user.lname, - code: user.token, - type: user.type, - phone: user.phone, - state: user.state, - }; - } - static toShortDtoList(users) { - return BaseMapper_1.BaseMapper.toShortDtoListStatic(users, UserMapper.toShortDto); - } -} -exports.UserMapper = UserMapper; -//# sourceMappingURL=UserMapper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.js.map b/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.js.map deleted file mode 100644 index 1d67ea9c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/Mappers/UserMapper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserMapper.js","sourceRoot":"","sources":["../../../../src/Application/DTOs/Mappers/UserMapper.ts"],"names":[],"mappings":";;;AAAA,sEAA8E;AAE9E,6CAA0C;AAE1C,MAAa,UAAU;IACrB,MAAM,CAAC,UAAU,CAAC,IAAmB;QACnC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,yBAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAU;SAC7D,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAmB;QACpC,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAsB;QAC1C,OAAO,uBAAU,CAAC,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IACvE,CAAC;CACF;AA5BD,gCA4BC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.d.ts b/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.d.ts deleted file mode 100644 index 57d8b338..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export interface CreateOrganizationDto { - name: string; - description?: string; - maxOrganizationalDecks?: number | null; -} -export interface UpdateOrganizationDto { - id: string; - name?: string; - description?: string; -} -export interface ShortOrganizationDto { - id: string; - name: string; - state: number; - userinorg: number; - maxOrganizationalDecks?: number | null; -} -export interface DetailOrganizationDto { - id: string; - name: string; - contactfname: string; - contactlname: string; - contactphone: string; - contactemail: string; - state: number; - regdate: Date; - updatedate: Date; - url: string | null; - userinorg: number; - maxOrganizationalDecks: number | null; - users: string[]; -} -export interface OrganizationLoginUrlDto { - organizationId: string; - organizationName: string; - loginUrl: string; -} -export interface OrganizationAuthCallbackDto { - organizationId: string; - userId: string; - status: 'ok' | 'not_ok'; - authToken?: string; -} -//# sourceMappingURL=OrganizationDto.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.d.ts.map deleted file mode 100644 index 7235c3b4..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationDto.d.ts","sourceRoot":"","sources":["../../../src/Application/DTOs/OrganizationDto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,IAAI,GAAG,QAAQ,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.js b/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.js deleted file mode 100644 index 4bd33d30..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=OrganizationDto.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.js.map b/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.js.map deleted file mode 100644 index afae12cb..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/OrganizationDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationDto.js","sourceRoot":"","sources":["../../../src/Application/DTOs/OrganizationDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.d.ts b/SerpentRace_Backend/dist/Application/DTOs/SearchDto.d.ts deleted file mode 100644 index 08c8ff9c..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface SearchQuery { - query: string; - limit?: number; - offset?: number; -} -export interface SearchResult { - results: T[]; - totalCount: number; - hasMore: boolean; - searchQuery: string; - searchType: 'users' | 'organizations' | 'decks'; -} -//# sourceMappingURL=SearchDto.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/SearchDto.d.ts.map deleted file mode 100644 index f8ff6c1e..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SearchDto.d.ts","sourceRoot":"","sources":["../../../src/Application/DTOs/SearchDto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,GAAG,eAAe,GAAG,OAAO,CAAC;CACjD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.js b/SerpentRace_Backend/dist/Application/DTOs/SearchDto.js deleted file mode 100644 index 3902d011..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=SearchDto.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.js.map b/SerpentRace_Backend/dist/Application/DTOs/SearchDto.js.map deleted file mode 100644 index 807effdd..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/SearchDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SearchDto.js","sourceRoot":"","sources":["../../../src/Application/DTOs/SearchDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/UserDto.d.ts b/SerpentRace_Backend/dist/Application/DTOs/UserDto.d.ts deleted file mode 100644 index 27d86ac1..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/UserDto.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export interface CreateUserDto { - username: string; - email: string; -} -export interface UpdateUserDto { - id: string; - username?: string; - email?: string; -} -export interface ShortUserDto { - id: string; - username: string; - state: number; - authLevel: 0 | 1; -} -export interface DetailUserDto { - id: string; - orgid: string | null; - username: string; - email: string; - fname: string; - lname: string; - code: string | null; - type: string; - phone: string | null; - state: number; -} -//# sourceMappingURL=UserDto.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/UserDto.d.ts.map b/SerpentRace_Backend/dist/Application/DTOs/UserDto.d.ts.map deleted file mode 100644 index ae72cfe8..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/UserDto.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDto.d.ts","sourceRoot":"","sources":["../../../src/Application/DTOs/UserDto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/UserDto.js b/SerpentRace_Backend/dist/Application/DTOs/UserDto.js deleted file mode 100644 index 4c23cc90..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/UserDto.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UserDto.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/DTOs/UserDto.js.map b/SerpentRace_Backend/dist/Application/DTOs/UserDto.js.map deleted file mode 100644 index 344121b3..00000000 --- a/SerpentRace_Backend/dist/Application/DTOs/UserDto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserDto.js","sourceRoot":"","sources":["../../../src/Application/DTOs/UserDto.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.d.ts b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.d.ts deleted file mode 100644 index a90370e9..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface CreateDeckCommand { - name: string; - type: number; - userid: string; - cards: any[]; - ctype?: number; -} -//# sourceMappingURL=CreateDeckCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.d.ts.map deleted file mode 100644 index 7e472d3c..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateDeckCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/CreateDeckCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.js b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.js deleted file mode 100644 index 131d4b5a..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=CreateDeckCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.js.map b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.js.map deleted file mode 100644 index a6acca1e..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateDeckCommand.js","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/CreateDeckCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.d.ts deleted file mode 100644 index 509c30fb..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository'; -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { CreateDeckCommand } from './CreateDeckCommand'; -import { ShortDeckDto } from '../../DTOs/DeckDto'; -export declare class CreateDeckCommandHandler { - private readonly deckRepo; - private readonly userRepo; - private readonly orgRepo; - constructor(deckRepo: IDeckRepository, userRepo: IUserRepository, orgRepo: IOrganizationRepository); - execute(cmd: CreateDeckCommand): Promise; - /** - * Private method to create deck after all validations - */ - private createDeck; -} -//# sourceMappingURL=CreateDeckCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.d.ts.map deleted file mode 100644 index ebf5896d..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateDeckCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/CreateDeckCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,qBAAa,wBAAwB;IAEjC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,uBAAuB;IAG7C,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IAsE5D;;OAEG;YACW,UAAU;CAiCzB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.js b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.js deleted file mode 100644 index 099f1874..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateDeckCommandHandler = void 0; -const DeckAggregate_1 = require("../../../Domain/Deck/DeckAggregate"); -const UserAggregate_1 = require("../../../Domain/User/UserAggregate"); -const DeckMapper_1 = require("../../DTOs/Mappers/DeckMapper"); -const AdminBypassService_1 = require("../../Services/AdminBypassService"); -const Logger_1 = require("../../Services/Logger"); -class CreateDeckCommandHandler { - constructor(deckRepo, userRepo, orgRepo) { - this.deckRepo = deckRepo; - this.userRepo = userRepo; - this.orgRepo = orgRepo; - } - async execute(cmd) { - try { - // 1. Get user details - const user = await this.userRepo.findById(cmd.userid); - if (!user) { - throw new Error('User not found'); - } - // 2. ADMIN BYPASS - Skip all restrictions - if (AdminBypassService_1.AdminBypassService.shouldBypassRestrictions(user.state)) { - AdminBypassService_1.AdminBypassService.logAdminBypass('CREATE_DECK_BYPASS', user.id, 'new-deck', { - deckName: cmd.name, - deckType: cmd.type, - cardCount: cmd.cards.length, - ctype: cmd.ctype - }); - return this.createDeck(cmd); - } - // 3. Check deck count limits for regular users - const userDeckCount = await this.deckRepo.countActiveByUserId(cmd.userid); - const maxDecks = user.state === UserAggregate_1.UserState.VERIFIED_PREMIUM ? 12 : 8; - if (userDeckCount >= maxDecks) { - throw new Error(`Deck limit exceeded. Maximum ${maxDecks} decks allowed for your account type.`); - } - // 4. Organizational deck restrictions - if (cmd.ctype === DeckAggregate_1.CType.ORGANIZATION) { - // Only premium users can create organizational decks - if (user.state !== UserAggregate_1.UserState.VERIFIED_PREMIUM) { - throw new Error('Only premium users can create organizational decks.'); - } - // User must belong to an organization - if (!user.orgid) { - throw new Error('You must be a member of an organization to create organizational decks.'); - } - // Check organization limits - const org = await this.orgRepo.findById(user.orgid); - if (!org) { - throw new Error('Organization not found.'); - } - if (org.maxOrganizationalDecks === null) { - throw new Error('Organization deck limit not configured. Contact administrator.'); - } - const userOrgDeckCount = await this.deckRepo.countOrganizationalByUserId(cmd.userid); - if (userOrgDeckCount >= org.maxOrganizationalDecks) { - throw new Error(`Organization deck limit exceeded. Maximum ${org.maxOrganizationalDecks} organizational decks allowed.`); - } - } - // 5. Create deck with restrictions passed - return this.createDeck(cmd); - } - catch (error) { - if (error instanceof Error) { - throw error; // Re-throw known errors with original message - } - throw new Error('Failed to create deck'); - } - } - /** - * Private method to create deck after all validations - */ - async createDeck(cmd) { - const deck = new DeckAggregate_1.DeckAggregate(); - deck.name = cmd.name; - deck.type = cmd.type; - deck.userid = cmd.userid; - deck.cards = cmd.cards; - deck.ctype = cmd.ctype ?? DeckAggregate_1.CType.PUBLIC; - deck.state = DeckAggregate_1.State.ACTIVE; - // Set organization reference for organizational decks - if (cmd.ctype === DeckAggregate_1.CType.ORGANIZATION) { - const user = await this.userRepo.findById(cmd.userid); - if (user?.orgid) { - const org = await this.orgRepo.findById(user.orgid); - if (org) { - deck.organization = org; - } - } - } - const created = await this.deckRepo.create(deck); - (0, Logger_1.logRequest)('Deck created successfully', undefined, undefined, { - deckId: created.id, - userId: cmd.userid, - deckName: cmd.name, - deckType: cmd.type, - ctype: cmd.ctype, - cardCount: cmd.cards.length - }); - return DeckMapper_1.DeckMapper.toShortDto(created); - } -} -exports.CreateDeckCommandHandler = CreateDeckCommandHandler; -//# sourceMappingURL=CreateDeckCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.js.map deleted file mode 100644 index 673b4fd9..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/CreateDeckCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateDeckCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/CreateDeckCommandHandler.ts"],"names":[],"mappings":";;;AAKA,sEAAiF;AACjF,sEAA+D;AAC/D,8DAA2D;AAC3D,0EAAuE;AACvE,kDAAmD;AAEnD,MAAa,wBAAwB;IACnC,YACmB,QAAyB,EACzB,QAAyB,EACzB,OAAgC;QAFhC,aAAQ,GAAR,QAAQ,CAAiB;QACzB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,YAAO,GAAP,OAAO,CAAyB;IAChD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,GAAsB;QAClC,IAAI,CAAC;YACH,sBAAsB;YACtB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACtD,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACpC,CAAC;YAED,0CAA0C;YAC1C,IAAI,uCAAkB,CAAC,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5D,uCAAkB,CAAC,cAAc,CAC/B,oBAAoB,EACpB,IAAI,CAAC,EAAE,EACP,UAAU,EACV;oBACE,QAAQ,EAAE,GAAG,CAAC,IAAI;oBAClB,QAAQ,EAAE,GAAG,CAAC,IAAI;oBAClB,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM;oBAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;iBACjB,CACF,CAAC;gBACF,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAC9B,CAAC;YAED,+CAA+C;YAC/C,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC1E,MAAM,QAAQ,GAAG,IAAI,CA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2B,EAAE,SAAS,EAAE,SAAS,EAAE;YAC5D,MAAM,EAAE,OAAO,CAAC,EAAE;YAClB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,QAAQ,EAAE,GAAG,CAAC,IAAI;YAClB,QAAQ,EAAE,GAAG,CAAC,IAAI;YAClB,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;QAEH,OAAO,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;CACF;AAjHD,4DAiHC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.d.ts b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.d.ts deleted file mode 100644 index 8ca63383..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface DeleteDeckCommand { - id: string; - soft?: boolean; -} -//# sourceMappingURL=DeleteDeckCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.d.ts.map deleted file mode 100644 index 1e21ce9a..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteDeckCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/DeleteDeckCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.js b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.js deleted file mode 100644 index 3c66e377..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DeleteDeckCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.js.map b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.js.map deleted file mode 100644 index 24de4184..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteDeckCommand.js","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/DeleteDeckCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.d.ts deleted file mode 100644 index b1e18407..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository'; -import { DeleteDeckCommand } from './DeleteDeckCommand'; -export declare class DeleteDeckCommandHandler { - private readonly deckRepo; - constructor(deckRepo: IDeckRepository); - execute(cmd: DeleteDeckCommand): Promise; -} -//# sourceMappingURL=DeleteDeckCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.d.ts.map deleted file mode 100644 index ef6e6c0a..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteDeckCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/DeleteDeckCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;CAQxD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.js b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.js deleted file mode 100644 index f6ea3302..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteDeckCommandHandler = void 0; -class DeleteDeckCommandHandler { - constructor(deckRepo) { - this.deckRepo = deckRepo; - } - async execute(cmd) { - if (cmd.soft) { - await this.deckRepo.softDelete(cmd.id); - } - else { - await this.deckRepo.delete(cmd.id); - } - return true; - } -} -exports.DeleteDeckCommandHandler = DeleteDeckCommandHandler; -//# sourceMappingURL=DeleteDeckCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.js.map deleted file mode 100644 index 102a9d7a..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/DeleteDeckCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteDeckCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/DeleteDeckCommandHandler.ts"],"names":[],"mappings":";;;AAGA,MAAa,wBAAwB;IACnC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,GAAsB;QAClC,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAXD,4DAWC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.d.ts b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.d.ts deleted file mode 100644 index 300f84e9..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface UpdateDeckCommand { - id: string; - name?: string; - type?: number; - userid?: string; - cards?: any[]; - ctype?: number; - state?: number; -} -//# sourceMappingURL=UpdateDeckCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.d.ts.map deleted file mode 100644 index 02c74a33..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateDeckCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/UpdateDeckCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.js b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.js deleted file mode 100644 index f33c190b..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UpdateDeckCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.js.map b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.js.map deleted file mode 100644 index f3c74623..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateDeckCommand.js","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/UpdateDeckCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.d.ts deleted file mode 100644 index 61035abc..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository'; -import { UpdateDeckCommand } from './UpdateDeckCommand'; -import { ShortDeckDto } from '../../DTOs/DeckDto'; -export declare class UpdateDeckCommandHandler { - private readonly deckRepo; - constructor(deckRepo: IDeckRepository); - execute(cmd: UpdateDeckCommand): Promise; -} -//# sourceMappingURL=UpdateDeckCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.d.ts.map deleted file mode 100644 index ee28a52f..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateDeckCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/UpdateDeckCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;CAKpE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.js b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.js deleted file mode 100644 index e21db006..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateDeckCommandHandler = void 0; -const DeckMapper_1 = require("../../DTOs/Mappers/DeckMapper"); -class UpdateDeckCommandHandler { - constructor(deckRepo) { - this.deckRepo = deckRepo; - } - async execute(cmd) { - const updated = await this.deckRepo.update(cmd.id, { ...cmd }); - if (!updated) - return null; - return DeckMapper_1.DeckMapper.toShortDto(updated); - } -} -exports.UpdateDeckCommandHandler = UpdateDeckCommandHandler; -//# sourceMappingURL=UpdateDeckCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.js.map deleted file mode 100644 index 5bf59127..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/commands/UpdateDeckCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateDeckCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Deck/commands/UpdateDeckCommandHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAE3D,MAAa,wBAAwB;IACnC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,GAAsB;QAClC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,OAAO,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;CACF;AARD,4DAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.d.ts b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.d.ts deleted file mode 100644 index f7056562..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetDeckByIdQuery { - id: string; -} -//# sourceMappingURL=GetDeckByIdQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.d.ts.map deleted file mode 100644 index 9db7c375..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDeckByIdQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDeckByIdQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.js b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.js deleted file mode 100644 index 62eeb764..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetDeckByIdQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.js.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.js.map deleted file mode 100644 index f90c42cd..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDeckByIdQuery.js","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDeckByIdQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.d.ts deleted file mode 100644 index 94770f06..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository'; -import { GetDeckByIdQuery } from './GetDeckByIdQuery'; -import { ShortDeckDto } from '../../DTOs/DeckDto'; -export declare class GetDeckByIdQueryHandler { - private readonly deckRepo; - constructor(deckRepo: IDeckRepository); - execute(query: GetDeckByIdQuery): Promise; -} -//# sourceMappingURL=GetDeckByIdQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.d.ts.map deleted file mode 100644 index 059a9036..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDeckByIdQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDeckByIdQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;CAKrE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.js b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.js deleted file mode 100644 index 9e74e39b..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetDeckByIdQueryHandler = void 0; -const DeckMapper_1 = require("../../DTOs/Mappers/DeckMapper"); -class GetDeckByIdQueryHandler { - constructor(deckRepo) { - this.deckRepo = deckRepo; - } - async execute(query) { - const deck = await this.deckRepo.findById(query.id); - if (!deck) - return null; - return DeckMapper_1.DeckMapper.toShortDto(deck); - } -} -exports.GetDeckByIdQueryHandler = GetDeckByIdQueryHandler; -//# sourceMappingURL=GetDeckByIdQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.js.map deleted file mode 100644 index dced6929..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDeckByIdQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDeckByIdQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDeckByIdQueryHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAE3D,MAAa,uBAAuB;IAClC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,KAAuB;QACnC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QACvB,OAAO,uBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF;AARD,0DAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.d.ts b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.d.ts deleted file mode 100644 index cbcb61f6..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface GetDecksByPageQuery { - from: number; - to: number; - userId: string; - userOrgId?: string; - isAdmin: boolean; - includeDeleted?: boolean; -} -//# sourceMappingURL=GetDecksByPageQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.d.ts.map deleted file mode 100644 index 69d31b46..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDecksByPageQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDecksByPageQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.js b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.js deleted file mode 100644 index 73a8cd73..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetDecksByPageQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.js.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.js.map deleted file mode 100644 index 20e0bc8c..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDecksByPageQuery.js","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDecksByPageQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.d.ts deleted file mode 100644 index c7225ba0..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IDeckRepository } from '../../../Domain/IRepository/IDeckRepository'; -import { GetDecksByPageQuery } from './GetDecksByPageQuery'; -import { ShortDeckDto } from '../../DTOs/DeckDto'; -export declare class GetDecksByPageQueryHandler { - private readonly deckRepo; - constructor(deckRepo: IDeckRepository); - execute(query: GetDecksByPageQuery): Promise<{ - decks: ShortDeckDto[]; - totalCount: number; - }>; -} -//# sourceMappingURL=GetDecksByPageQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.d.ts.map deleted file mode 100644 index 0c004871..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDecksByPageQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDecksByPageQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD,qBAAa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAuElG"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.js b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.js deleted file mode 100644 index b4039f62..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetDecksByPageQueryHandler = void 0; -const DeckMapper_1 = require("../../DTOs/Mappers/DeckMapper"); -const AdminBypassService_1 = require("../../Services/AdminBypassService"); -const Logger_1 = require("../../Services/Logger"); -class GetDecksByPageQueryHandler { - constructor(deckRepo) { - this.deckRepo = deckRepo; - } - async execute(query) { - try { - // Validate pagination parameters - if (query.from < 0 || query.to < query.from) { - throw new Error('Invalid pagination parameters'); - } - const limit = query.to - query.from + 1; - if (limit > 100) { - throw new Error('Page size too large. Maximum 100 records per request'); - } - // Log admin bypass if applicable - if (query.isAdmin) { - AdminBypassService_1.AdminBypassService.logAdminBypass('GET_DECKS_PAGE_BYPASS', query.userId, 'paginated-decks', { - from: query.from, - to: query.to, - includesDeleted: query.includeDeleted || false, - operation: 'read' - }); - } - (0, Logger_1.logRequest)('Get decks by page query started', undefined, undefined, { - userId: query.userId, - userOrgId: query.userOrgId, - isAdmin: query.isAdmin, - from: query.from, - to: query.to, - includeDeleted: query.includeDeleted || false - }); - // Use paginated filtered deck finding method - const result = await this.deckRepo.findFilteredDecks(query.userId, query.userOrgId, query.isAdmin, query.from, query.to); - (0, Logger_1.logRequest)('Get decks by page query completed', undefined, undefined, { - userId: query.userId, - userOrgId: query.userOrgId, - isAdmin: query.isAdmin, - from: query.from, - to: query.to, - returned: result.decks.length, - totalCount: result.totalCount, - includeDeleted: query.includeDeleted || false - }); - return { - decks: DeckMapper_1.DeckMapper.toShortDtoList(result.decks), - totalCount: result.totalCount - }; - } - catch (error) { - (0, Logger_1.logError)('GetDecksByPageQueryHandler error', error instanceof Error ? error : new Error(String(error))); - // Re-throw validation errors as-is - if (error instanceof Error && (error.message.includes('Invalid pagination') || error.message.includes('Page size'))) { - throw error; - } - throw new Error('Failed to retrieve decks page'); - } - } -} -exports.GetDecksByPageQueryHandler = GetDecksByPageQueryHandler; -//# sourceMappingURL=GetDecksByPageQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.js.map deleted file mode 100644 index 0f039d93..00000000 --- a/SerpentRace_Backend/dist/Application/Deck/queries/GetDecksByPageQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetDecksByPageQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Deck/queries/GetDecksByPageQueryHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,0EAAuE;AACvE,kDAA6D;AAE7D,MAAa,0BAA0B;IACrC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,KAA0B;QACtC,IAAI,CAAC;YACH,iCAAiC;YACjC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACnD,CAAC;YAED,MAAM,KAAK,GAAG,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;YACxC,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAC1E,CAAC;YAED,iCAAiC;YACjC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBAClB,uCAAkB,CAAC,cAAc,CAC/B,uBAAuB,EACvB,KAAK,CAAC,MAAM,EACZ,iBAAiB,EACjB;oBACE,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,EAAE,EAAE,KAAK,CAAC,EAAE;oBACZ,eAAe,EAAE,KAAK,CAAC,cAAc,IAAI,KAAK;oBAC9C,SAAS,EAAE,MAAM;iBAClB,CACF,CAAC;YACJ,CAAC;YAED,IAAA,mBAAU,EAAC,iCAAiC,EAAE,SAAS,EAAE,SAAS,EAAE;gBAClE,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI,EAAE,KAAK,CAA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C,EAAE,CAAC;gBACpH,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AA1ED,gEA0EC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.d.ts deleted file mode 100644 index 368d0110..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface CreateOrganizationCommand { - name: string; - contactfname: string; - contactlname: string; - contactphone: string; - contactemail: string; - url?: string; -} -//# sourceMappingURL=CreateOrganizationCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.d.ts.map deleted file mode 100644 index 9dd4d856..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateOrganizationCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/CreateOrganizationCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.js b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.js deleted file mode 100644 index a57a5cbd..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=CreateOrganizationCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.js.map deleted file mode 100644 index 45fa4096..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateOrganizationCommand.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/CreateOrganizationCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.d.ts deleted file mode 100644 index 118ca280..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { CreateOrganizationCommand } from './CreateOrganizationCommand'; -import { ShortOrganizationDto } from '../../DTOs/OrganizationDto'; -export declare class CreateOrganizationCommandHandler { - private readonly orgRepo; - constructor(orgRepo: IOrganizationRepository); - execute(cmd: CreateOrganizationCommand): Promise; -} -//# sourceMappingURL=CreateOrganizationCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.d.ts.map deleted file mode 100644 index 85852b35..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateOrganizationCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/CreateOrganizationCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,qBAAa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,OAAO,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAsB7E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.js b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.js deleted file mode 100644 index 215a97ec..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateOrganizationCommandHandler = void 0; -const OrganizationAggregate_1 = require("../../../Domain/Organization/OrganizationAggregate"); -const OrganizationMapper_1 = require("../../DTOs/Mappers/OrganizationMapper"); -class CreateOrganizationCommandHandler { - constructor(orgRepo) { - this.orgRepo = orgRepo; - } - async execute(cmd) { - try { - const org = new OrganizationAggregate_1.OrganizationAggregate(); - org.name = cmd.name; - org.contactfname = cmd.contactfname; - org.contactlname = cmd.contactlname; - org.contactphone = cmd.contactphone; - org.contactemail = cmd.contactemail; - org.url = cmd.url || null; - org.state = OrganizationAggregate_1.OrganizationState.REGISTERED; - const created = await this.orgRepo.create(org); - return OrganizationMapper_1.OrganizationMapper.toShortDto(created); - } - catch (error) { - if (error instanceof Error) { - if (error.message.includes('duplicate key value violates unique constraint')) { - throw new Error('Organization with this name or contact email already exists'); - } - } - throw new Error('Failed to create organization'); - } - } -} -exports.CreateOrganizationCommandHandler = CreateOrganizationCommandHandler; -//# sourceMappingURL=CreateOrganizationCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.js.map deleted file mode 100644 index 977450e1..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/CreateOrganizationCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateOrganizationCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/CreateOrganizationCommandHandler.ts"],"names":[],"mappings":";;;AAGA,8FAA8G;AAC9G,8EAA2E;AAE3E,MAAa,gCAAgC;IAC3C,YAA6B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;IAEjE,KAAK,CAAC,OAAO,CAAC,GAA8B;QAC1C,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,6CAAqB,EAAE,CAAC;YACxC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACpB,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;YACpC,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;YACpC,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;YACpC,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;YACpC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC;YAC1B,GAAG,CAAC,KAAK,GAAG,yCAAiB,CAAC,UAAU,CAAC;YAEzC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC/C,OAAO,uCAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,gDAAgD,CAAC,EAAE,CAAC;oBAC7E,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;gBACjF,CAAC;YACH,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF;AAzBD,4EAyBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.d.ts deleted file mode 100644 index cf1fa58b..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface DeleteOrganizationCommand { - id: string; - soft?: boolean; -} -//# sourceMappingURL=DeleteOrganizationCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.d.ts.map deleted file mode 100644 index 4a379951..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteOrganizationCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/DeleteOrganizationCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.js b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.js deleted file mode 100644 index 74db6349..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DeleteOrganizationCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.js.map deleted file mode 100644 index ffbe3cdd..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteOrganizationCommand.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/DeleteOrganizationCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.d.ts deleted file mode 100644 index d00679b4..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { DeleteOrganizationCommand } from './DeleteOrganizationCommand'; -export declare class DeleteOrganizationCommandHandler { - private readonly orgRepo; - constructor(orgRepo: IOrganizationRepository); - execute(cmd: DeleteOrganizationCommand): Promise; -} -//# sourceMappingURL=DeleteOrganizationCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.d.ts.map deleted file mode 100644 index 23917a20..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteOrganizationCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/DeleteOrganizationCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,qBAAa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,OAAO,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;CAQhE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js deleted file mode 100644 index ba47b855..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteOrganizationCommandHandler = void 0; -class DeleteOrganizationCommandHandler { - constructor(orgRepo) { - this.orgRepo = orgRepo; - } - async execute(cmd) { - if (cmd.soft) { - await this.orgRepo.softDelete(cmd.id); - } - else { - await this.orgRepo.delete(cmd.id); - } - return true; - } -} -exports.DeleteOrganizationCommandHandler = DeleteOrganizationCommandHandler; -//# sourceMappingURL=DeleteOrganizationCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js.map deleted file mode 100644 index f164edda..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/DeleteOrganizationCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteOrganizationCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/DeleteOrganizationCommandHandler.ts"],"names":[],"mappings":";;;AAIA,MAAa,gCAAgC;IAC3C,YAA6B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;IAEjE,KAAK,CAAC,OAAO,CAAC,GAA8B;QAC1C,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAXD,4EAWC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.d.ts deleted file mode 100644 index e63e6b53..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface ProcessOrgAuthCallbackCommand { - organizationId: string; - userId: string; - status: 'ok' | 'not_ok'; - authToken?: string; -} -//# sourceMappingURL=ProcessOrgAuthCallbackCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.d.ts.map deleted file mode 100644 index 15b68720..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProcessOrgAuthCallbackCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/ProcessOrgAuthCallbackCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,6BAA6B;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,IAAI,GAAG,QAAQ,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.js b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.js deleted file mode 100644 index 2b2f6f24..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ProcessOrgAuthCallbackCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.js.map deleted file mode 100644 index 94396c24..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProcessOrgAuthCallbackCommand.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/ProcessOrgAuthCallbackCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.d.ts deleted file mode 100644 index 76cbb7e9..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { ProcessOrgAuthCallbackCommand } from './ProcessOrgAuthCallbackCommand'; -export interface ProcessOrgAuthCallbackResponse { - success: boolean; - message: string; - updatedFields?: string[]; -} -export declare class ProcessOrgAuthCallbackCommandHandler { - private readonly userRepo; - private readonly orgRepo; - constructor(userRepo: IUserRepository, orgRepo: IOrganizationRepository); - execute(cmd: ProcessOrgAuthCallbackCommand): Promise; -} -//# sourceMappingURL=ProcessOrgAuthCallbackCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.d.ts.map deleted file mode 100644 index 207539a9..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProcessOrgAuthCallbackCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAGhF,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,qBAAa,oCAAoC;IAE7C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,uBAAuB;IAG7C,OAAO,CAAC,GAAG,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC;CAyG3F"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.js b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.js deleted file mode 100644 index e7a6bdaf..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ProcessOrgAuthCallbackCommandHandler = void 0; -const Logger_1 = require("../../Services/Logger"); -class ProcessOrgAuthCallbackCommandHandler { - constructor(userRepo, orgRepo) { - this.userRepo = userRepo; - this.orgRepo = orgRepo; - } - async execute(cmd) { - const startTime = Date.now(); - try { - (0, Logger_1.logAuth)('Processing organization authentication callback', cmd.userId, { - organizationId: cmd.organizationId, - status: cmd.status, - hasAuthToken: !!cmd.authToken - }); - // Verify organization exists - const organization = await this.orgRepo.findById(cmd.organizationId); - if (!organization) { - (0, Logger_1.logWarning)('Organization not found for auth callback', { - organizationId: cmd.organizationId, - userId: cmd.userId - }); - return { - success: false, - message: 'Organization not found' - }; - } - // Verify user exists - const user = await this.userRepo.findById(cmd.userId); - if (!user) { - (0, Logger_1.logWarning)('User not found for auth callback', { - organizationId: cmd.organizationId, - userId: cmd.userId - }); - return { - success: false, - message: 'User not found' - }; - } - // Verify user belongs to the organization - if (user.orgid !== cmd.organizationId) { - (0, Logger_1.logWarning)('User does not belong to organization for auth callback', { - organizationId: cmd.organizationId, - userId: cmd.userId, - userOrgId: user.orgid - }); - return { - success: false, - message: 'User does not belong to this organization' - }; - } - if (cmd.status === 'not_ok') { - (0, Logger_1.logAuth)('Organization authentication failed', cmd.userId, { - organizationId: cmd.organizationId, - organizationName: organization.name - }); - return { - success: false, - message: 'Organization authentication failed' - }; - } - // Update user's organization login date - const now = new Date(); - const updatedUser = await this.userRepo.update(cmd.userId, { - Orglogindate: now - }); - if (!updatedUser) { - (0, Logger_1.logError)('Failed to update user organization login date', new Error('User update returned null')); - return { - success: false, - message: 'Failed to update user login information' - }; - } - (0, Logger_1.logAuth)('Organization authentication successful', cmd.userId, { - organizationId: cmd.organizationId, - organizationName: organization.name, - orgLoginDate: now.toISOString(), - executionTime: Date.now() - startTime - }); - (0, Logger_1.logDatabase)('User organization login date updated', `userId: ${cmd.userId}, orgId: ${cmd.organizationId}`, Date.now() - startTime, { - userId: cmd.userId, - organizationId: cmd.organizationId, - newOrgLoginDate: now.toISOString() - }); - return { - success: true, - message: 'Organization authentication successful', - updatedFields: ['Orglogindate'] - }; - } - catch (error) { - (0, Logger_1.logError)('ProcessOrgAuthCallbackCommandHandler error', error); - return { - success: false, - message: 'Internal error processing authentication callback' - }; - } - } -} -exports.ProcessOrgAuthCallbackCommandHandler = ProcessOrgAuthCallbackCommandHandler; -//# sourceMappingURL=ProcessOrgAuthCallbackCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.js.map deleted file mode 100644 index 32bfa2f3..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProcessOrgAuthCallbackCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/ProcessOrgAuthCallbackCommandHandler.ts"],"names":[],"mappings":";;;AAGA,kDAAmF;AAQnF,MAAa,oCAAoC;IAC/C,YACmB,QAAyB,EACzB,OAAgC;QADhC,aAAQ,GAAR,QAAQ,CAAiB;QACzB,YAAO,GAAP,OAAO,CAAyB;IAChD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,GAAkC;QAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC;YACH,IAAA,gBAAO,EAAC,iDAAiD,EAAE,GAAG,CAAC,MAAM,EAAE;gBACrE,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,YAAY,EAAE,CAAC,CAAC,GAAG,CAAC,SAAS;aAC9B,CAAC,CAAC;YAEH,6BAA6B;YAC7B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YACrE,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,IAAA,mBAAU,EAAC,0CAA0C,EAAE;oBACrD,cAAc,EAAE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end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.d.ts deleted file mode 100644 index c18d35f2..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { OrganizationStateType } from '../../../Domain/Organization/OrganizationAggregate'; -export interface UpdateOrganizationCommand { - id: string; - name?: string; - contactfname?: string; - contactlname?: string; - contactphone?: string; - contactemail?: string; - url?: string; - state?: OrganizationStateType; - userinorg?: number; - maxOrganizationalDecks?: number | null; -} -//# sourceMappingURL=UpdateOrganizationCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.d.ts.map deleted file mode 100644 index 335be16a..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateOrganizationCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/UpdateOrganizationCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAE3F,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.js b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.js deleted file mode 100644 index 020d40c7..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UpdateOrganizationCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.js.map deleted file mode 100644 index 2c9b9cd5..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateOrganizationCommand.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/UpdateOrganizationCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.d.ts deleted file mode 100644 index c6186e23..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { UpdateOrganizationCommand } from './UpdateOrganizationCommand'; -import { ShortOrganizationDto } from '../../DTOs/OrganizationDto'; -export declare class UpdateOrganizationCommandHandler { - private readonly orgRepo; - constructor(orgRepo: IOrganizationRepository); - execute(cmd: UpdateOrganizationCommand): Promise; -} -//# sourceMappingURL=UpdateOrganizationCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.d.ts.map deleted file mode 100644 index 87f2c042..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateOrganizationCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/UpdateOrganizationCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,qBAAa,gCAAgC;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,OAAO,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;CAKpF"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.js b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.js deleted file mode 100644 index 7b6b9ce8..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateOrganizationCommandHandler = void 0; -const OrganizationMapper_1 = require("../../DTOs/Mappers/OrganizationMapper"); -class UpdateOrganizationCommandHandler { - constructor(orgRepo) { - this.orgRepo = orgRepo; - } - async execute(cmd) { - const updated = await this.orgRepo.update(cmd.id, { ...cmd }); - if (!updated) - return null; - return OrganizationMapper_1.OrganizationMapper.toShortDto(updated); - } -} -exports.UpdateOrganizationCommandHandler = UpdateOrganizationCommandHandler; -//# sourceMappingURL=UpdateOrganizationCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.js.map deleted file mode 100644 index 5484c8d5..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/commands/UpdateOrganizationCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateOrganizationCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/commands/UpdateOrganizationCommandHandler.ts"],"names":[],"mappings":";;;AAIA,8EAA2E;AAE3E,MAAa,gCAAgC;IAC3C,YAA6B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;IAEjE,KAAK,CAAC,OAAO,CAAC,GAA8B;QAC1C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,OAAO,uCAAkB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AARD,4EAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.d.ts b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.d.ts deleted file mode 100644 index 12ac6df5..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetOrganizationByIdQuery { - id: string; -} -//# sourceMappingURL=GetOrganizationByIdQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.d.ts.map deleted file mode 100644 index 9afe1387..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationByIdQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationByIdQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.js b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.js deleted file mode 100644 index f79220b5..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetOrganizationByIdQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.js.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.js.map deleted file mode 100644 index 52e36dba..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationByIdQuery.js","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationByIdQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.d.ts deleted file mode 100644 index 09d73c4e..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { GetOrganizationByIdQuery } from './GetOrganizationByIdQuery'; -import { ShortOrganizationDto } from '../../DTOs/OrganizationDto'; -export declare class GetOrganizationByIdQueryHandler { - private readonly orgRepo; - constructor(orgRepo: IOrganizationRepository); - execute(query: GetOrganizationByIdQuery): Promise; -} -//# sourceMappingURL=GetOrganizationByIdQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.d.ts.map deleted file mode 100644 index 457f6a76..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationByIdQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationByIdQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAGlE,qBAAa,+BAA+B;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,OAAO,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;CAKrF"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.js b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.js deleted file mode 100644 index 52351000..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetOrganizationByIdQueryHandler = void 0; -const OrganizationMapper_1 = require("../../DTOs/Mappers/OrganizationMapper"); -class GetOrganizationByIdQueryHandler { - constructor(orgRepo) { - this.orgRepo = orgRepo; - } - async execute(query) { - const org = await this.orgRepo.findById(query.id); - if (!org) - return null; - return OrganizationMapper_1.OrganizationMapper.toShortDto(org); - } -} -exports.GetOrganizationByIdQueryHandler = GetOrganizationByIdQueryHandler; -//# sourceMappingURL=GetOrganizationByIdQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.js.map deleted file mode 100644 index b6903fb3..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationByIdQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationByIdQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationByIdQueryHandler.ts"],"names":[],"mappings":";;;AAIA,8EAA2E;AAE3E,MAAa,+BAA+B;IAC1C,YAA6B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;IAEjE,KAAK,CAAC,OAAO,CAAC,KAA+B;QAC3C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,OAAO,uCAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;CACF;AARD,0EAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.d.ts b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.d.ts deleted file mode 100644 index 33cacf49..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetOrganizationLoginUrlQuery { - organizationId: string; -} -//# sourceMappingURL=GetOrganizationLoginUrlQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.d.ts.map deleted file mode 100644 index b2debe96..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationLoginUrlQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationLoginUrlQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,cAAc,EAAE,MAAM,CAAC;CACxB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.js b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.js deleted file mode 100644 index f67fd300..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetOrganizationLoginUrlQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.js.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.js.map deleted file mode 100644 index 21c70a93..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationLoginUrlQuery.js","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationLoginUrlQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.d.ts deleted file mode 100644 index 0f568894..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { GetOrganizationLoginUrlQuery } from './GetOrganizationLoginUrlQuery'; -import { OrganizationLoginUrlDto } from '../../DTOs/OrganizationDto'; -export declare class GetOrganizationLoginUrlQueryHandler { - private readonly orgRepo; - constructor(orgRepo: IOrganizationRepository); - execute(query: GetOrganizationLoginUrlQuery): Promise; -} -//# sourceMappingURL=GetOrganizationLoginUrlQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.d.ts.map deleted file mode 100644 index 552684ca..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationLoginUrlQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,qBAAa,mCAAmC;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,OAAO,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC;CA+C5F"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.js b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.js deleted file mode 100644 index 95e4fab3..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetOrganizationLoginUrlQueryHandler = void 0; -const Logger_1 = require("../../Services/Logger"); -class GetOrganizationLoginUrlQueryHandler { - constructor(orgRepo) { - this.orgRepo = orgRepo; - } - async execute(query) { - const startTime = Date.now(); - try { - (0, Logger_1.logDatabase)('Getting organization login URL', `organizationId: ${query.organizationId}`, 0, { - organizationId: query.organizationId - }); - const organization = await this.orgRepo.findById(query.organizationId); - if (!organization) { - (0, Logger_1.logWarning)('Organization not found for login URL request', { - organizationId: query.organizationId - }); - return null; - } - if (!organization.url) { - (0, Logger_1.logWarning)('Organization has no configured login URL', { - organizationId: query.organizationId, - organizationName: organization.name - }); - return null; - } - const result = { - organizationId: organization.id, - organizationName: organization.name, - loginUrl: organization.url - }; - (0, Logger_1.logDatabase)('Organization login URL retrieved successfully', `organizationId: ${query.organizationId}`, Date.now() - startTime, { - organizationId: organization.id, - organizationName: organization.name, - hasUrl: !!organization.url - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('GetOrganizationLoginUrlQueryHandler error', error); - throw new Error('Failed to retrieve organization login URL'); - } - } -} -exports.GetOrganizationLoginUrlQueryHandler = GetOrganizationLoginUrlQueryHandler; -//# sourceMappingURL=GetOrganizationLoginUrlQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.js.map deleted file mode 100644 index ae1199ee..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationLoginUrlQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationLoginUrlQueryHandler.ts"],"names":[],"mappings":";;;AAGA,kDAA0E;AAE1E,MAAa,mCAA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;YAEF,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,2CAA2C,EAAE,KAAc,CAAC,CAAC;YACtE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CACF;AAlDD,kFAkDC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.d.ts b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.d.ts deleted file mode 100644 index 82834da5..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetOrganizationsByPageQuery { - from: number; - to: number; - includeDeleted?: boolean; -} -//# sourceMappingURL=GetOrganizationsByPageQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.d.ts.map deleted file mode 100644 index 52ed8682..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationsByPageQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationsByPageQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.js b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.js deleted file mode 100644 index 797f5673..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetOrganizationsByPageQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.js.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.js.map deleted file mode 100644 index ec54281b..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationsByPageQuery.js","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationsByPageQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.d.ts deleted file mode 100644 index ec28fc20..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { GetOrganizationsByPageQuery } from './GetOrganizationsByPageQuery'; -import { ShortOrganizationDto } from '../../DTOs/OrganizationDto'; -export declare class GetOrganizationsByPageQueryHandler { - private readonly orgRepo; - constructor(orgRepo: IOrganizationRepository); - execute(query: GetOrganizationsByPageQuery): Promise<{ - organizations: ShortOrganizationDto[]; - totalCount: number; - }>; -} -//# sourceMappingURL=GetOrganizationsByPageQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.d.ts.map deleted file mode 100644 index 46c016d0..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationsByPageQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationsByPageQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIlE,qBAAa,kCAAkC;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEvD,OAAO,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAkD1H"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.js b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.js deleted file mode 100644 index a46bcf2d..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetOrganizationsByPageQueryHandler = void 0; -const OrganizationMapper_1 = require("../../DTOs/Mappers/OrganizationMapper"); -const Logger_1 = require("../../Services/Logger"); -class GetOrganizationsByPageQueryHandler { - constructor(orgRepo) { - this.orgRepo = orgRepo; - } - async execute(query) { - try { - // Validate pagination parameters - if (query.from < 0 || query.to < query.from) { - throw new Error('Invalid pagination parameters'); - } - const limit = query.to - query.from + 1; - if (limit > 100) { - throw new Error('Page size too large. Maximum 100 records per request'); - } - (0, Logger_1.logRequest)('Get organizations by page query started', undefined, undefined, { - from: query.from, - to: query.to, - includeDeleted: query.includeDeleted || false - }); - const result = query.includeDeleted - ? await this.orgRepo.findByPageIncludingDeleted(query.from, query.to) - : await this.orgRepo.findByPage(query.from, query.to); - (0, Logger_1.logRequest)('Get organizations by page query completed', undefined, undefined, { - from: query.from, - to: query.to, - returned: result.organizations.length, - totalCount: result.totalCount, - includeDeleted: query.includeDeleted || false - }); - return { - organizations: OrganizationMapper_1.OrganizationMapper.toShortDtoList(result.organizations), - totalCount: result.totalCount - }; - } - catch (error) { - (0, Logger_1.logError)('GetOrganizationsByPageQueryHandler error', error instanceof Error ? error : new Error(String(error))); - // Handle database errors - if (error instanceof Error && error.message.includes('database')) { - throw new Error('Database connection error'); - } - // Re-throw validation errors as-is - if (error instanceof Error && (error.message.includes('Invalid pagination') || error.message.includes('Page size'))) { - throw error; - } - throw new Error('Failed to retrieve organizations'); - } - } -} -exports.GetOrganizationsByPageQueryHandler = GetOrganizationsByPageQueryHandler; -//# sourceMappingURL=GetOrganizationsByPageQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.js.map b/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.js.map deleted file mode 100644 index 6b154729..00000000 --- a/SerpentRace_Backend/dist/Application/Organization/queries/GetOrganizationsByPageQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetOrganizationsByPageQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/Organization/queries/GetOrganizationsByPageQueryHandler.ts"],"names":[],"mappings":";;;AAGA,8EAA2E;AAC3E,kDAA6D;AAE7D,MAAa,kCAAkC;IAC7C,YAA6B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAG,CAAC;IAEjE,KAAK,CAAC,OAAO,CAAC,KAAkC;QAC9C,IAAI,CAAC;YACH,iCAAiC;YACjC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;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AAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEhH,yBAAyB;YACzB,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBACjE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAC/C,CAAC;YAED,mCAAmC;YACnC,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;gBACpH,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF;AArDD,gFAqDC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Search/Generalsearch.d.ts b/SerpentRace_Backend/dist/Application/Search/Generalsearch.d.ts deleted file mode 100644 index 03a23433..00000000 --- a/SerpentRace_Backend/dist/Application/Search/Generalsearch.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { IUserRepository } from '../../Domain/IRepository/IUserRepository'; -import { IOrganizationRepository } from '../../Domain/IRepository/IOrganizationRepository'; -import { IDeckRepository } from '../../Domain/IRepository/IDeckRepository'; -import { SearchQuery, SearchResult } from '../DTOs/SearchDto'; -import { ShortUserDto } from '../DTOs/UserDto'; -import { ShortOrganizationDto } from '../DTOs/OrganizationDto'; -import { ShortDeckDto } from '../DTOs/DeckDto'; -export type SearchType = 'users' | 'organizations' | 'decks'; -export interface IGeneralSearchService { - searchUsers(searchQuery: SearchQuery): Promise>; - searchOrganizations(searchQuery: SearchQuery): Promise>; - searchDecks(searchQuery: SearchQuery): Promise>; - searchByType(searchType: SearchType, searchQuery: SearchQuery): Promise>; -} -export declare class GeneralSearchService implements IGeneralSearchService { - private userRepo; - private organizationRepo; - private deckRepo; - constructor(userRepo: IUserRepository, organizationRepo: IOrganizationRepository, deckRepo: IDeckRepository); - static getSearchTypeFromUrl(url: string): SearchType; - searchUsers(searchQuery: SearchQuery): Promise>; - searchOrganizations(searchQuery: SearchQuery): Promise>; - searchDecks(searchQuery: SearchQuery): Promise>; - searchByType(searchType: SearchType, searchQuery: SearchQuery): Promise>; - searchFromUrl(url: string, searchQuery: SearchQuery): Promise>; -} -//# sourceMappingURL=Generalsearch.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Search/Generalsearch.d.ts.map b/SerpentRace_Backend/dist/Application/Search/Generalsearch.d.ts.map deleted file mode 100644 index b9dabc25..00000000 --- a/SerpentRace_Backend/dist/Application/Search/Generalsearch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Generalsearch.d.ts","sourceRoot":"","sources":["../../../src/Application/Search/Generalsearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAyB,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAK9D,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,eAAe,GAAG,OAAO,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3E,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC3F,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3E,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,GAAG,oBAAoB,GAAG,YAAY,CAAC,CAAC,CAAC;CAC3I;AAED,qBAAa,oBAAqB,YAAW,qBAAqB;IAE9D,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,QAAQ;gBAFR,QAAQ,EAAE,eAAe,EACzB,gBAAgB,EAAE,uBAAuB,EACzC,QAAQ,EAAE,eAAe;IAGnC,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU;IAW9C,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IA8B1E,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IA0B1F,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IA0B1E,YAAY,CAChB,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,YAAY,CAAC,YAAY,GAAG,oBAAoB,GAAG,YAAY,CAAC,CAAC;IAatE,aAAa,CACjB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,YAAY,CAAC,YAAY,GAAG,oBAAoB,GAAG,YAAY,CAAC,CAAC;CAI7E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Search/Generalsearch.js b/SerpentRace_Backend/dist/Application/Search/Generalsearch.js deleted file mode 100644 index c21a0b15..00000000 --- a/SerpentRace_Backend/dist/Application/Search/Generalsearch.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GeneralSearchService = void 0; -const UserMapper_1 = require("../DTOs/Mappers/UserMapper"); -const OrganizationMapper_1 = require("../DTOs/Mappers/OrganizationMapper"); -const DeckMapper_1 = require("../DTOs/Mappers/DeckMapper"); -class GeneralSearchService { - constructor(userRepo, organizationRepo, deckRepo) { - this.userRepo = userRepo; - this.organizationRepo = organizationRepo; - this.deckRepo = deckRepo; - } - static getSearchTypeFromUrl(url) { - if (url.includes('/users/') || url.includes('/api/users/')) { - return 'users'; - } - else if (url.includes('/organizations/') || url.includes('/api/organizations/')) { - return 'organizations'; - } - else if (url.includes('/decks/') || url.includes('/api/decks/')) { - return 'decks'; - } - return 'users'; - } - async searchUsers(searchQuery) { - const { query, limit = 20, offset = 0 } = searchQuery; - if (!query || query.trim().length === 0) { - return { - results: [], - totalCount: 0, - hasMore: false, - searchQuery: query, - searchType: 'users' - }; - } - try { - const { users, totalCount } = await this.userRepo.search(query.trim(), limit, offset); - const results = users.map(user => UserMapper_1.UserMapper.toShortDto(user)); - const hasMore = (offset + limit) < totalCount; - return { - results, - totalCount, - hasMore, - searchQuery: query, - searchType: 'users' - }; - } - catch (error) { - throw new Error('Failed to search users'); - } - } - async searchOrganizations(searchQuery) { - const { query, limit = 20, offset = 0 } = searchQuery; - if (!query || query.trim().length === 0) { - return { - results: [], - totalCount: 0, - hasMore: false, - searchQuery: query, - searchType: 'organizations' - }; - } - const { organizations, totalCount } = await this.organizationRepo.search(query.trim(), limit, offset); - const results = organizations.map(org => OrganizationMapper_1.OrganizationMapper.toShortDto(org)); - const hasMore = (offset + limit) < totalCount; - return { - results, - totalCount, - hasMore, - searchQuery: query, - searchType: 'organizations' - }; - } - async searchDecks(searchQuery) { - const { query, limit = 20, offset = 0 } = searchQuery; - if (!query || query.trim().length === 0) { - return { - results: [], - totalCount: 0, - hasMore: false, - searchQuery: query, - searchType: 'decks' - }; - } - const { decks, totalCount } = await this.deckRepo.search(query.trim(), limit, offset); - const results = decks.map(deck => DeckMapper_1.DeckMapper.toShortDto(deck)); - const hasMore = (offset + limit) < totalCount; - return { - results, - totalCount, - hasMore, - searchQuery: query, - searchType: 'decks' - }; - } - async searchByType(searchType, searchQuery) { - switch (searchType) { - case 'users': - return await this.searchUsers(searchQuery); - case 'organizations': - return await this.searchOrganizations(searchQuery); - case 'decks': - return await this.searchDecks(searchQuery); - default: - throw new Error(`Unsupported search type: ${searchType}`); - } - } - async searchFromUrl(url, searchQuery) { - const searchType = GeneralSearchService.getSearchTypeFromUrl(url); - return await this.searchByType(searchType, searchQuery); - } -} -exports.GeneralSearchService = GeneralSearchService; -//# sourceMappingURL=Generalsearch.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Search/Generalsearch.js.map b/SerpentRace_Backend/dist/Application/Search/Generalsearch.js.map deleted file mode 100644 index 7dfc0555..00000000 --- a/SerpentRace_Backend/dist/Application/Search/Generalsearch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Generalsearch.js","sourceRoot":"","sources":["../../../src/Application/Search/Generalsearch.ts"],"names":[],"mappings":";;;AAOA,2DAAwD;AACxD,2EAAwE;AACxE,2DAAwD;AAWxD,MAAa,oBAAoB;IAC/B,YACU,QAAyB,EACzB,gBAAyC,EACzC,QAAyB;QAFzB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,qBAAgB,GAAhB,gBAAgB,CAAyB;QACzC,aAAQ,GAAR,QAAQ,CAAiB;IAChC,CAAC;IAEJ,MAAM,CAAC,oBAAoB,CAAC,GAAW;QACrC,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAC3D,OAAO,OAAO,CAAC;QACjB,CAAC;aAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;YAClF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AI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACtF,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,uBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,UAAU,CAAC;QAE9C,OAAO;YACL,OAAO;YACP,UAAU;YACV,OAAO;YACP,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,OAAO;SACpB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,UAAsB,EACtB,WAAwB;QAExB,QAAQ,UAAU,EAAE,CAAC;YACnB,KAAK,OAAO;gBACV,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAqE,CAAC;YACjH,KAAK,eAAe;gBAClB,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAqE,CAAC;YACzH,KAAK,OAAO;gBACV,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAqE,CAAC;YACjH;gBACE,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,EAAE,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,GAAW,EACX,WAAwB;QAExB,MAAM,UAAU,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAClE,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC1D,CAAC;CACF;AA3HD,oDA2HC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.d.ts b/SerpentRace_Backend/dist/Application/Services/AdminBypassService.d.ts deleted file mode 100644 index 5f900fd2..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { UserState } from '../../Domain/User/UserAggregate'; -import { Request, Response } from 'express'; -/** - * Admin Bypass Service - Centralized admin privilege checking and logging - */ -export declare class AdminBypassService { - /** - * Check if user has admin privileges - * @param userState - User's current state - * @returns true if user is admin - */ - static isAdmin(userState: UserState): boolean; - /** - * Check if user should bypass all restrictions - * @param userState - User's current state - * @returns true if restrictions should be bypassed - */ - static shouldBypassRestrictions(userState: UserState): boolean; - /** - * Log admin bypass action for audit trail - * @param action - Description of the action being bypassed - * @param adminUserId - ID of the admin user - * @param targetId - ID of the target resource - * @param details - Additional details about the bypass - * @param req - Optional request object for context - * @param res - Optional response object for context - */ - static logAdminBypass(action: string, adminUserId: string, targetId: string, details?: any, req?: Request, res?: Response): void; -} -/** - * Admin Audit Service - Enhanced logging for all admin actions - */ -export declare class AdminAuditService { - /** - * Log comprehensive admin action for audit trail - * @param action - Action being performed - * @param adminUserId - ID of the admin user - * @param details - Detailed information about the action - * @param req - Request object for context - * @param res - Response object for context - */ - static logAdminAction(action: string, adminUserId: string, details: { - targetType: 'user' | 'organization' | 'deck' | 'contact' | 'chat'; - targetId: string; - operation: 'create' | 'read' | 'update' | 'delete' | 'bypass' | 'export' | 'import'; - changes?: any; - sensitive?: boolean; - metadata?: any; - }, req?: Request, res?: Response): void; - /** - * Log bulk admin operations - * @param action - Bulk action being performed - * @param adminUserId - ID of the admin user - * @param affectedCount - Number of resources affected - * @param targetType - Type of resources affected - * @param req - Request object for context - * @param res - Response object for context - */ - static logBulkAdminAction(action: string, adminUserId: string, affectedCount: number, targetType: string, req?: Request, res?: Response): void; -} -//# sourceMappingURL=AdminBypassService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/AdminBypassService.d.ts.map deleted file mode 100644 index 0c01c86b..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,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AAM,EACnB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,OAAO,EACb,GAAG,CAAC,EAAE,QAAQ,GACf,IAAI;CASV"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.js b/SerpentRace_Backend/dist/Application/Services/AdminBypassService.js deleted file mode 100644 index 82f206d1..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AdminAuditService = exports.AdminBypassService = void 0; -const UserAggregate_1 = require("../../Domain/User/UserAggregate"); -const Logger_1 = require("./Logger"); -/** - * Admin Bypass Service - Centralized admin privilege checking and logging - */ -class AdminBypassService { - /** - * Check if user has admin privileges - * @param userState - User's current state - * @returns true if user is admin - */ - static isAdmin(userState) { - return userState === UserAggregate_1.UserState.ADMIN; - } - /** - * Check if user should bypass all restrictions - * @param userState - User's current state - * @returns true if restrictions should be bypassed - */ - static shouldBypassRestrictions(userState) { - return this.isAdmin(userState); - } - /** - * Log admin bypass action for audit trail - * @param action - Description of the action being bypassed - * @param adminUserId - ID of the admin user - * @param targetId - ID of the target resource - * @param details - Additional details about the bypass - * @param req - Optional request object for context - * @param res - Optional response object for context - */ - static logAdminBypass(action, adminUserId, targetId, details, req, res) { - (0, Logger_1.logAuth)(`ADMIN_BYPASS: ${action}`, adminUserId, { - targetId, - action, - bypassReason: 'Admin privileges', - timestamp: new Date().toISOString(), - ...details - }, req, res); - } -} -exports.AdminBypassService = AdminBypassService; -/** - * Admin Audit Service - Enhanced logging for all admin actions - */ -class AdminAuditService { - /** - * Log comprehensive admin action for audit trail - * @param action - Action being performed - * @param adminUserId - ID of the admin user - * @param details - Detailed information about the action - * @param req - Request object for context - * @param res - Response object for context - */ - static logAdminAction(action, adminUserId, details, req, res) { - const auditData = { - timestamp: new Date().toISOString(), - adminUserId, - action, - ...details, - ip: req?.ip, - userAgent: req?.get('User-Agent'), - endpoint: req?.path, - method: req?.method, - requestId: req?.headers['x-request-id'] || 'unknown' - }; - // Enhanced logging for admin actions - (0, Logger_1.logAuth)(`ADMIN_AUDIT: ${action}`, adminUserId, auditData, req, res); - // Additional security logging for sensitive operations - if (details.sensitive) { - (0, Logger_1.logAuth)(`ADMIN_SENSITIVE: ${action}`, adminUserId, { - ...auditData, - alertLevel: 'HIGH', - requiresReview: true - }, req, res); - } - } - /** - * Log bulk admin operations - * @param action - Bulk action being performed - * @param adminUserId - ID of the admin user - * @param affectedCount - Number of resources affected - * @param targetType - Type of resources affected - * @param req - Request object for context - * @param res - Response object for context - */ - static logBulkAdminAction(action, adminUserId, affectedCount, targetType, req, res) { - this.logAdminAction(`BULK_${action}`, adminUserId, { - targetType: targetType, - targetId: `bulk-${affectedCount}-items`, - operation: 'update', - metadata: { affectedCount }, - sensitive: affectedCount > 10 // Mark large bulk operations as sensitive - }, req, res); - } -} -exports.AdminAuditService = AdminAuditService; -//# sourceMappingURL=AdminBypassService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.js.map b/SerpentRace_Backend/dist/Application/Services/AdminBypassService.js.map deleted file mode 100644 index a39f763e..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AdminBypassService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AdminBypassService.js","sourceRoot":"","sources":["../../../src/Application/Services/AdminBypassService.ts"],"names":[],"mappings":";;;AAAA,mEAA4D;AAC5D,qCAAmC;AAGnC;;GAEG;AACH,MAAa,kBAAkB;IAC3B;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,SAAoB;QAC/B,OAAO,SAAS,KAAK,yBAAS,CAAC,KAAK,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,SAAoB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;;;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;;;;;;;OAQG;IACH,MAAM,CAAC,kBAAkB,CACrB,MAAc,EACd,WAAmB,EACnB,aAAqB,EACrB,UAAkB,EAClB,GAAa,EACb,GAAc;QAEd,IAAI,CAAC,cAAc,CAAC,QAAQ,MAAM,EAAE,EAAE,WAAW,EAAE;YAC/C,UAAU,EAAE,UAAiB;YAC7B,QAAQ,EAAE,QAAQ,aAAa,QAAQ;YACvC,SAAS,EAAE,QAAe;YAC1B,QAAQ,EAAE,EAAE,aAAa,EAAE;YAC3B,SAAS,EAAE,aAAa,GAAG,EAAE,CAAC,0CAA0C;SAC3E,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACjB,CAAC;CACJ;AA1ED,8CA0EC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.d.ts b/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.d.ts deleted file mode 100644 index f7dce2a8..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Request, Response, NextFunction } from 'express'; -import { JWTService } from './JWTService'; -export declare const jwtService: JWTService; -export declare function authRequired(req: Request, res: Response, next: NextFunction): Response> | undefined; -export declare function adminRequired(req: Request, res: Response, next: NextFunction): Response> | undefined; -//# sourceMappingURL=AuthMiddleware.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.d.ts.map b/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.d.ts.map deleted file mode 100644 index c2a3f7f0..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthMiddleware.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/AuthMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,eAAO,MAAM,UAAU,YAAmB,CAAC;AAE3C,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,kDAuB3E;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,kDAyB5E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.js b/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.js deleted file mode 100644 index 995d747d..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jwtService = void 0; -exports.authRequired = authRequired; -exports.adminRequired = adminRequired; -const JWTService_1 = require("./JWTService"); -const Logger_1 = require("./Logger"); -exports.jwtService = new JWTService_1.JWTService(); -function authRequired(req, res, next) { - const payload = exports.jwtService.verify(req); - if (!payload) { - (0, Logger_1.logAuth)('Authentication failed - No valid token', undefined, { - ip: req.ip, - userAgent: req.get ? req.get('User-Agent') : 'unknown', - path: req.path - }, req); - return res.status(401).json({ error: 'Unauthorized' }); - } - (0, Logger_1.logAuth)('Authentication successful', payload.userId, { - authLevel: payload.authLevel, - orgId: payload.orgId - }, req); - const refreshed = exports.jwtService.refreshIfNeeded(payload, res); - if (refreshed) { - (0, Logger_1.logAuth)('Token refreshed', payload.userId, undefined, req); - } - req.user = payload; - next(); -} -function adminRequired(req, res, next) { - const payload = exports.jwtService.verify(req); - if (!payload || payload.authLevel !== 1) { - (0, Logger_1.logWarning)('Admin access denied', { - hasPayload: !!payload, - authLevel: payload?.authLevel, - userId: payload?.userId, - ip: req.ip, - path: req.path - }, req); - return res.status(403).json({ error: 'Forbidden' }); - } - (0, Logger_1.logAuth)('Admin authentication successful', payload.userId, { - authLevel: payload.authLevel, - orgId: payload.orgId - }, req); - const refreshed = exports.jwtService.refreshIfNeeded(payload, res); - if (refreshed) { - (0, Logger_1.logAuth)('Admin token refreshed', payload.userId, undefined, req); - } - req.user = payload; - next(); -} -//# sourceMappingURL=AuthMiddleware.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.js.map b/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.js.map deleted file mode 100644 index 4e66cae6..00000000 --- a/SerpentRace_Backend/dist/Application/Services/AuthMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AuthMiddleware.js","sourceRoot":"","sources":["../../../src/Application/Services/AuthMiddleware.ts"],"names":[],"mappings":";;;AAMA,oCAuBC;AAED,sCAyBC;AAvDD,6CAA0C;AAC1C,qCAA+C;AAElC,QAAA,UAAU,GAAG,IAAI,uBAAU,EAAE,CAAC;AAE3C,SAAgB,YAAY,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;IACxE,MAAM,OAAO,GAAG,kBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,IAAA,gBAAO,EAAC,wCAAwC,EAAE,SAAS,EAAE;YACzD,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS;YACtD,IAAI,EAAE,GAAG,CAAC,IAAI;SACjB,EAAE,GAAG,CAAC,CAAC;QACR,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,IAAA,gBAAO,EAAC,2BAA2B,EAAE,OAAO,CAAC,MAAM,EAAE;QACjD,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;KACvB,EAAE,GAAG,CAA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CAAC;IACrE,CAAC;IAEA,GAAW,CAAC,IAAI,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.d.ts b/SerpentRace_Backend/dist/Application/Services/ContactEmailService.d.ts deleted file mode 100644 index 984a761c..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { IContactRepository } from '../../Domain/IRepository/IContactRepository'; -import { ContactType } from '../../Domain/Contact/ContactAggregate'; -export interface EmailResponseData { - to: string; - message: string; - contactId: string; - adminUserId: string; - contactName: string; - contactType: ContactType; - originalMessage: string; - language?: 'en' | 'hu' | 'de'; -} -export declare class ContactEmailService { - private readonly contactRepo; - private emailService; - constructor(contactRepo: IContactRepository); - sendResponse(responseData: EmailResponseData): Promise; - private getLocalizedContactResponseSubject; - private getContactTypeString; - private getContactTypeBadge; -} -//# sourceMappingURL=ContactEmailService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/ContactEmailService.d.ts.map deleted file mode 100644 index ef7ef956..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactEmailService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/ContactEmailService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAIpE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC/B;AAED,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAFxC,OAAO,CAAC,YAAY,CAAe;gBAEN,WAAW,EAAE,kBAAkB;IAItD,YAAY,CAAC,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAkDlE,OAAO,CAAC,kCAAkC;IAW1C,OAAO,CAAC,oBAAoB;IAgC5B,OAAO,CAAC,mBAAmB;CAgB5B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.js b/SerpentRace_Backend/dist/Application/Services/ContactEmailService.js deleted file mode 100644 index cb2d41a3..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContactEmailService = void 0; -const EmailService_1 = require("./EmailService"); -const ContactAggregate_1 = require("../../Domain/Contact/ContactAggregate"); -const Logger_1 = require("./Logger"); -const EmailTemplateHelper_1 = require("./EmailTemplateHelper"); -class ContactEmailService { - constructor(contactRepo) { - this.contactRepo = contactRepo; - this.emailService = new EmailService_1.EmailService(); - } - async sendResponse(responseData) { - try { - // First update the contact with the response - await this.contactRepo.update(responseData.contactId, { - adminResponse: responseData.message, - responseDate: new Date(), - respondedBy: responseData.adminUserId, - }); - // Determine language and template - const language = responseData.language || 'en'; - const templateName = language === 'en' ? 'contact-response' : `contact-response-${language}`; - // Prepare template data - const templateData = { - contactName: responseData.contactName, - contactTypeString: this.getContactTypeString(responseData.contactType, language), - contactTypeBadge: this.getContactTypeBadge(responseData.contactType), - originalMessage: responseData.originalMessage, - adminResponse: responseData.message, - companyName: 'SerpentRace', - supportEmail: 'support@serpentrace.com' - }; - // Send email using EmailService with template - const emailSent = await this.emailService.sendEmail({ - to: responseData.to, - subject: this.getLocalizedContactResponseSubject(language), - template: templateName, - templateData - }); - if (emailSent) { - (0, Logger_1.logOther)('Contact response email sent successfully', { - to: responseData.to, - subject: this.getLocalizedContactResponseSubject(language), - contactId: responseData.contactId, - respondedBy: responseData.adminUserId, - language - }); - } - else { - throw new Error('Email service failed to send email'); - } - } - catch (error) { - (0, Logger_1.logError)('Failed to send contact response email', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to send email response'); - } - } - getLocalizedContactResponseSubject(language) { - const subjects = { - contactResponse: { - en: 'SerpentRace - Response to Your Message', - hu: 'SerpentRace - Válasz az üzenetére', - de: 'SerpentRace - Antwort auf Ihre Nachricht' - } - }; - return EmailTemplateHelper_1.EmailTemplateHelper.getLocalizedSubject('contactResponse', subjects, language); - } - getContactTypeString(type, language = 'en') { - const translations = { - [ContactAggregate_1.ContactType.BUG]: { - en: 'Bug Report', - hu: 'Hiba bejelentés', - de: 'Fehlerbericht' - }, - [ContactAggregate_1.ContactType.PROBLEM]: { - en: 'Problem', - hu: 'Probléma', - de: 'Problem' - }, - [ContactAggregate_1.ContactType.QUESTION]: { - en: 'Question', - hu: 'Kérdés', - de: 'Frage' - }, - [ContactAggregate_1.ContactType.SALES]: { - en: 'Sales Inquiry', - hu: 'Értékesítési kérdés', - de: 'Verkaufsanfrage' - }, - [ContactAggregate_1.ContactType.OTHER]: { - en: 'General Inquiry', - hu: 'Általános kérdés', - de: 'Allgemeine Anfrage' - } - }; - return translations[type]?.[language] || translations[type]?.['en'] || 'Contact'; - } - getContactTypeBadge(type) { - switch (type) { - case ContactAggregate_1.ContactType.BUG: - return 'bug'; - case ContactAggregate_1.ContactType.PROBLEM: - return 'problem'; - case ContactAggregate_1.ContactType.QUESTION: - return 'question'; - case ContactAggregate_1.ContactType.SALES: - return 'sales'; - case ContactAggregate_1.ContactType.OTHER: - return 'other'; - default: - return 'other'; - } - } -} -exports.ContactEmailService = ContactEmailService; -//# sourceMappingURL=ContactEmailService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.js.map b/SerpentRace_Backend/dist/Application/Services/ContactEmailService.js.map deleted file mode 100644 index 49003197..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ContactEmailService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactEmailService.js","sourceRoot":"","sources":["../../../src/Application/Services/ContactEmailService.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAC9C,4EAAoE;AACpE,qCAA8C;AAC9C,+DAA+E;AAa/E,MAAa,mBAAmB;IAG9B,YAA6B,WAA+B;QAA/B,gBAAW,GAAX,WAAW,CAAoB;QAC1D,IAAI,CAAC,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,YAA+B;QAChD,IAAI,CAAC;YACH,6CAA6C;YAC7C,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE;gBACpD,aAAa,EAAE,YAAY,CAAC,OAAO;gBACnC,YAAY,EAAE,IAAI,IAAI,EAAE;gBACxB,WAAW,EAAE,YAAY,CAAC,WAAW;aACtC,CAAC,CAAC;YAEH,kCAAkC;YAClC,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,IAAI,IAAI,CAAC;YAC/C,MAAM,YAAY,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,QAAQ,EAAE,CAAC;YAE7F,wBAAwB;YACxB,MAAM,YAAY,GAAG;gBACnB,WAAW,EAAE,YAAY,CAAC,WAAW;gBACrC,iBAAiB,EAAE,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC;gBAChF,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,WAAW,CAAC;gBACpE,eAAe,EAAE,YAAY,CAAC,eAAe;gBAC7C,aAAa,EAAE,YAAY,CAAC,OAAO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AAC;CACF;AApHD,kDAoHC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DIContainer.d.ts b/SerpentRace_Backend/dist/Application/Services/DIContainer.d.ts deleted file mode 100644 index 1e3a1aef..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DIContainer.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -import { IUserRepository } from '../../Domain/IRepository/IUserRepository'; -import { IChatRepository } from '../../Domain/IRepository/IChatRepository'; -import { IChatArchiveRepository } from '../../Domain/IRepository/IChatArchiveRepository'; -import { IDeckRepository } from '../../Domain/IRepository/IDeckRepository'; -import { IOrganizationRepository } from '../../Domain/IRepository/IOrganizationRepository'; -import { IContactRepository } from '../../Domain/IRepository/IContactRepository'; -import { CreateUserCommandHandler } from '../User/commands/CreateUserCommandHandler'; -import { LoginCommandHandler } from '../User/commands/LoginCommandHandler'; -import { UpdateUserCommandHandler } from '../User/commands/UpdateUserCommandHandler'; -import { DeactivateUserCommandHandler } from '../User/commands/DeactivateUserCommandHandler'; -import { DeleteUserCommandHandler } from '../User/commands/DeleteUserCommandHandler'; -import { VerifyEmailCommandHandler } from '../User/commands/VerifyEmailCommandHandler'; -import { RequestPasswordResetCommandHandler } from '../User/commands/RequestPasswordResetCommandHandler'; -import { ResetPasswordCommandHandler } from '../User/commands/ResetPasswordCommandHandler'; -import { CreateChatCommandHandler } from '../Chat/commands/CreateChatCommandHandler'; -import { SendMessageCommandHandler } from '../Chat/commands/SendMessageCommandHandler'; -import { ArchiveChatCommandHandler, RestoreChatCommandHandler } from '../Chat/commands/ChatArchiveCommandHandlers'; -import { CreateDeckCommandHandler } from '../Deck/commands/CreateDeckCommandHandler'; -import { UpdateDeckCommandHandler } from '../Deck/commands/UpdateDeckCommandHandler'; -import { DeleteDeckCommandHandler } from '../Deck/commands/DeleteDeckCommandHandler'; -import { CreateOrganizationCommandHandler } from '../Organization/commands/CreateOrganizationCommandHandler'; -import { UpdateOrganizationCommandHandler } from '../Organization/commands/UpdateOrganizationCommandHandler'; -import { DeleteOrganizationCommandHandler } from '../Organization/commands/DeleteOrganizationCommandHandler'; -import { ProcessOrgAuthCallbackCommandHandler } from '../Organization/commands/ProcessOrgAuthCallbackCommandHandler'; -import { CreateContactCommandHandler } from '../Contact/commands/CreateContactCommandHandler'; -import { UpdateContactCommandHandler } from '../Contact/commands/UpdateContactCommandHandler'; -import { DeleteContactCommandHandler } from '../Contact/commands/DeleteContactCommandHandler'; -import { GetUserByIdQueryHandler } from '../User/queries/GetUserByIdQueryHandler'; -import { GetUsersByPageQueryHandler } from '../User/queries/GetUsersByPageQueryHandler'; -import { GetUserChatsQueryHandler } from '../Chat/queries/GetUserChatsQueryHandler'; -import { GetChatHistoryQueryHandler, GetArchivedChatsQueryHandler } from '../Chat/queries/ChatHistoryQueryHandlers'; -import { GetChatsByPageQueryHandler } from '../Chat/queries/GetChatsByPageQueryHandler'; -import { GetDeckByIdQueryHandler } from '../Deck/queries/GetDeckByIdQueryHandler'; -import { GetDecksByPageQueryHandler } from '../Deck/queries/GetDecksByPageQueryHandler'; -import { GetOrganizationByIdQueryHandler } from '../Organization/queries/GetOrganizationByIdQueryHandler'; -import { GetOrganizationsByPageQueryHandler } from '../Organization/queries/GetOrganizationsByPageQueryHandler'; -import { GetOrganizationLoginUrlQueryHandler } from '../Organization/queries/GetOrganizationLoginUrlQueryHandler'; -import { GetContactByIdQueryHandler } from '../Contact/queries/GetContactByIdQueryHandler'; -import { GetContactsByPageQueryHandler } from '../Contact/queries/GetContactsByPageQueryHandler'; -import { JWTService } from './JWTService'; -import { ContactEmailService } from './ContactEmailService'; -import { DeckImportExportService } from './DeckImportExportService'; -/** - * Central Dependency Injection Container - * Manages all repositories, command handlers, and query handlers as singletons - */ -export declare class DIContainer { - private static instance; - private _userRepository; - private _chatRepository; - private _chatArchiveRepository; - private _deckRepository; - private _organizationRepository; - private _contactRepository; - private _jwtService; - private _contactEmailService; - private _deckImportExportService; - private _createUserCommandHandler; - private _loginCommandHandler; - private _updateUserCommandHandler; - private _deactivateUserCommandHandler; - private _deleteUserCommandHandler; - private _verifyEmailCommandHandler; - private _requestPasswordResetCommandHandler; - private _resetPasswordCommandHandler; - private _createChatCommandHandler; - private _sendMessageCommandHandler; - private _archiveChatCommandHandler; - private _restoreChatCommandHandler; - private _createDeckCommandHandler; - private _updateDeckCommandHandler; - private _deleteDeckCommandHandler; - private _createOrganizationCommandHandler; - private _updateOrganizationCommandHandler; - private _deleteOrganizationCommandHandler; - private _processOrgAuthCallbackCommandHandler; - private _createContactCommandHandler; - private _updateContactCommandHandler; - private _deleteContactCommandHandler; - private _getUserByIdQueryHandler; - private _getUsersByPageQueryHandler; - private _getUserChatsQueryHandler; - private _getChatHistoryQueryHandler; - private _getArchivedChatsQueryHandler; - private _getChatsByPageQueryHandler; - private _getDeckByIdQueryHandler; - private _getDecksByPageQueryHandler; - private _getOrganizationByIdQueryHandler; - private _getOrganizationsByPageQueryHandler; - private _getOrganizationLoginUrlQueryHandler; - private _getContactByIdQueryHandler; - private _getContactsByPageQueryHandler; - private constructor(); - static getInstance(): DIContainer; - get userRepository(): IUserRepository; - get chatRepository(): IChatRepository; - get chatArchiveRepository(): IChatArchiveRepository; - get deckRepository(): IDeckRepository; - get organizationRepository(): IOrganizationRepository; - get contactRepository(): IContactRepository; - get jwtService(): JWTService; - get contactEmailService(): ContactEmailService; - get deckImportExportService(): DeckImportExportService; - get createUserCommandHandler(): CreateUserCommandHandler; - get loginCommandHandler(): LoginCommandHandler; - get updateUserCommandHandler(): UpdateUserCommandHandler; - get deactivateUserCommandHandler(): DeactivateUserCommandHandler; - get deleteUserCommandHandler(): DeleteUserCommandHandler; - get verifyEmailCommandHandler(): VerifyEmailCommandHandler; - get requestPasswordResetCommandHandler(): RequestPasswordResetCommandHandler; - get resetPasswordCommandHandler(): ResetPasswordCommandHandler; - get createChatCommandHandler(): CreateChatCommandHandler; - get sendMessageCommandHandler(): SendMessageCommandHandler; - get archiveChatCommandHandler(): ArchiveChatCommandHandler; - get restoreChatCommandHandler(): RestoreChatCommandHandler; - get createDeckCommandHandler(): CreateDeckCommandHandler; - get updateDeckCommandHandler(): UpdateDeckCommandHandler; - get deleteDeckCommandHandler(): DeleteDeckCommandHandler; - get createOrganizationCommandHandler(): CreateOrganizationCommandHandler; - get updateOrganizationCommandHandler(): UpdateOrganizationCommandHandler; - get deleteOrganizationCommandHandler(): DeleteOrganizationCommandHandler; - get processOrgAuthCallbackCommandHandler(): ProcessOrgAuthCallbackCommandHandler; - get createContactCommandHandler(): CreateContactCommandHandler; - get updateContactCommandHandler(): UpdateContactCommandHandler; - get deleteContactCommandHandler(): DeleteContactCommandHandler; - get getUserByIdQueryHandler(): GetUserByIdQueryHandler; - get getUserChatsQueryHandler(): GetUserChatsQueryHandler; - get getChatHistoryQueryHandler(): GetChatHistoryQueryHandler; - get getArchivedChatsQueryHandler(): GetArchivedChatsQueryHandler; - get getDeckByIdQueryHandler(): GetDeckByIdQueryHandler; - get getOrganizationByIdQueryHandler(): GetOrganizationByIdQueryHandler; - get getOrganizationLoginUrlQueryHandler(): GetOrganizationLoginUrlQueryHandler; - get getContactByIdQueryHandler(): GetContactByIdQueryHandler; - get getContactsByPageQueryHandler(): GetContactsByPageQueryHandler; - get getUsersByPageQueryHandler(): GetUsersByPageQueryHandler; - get getDecksByPageQueryHandler(): GetDecksByPageQueryHandler; - get getOrganizationsByPageQueryHandler(): GetOrganizationsByPageQueryHandler; - get getChatsByPageQueryHandler(): GetChatsByPageQueryHandler; -} -export declare const container: DIContainer; -//# sourceMappingURL=DIContainer.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DIContainer.d.ts.map b/SerpentRace_Backend/dist/Application/Services/DIContainer.d.ts.map deleted file mode 100644 index 58fbc1bd..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DIContainer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DIContainer.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/DIContainer.ts"],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gCAAgC,CAK9E;IAED,IAAW,gCAAgC,IAAI,gCAAgC,CAK9E;IAED,IAAW,oCAAoC,IAAI,oCAAoC,CAKtF;IAED,IAAW,2BAA2B,IAAI,2BAA2B,CAKpE;IAED,IAAW,2BAA2B,IAAI,2BAA2B,CAKpE;IAED,IAAW,2BAA2B,IAAI,2BAA2B,CAKpE;IAGD,IAAW,uBAAuB,IAAI,uBAAuB,CAK5D;IAED,IAAW,wBAAwB,IAAI,wBAAwB,CAK9D;IAED,IAAW,0BAA0B,IAAI,0BAA0B,CAKlE;IAED,IAAW,4BAA4B,IAAI,4BAA4B,CAKtE;IAED,IAAW,uBAAuB,IAAI,uBAAuB,CAK5D;IAED,IAAW,+BAA+B,IAAI,+BAA+B,CAK5E;IAED,IAAW,mCAAmC,IAAI,mCAAmC,CAKpF;IAED,IAAW,0BAA0B,IAAI,0BAA0B,CAKlE;IAED,IAAW,6BAA6B,IAAI,6BAA6B,CAKxE;IAGD,IAAW,0BAA0B,IAAI,0BAA0B,CAKlE;IAED,IAAW,0BAA0B,IAAI,0BAA0B,CAKlE;IAED,IAAW,kCAAkC,IAAI,kCAAkC,CAKlF;IAED,IAAW,0BAA0B,IAAI,0BAA0B,CAKlE;CACJ;AAGD,eAAO,MAAM,SAAS,aAA4B,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DIContainer.js b/SerpentRace_Backend/dist/Application/Services/DIContainer.js deleted file mode 100644 index 2d838bf4..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DIContainer.js +++ /dev/null @@ -1,384 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.container = exports.DIContainer = void 0; -// Repository Implementations -const UserRepository_1 = require("../../Infrastructure/Repository/UserRepository"); -const ChatRepository_1 = require("../../Infrastructure/Repository/ChatRepository"); -const ChatArchiveRepository_1 = require("../../Infrastructure/Repository/ChatArchiveRepository"); -const DeckRepository_1 = require("../../Infrastructure/Repository/DeckRepository"); -const OrganizationRepository_1 = require("../../Infrastructure/Repository/OrganizationRepository"); -const ContactRepository_1 = require("../../Infrastructure/Repository/ContactRepository"); -// Command Handlers -const CreateUserCommandHandler_1 = require("../User/commands/CreateUserCommandHandler"); -const LoginCommandHandler_1 = require("../User/commands/LoginCommandHandler"); -const UpdateUserCommandHandler_1 = require("../User/commands/UpdateUserCommandHandler"); -const DeactivateUserCommandHandler_1 = require("../User/commands/DeactivateUserCommandHandler"); -const DeleteUserCommandHandler_1 = require("../User/commands/DeleteUserCommandHandler"); -const VerifyEmailCommandHandler_1 = require("../User/commands/VerifyEmailCommandHandler"); -const RequestPasswordResetCommandHandler_1 = require("../User/commands/RequestPasswordResetCommandHandler"); -const ResetPasswordCommandHandler_1 = require("../User/commands/ResetPasswordCommandHandler"); -const CreateChatCommandHandler_1 = require("../Chat/commands/CreateChatCommandHandler"); -const SendMessageCommandHandler_1 = require("../Chat/commands/SendMessageCommandHandler"); -const ChatArchiveCommandHandlers_1 = require("../Chat/commands/ChatArchiveCommandHandlers"); -const CreateDeckCommandHandler_1 = require("../Deck/commands/CreateDeckCommandHandler"); -const UpdateDeckCommandHandler_1 = require("../Deck/commands/UpdateDeckCommandHandler"); -const DeleteDeckCommandHandler_1 = require("../Deck/commands/DeleteDeckCommandHandler"); -const CreateOrganizationCommandHandler_1 = require("../Organization/commands/CreateOrganizationCommandHandler"); -const UpdateOrganizationCommandHandler_1 = require("../Organization/commands/UpdateOrganizationCommandHandler"); -const DeleteOrganizationCommandHandler_1 = require("../Organization/commands/DeleteOrganizationCommandHandler"); -const ProcessOrgAuthCallbackCommandHandler_1 = require("../Organization/commands/ProcessOrgAuthCallbackCommandHandler"); -const CreateContactCommandHandler_1 = require("../Contact/commands/CreateContactCommandHandler"); -const UpdateContactCommandHandler_1 = require("../Contact/commands/UpdateContactCommandHandler"); -const DeleteContactCommandHandler_1 = require("../Contact/commands/DeleteContactCommandHandler"); -// Query Handlers -const GetUserByIdQueryHandler_1 = require("../User/queries/GetUserByIdQueryHandler"); -const GetUsersByPageQueryHandler_1 = require("../User/queries/GetUsersByPageQueryHandler"); -const GetUserChatsQueryHandler_1 = require("../Chat/queries/GetUserChatsQueryHandler"); -const ChatHistoryQueryHandlers_1 = require("../Chat/queries/ChatHistoryQueryHandlers"); -const GetChatsByPageQueryHandler_1 = require("../Chat/queries/GetChatsByPageQueryHandler"); -const GetDeckByIdQueryHandler_1 = require("../Deck/queries/GetDeckByIdQueryHandler"); -const GetDecksByPageQueryHandler_1 = require("../Deck/queries/GetDecksByPageQueryHandler"); -const GetOrganizationByIdQueryHandler_1 = require("../Organization/queries/GetOrganizationByIdQueryHandler"); -const GetOrganizationsByPageQueryHandler_1 = require("../Organization/queries/GetOrganizationsByPageQueryHandler"); -const GetOrganizationLoginUrlQueryHandler_1 = require("../Organization/queries/GetOrganizationLoginUrlQueryHandler"); -const GetContactByIdQueryHandler_1 = require("../Contact/queries/GetContactByIdQueryHandler"); -const GetContactsByPageQueryHandler_1 = require("../Contact/queries/GetContactsByPageQueryHandler"); -// Services -const JWTService_1 = require("./JWTService"); -const ContactEmailService_1 = require("./ContactEmailService"); -const DeckImportExportService_1 = require("./DeckImportExportService"); -/** - * Central Dependency Injection Container - * Manages all repositories, command handlers, and query handlers as singletons - */ -class DIContainer { - constructor() { - // Repositories - Using interfaces for better abstraction - this._userRepository = null; - this._chatRepository = null; - this._chatArchiveRepository = null; - this._deckRepository = null; - this._organizationRepository = null; - this._contactRepository = null; - // Services - this._jwtService = null; - this._contactEmailService = null; - this._deckImportExportService = null; - // Command Handlers - this._createUserCommandHandler = null; - this._loginCommandHandler = null; - this._updateUserCommandHandler = null; - this._deactivateUserCommandHandler = null; - this._deleteUserCommandHandler = null; - this._verifyEmailCommandHandler = null; - this._requestPasswordResetCommandHandler = null; - this._resetPasswordCommandHandler = null; - this._createChatCommandHandler = null; - this._sendMessageCommandHandler = null; - this._archiveChatCommandHandler = null; - this._restoreChatCommandHandler = null; - this._createDeckCommandHandler = null; - this._updateDeckCommandHandler = null; - this._deleteDeckCommandHandler = null; - this._createOrganizationCommandHandler = null; - this._updateOrganizationCommandHandler = null; - this._deleteOrganizationCommandHandler = null; - this._processOrgAuthCallbackCommandHandler = null; - this._createContactCommandHandler = null; - this._updateContactCommandHandler = null; - this._deleteContactCommandHandler = null; - // Query Handlers - this._getUserByIdQueryHandler = null; - this._getUsersByPageQueryHandler = null; - this._getUserChatsQueryHandler = null; - this._getChatHistoryQueryHandler = null; - this._getArchivedChatsQueryHandler = null; - this._getChatsByPageQueryHandler = null; - this._getDeckByIdQueryHandler = null; - this._getDecksByPageQueryHandler = null; - this._getOrganizationByIdQueryHandler = null; - this._getOrganizationsByPageQueryHandler = null; - this._getOrganizationLoginUrlQueryHandler = null; - this._getContactByIdQueryHandler = null; - this._getContactsByPageQueryHandler = null; - } - static getInstance() { - if (!DIContainer.instance) { - DIContainer.instance = new DIContainer(); - } - return DIContainer.instance; - } - // Repository getters - Return interfaces for better abstraction - get userRepository() { - if (!this._userRepository) { - this._userRepository = new UserRepository_1.UserRepository(); - } - return this._userRepository; - } - get chatRepository() { - if (!this._chatRepository) { - this._chatRepository = new ChatRepository_1.ChatRepository(); - } - return this._chatRepository; - } - get chatArchiveRepository() { - if (!this._chatArchiveRepository) { - this._chatArchiveRepository = new ChatArchiveRepository_1.ChatArchiveRepository(); - } - return this._chatArchiveRepository; - } - get deckRepository() { - if (!this._deckRepository) { - this._deckRepository = new DeckRepository_1.DeckRepository(); - } - return this._deckRepository; - } - get organizationRepository() { - if (!this._organizationRepository) { - this._organizationRepository = new OrganizationRepository_1.OrganizationRepository(); - } - return this._organizationRepository; - } - get contactRepository() { - if (!this._contactRepository) { - this._contactRepository = new ContactRepository_1.ContactRepository(); - } - return this._contactRepository; - } - // Services getters - get jwtService() { - if (!this._jwtService) { - this._jwtService = new JWTService_1.JWTService(); - } - return this._jwtService; - } - get contactEmailService() { - if (!this._contactEmailService) { - this._contactEmailService = new ContactEmailService_1.ContactEmailService(this.contactRepository); - } - return this._contactEmailService; - } - get deckImportExportService() { - if (!this._deckImportExportService) { - this._deckImportExportService = new DeckImportExportService_1.DeckImportExportService(this.deckRepository); - } - return this._deckImportExportService; - } - // Command Handler getters - get createUserCommandHandler() { - if (!this._createUserCommandHandler) { - this._createUserCommandHandler = new CreateUserCommandHandler_1.CreateUserCommandHandler(this.userRepository); - } - return this._createUserCommandHandler; - } - get loginCommandHandler() { - if (!this._loginCommandHandler) { - this._loginCommandHandler = new LoginCommandHandler_1.LoginCommandHandler(this.userRepository, this.jwtService, this.organizationRepository); - } - return this._loginCommandHandler; - } - get updateUserCommandHandler() { - if (!this._updateUserCommandHandler) { - this._updateUserCommandHandler = new UpdateUserCommandHandler_1.UpdateUserCommandHandler(this.userRepository); - } - return this._updateUserCommandHandler; - } - get deactivateUserCommandHandler() { - if (!this._deactivateUserCommandHandler) { - this._deactivateUserCommandHandler = new DeactivateUserCommandHandler_1.DeactivateUserCommandHandler(this.userRepository); - } - return this._deactivateUserCommandHandler; - } - get deleteUserCommandHandler() { - if (!this._deleteUserCommandHandler) { - this._deleteUserCommandHandler = new DeleteUserCommandHandler_1.DeleteUserCommandHandler(this.userRepository); - } - return this._deleteUserCommandHandler; - } - get verifyEmailCommandHandler() { - if (!this._verifyEmailCommandHandler) { - this._verifyEmailCommandHandler = new VerifyEmailCommandHandler_1.VerifyEmailCommandHandler(this.userRepository); - } - return this._verifyEmailCommandHandler; - } - get requestPasswordResetCommandHandler() { - if (!this._requestPasswordResetCommandHandler) { - this._requestPasswordResetCommandHandler = new RequestPasswordResetCommandHandler_1.RequestPasswordResetCommandHandler(this.userRepository); - } - return this._requestPasswordResetCommandHandler; - } - get resetPasswordCommandHandler() { - if (!this._resetPasswordCommandHandler) { - this._resetPasswordCommandHandler = new ResetPasswordCommandHandler_1.ResetPasswordCommandHandler(this.userRepository); - } - return this._resetPasswordCommandHandler; - } - get createChatCommandHandler() { - if (!this._createChatCommandHandler) { - this._createChatCommandHandler = new CreateChatCommandHandler_1.CreateChatCommandHandler(this.chatRepository, this.userRepository); - } - return this._createChatCommandHandler; - } - get sendMessageCommandHandler() { - if (!this._sendMessageCommandHandler) { - this._sendMessageCommandHandler = new SendMessageCommandHandler_1.SendMessageCommandHandler(this.chatRepository); - } - return this._sendMessageCommandHandler; - } - get archiveChatCommandHandler() { - if (!this._archiveChatCommandHandler) { - this._archiveChatCommandHandler = new ChatArchiveCommandHandlers_1.ArchiveChatCommandHandler(this.chatRepository); - } - return this._archiveChatCommandHandler; - } - get restoreChatCommandHandler() { - if (!this._restoreChatCommandHandler) { - this._restoreChatCommandHandler = new ChatArchiveCommandHandlers_1.RestoreChatCommandHandler(this.chatRepository); - } - return this._restoreChatCommandHandler; - } - get createDeckCommandHandler() { - if (!this._createDeckCommandHandler) { - this._createDeckCommandHandler = new CreateDeckCommandHandler_1.CreateDeckCommandHandler(this.deckRepository, this.userRepository, this.organizationRepository); - } - return this._createDeckCommandHandler; - } - get updateDeckCommandHandler() { - if (!this._updateDeckCommandHandler) { - this._updateDeckCommandHandler = new UpdateDeckCommandHandler_1.UpdateDeckCommandHandler(this.deckRepository); - } - return this._updateDeckCommandHandler; - } - get deleteDeckCommandHandler() { - if (!this._deleteDeckCommandHandler) { - this._deleteDeckCommandHandler = new DeleteDeckCommandHandler_1.DeleteDeckCommandHandler(this.deckRepository); - } - return this._deleteDeckCommandHandler; - } - get createOrganizationCommandHandler() { - if (!this._createOrganizationCommandHandler) { - this._createOrganizationCommandHandler = new CreateOrganizationCommandHandler_1.CreateOrganizationCommandHandler(this.organizationRepository); - } - return this._createOrganizationCommandHandler; - } - get updateOrganizationCommandHandler() { - if (!this._updateOrganizationCommandHandler) { - this._updateOrganizationCommandHandler = new UpdateOrganizationCommandHandler_1.UpdateOrganizationCommandHandler(this.organizationRepository); - } - return this._updateOrganizationCommandHandler; - } - get deleteOrganizationCommandHandler() { - if (!this._deleteOrganizationCommandHandler) { - this._deleteOrganizationCommandHandler = new DeleteOrganizationCommandHandler_1.DeleteOrganizationCommandHandler(this.organizationRepository); - } - return this._deleteOrganizationCommandHandler; - } - get processOrgAuthCallbackCommandHandler() { - if (!this._processOrgAuthCallbackCommandHandler) { - this._processOrgAuthCallbackCommandHandler = new ProcessOrgAuthCallbackCommandHandler_1.ProcessOrgAuthCallbackCommandHandler(this.userRepository, this.organizationRepository); - } - return this._processOrgAuthCallbackCommandHandler; - } - get createContactCommandHandler() { - if (!this._createContactCommandHandler) { - this._createContactCommandHandler = new CreateContactCommandHandler_1.CreateContactCommandHandler(this.contactRepository); - } - return this._createContactCommandHandler; - } - get updateContactCommandHandler() { - if (!this._updateContactCommandHandler) { - this._updateContactCommandHandler = new UpdateContactCommandHandler_1.UpdateContactCommandHandler(this.contactRepository); - } - return this._updateContactCommandHandler; - } - get deleteContactCommandHandler() { - if (!this._deleteContactCommandHandler) { - this._deleteContactCommandHandler = new DeleteContactCommandHandler_1.DeleteContactCommandHandler(this.contactRepository); - } - return this._deleteContactCommandHandler; - } - // Query Handler getters - get getUserByIdQueryHandler() { - if (!this._getUserByIdQueryHandler) { - this._getUserByIdQueryHandler = new GetUserByIdQueryHandler_1.GetUserByIdQueryHandler(this.userRepository); - } - return this._getUserByIdQueryHandler; - } - get getUserChatsQueryHandler() { - if (!this._getUserChatsQueryHandler) { - this._getUserChatsQueryHandler = new GetUserChatsQueryHandler_1.GetUserChatsQueryHandler(this.chatRepository, this.chatArchiveRepository); - } - return this._getUserChatsQueryHandler; - } - get getChatHistoryQueryHandler() { - if (!this._getChatHistoryQueryHandler) { - this._getChatHistoryQueryHandler = new ChatHistoryQueryHandlers_1.GetChatHistoryQueryHandler(this.chatRepository, this.chatArchiveRepository); - } - return this._getChatHistoryQueryHandler; - } - get getArchivedChatsQueryHandler() { - if (!this._getArchivedChatsQueryHandler) { - this._getArchivedChatsQueryHandler = new ChatHistoryQueryHandlers_1.GetArchivedChatsQueryHandler(this.chatArchiveRepository); - } - return this._getArchivedChatsQueryHandler; - } - get getDeckByIdQueryHandler() { - if (!this._getDeckByIdQueryHandler) { - this._getDeckByIdQueryHandler = new GetDeckByIdQueryHandler_1.GetDeckByIdQueryHandler(this.deckRepository); - } - return this._getDeckByIdQueryHandler; - } - get getOrganizationByIdQueryHandler() { - if (!this._getOrganizationByIdQueryHandler) { - this._getOrganizationByIdQueryHandler = new GetOrganizationByIdQueryHandler_1.GetOrganizationByIdQueryHandler(this.organizationRepository); - } - return this._getOrganizationByIdQueryHandler; - } - get getOrganizationLoginUrlQueryHandler() { - if (!this._getOrganizationLoginUrlQueryHandler) { - this._getOrganizationLoginUrlQueryHandler = new GetOrganizationLoginUrlQueryHandler_1.GetOrganizationLoginUrlQueryHandler(this.organizationRepository); - } - return this._getOrganizationLoginUrlQueryHandler; - } - get getContactByIdQueryHandler() { - if (!this._getContactByIdQueryHandler) { - this._getContactByIdQueryHandler = new GetContactByIdQueryHandler_1.GetContactByIdQueryHandler(this.contactRepository); - } - return this._getContactByIdQueryHandler; - } - get getContactsByPageQueryHandler() { - if (!this._getContactsByPageQueryHandler) { - this._getContactsByPageQueryHandler = new GetContactsByPageQueryHandler_1.GetContactsByPageQueryHandler(this.contactRepository); - } - return this._getContactsByPageQueryHandler; - } - // New paginated query handlers - get getUsersByPageQueryHandler() { - if (!this._getUsersByPageQueryHandler) { - this._getUsersByPageQueryHandler = new GetUsersByPageQueryHandler_1.GetUsersByPageQueryHandler(this.userRepository); - } - return this._getUsersByPageQueryHandler; - } - get getDecksByPageQueryHandler() { - if (!this._getDecksByPageQueryHandler) { - this._getDecksByPageQueryHandler = new GetDecksByPageQueryHandler_1.GetDecksByPageQueryHandler(this.deckRepository); - } - return this._getDecksByPageQueryHandler; - } - get getOrganizationsByPageQueryHandler() { - if (!this._getOrganizationsByPageQueryHandler) { - this._getOrganizationsByPageQueryHandler = new GetOrganizationsByPageQueryHandler_1.GetOrganizationsByPageQueryHandler(this.organizationRepository); - } - return this._getOrganizationsByPageQueryHandler; - } - get getChatsByPageQueryHandler() { - if (!this._getChatsByPageQueryHandler) { - this._getChatsByPageQueryHandler = new GetChatsByPageQueryHandler_1.GetChatsByPageQueryHandler(this.chatRepository); - } - return this._getChatsByPageQueryHandler; - } -} -exports.DIContainer = DIContainer; -// Export singleton instance -exports.container = DIContainer.getInstance(); -//# sourceMappingURL=DIContainer.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DIContainer.js.map b/SerpentRace_Backend/dist/Application/Services/DIContainer.js.map deleted file mode 100644 index 1eb30976..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DIContainer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DIContainer.js","sourceRoot":"","sources":["../../../src/Application/Services/DIContainer.ts"],"names":[],"mappings":";;;AAQA,6BAA6B;AAC7B,mFAAgF;AAChF,mFAAgF;AAChF,iGAA8F;AAC9F,mFAAgF;AAChF,mGAAgG;AAChG,yFAAsF;AAEtF,mBAAmB;AACnB,wFAAqF;AACrF,8EAA2E;AAC3E,wFAAqF;AACrF,gGAA6F;AAC7F,wFAAqF;AACrF,0FAAuF;AACvF,4GAAyG;AACzG,8FAA2F;AAC3F,wFAAqF;AACrF,0FAAuF;AACvF,4FAAmH;AACnH,wFAAqF;AACrF,wFAAqF;AACrF,wFAAqF;AACrF,gHAA6G;AAC7G,gHAA6G;AAC7G,gHAA6G;AAC7G,wHAAqH;AACrH,iGAA8F;AAC9F,iGAA8F;AAC9F,iGAA8F;AAE9F,iBAAiB;AACjB,qFAAkF;AAClF,2FAAwF;AACxF,uFAAoF;AACpF,uFAAoH;AACpH,2FAAwF;AACxF,qFAAkF;AAClF,2FAAwF;AACxF,6GAA0G;AAC1G,mHAAgH;AAChH,qHAAkH;AAClH,8FAA2F;AAC3F,oGAAiG;AAEjG,WAAW;AACX,6CAA0C;AAC1C,+DAA4D;AAC5D,uEAAoE;AAEpE;;;GAGG;AACH,MAAa,WAAW;IAuDpB;QApDA,yDAAyD;QACjD,oBAAe,GAA2B,IAAI,CAAC;QAC/C,oBAAe,GAA2B,IAAI,CAAC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C,IAAI,CAAC,2BAA2B,EAAE,CAAC;YACpC,IAAI,CAAC,2BAA2B,GAAG,IAAI,uDAA0B,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC3F,CAAC;QACD,OAAO,IAAI,CAAC,2BAA2B,CAAC;IAC5C,CAAC;CACJ;AA5XD,kCA4XC;AAED,4BAA4B;AACf,QAAA,SAAS,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts b/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts deleted file mode 100644 index 4f27a234..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { DeckAggregate } from '../../Domain/Deck/DeckAggregate'; -import { IDeckRepository } from '../../Domain/IRepository/IDeckRepository'; -export interface SprDeckData { - name: string; - type: number; - cards: any[]; - ctype: number; - exportDate: string; - version: string; -} -export interface ImportDeckCommand { - name: string; - type: number; - cards: any[]; - ctype?: number; - userid: string; -} -export declare class DeckImportExportService { - private readonly deckRepo; - private readonly encryptionKey; - private readonly algorithm; - constructor(deckRepo: IDeckRepository); - exportDeckToSpr(deckId: string, userId: string): Promise; - importDeckFromSpr(sprData: Buffer, userId: string): Promise; - importDeckFromJson(jsonData: any, userId: string): Promise; - adminImportFromJson(jsonData: any, targetUserId: string, adminUserId: string): Promise; - private encrypt; - private decrypt; - generateFilename(deckName: string): string; -} -//# sourceMappingURL=DeckImportExportService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts.map deleted file mode 100644 index 9265a7ed..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckImportExportService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/DeckImportExport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a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.js b/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.js deleted file mode 100644 index 2703a50f..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.js +++ /dev/null @@ -1,195 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeckImportExportService = void 0; -const crypto = __importStar(require("crypto")); -const DeckAggregate_1 = require("../../Domain/Deck/DeckAggregate"); -const Logger_1 = require("./Logger"); -class DeckImportExportService { - constructor(deckRepo) { - this.deckRepo = deckRepo; - this.algorithm = 'aes-256-gcm'; - this.encryptionKey = process.env.DECK_ENCRYPTION_KEY || 'your-32-byte-encryption-key-here!!'; - if (this.encryptionKey.length !== 32) { - throw new Error('DECK_ENCRYPTION_KEY must be exactly 32 characters long'); - } - } - async exportDeckToSpr(deckId, userId) { - try { - const deck = await this.deckRepo.findByIdIncludingDeleted(deckId); - if (!deck) { - throw new Error('Deck not found'); - } - if (deck.userid !== userId) { - throw new Error('Unauthorized: You can only export your own decks'); - } - const deckData = { - name: deck.name, - type: deck.type, - cards: deck.cards, - ctype: deck.ctype, - exportDate: new Date().toISOString(), - version: '1.0' - }; - const jsonString = JSON.stringify(deckData); - const encrypted = this.encrypt(jsonString); - (0, Logger_1.logAuth)('Deck exported to SPR format', userId, { - deckId: deck.id, - deckName: deck.name, - cardCount: deck.cards.length - }); - return encrypted; - } - catch (error) { - (0, Logger_1.logError)('Failed to export deck to SPR', error); - throw error; - } - } - async importDeckFromSpr(sprData, userId) { - try { - const decrypted = this.decrypt(sprData); - const deckData = JSON.parse(decrypted); - // Validate required fields - if (!deckData.name || !deckData.cards || deckData.type === undefined) { - throw new Error('Invalid SPR file format: missing required fields'); - } - // Create new deck - const newDeck = new DeckAggregate_1.DeckAggregate(); - newDeck.name = deckData.name; - newDeck.type = deckData.type; - newDeck.userid = userId; - newDeck.cards = deckData.cards; - newDeck.ctype = deckData.ctype || DeckAggregate_1.CType.PUBLIC; - newDeck.state = DeckAggregate_1.State.ACTIVE; - const createdDeck = await this.deckRepo.create(newDeck); - (0, Logger_1.logAuth)('Deck imported from SPR format', userId, { - deckId: createdDeck.id, - deckName: createdDeck.name, - cardCount: createdDeck.cards.length, - originalExportDate: deckData.exportDate - }); - return createdDeck; - } - catch (error) { - (0, Logger_1.logError)('Failed to import deck from SPR', error); - throw error; - } - } - async importDeckFromJson(jsonData, userId) { - try { - // Validate required fields - if (!jsonData.name || !jsonData.cards || jsonData.type === undefined) { - throw new Error('Invalid JSON format: missing required fields (name, cards, type)'); - } - // Create new deck - const newDeck = new DeckAggregate_1.DeckAggregate(); - newDeck.name = jsonData.name; - newDeck.type = jsonData.type; - newDeck.userid = userId; - newDeck.cards = jsonData.cards; - newDeck.ctype = jsonData.ctype || DeckAggregate_1.CType.PUBLIC; - newDeck.state = DeckAggregate_1.State.ACTIVE; - const createdDeck = await this.deckRepo.create(newDeck); - (0, Logger_1.logAuth)('Deck imported from JSON format', userId, { - deckId: createdDeck.id, - deckName: createdDeck.name, - cardCount: createdDeck.cards.length - }); - return createdDeck; - } - catch (error) { - (0, Logger_1.logError)('Failed to import deck from JSON', error); - throw error; - } - } - // Admin-only function to import JSON without encryption - async adminImportFromJson(jsonData, targetUserId, adminUserId) { - try { - if (!jsonData.name || !jsonData.cards || jsonData.type === undefined) { - throw new Error('Invalid JSON format: missing required fields (name, cards, type)'); - } - const newDeck = new DeckAggregate_1.DeckAggregate(); - newDeck.name = jsonData.name; - newDeck.type = jsonData.type; - newDeck.userid = targetUserId; - newDeck.cards = jsonData.cards; - newDeck.ctype = jsonData.ctype || DeckAggregate_1.CType.PUBLIC; - newDeck.state = jsonData.state || DeckAggregate_1.State.ACTIVE; - const createdDeck = await this.deckRepo.create(newDeck); - (0, Logger_1.logAuth)('Deck imported by admin from JSON', adminUserId, { - deckId: createdDeck.id, - deckName: createdDeck.name, - cardCount: createdDeck.cards.length, - targetUserId: targetUserId - }); - return createdDeck; - } - catch (error) { - (0, Logger_1.logError)('Failed to admin import deck from JSON', error); - throw error; - } - } - encrypt(text) { - const iv = crypto.randomBytes(16); - const cipher = crypto.createCipheriv(this.algorithm, this.encryptionKey, iv); - cipher.setAAD(Buffer.from('SerpentRace-Deck', 'utf8')); - let encrypted = cipher.update(text, 'utf8'); - encrypted = Buffer.concat([encrypted, cipher.final()]); - const authTag = cipher.getAuthTag(); - return Buffer.concat([iv, authTag, encrypted]); - } - decrypt(encryptedData) { - if (encryptedData.length < 32) { - throw new Error('Invalid SPR file: file too short'); - } - const iv = encryptedData.slice(0, 16); - const authTag = encryptedData.slice(16, 32); - const encrypted = encryptedData.slice(32); - const decipher = crypto.createDecipheriv(this.algorithm, this.encryptionKey, iv); - decipher.setAAD(Buffer.from('SerpentRace-Deck', 'utf8')); - decipher.setAuthTag(authTag); - let decrypted = decipher.update(encrypted, undefined, 'utf8'); - decrypted += decipher.final('utf8'); - return decrypted; - } - generateFilename(deckName) { - // Sanitize deck name for filename - const sanitized = deckName.replace(/[^a-zA-Z0-9\-_]/g, '_'); - const timestamp = new Date().toISOString().split('T')[0]; // YYYY-MM-DD - return `${sanitized}_${timestamp}.spr`; - } -} -exports.DeckImportExportService = DeckImportExportService; -//# sourceMappingURL=DeckImportExportService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.js.map b/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.js.map deleted file mode 100644 index 88597245..00000000 --- a/SerpentRace_Backend/dist/Application/Services/DeckImportExportService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckImportExportService.js","sourceRoot":"","sources":["../../../src/Application/Services/DeckImportExportService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AAEjC,mEAA8E;AAE9E,qCAA6C;AAmB7C,MAAa,uBAAuB;IAIhC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;QAFrC,cAAS,GAAG,aAAa,CAAC;QAGvC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,oCAAoC,CAAC;QAE7F,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACnC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC9E,CAAC;IACL,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,MAAc,EAAE,MAAc;QAChD,IAAI,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;YAElE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACR,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YACtC,CAAC;YAED,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;gBACz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;QACvE,OAAO,GAAG,SAAS,IAAI,SAAS,MAAM,CAAC;IAC3C,CAAC;CACJ;AAxLD,0DAwLC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailService.d.ts b/SerpentRace_Backend/dist/Application/Services/EmailService.d.ts deleted file mode 100644 index 26c057bd..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailService.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export interface EmailOptions { - to: string; - subject: string; - html?: string; - text?: string; - template?: string; - templateData?: any; -} -export interface EmailConfig { - host: string; - port: number; - secure: boolean; - auth: { - user: string; - pass: string; - }; - from: string; -} -export declare class EmailService { - private transporter; - private config; - private templatesPath; - constructor(); - private initializeTransporter; - /** - * Send email with template - * @param options - Email options including template and data - */ - sendEmail(options: EmailOptions): Promise; - /** - * Send verification email to user - * @param userEmail - User's email address - * @param userName - User's name - * @param verificationToken - Verification token - * @param verificationUrl - Complete verification URL - * @param language - Language code ('en', 'hu', 'de') - */ - sendVerificationEmail(userEmail: string, userName: string, verificationToken: string, verificationUrl: string, language?: 'en' | 'hu' | 'de'): Promise; - /** - * Send password reset email - * @param userEmail - User's email address - * @param userName - User's name - * @param resetToken - Password reset token - * @param resetUrl - Complete password reset URL - * @param language - Language code ('en', 'hu', 'de') - */ - sendPasswordResetEmail(userEmail: string, userName: string, resetToken: string, resetUrl: string, language?: 'en' | 'hu' | 'de'): Promise; - /** - * Load and compile email template with language support - * @param templateName - Name of the template file (with or without language suffix) - * @param data - Data to replace placeholders in the template - */ - private loadTemplate; - /** - * Get localized verification email subject - * @param language - Language code ('en', 'hu', 'de') - */ - private getLocalizedVerificationSubject; - /** - * Get localized password reset email subject - * @param language - Language code ('en', 'hu', 'de') - */ - private getLocalizedPasswordResetSubject; -} -//# sourceMappingURL=EmailService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/EmailService.d.ts.map deleted file mode 100644 index 8e160697..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmailService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/EmailService.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAAS;;IAmB9B,OAAO,CAAC,qBAAqB;IAiB7B;;;OAGG;IACG,SAAS,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAgCxD;;;;;;;OAOG;IACG,qBAAqB,CACzB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,eAAe,EAAE,MAAM,EACvB,QAAQ,GAAE,IAAI,GAAG,IAAI,GAAG,IAAW,GAClC,OAAO,CAAC,OAAO,CAAC;IAuBnB;;;;;;;OAOG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,IAAI,GAAG,IAAI,GAAG,IAAW,GAClC,OAAO,CAAC,OAAO,CAAC;IAuBnB;;;;OAIG;YACW,YAAY;IAsD1B;;;OAGG;IACH,OAAO,CAAC,+BAA+B;IAWvC;;;OAGG;IACH,OAAO,CAAC,gCAAgC;CAUzC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailService.js b/SerpentRace_Backend/dist/Application/Services/EmailService.js deleted file mode 100644 index 679ab527..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailService.js +++ /dev/null @@ -1,249 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmailService = void 0; -const nodemailer = __importStar(require("nodemailer")); -const fs = __importStar(require("fs")); -const path = __importStar(require("path")); -const Logger_1 = require("./Logger"); -const EmailTemplateHelper_1 = require("./EmailTemplateHelper"); -class EmailService { - constructor() { - this.templatesPath = path.join(__dirname, '../../Templates'); - this.config = { - host: process.env.EMAIL_HOST || 'smtp.gmail.com', - port: parseInt(process.env.EMAIL_PORT || '587'), - secure: process.env.EMAIL_SECURE === 'true', - auth: { - user: process.env.EMAIL_USER || '', - pass: process.env.EMAIL_PASS || '' - }, - from: process.env.EMAIL_FROM || 'noreply@serpentrace.com' - }; - this.initializeTransporter(); - } - initializeTransporter() { - try { - this.transporter = nodemailer.createTransport({ - host: this.config.host, - port: this.config.port, - secure: this.config.secure, - auth: { - user: this.config.auth.user, - pass: this.config.auth.pass - } - }); - } - catch (error) { - (0, Logger_1.logError)('EmailService initialization failed', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to initialize email service'); - } - } - /** - * Send email with template - * @param options - Email options including template and data - */ - async sendEmail(options) { - try { - let htmlContent = options.html; - let textContent = options.text; - if (options.template) { - const templateResult = await this.loadTemplate(options.template, options.templateData || {}); - htmlContent = templateResult.html; - textContent = templateResult.text; - } - const mailOptions = { - from: this.config.from, - to: options.to, - subject: options.subject, - html: htmlContent, - text: textContent - }; - const result = await this.transporter.sendMail(mailOptions); - (0, Logger_1.logAuth)('Email sent successfully', undefined, { - messageId: result.messageId, - to: options.to, - subject: options.subject - }); - return true; - } - catch (error) { - (0, Logger_1.logError)('Email sending failed', error instanceof Error ? error : new Error(String(error))); - return false; - } - } - /** - * Send verification email to user - * @param userEmail - User's email address - * @param userName - User's name - * @param verificationToken - Verification token - * @param verificationUrl - Complete verification URL - * @param language - Language code ('en', 'hu', 'de') - */ - async sendVerificationEmail(userEmail, userName, verificationToken, verificationUrl, language = 'en') { - try { - const templateName = language === 'en' ? 'verification' : `verification-${language}`; - const subject = this.getLocalizedVerificationSubject(language); - return await this.sendEmail({ - to: userEmail, - subject, - template: templateName, - templateData: { - userName, - verificationToken, - verificationUrl, - companyName: 'SerpentRace', - supportEmail: 'support@serpentrace.com' - } - }); - } - catch (error) { - (0, Logger_1.logError)('Verification email sending failed', error instanceof Error ? error : new Error(String(error))); - return false; - } - } - /** - * Send password reset email - * @param userEmail - User's email address - * @param userName - User's name - * @param resetToken - Password reset token - * @param resetUrl - Complete password reset URL - * @param language - Language code ('en', 'hu', 'de') - */ - async sendPasswordResetEmail(userEmail, userName, resetToken, resetUrl, language = 'en') { - try { - const templateName = language === 'en' ? 'password-reset' : `password-reset-${language}`; - const subject = this.getLocalizedPasswordResetSubject(language); - return await this.sendEmail({ - to: userEmail, - subject, - template: templateName, - templateData: { - userName, - resetToken, - resetUrl, - companyName: 'SerpentRace', - supportEmail: 'support@serpentrace.com' - } - }); - } - catch (error) { - (0, Logger_1.logError)('Password reset email sending failed', error instanceof Error ? error : new Error(String(error))); - return false; - } - } - /** - * Load and compile email template with language support - * @param templateName - Name of the template file (with or without language suffix) - * @param data - Data to replace placeholders in the template - */ - async loadTemplate(templateName, data) { - try { - // Try the specified template first - let htmlTemplatePath = path.join(this.templatesPath, `${templateName}.html`); - let textTemplatePath = path.join(this.templatesPath, `${templateName}.txt`); - let htmlTemplate = ''; - let textTemplate = ''; - // Load HTML template if it exists - if (fs.existsSync(htmlTemplatePath)) { - htmlTemplate = fs.readFileSync(htmlTemplatePath, 'utf8'); - } - else { - // If language-specific template doesn't exist, try fallback to English - const baseName = templateName.replace(/-[a-z]{2}$/, ''); // Remove language suffix - const fallbackHtmlPath = path.join(this.templatesPath, `${baseName}.html`); - if (fs.existsSync(fallbackHtmlPath)) { - htmlTemplate = fs.readFileSync(fallbackHtmlPath, 'utf8'); - } - } - // Load text template if it exists - if (fs.existsSync(textTemplatePath)) { - textTemplate = fs.readFileSync(textTemplatePath, 'utf8'); - } - else { - // If language-specific template doesn't exist, try fallback to English - const baseName = templateName.replace(/-[a-z]{2}$/, ''); // Remove language suffix - const fallbackTextPath = path.join(this.templatesPath, `${baseName}.txt`); - if (fs.existsSync(fallbackTextPath)) { - textTemplate = fs.readFileSync(fallbackTextPath, 'utf8'); - } - } - // If no templates found, throw error - if (!htmlTemplate && !textTemplate) { - throw new Error(`Template '${templateName}' not found`); - } - // Replace placeholders in templates - const processedTemplate = EmailTemplateHelper_1.EmailTemplateHelper.processTemplate({ html: htmlTemplate, text: textTemplate }, data); - return { - html: processedTemplate.html, - text: processedTemplate.text - }; - } - catch (error) { - (0, Logger_1.logError)('Email template loading failed', error instanceof Error ? error : new Error(String(error))); - throw new Error(`Failed to load email template: ${templateName}`); - } - } - /** - * Get localized verification email subject - * @param language - Language code ('en', 'hu', 'de') - */ - getLocalizedVerificationSubject(language) { - const subjects = { - verification: { - en: 'SerpentRace - Verify Your Account', - hu: 'SerpentRace - Fiók megerősítése', - de: 'SerpentRace - Konto verifizieren' - } - }; - return EmailTemplateHelper_1.EmailTemplateHelper.getLocalizedSubject('verification', subjects, language); - } - /** - * Get localized password reset email subject - * @param language - Language code ('en', 'hu', 'de') - */ - getLocalizedPasswordResetSubject(language) { - const subjects = { - passwordReset: { - en: 'SerpentRace - Password Reset Request', - hu: 'SerpentRace - Jelszó visszaállítás kérése', - de: 'SerpentRace - Passwort zurücksetzen' - } - }; - return EmailTemplateHelper_1.EmailTemplateHelper.getLocalizedSubject('passwordReset', subjects, language); - } -} -exports.EmailService = EmailService; -//# sourceMappingURL=EmailService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailService.js.map b/SerpentRace_Backend/dist/Application/Services/EmailService.js.map deleted file mode 100644 index ae48a3b2..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmailService.js","sourceRoot":"","sources":["../../../src/Application/Services/EmailService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AACzC,uCAAyB;AACzB,2CAA6B;AAC7B,qCAAyD;AACzD,+DAA+E;AAsB/E,MAAa,YAAY;IAKvB;QACE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAE7D,IAAI,CAAC,MAAM,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ACK,+BAA+B,CAAC,QAA4B;QAClE,MAAM,QAAQ,GAAsB;YAClC,YAAY,EAAE;gBACZ,EAAE,EAAE,mCAAmC;gBACvC,EAAE,EAAE,iCAAiC;gBACrC,EAAE,EAAE,kCAAkC;aACvC;SACF,CAAC;QACF,OAAO,yCAAmB,CAAC,mBAAmB,CAAC,cAAc,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACrF,CAAC;IAED;;;OAGG;IACK,gCAAgC,CAAC,QAA4B;QACnE,MAAM,QAAQ,GAAsB;YAClC,aAAa,EAAE;gBACb,EAAE,EAAE,sCAAsC;gBAC1C,EAAE,EAAE,2CAA2C;gBAC/C,EAAE,EAAE,qCAAqC;aAC1C;SACF,CAAC;QACF,OAAO,yCAAmB,CAAC,mBAAmB,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACtF,CAAC;CACF;AA7OD,oCA6OC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.d.ts b/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.d.ts deleted file mode 100644 index 21d70724..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface LocalizedSubjects { - [key: string]: { - en: string; - hu: string; - de: string; - }; -} -export interface TemplateData { - [key: string]: any; -} -export interface EmailTemplate { - html: string; - text: string; -} -export declare class EmailTemplateHelper { - static getLocalizedSubject(subjectKey: string, subjects: LocalizedSubjects, language: 'en' | 'hu' | 'de'): string; - static replaceTemplatePlaceholders(template: string, data: TemplateData): string; - static processTemplate(templateContent: EmailTemplate, data: TemplateData): EmailTemplate; -} -//# sourceMappingURL=EmailTemplateHelper.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.d.ts.map b/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.d.ts.map deleted file mode 100644 index 3657ffce..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmailTemplateHelper.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/EmailTemplateHelper.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,mBAAmB;WAChB,mBAAmB,CAC/B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAC3B,MAAM;WAIK,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM;WAMzE,eAAe,CAAC,eAAe,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,GAAG,aAAa;CAMjG"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.js b/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.js deleted file mode 100644 index 755d33d1..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmailTemplateHelper = void 0; -class EmailTemplateHelper { - static getLocalizedSubject(subjectKey, subjects, language) { - return subjects[subjectKey]?.[language] || subjects[subjectKey]?.['en'] || 'SerpentRace'; - } - static replaceTemplatePlaceholders(template, data) { - return template.replace(/\{\{(\w+)\}\}/g, (match, key) => { - return data[key] !== undefined ? String(data[key]) : match; - }); - } - static processTemplate(templateContent, data) { - return { - html: this.replaceTemplatePlaceholders(templateContent.html, data), - text: this.replaceTemplatePlaceholders(templateContent.text, data) - }; - } -} -exports.EmailTemplateHelper = EmailTemplateHelper; -//# sourceMappingURL=EmailTemplateHelper.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.js.map b/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.js.map deleted file mode 100644 index dac86041..00000000 --- a/SerpentRace_Backend/dist/Application/Services/EmailTemplateHelper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmailTemplateHelper.js","sourceRoot":"","sources":["../../../src/Application/Services/EmailTemplateHelper.ts"],"names":[],"mappings":";;;AAiBA,MAAa,mBAAmB;IACvB,MAAM,CAAC,mBAAmB,CAC/B,UAAkB,EAClB,QAA2B,EAC3B,QAA4B;QAE5B,OAAO,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC;IAC3F,CAAC;IAEM,MAAM,CAAC,2BAA2B,CAAC,QAAgB,EAAE,IAAkB;QAC5E,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YACvD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,eAA8B,EAAE,IAAkB;QAC9E,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,2BAA2B,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;YAClE,IAAI,EAAE,IAAI,CAAC,2BAA2B,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;SACnE,CAAC;IACJ,CAAC;CACF;AArBD,kDAqBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.d.ts b/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.d.ts deleted file mode 100644 index 55252ca6..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Response } from 'express'; -export declare class ErrorResponseService { - static sendError(res: Response, statusCode: number, message: string, details?: any): Response; - static sendInternalServerError(res: Response): Response; - static sendBadRequest(res: Response, message?: string, details?: any): Response; - static sendUnauthorized(res: Response, message?: string): Response; - static sendForbidden(res: Response, message?: string): Response; - static sendNotFound(res: Response, message?: string): Response; - static sendConflict(res: Response, message?: string): Response; -} -//# sourceMappingURL=ErrorResponseService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.d.ts.map deleted file mode 100644 index 1d9d1ff9..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ErrorResponseService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/ErrorResponseService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,QAAQ;IAQ7F,MAAM,CAAC,uBAAuB,CAAC,GAAG,EAAE,QAAQ,GAAG,QAAQ;IAIvD,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,GAAE,MAAsB,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,QAAQ;IAI9F,MAAM,CAAC,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,GAAE,MAAuB,GAAG,QAAQ;IAIlF,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,GAAE,MAAoB,GAAG,QAAQ;IAI5E,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,GAAE,MAAoB,GAAG,QAAQ;IAI3E,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,GAAE,MAAmB,GAAG,QAAQ;CAG3E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.js b/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.js deleted file mode 100644 index 8428da02..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ErrorResponseService = void 0; -class ErrorResponseService { - static sendError(res, statusCode, message, details) { - const errorResponse = { error: message }; - if (details) { - errorResponse.details = details; - } - return res.status(statusCode).json(errorResponse); - } - static sendInternalServerError(res) { - return this.sendError(res, 500, 'Internal server error'); - } - static sendBadRequest(res, message = 'Bad request', details) { - return this.sendError(res, 400, message, details); - } - static sendUnauthorized(res, message = 'Unauthorized') { - return this.sendError(res, 401, message); - } - static sendForbidden(res, message = 'Forbidden') { - return this.sendError(res, 403, message); - } - static sendNotFound(res, message = 'Not found') { - return this.sendError(res, 404, message); - } - static sendConflict(res, message = 'Conflict') { - return this.sendError(res, 409, message); - } -} -exports.ErrorResponseService = ErrorResponseService; -//# sourceMappingURL=ErrorResponseService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.js.map b/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.js.map deleted file mode 100644 index 19feef9d..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ErrorResponseService.js.map +++ /dev/null @@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;QAC7D,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CACF;AAhCD,oDAgCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/JWTService.d.ts b/SerpentRace_Backend/dist/Application/Services/JWTService.d.ts deleted file mode 100644 index 6915b51b..00000000 --- a/SerpentRace_Backend/dist/Application/Services/JWTService.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Request, Response } from 'express'; -import { UserState } from '../../Domain/User/UserAggregate'; -export interface TokenPayload { - userId: string; - authLevel: 0 | 1; - userStatus: UserState; - orgId: string; - iat?: number; - exp?: number; -} -export declare class JWTService { - private readonly secretKey; - private readonly tokenExpiry; - private readonly cookieName; - constructor(); - create(payload: TokenPayload, res: Response): string; - verify(req: Request): TokenPayload | null; - shouldRefreshToken(payload: TokenPayload): boolean; - refreshIfNeeded(payload: TokenPayload, res: Response): boolean; - /** - * Parse duration string to seconds (e.g., "24h", "7d", "30m") - * @param duration Duration string - * @returns Duration in seconds - */ - private parseDuration; -} -//# sourceMappingURL=JWTService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/JWTService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/JWTService.d.ts.map deleted file mode 100644 index ade9a70c..00000000 --- a/SerpentRace_Backend/dist/Application/Services/JWTService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JWTService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/JWTService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,UAAU,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;;IAqBpC,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,GAAG,MAAM;IAuBpD,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI;IAazC,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO;IAYlD,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO;IAe9D;;;;OAIG;IACH,OAAO,CAAC,aAAa;CAkBxB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/JWTService.js b/SerpentRace_Backend/dist/Application/Services/JWTService.js deleted file mode 100644 index 07e6f73a..00000000 --- a/SerpentRace_Backend/dist/Application/Services/JWTService.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JWTService = void 0; -const jsonwebtoken_1 = __importDefault(require("jsonwebtoken")); -class JWTService { - constructor() { - this.secretKey = process.env.JWT_SECRET || 'your-secret-key'; - let expiry = 86400; - if (process.env.JWT_EXPIRY) { - expiry = parseInt(process.env.JWT_EXPIRY); - } - else if (process.env.JWT_EXPIRATION) { - expiry = this.parseDuration(process.env.JWT_EXPIRATION); - } - this.tokenExpiry = expiry; - this.cookieName = 'auth_token'; - if (process.env.NODE_ENV === 'production' && (!process.env.JWT_SECRET || process.env.JWT_SECRET === 'your-secret-key')) { - throw new Error('JWT_SECRET environment variable must be set in production'); - } - } - create(payload, res) { - const now = Math.floor(Date.now() / 1000); - const payloadWithTimestamps = { - ...payload, - iat: now, - exp: now + this.tokenExpiry - }; - // Don't use expiresIn option since we're manually setting exp in payload - const options = {}; - const token = jsonwebtoken_1.default.sign(payloadWithTimestamps, this.secretKey, options); - res.cookie(this.cookieName, token, { - httpOnly: true, - secure: process.env.NODE_ENV === 'production', - sameSite: 'strict', - maxAge: this.tokenExpiry * 1000, // Convert to milliseconds - }); - return token; - } - verify(req) { - try { - const token = req.cookies[this.cookieName]; - if (!token) - return null; - const decoded = jsonwebtoken_1.default.verify(token, this.secretKey); - return decoded; - } - catch (error) { - return null; - } - } - // Check if token needs refresh (within 25% of expiry time) - shouldRefreshToken(payload) { - if (!payload.exp || !payload.iat) - return false; - const now = Math.floor(Date.now() / 1000); - const tokenAge = now - payload.iat; - const tokenLifetime = payload.exp - payload.iat; - const refreshThreshold = tokenLifetime * 0.75; // Refresh when 75% of lifetime has passed - return tokenAge >= refreshThreshold; - } - // Conditionally refresh token only if needed - refreshIfNeeded(payload, res) { - if (this.shouldRefreshToken(payload)) { - // Create new token with fresh timestamps, but same user data - const freshPayload = { - userId: payload.userId, - authLevel: payload.authLevel, - userStatus: payload.userStatus, - orgId: payload.orgId - }; - this.create(freshPayload, res); - return true; - } - return false; - } - /** - * Parse duration string to seconds (e.g., "24h", "7d", "30m") - * @param duration Duration string - * @returns Duration in seconds - */ - parseDuration(duration) { - const match = duration.match(/^(\d+)([smhd])$/); - if (!match) { - throw new Error(`Invalid duration format: ${duration}. Use format like '24h', '7d', '30m'`); - } - const [, value, unit] = match; - const num = parseInt(value); - switch (unit) { - case 's': return num; // seconds - case 'm': return num * 60; // minutes - case 'h': return num * 60 * 60; // hours - case 'd': return num * 60 * 60 * 24; // days - default: - throw new Error(`Unsupported duration unit: ${unit}`); - } - } -} -exports.JWTService = JWTService; -//# sourceMappingURL=JWTService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/JWTService.js.map b/SerpentRace_Backend/dist/Application/Services/JWTService.js.map deleted file mode 100644 index b175daa8..00000000 --- a/SerpentRace_Backend/dist/Application/Services/JWTService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JWTService.js","sourceRoot":"","sources":["../../../src/Application/Services/JWTService.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAgD;AAahD,MAAa,UAAU;IAKnB;QACI,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,iBAAiB,CAAC;QAE7D,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;YACzB,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;YACpC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAE/B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,iBAAiB,CAAC,EAAE,CAAC;YACrH,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;QACjF,CAAC;IACL,CAAC;IAED,MAAM,CAAC,OAAqB,EAAE,GAAa;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAE1C,MAAM,qBAAqB,GAAiB;YACxC,GAAG,OAAO;YACV,GAAG,EAAE,GAAG;YACR,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC,WAAW;SAC9B,CAAC;QAEF,yEAAyE;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K,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;QAC9D,CAAC;IACL,CAAC;CACJ;AA9GD,gCA8GC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/Logger.d.ts b/SerpentRace_Backend/dist/Application/Services/Logger.d.ts deleted file mode 100644 index 222c7183..00000000 --- a/SerpentRace_Backend/dist/Application/Services/Logger.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { LoggingService, LogLevel } from './LoggingService'; -import { Request, Response } from 'express'; -declare const logger: LoggingService; -export declare const logRequest: (message: string, req?: Request, res?: Response, metadata?: any) => void; -export declare const logError: (message: string, error?: Error, req?: Request, res?: Response) => void; -export declare const logWarning: (message: string, metadata?: any, req?: Request, res?: Response) => void; -export declare const logAuth: (message: string, userId?: string, metadata?: any, req?: Request, res?: Response) => void; -export declare const logDatabase: (message: string, query?: string, executionTime?: number, metadata?: any) => void; -export declare const logStartup: (message: string, metadata?: any) => void; -export declare const logConnection: (message: string, type: string, status: "success" | "failure" | "attempt", metadata?: any) => void; -export declare const logOther: (message: string, metadata?: any, req?: Request, res?: Response) => void; -export { LoggingService, LogLevel }; -export default logger; -//# sourceMappingURL=Logger.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/Logger.d.ts.map b/SerpentRace_Backend/dist/Application/Services/Logger.d.ts.map deleted file mode 100644 index b395bbea..00000000 --- a/SerpentRace_Backend/dist/Application/Services/Logger.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/Logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG5C,QAAA,MAAM,MAAM,gBAA+B,CAAC;AAG5C,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,EAAE,MAAM,OAAO,EAAE,MAAM,QAAQ,EAAE,WAAW,GAAG,SAExF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,EAAE,QAAQ,KAAK,EAAE,MAAM,OAAO,EAAE,MAAM,QAAQ,SAOrF,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,EAAE,WAAW,GAAG,EAAE,MAAM,OAAO,EAAE,MAAM,QAAQ,SAExF,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,SAAS,MAAM,EAAE,SAAS,MAAM,EAAE,WAAW,GAAG,EAAE,MAAM,OAAO,EAAE,MAAM,QAAQ,SAMtG,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,EAAE,gBAAgB,MAAM,EAAE,WAAW,GAAG,SAOlG,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,EAAE,WAAW,GAAG,SAEzD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,EAAE,QAAQ,SAAS,GAAG,SAAS,GAAG,SAAS,EAAE,WAAW,GAAG,SAOrH,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,EAAE,WAAW,GAAG,EAAE,MAAM,OAAO,EAAE,MAAM,QAAQ,SAEtF,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;AACpC,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/Logger.js b/SerpentRace_Backend/dist/Application/Services/Logger.js deleted file mode 100644 index 243007e3..00000000 --- a/SerpentRace_Backend/dist/Application/Services/Logger.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LogLevel = exports.LoggingService = exports.logOther = exports.logConnection = exports.logStartup = exports.logDatabase = exports.logAuth = exports.logWarning = exports.logError = exports.logRequest = void 0; -const LoggingService_1 = require("./LoggingService"); -Object.defineProperty(exports, "LoggingService", { enumerable: true, get: function () { return LoggingService_1.LoggingService; } }); -Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return LoggingService_1.LogLevel; } }); -// Singleton instance -const logger = LoggingService_1.LoggingService.getInstance(); -// Convenience functions for each log level -const logRequest = (message, req, res, metadata) => { - logger.log(LoggingService_1.LogLevel.REQUEST, message, metadata, req, res); -}; -exports.logRequest = logRequest; -const logError = (message, error, req, res) => { - const metadata = error ? { - name: error.name, - message: error.message, - stack: error.stack - } : undefined; - logger.log(LoggingService_1.LogLevel.ERROR, message, metadata, req, res); -}; -exports.logError = logError; -const logWarning = (message, metadata, req, res) => { - logger.log(LoggingService_1.LogLevel.WARNING, message, metadata, req, res); -}; -exports.logWarning = logWarning; -const logAuth = (message, userId, metadata, req, res) => { - const authMetadata = { - userId, - ...metadata - }; - logger.log(LoggingService_1.LogLevel.AUTH, message, authMetadata, req, res); -}; -exports.logAuth = logAuth; -const logDatabase = (message, query, executionTime, metadata) => { - const dbMetadata = { - query: query ? query.substring(0, 200) : undefined, - executionTime, - ...metadata - }; - logger.log(LoggingService_1.LogLevel.DATABASE, message, dbMetadata); -}; -exports.logDatabase = logDatabase; -const logStartup = (message, metadata) => { - logger.log(LoggingService_1.LogLevel.STARTUP, message, metadata); -}; -exports.logStartup = logStartup; -const logConnection = (message, type, status, metadata) => { - const connectionMetadata = { - connectionType: type, - status, - ...metadata - }; - logger.log(LoggingService_1.LogLevel.CONNECTION, message, connectionMetadata); -}; -exports.logConnection = logConnection; -const logOther = (message, metadata, req, res) => { - logger.log(LoggingService_1.LogLevel.OTHER, message, metadata, req, res); -}; -exports.logOther = logOther; -exports.default = logger; -//# sourceMappingURL=Logger.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/Logger.js.map b/SerpentRace_Backend/dist/Application/Services/Logger.js.map deleted file mode 100644 index 6055d5d9..00000000 --- a/SerpentRace_Backend/dist/Application/Services/Logger.js.map +++ /dev/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E,EAAE;IACzF,MAAM,CAAC,GAAG,CAAC,yBAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC1D,CAAC,CAAC;AAFW,QAAA,QAAQ,YAEnB;AAIF,kBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/LoggingService.d.ts b/SerpentRace_Backend/dist/Application/Services/LoggingService.d.ts deleted file mode 100644 index dc1c06a3..00000000 --- a/SerpentRace_Backend/dist/Application/Services/LoggingService.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Request, Response, NextFunction } from 'express'; -export declare enum LogLevel { - REQUEST = "REQUEST", - ERROR = "ERROR", - WARNING = "WARNING", - AUTH = "AUTH", - DATABASE = "DATABASE", - STARTUP = "STARTUP", - CONNECTION = "CONNECTION", - OTHER = "OTHER" -} -export interface LogEntry { - timestamp: string; - level: LogLevel; - message: string; - metadata?: any; - requestId?: string; - userId?: string; - ip?: string; - userAgent?: string; - method?: string; - url?: string; - statusCode?: number; - responseTime?: number; -} -export declare class LoggingService { - private static instance; - private minioClient; - private logBuffer; - private currentLogFile; - private logCount; - private readonly maxLogsPerFile; - private readonly logsDir; - private readonly bucketName; - private uploadInterval; - private constructor(); - static getInstance(): LoggingService; - private initializeLogsDirectory; - private initializeMinioClient; - private ensureBucketExists; - private startPeriodicUpload; - private getMonthlyDirectory; - private getMonthlyMinioPrefix; - private createNewLogFile; - private formatLogEntry; - private writeToLocalFile; - private rotateLogFile; - private uploadToMinio; - private logToConsole; - log(level: LogLevel, message: string, metadata?: any, req?: Request, res?: Response, responseTime?: number): void; - private generateRequestId; - shutdown(): Promise; - requestLoggingMiddleware(): (req: Request, res: Response, next: NextFunction) => void; - errorLoggingMiddleware(): (error: Error, req: Request, res: Response, next: NextFunction) => void; -} -export default LoggingService; -//# sourceMappingURL=LoggingService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/LoggingService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/LoggingService.d.ts.map deleted file mode 100644 index 05374be8..00000000 --- a/SerpentRace_Backend/dist/Application/Services/LoggingService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoggingService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/LoggingService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;IACxC,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsD;IACrF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAC5D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuD;IAClF,OAAO,CAAC,cAAc,CAA+B;IAErD,OAAO;IAcP,MAAM,CAAC,WAAW,IAAI,cAAc;IAOpC,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,qBAAqB;YAqCf,kBAAkB;IAchC,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,cAAc;YAmBR,gBAAgB;YAkBhB,aAAa;YAgBb,aAAa;IA2B3B,OAAO,CAAC,YAAY;IAwBb,GAAG,CACR,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,GAAG,EACd,GAAG,CAAC,EAAE,OAAO,EACb,GAAG,CAAC,EAAE,QAAQ,EACd,YAAY,CAAC,EAAE,MAAM,GACpB,IAAI;IAuCP,OAAO,CAAC,iBAAiB;IAIZ,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB/B,wBAAwB,KACrB,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY;IA4BlD,sBAAsB,KACnB,OAAO,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY;CAcxE;AAED,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/LoggingService.js b/SerpentRace_Backend/dist/Application/Services/LoggingService.js deleted file mode 100644 index f707c6d0..00000000 --- a/SerpentRace_Backend/dist/Application/Services/LoggingService.js +++ /dev/null @@ -1,363 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggingService = exports.LogLevel = void 0; -const fs_1 = __importDefault(require("fs")); -const path_1 = __importDefault(require("path")); -const Minio = __importStar(require("minio")); -var LogLevel; -(function (LogLevel) { - LogLevel["REQUEST"] = "REQUEST"; - LogLevel["ERROR"] = "ERROR"; - LogLevel["WARNING"] = "WARNING"; - LogLevel["AUTH"] = "AUTH"; - LogLevel["DATABASE"] = "DATABASE"; - LogLevel["STARTUP"] = "STARTUP"; - LogLevel["CONNECTION"] = "CONNECTION"; - LogLevel["OTHER"] = "OTHER"; -})(LogLevel || (exports.LogLevel = LogLevel = {})); -class LoggingService { - constructor() { - this.minioClient = null; - this.logBuffer = []; - this.currentLogFile = null; - this.logCount = 0; - this.maxLogsPerFile = parseInt(process.env.MAX_LOGS_PER_FILE || '10000'); - this.logsDir = path_1.default.join(process.cwd(), 'logs'); - this.bucketName = process.env.MINIO_BUCKET_NAME || 'serpentrace-logs'; - this.uploadInterval = null; - this.initializeLogsDirectory(); - this.initializeMinioClient(); - this.createNewLogFile(); - if (process.env.NODE_ENV !== 'test') { - this.startPeriodicUpload(); - } - process.on('SIGTERM', () => this.shutdown()); - process.on('SIGINT', () => this.shutdown()); - process.on('beforeExit', () => this.shutdown()); - } - static getInstance() { - if (!LoggingService.instance) { - LoggingService.instance = new LoggingService(); - } - return LoggingService.instance; - } - initializeLogsDirectory() { - try { - if (!fs_1.default.existsSync(this.logsDir)) { - fs_1.default.mkdirSync(this.logsDir, { recursive: true }); - } - // Create monthly subdirectory - const monthlyDir = this.getMonthlyDirectory(); - if (!fs_1.default.existsSync(monthlyDir)) { - fs_1.default.mkdirSync(monthlyDir, { recursive: true }); - } - } - catch (error) { - console.error('Failed to initialize logs directory:', error); - } - } - initializeMinioClient() { - try { - // Check if in production or development - if (process.env.NODE_ENV === 'production') { - if (process.env.MINIO_ENDPOINT && process.env.MINIO_ACCESS_KEY && process.env.MINIO_SECRET_KEY) { - this.minioClient = new Minio.Client({ - endPoint: process.env.MINIO_ENDPOINT, - port: parseInt(process.env.MINIO_PORT || '9000'), - useSSL: process.env.MINIO_USE_SSL === 'true', - accessKey: process.env.MINIO_ACCESS_KEY, - secretKey: process.env.MINIO_SECRET_KEY - }); - this.ensureBucketExists(); - } - else { - console.warn('Minio configuration not found. Logs will only be stored locally and in console.'); - } - } - else { - // Development-specific Minio configuration - this.minioClient = new Minio.Client({ - endPoint: 'localhost', - port: 9000, - useSSL: false, - accessKey: 'serpentrace', - secretKey: 'serpentrace123!' - }); - this.ensureBucketExists(); - } - } - catch (error) { - console.error('Failed to initialize Minio client:', error); - this.minioClient = null; - } - } - async ensureBucketExists() { - if (!this.minioClient) - return; - try { - const exists = await this.minioClient.bucketExists(this.bucketName); - if (!exists) { - await this.minioClient.makeBucket(this.bucketName); - this.log(LogLevel.STARTUP, `Created Minio bucket: ${this.bucketName}`); - } - } - catch (error) { - console.error('Failed to ensure bucket exists:', error); - } - } - startPeriodicUpload() { - // Upload current log file to Minio every 2 minutes - this.uploadInterval = setInterval(async () => { - if (this.currentLogFile && this.minioClient) { - await this.uploadToMinio(this.currentLogFile); - } - }, 2 * 60 * 1000); // 2 minutes - } - getMonthlyDirectory() { - const now = new Date(); - const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return path_1.default.join(this.logsDir, `${year}-${month}`); - } - getMonthlyMinioPrefix() { - const now = new Date(); - const year = now.getFullYear(); - const month = String(now.getMonth() + 1).padStart(2, '0'); - return `${year}-${month}/`; - } - createNewLogFile() { - const now = new Date(); - const timestamp = now.toISOString().replace(/[:.]/g, '-'); - const fileName = `serpentrace-${timestamp}.log`; - this.currentLogFile = path_1.default.join(this.getMonthlyDirectory(), fileName); - this.logCount = 0; - // Write log file header - const header = `# SerpentRace Backend Logs\n# Started: ${now.toISOString()}\n# Max entries per file: ${this.maxLogsPerFile}\n\n`; - try { - fs_1.default.writeFileSync(this.currentLogFile, header); - } - catch (error) { - console.error('Failed to create log file:', error); - } - } - formatLogEntry(entry) { - const parts = [ - entry.timestamp, - `[${entry.level}]`, - entry.message - ]; - if (entry.requestId) - parts.push(`ReqId:${entry.requestId}`); - if (entry.userId) - parts.push(`UserId:${entry.userId}`); - if (entry.ip) - parts.push(`IP:${entry.ip}`); - if (entry.method && entry.url) - parts.push(`${entry.method} ${entry.url}`); - if (entry.statusCode) - parts.push(`Status:${entry.statusCode}`); - if (entry.responseTime) - parts.push(`Time:${entry.responseTime}ms`); - if (entry.userAgent) - parts.push(`UA:${entry.userAgent.substring(0, 50)}`); - if (entry.metadata) - parts.push(`Meta:${JSON.stringify(entry.metadata)}`); - return parts.join(' | '); - } - async writeToLocalFile(entry) { - if (!this.currentLogFile) - return; - try { - const logLine = this.formatLogEntry(entry) + '\n'; - fs_1.default.appendFileSync(this.currentLogFile, logLine); - this.logCount++; - // Check if we need to rotate the log file - if (this.logCount >= this.maxLogsPerFile) { - await this.rotateLogFile(); - } - } - catch (error) { - console.error('Failed to write to log file:', error); - } - } - async rotateLogFile() { - if (!this.currentLogFile) - return; - try { - // Upload current file to Minio before rotating - await this.uploadToMinio(this.currentLogFile); - // Create new log file - this.createNewLogFile(); - this.log(LogLevel.OTHER, 'Log file rotated due to size limit'); - } - catch (error) { - console.error('Failed to rotate log file:', error); - } - } - async uploadToMinio(filePath) { - if (!this.minioClient) { - console.warn('Minio client not initialized, skipping upload'); - return; - } - if (!fs_1.default.existsSync(filePath)) { - console.warn(`Log file does not exist: ${filePath}`); - return; - } - try { - const fileName = path_1.default.basename(filePath); - const objectName = this.getMonthlyMinioPrefix() + fileName; - console.log(`Attempting to upload log file to Minio: ${objectName}`); - await this.minioClient.fPutObject(this.bucketName, objectName, filePath); - console.log(`Successfully uploaded log file to Minio: ${objectName}`); - } - catch (error) { - console.error('Failed to upload to Minio:', error); - console.error('Minio config:', { - endpoint: this.minioClient ? 'configured' : 'not configured', - bucket: this.bucketName - }); - } - } - logToConsole(entry) { - const formattedEntry = this.formatLogEntry(entry); - switch (entry.level) { - case LogLevel.ERROR: - console.error(formattedEntry); - break; - case LogLevel.WARNING: - console.warn(formattedEntry); - break; - case LogLevel.REQUEST: - case LogLevel.AUTH: - case LogLevel.DATABASE: - case LogLevel.CONNECTION: - console.info(formattedEntry); - break; - case LogLevel.STARTUP: - console.log(formattedEntry); - break; - default: - console.log(formattedEntry); - } - } - log(level, message, metadata, req, res, responseTime) { - const entry = { - timestamp: new Date().toISOString(), - level, - message, - metadata - }; - // Add request context if available - if (req) { - entry.requestId = req.requestId || this.generateRequestId(); - entry.userId = req.user?.userId; - entry.ip = req.ip || req.socket?.remoteAddress || 'unknown'; - entry.userAgent = req.get ? req.get('User-Agent') : 'unknown'; - entry.method = req.method; - entry.url = req.originalUrl || req.url; - } - if (res) { - entry.statusCode = res.statusCode; - } - if (responseTime !== undefined) { - entry.responseTime = responseTime; - } - // Log to all three destinations - this.logToConsole(entry); - this.writeToLocalFile(entry); - // Add to buffer for potential batch processing - this.logBuffer.push(entry); - // Limit buffer size - if (this.logBuffer.length > 1000) { - this.logBuffer = this.logBuffer.slice(-500); - } - } - generateRequestId() { - return Math.random().toString(36).substr(2, 9); - } - async shutdown() { - try { - // Clear the upload interval - if (this.uploadInterval) { - clearInterval(this.uploadInterval); - this.uploadInterval = null; - } - // Upload current log file to Minio - if (this.currentLogFile) { - await this.uploadToMinio(this.currentLogFile); - } - this.log(LogLevel.STARTUP, 'Logging service shutting down gracefully'); - // Give time for final logs to be written - await new Promise(resolve => setTimeout(resolve, 1000)); - } - catch (error) { - console.error('Error during logging service shutdown:', error); - } - } - // Middleware factory methods - requestLoggingMiddleware() { - return (req, res, next) => { - const startTime = Date.now(); - // Generate request ID - req.requestId = this.generateRequestId(); - // Log request start - this.log(LogLevel.REQUEST, `Incoming request`, undefined, req); - // Override res.end to log response - const originalEnd = res.end.bind(res); - res.end = (...args) => { - const responseTime = Date.now() - startTime; - LoggingService.getInstance().log(LogLevel.REQUEST, `Request completed`, undefined, req, res, responseTime); - return originalEnd(...args); - }; - next(); - }; - } - errorLoggingMiddleware() { - return (error, req, res, next) => { - this.log(LogLevel.ERROR, `Unhandled error: ${error.message}`, { - stack: error.stack, - name: error.name - }, req, res); - next(error); - }; - } -} -exports.LoggingService = LoggingService; -exports.default = LoggingService; -//# sourceMappingURL=LoggingService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/LoggingService.js.map b/SerpentRace_Backend/dist/Application/Services/LoggingService.js.map deleted file mode 100644 index c539f993..00000000 --- a/SerpentRace_Backend/dist/Application/Services/LoggingService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoggingService.js","sourceRoot":"","sources":["../../../src/Application/Services/LoggingService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAExB,6CAA+B;AAE/B,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,iCAAqB,CAAA;IACrB,+BAAmB,CAAA;IACnB,qCAAyB,CAAA;IACzB,2BAA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gBAClB,IAAI,EAAE,KAAK,CAAC,IAAI;aACjB,EACD,GAAG,EACH,GAAG,CACJ,CAAC;YACF,IAAI,CAAC,KAAK,CAAC,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;CACF;AAxWD,wCAwWC;AAED,kBAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/PasswordService.d.ts b/SerpentRace_Backend/dist/Application/Services/PasswordService.d.ts deleted file mode 100644 index 5ba1c1ce..00000000 --- a/SerpentRace_Backend/dist/Application/Services/PasswordService.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export declare class PasswordService { - private static readonly SALT_ROUNDS; - /** - * Hashes a plain text password using bcrypt - * @param password - The plain text password to hash - * @returns Promise - The hashed password - */ - static hashPassword(password: string): Promise; - /** - * Verifies a plain text password against a hashed password - * @param password - The plain text password to verify - * @param hashedPassword - The hashed password to compare against - * @returns Promise - True if password matches, false otherwise - */ - static verifyPassword(password: string, hashedPassword: string): Promise; - /** - * Validates password strength requirements - * @param password - The password to validate - * @returns object - Object containing isValid boolean and error messages - */ - static validatePasswordStrength(password: string): { - isValid: boolean; - errors: string[]; - }; -} -//# sourceMappingURL=PasswordService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/PasswordService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/PasswordService.d.ts.map deleted file mode 100644 index 393448f9..00000000 --- a/SerpentRace_Backend/dist/Application/Services/PasswordService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PasswordService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/PasswordService.ts"],"names":[],"mappings":"AAGA,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAM;IAEzC;;;;OAIG;WACU,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAkB5D;;;;;OAKG;WACU,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBvF;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;CAyC1F"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/PasswordService.js b/SerpentRace_Backend/dist/Application/Services/PasswordService.js deleted file mode 100644 index 09d1e849..00000000 --- a/SerpentRace_Backend/dist/Application/Services/PasswordService.js +++ /dev/null @@ -1,124 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PasswordService = void 0; -const bcrypt = __importStar(require("bcrypt")); -const Logger_1 = require("./Logger"); -class PasswordService { - /** - * Hashes a plain text password using bcrypt - * @param password - The plain text password to hash - * @returns Promise - The hashed password - */ - static async hashPassword(password) { - try { - if (!password || typeof password !== 'string') { - throw new Error('Password must be a non-empty string'); - } - return await bcrypt.hash(password, this.SALT_ROUNDS); - } - catch (error) { - (0, Logger_1.logError)('PasswordService.hashPassword error', error instanceof Error ? error : new Error(String(error))); - if (error instanceof Error && error.message === 'Password must be a non-empty string') { - throw error; // Re-throw validation errors as-is - } - throw new Error('Failed to hash password'); - } - } - /** - * Verifies a plain text password against a hashed password - * @param password - The plain text password to verify - * @param hashedPassword - The hashed password to compare against - * @returns Promise - True if password matches, false otherwise - */ - static async verifyPassword(password, hashedPassword) { - try { - if (!password || typeof password !== 'string') { - return false; // Invalid input should return false, not throw - } - if (!hashedPassword || typeof hashedPassword !== 'string') { - return false; // Invalid input should return false, not throw - } - return await bcrypt.compare(password, hashedPassword); - } - catch (error) { - (0, Logger_1.logError)('PasswordService.verifyPassword error', error instanceof Error ? error : new Error(String(error))); - return false; // Return false on error instead of throwing - } - } - /** - * Validates password strength requirements - * @param password - The password to validate - * @returns object - Object containing isValid boolean and error messages - */ - static validatePasswordStrength(password) { - try { - const errors = []; - if (!password || typeof password !== 'string') { - errors.push('Password must be provided as a string'); - return { isValid: false, errors }; - } - if (password.length < 8) { - errors.push('Password must be at least 8 characters long'); - } - if (!/[A-Z]/.test(password)) { - errors.push('Password must contain at least one uppercase letter'); - } - if (!/[a-z]/.test(password)) { - errors.push('Password must contain at least one lowercase letter'); - } - if (!/\d/.test(password)) { - errors.push('Password must contain at least one number'); - } - if (!/[!@#$%^&*(),.?":{}|<>]/.test(password)) { - errors.push('Password must contain at least one special character'); - } - return { - isValid: errors.length === 0, - errors - }; - } - catch (error) { - (0, Logger_1.logError)('PasswordService.validatePasswordStrength error', error instanceof Error ? error : new Error(String(error))); - return { - isValid: false, - errors: ['Password validation failed due to internal error'] - }; - } - } -} -exports.PasswordService = PasswordService; -PasswordService.SALT_ROUNDS = 12; -//# sourceMappingURL=PasswordService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/PasswordService.js.map b/SerpentRace_Backend/dist/Application/Services/PasswordService.js.map deleted file mode 100644 index cd4e8da4..00000000 --- a/SerpentRace_Backend/dist/Application/Services/PasswordService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PasswordService.js","sourceRoot":"","sources":["../../../src/Application/Services/PasswordService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,qCAAoC;AAEpC,MAAa,eAAe;IAG1B;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,QAAgB;QACxC,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBAC9C,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;YACzD,CAAC;YAED,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACvD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,oCAAoC,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE1G,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,qCAAqC,EAAE,CAAC;gBACtF,MAAM,KAAK,CAAC,CAAC,mCAAmC;YAClD,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,QAAgB,EAAE,cAAsB;QAClE,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBAC9C,OAAO,KAAK,CAAC,CAAC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;gBACzB,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;YAC3D,CAAC;YAED,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7C,MAAM,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;YACtE,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;gBAC5B,MAAM;aACP,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,gDAAgD,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACtH,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,CAAC,kDAAkD,CAAC;aAC7D,CAAC;QACJ,CAAC;IACH,CAAC;;AA9FH,0CA+FC;AA9FyB,2BAAW,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/RedisService.d.ts b/SerpentRace_Backend/dist/Application/Services/RedisService.d.ts deleted file mode 100644 index 27acf798..00000000 --- a/SerpentRace_Backend/dist/Application/Services/RedisService.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export interface ActiveChatData { - chatId: string; - participants: string[]; - lastActivity: Date; - messageCount: number; - chatType: 'direct' | 'group' | 'game'; - gameId?: string; - name?: string; -} -export interface ActiveUserData { - userId: string; - activeChatIds: string[]; - lastActivity: Date; - isOnline: boolean; -} -export declare class RedisService { - private static instance; - private client; - private isConnected; - private constructor(); - static getInstance(): RedisService; - connect(): Promise; - disconnect(): Promise; - setActiveChat(chatId: string, chatData: ActiveChatData): Promise; - getActiveChat(chatId: string): Promise; - removeActiveChat(chatId: string): Promise; - getAllActiveChats(): Promise; - setActiveUser(userId: string, userData: ActiveUserData): Promise; - getActiveUser(userId: string): Promise; - removeActiveUser(userId: string): Promise; - addUserToChat(userId: string, chatId: string): Promise; - removeUserFromChat(userId: string, chatId: string): Promise; - getUserActiveChats(userId: string): Promise; - updateChatActivity(chatId: string, messageCount?: number): Promise; - getInactiveChats(inactivityMinutes: number): Promise; - cleanupInactiveChats(inactivityMinutes: number): Promise; - ping(): Promise; - isRedisConnected(): boolean; -} -//# sourceMappingURL=RedisService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/RedisService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/RedisService.d.ts.map deleted file mode 100644 index 40fe8718..00000000 --- a/SerpentRace_Backend/dist/Application/Services/RedisService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RedisService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/RedisService.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,IAAI,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,YAAY;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAe;IACtC,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,WAAW,CAAkB;IAErC,OAAO;WAyBO,WAAW,IAAI,YAAY;IAO5B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAWxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAU3B,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBtE,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAwB7D,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/C,iBAAiB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IA4B9C,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBtE,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAqB7D,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS/C,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB5D,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAajE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAUrD,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAexE,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAc9D,oBAAoB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAelE,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAU9B,gBAAgB,IAAI,OAAO;CAGrC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/RedisService.js b/SerpentRace_Backend/dist/Application/Services/RedisService.js deleted file mode 100644 index 50747941..00000000 --- a/SerpentRace_Backend/dist/Application/Services/RedisService.js +++ /dev/null @@ -1,273 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RedisService = void 0; -const redis_1 = require("redis"); -const Logger_1 = require("./Logger"); -class RedisService { - constructor() { - this.isConnected = false; - const redisUrl = process.env.REDIS_URL || 'redis://localhost:6379'; - this.client = (0, redis_1.createClient)({ - url: redisUrl, - socket: { - reconnectStrategy: (retries) => Math.min(retries * 50, 500) - } - }); - this.client.on('error', (err) => { - (0, Logger_1.logError)('Redis connection error', err); - this.isConnected = false; - }); - this.client.on('connect', () => { - (0, Logger_1.logStartup)('Redis client connected successfully'); - this.isConnected = true; - }); - this.client.on('disconnect', () => { - (0, Logger_1.logWarning)('Redis client disconnected'); - this.isConnected = false; - }); - } - static getInstance() { - if (!RedisService.instance) { - RedisService.instance = new RedisService(); - } - return RedisService.instance; - } - async connect() { - try { - if (!this.isConnected) { - await this.client.connect(); - } - } - catch (error) { - (0, Logger_1.logError)('Failed to connect to Redis', error); - throw error; - } - } - async disconnect() { - try { - if (this.isConnected) { - await this.client.disconnect(); - } - } - catch (error) { - (0, Logger_1.logError)('Failed to disconnect from Redis', error); - } - } - async setActiveChat(chatId, chatData) { - try { - const key = `active_chat:${chatId}`; - await this.client.hSet(key, { - chatId: chatData.chatId, - participants: JSON.stringify(chatData.participants), - lastActivity: chatData.lastActivity.toISOString(), - messageCount: chatData.messageCount.toString(), - chatType: chatData.chatType, - gameId: chatData.gameId || '', - name: chatData.name || '' - }); - // Set expiration for 1 hour of inactivity - await this.client.expire(key, 3600); - } - catch (error) { - (0, Logger_1.logError)(`Failed to set active chat ${chatId}`, error); - } - } - async getActiveChat(chatId) { - try { - const key = `active_chat:${chatId}`; - const data = await this.client.hGetAll(key); - if (!data.chatId) { - return null; - } - return { - chatId: data.chatId, - participants: JSON.parse(data.participants), - lastActivity: new Date(data.lastActivity), - messageCount: parseInt(data.messageCount, 10), - chatType: data.chatType, - gameId: data.gameId || undefined, - name: data.name || undefined - }; - } - catch (error) { - (0, Logger_1.logError)(`Failed to get active chat ${chatId}`, error); - return null; - } - } - async removeActiveChat(chatId) { - try { - const key = `active_chat:${chatId}`; - await this.client.del(key); - } - catch (error) { - (0, Logger_1.logError)(`Failed to remove active chat ${chatId}`, error); - } - } - async getAllActiveChats() { - try { - const pattern = 'active_chat:*'; - const keys = await this.client.keys(pattern); - const chats = []; - for (const key of keys) { - const data = await this.client.hGetAll(key); - if (data.chatId) { - chats.push({ - chatId: data.chatId, - participants: JSON.parse(data.participants), - lastActivity: new Date(data.lastActivity), - messageCount: parseInt(data.messageCount, 10), - chatType: data.chatType, - gameId: data.gameId || undefined, - name: data.name || undefined - }); - } - } - return chats; - } - catch (error) { - (0, Logger_1.logError)('Failed to get all active chats', error); - return []; - } - } - async setActiveUser(userId, userData) { - try { - const key = `active_user:${userId}`; - await this.client.hSet(key, { - userId: userData.userId, - activeChatIds: JSON.stringify(userData.activeChatIds), - lastActivity: userData.lastActivity.toISOString(), - isOnline: userData.isOnline.toString() - }); - // Set expiration for 2 hours - await this.client.expire(key, 7200); - } - catch (error) { - (0, Logger_1.logError)(`Failed to set active user ${userId}`, error); - } - } - async getActiveUser(userId) { - try { - const key = `active_user:${userId}`; - const data = await this.client.hGetAll(key); - if (!data.userId) { - return null; - } - return { - userId: data.userId, - activeChatIds: JSON.parse(data.activeChatIds), - lastActivity: new Date(data.lastActivity), - isOnline: data.isOnline === 'true' - }; - } - catch (error) { - (0, Logger_1.logError)(`Failed to get active user ${userId}`, error); - return null; - } - } - async removeActiveUser(userId) { - try { - const key = `active_user:${userId}`; - await this.client.del(key); - } - catch (error) { - (0, Logger_1.logError)(`Failed to remove active user ${userId}`, error); - } - } - async addUserToChat(userId, chatId) { - try { - const userData = await this.getActiveUser(userId) || { - userId, - activeChatIds: [], - lastActivity: new Date(), - isOnline: true - }; - if (!userData.activeChatIds.includes(chatId)) { - userData.activeChatIds.push(chatId); - userData.lastActivity = new Date(); - await this.setActiveUser(userId, userData); - } - } - catch (error) { - (0, Logger_1.logError)(`Failed to add user ${userId} to chat ${chatId}`, error); - } - } - async removeUserFromChat(userId, chatId) { - try { - const userData = await this.getActiveUser(userId); - if (userData) { - userData.activeChatIds = userData.activeChatIds.filter(id => id !== chatId); - userData.lastActivity = new Date(); - await this.setActiveUser(userId, userData); - } - } - catch (error) { - (0, Logger_1.logError)(`Failed to remove user ${userId} from chat ${chatId}`, error); - } - } - async getUserActiveChats(userId) { - try { - const userData = await this.getActiveUser(userId); - return userData?.activeChatIds || []; - } - catch (error) { - (0, Logger_1.logError)(`Failed to get active chats for user ${userId}`, error); - return []; - } - } - async updateChatActivity(chatId, messageCount) { - try { - const chatData = await this.getActiveChat(chatId); - if (chatData) { - chatData.lastActivity = new Date(); - if (messageCount !== undefined) { - chatData.messageCount = messageCount; - } - await this.setActiveChat(chatId, chatData); - } - } - catch (error) { - (0, Logger_1.logError)(`Failed to update chat activity ${chatId}`, error); - } - } - async getInactiveChats(inactivityMinutes) { - try { - const cutoffTime = new Date(Date.now() - inactivityMinutes * 60 * 1000); - const allChats = await this.getAllActiveChats(); - return allChats - .filter(chat => chat.lastActivity < cutoffTime) - .map(chat => chat.chatId); - } - catch (error) { - (0, Logger_1.logError)('Failed to get inactive chats', error); - return []; - } - } - async cleanupInactiveChats(inactivityMinutes) { - try { - const inactiveChats = await this.getInactiveChats(inactivityMinutes); - for (const chatId of inactiveChats) { - await this.removeActiveChat(chatId); - } - return inactiveChats; - } - catch (error) { - (0, Logger_1.logError)('Failed to cleanup inactive chats', error); - return []; - } - } - async ping() { - try { - const result = await this.client.ping(); - return result === 'PONG'; - } - catch (error) { - (0, Logger_1.logError)('Redis ping failed', error); - return false; - } - } - isRedisConnected() { - return this.isConnected; - } -} -exports.RedisService = RedisService; -//# sourceMappingURL=RedisService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/RedisService.js.map b/SerpentRace_Backend/dist/Application/Services/RedisService.js.map deleted file mode 100644 index 8319ace6..00000000 --- a/SerpentRace_Backend/dist/Application/Services/RedisService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RedisService.js","sourceRoot":"","sources":["../../../src/Application/Services/RedisService.ts"],"names":[],"mappings":";;;AAAA,iCAAsD;AACtD,qCAA4D;AAmB5D,MAAa,YAAY;IAKrB;QAFQ,gBAAW,GAAY,KAAK,CAAC;QAGjC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,wBAAwB,CAAC;QACnE,IAAI,CAAC,MAAM,GAAG,IAAA,oBAAY,EAAC;YACvB,GAAG,EAAE,QAAQ;YACb,MAAM,EAAE;gBACJ,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,GAAG,CAAC;aAC9D;SACJ,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YAC5B,IAAA,iBAAQ,EAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;YACxC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;YAC3B,IAAA,mBAAU,EAAC,qCAAqC,CAAC,CAAC;YAClD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;YAC9B,IAAA,mBAAU,EAAC,2BAA2B,CAAC,CAAC;YACxC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC7B,CAAC,CAAC,CAAC;IACP,CAAC;IAEM,MAAM,CAAC,WAAW;QACrB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;YACzB,YAAY,CAAC,QAAQ,GAAG,IAAI,YAAY,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B;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ;AA7RD,oCA6RC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/TokenService.d.ts b/SerpentRace_Backend/dist/Application/Services/TokenService.d.ts deleted file mode 100644 index 713225d2..00000000 --- a/SerpentRace_Backend/dist/Application/Services/TokenService.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export interface VerificationToken { - token: string; - expiresAt: Date; - createdAt: Date; -} -export interface PasswordResetToken { - token: string; - expiresAt: Date; - createdAt: Date; -} -export declare class TokenService { - private static readonly VERIFICATION_TOKEN_EXPIRES_HOURS; - private static readonly PASSWORD_RESET_TOKEN_EXPIRES_HOURS; - private static readonly TOKEN_LENGTH; - /** - * Generate a secure random token - * @param length - Length of the token in bytes (default: 32) - * @returns Hexadecimal string token - */ - static generateSecureToken(length?: number): string; - /** - * Generate email verification token with expiration - * @returns VerificationToken object with token and expiration info - */ - static generateVerificationToken(): VerificationToken; - /** - * Generate password reset token with expiration - * @returns PasswordResetToken object with token and expiration info - */ - static generatePasswordResetToken(): PasswordResetToken; - /** - * Check if a token has expired - * @param expiresAt - Expiration date of the token - * @returns True if token has expired, false otherwise - */ - static isTokenExpired(expiresAt: Date): boolean; - /** - * Validate token format (basic validation) - * @param token - Token to validate - * @returns True if token format is valid, false otherwise - */ - static isValidTokenFormat(token: string): boolean; - /** - * Generate a verification URL with token - * @param baseUrl - Base URL of the application - * @param token - Verification token - * @returns Complete verification URL - */ - static generateVerificationUrl(baseUrl: string, token: string): string; - /** - * Generate a password reset URL with token - * @param baseUrl - Base URL of the application - * @param token - Password reset token - * @returns Complete password reset URL - */ - static generatePasswordResetUrl(baseUrl: string, token: string): string; - /** - * Hash a token for secure storage in database - * @param token - Plain text token to hash - * @returns Hashed token - */ - static hashToken(token: string): Promise; - /** - * Verify a plain text token against a hashed token - * @param plainToken - Plain text token to verify - * @param hashedToken - Hashed token to compare against - * @returns True if tokens match, false otherwise - */ - static verifyToken(plainToken: string, hashedToken: string): Promise; - /** - * Get token expiration info in human-readable format - * @param expiresAt - Expiration date - * @returns Human-readable expiration info - */ - static getExpirationInfo(expiresAt: Date): { - expired: boolean; - timeLeft: string; - }; -} -//# sourceMappingURL=TokenService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/TokenService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/TokenService.d.ts.map deleted file mode 100644 index b3db302e..00000000 --- a/SerpentRace_Backend/dist/Application/Services/TokenService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/TokenService.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gCAAgC,CAAM;IAC9D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kCAAkC,CAAK;IAC/D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAM;IAE1C;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAM,GAAE,MAAkC,GAAG,MAAM;IAS9E;;;OAGG;IACH,MAAM,CAAC,yBAAyB,IAAI,iBAAiB;IAiBrD;;;OAGG;IACH,MAAM,CAAC,0BAA0B,IAAI,kBAAkB;IAiBvD;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO;IAS/C;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAiBjD;;;;;OAKG;IACH,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAWtE;;;;;OAKG;IACH,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAWvE;;;;OAIG;WACU,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAatD;;;;;OAKG;WACU,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAcnF;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,IAAI,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE;CAuClF"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/TokenService.js b/SerpentRace_Backend/dist/Application/Services/TokenService.js deleted file mode 100644 index b26a3ea5..00000000 --- a/SerpentRace_Backend/dist/Application/Services/TokenService.js +++ /dev/null @@ -1,245 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TokenService = void 0; -const crypto = __importStar(require("crypto")); -const Logger_1 = require("./Logger"); -class TokenService { - /** - * Generate a secure random token - * @param length - Length of the token in bytes (default: 32) - * @returns Hexadecimal string token - */ - static generateSecureToken(length = TokenService.TOKEN_LENGTH) { - try { - return crypto.randomBytes(length).toString('hex'); - } - catch (error) { - (0, Logger_1.logError)('TokenService.generateSecureToken error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to generate secure token'); - } - } - /** - * Generate email verification token with expiration - * @returns VerificationToken object with token and expiration info - */ - static generateVerificationToken() { - try { - const token = this.generateSecureToken(); - const createdAt = new Date(); - const expiresAt = new Date(createdAt.getTime() + (this.VERIFICATION_TOKEN_EXPIRES_HOURS * 60 * 60 * 1000)); - return { - token, - createdAt, - expiresAt - }; - } - catch (error) { - (0, Logger_1.logError)('TokenService.generateVerificationToken error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to generate verification token'); - } - } - /** - * Generate password reset token with expiration - * @returns PasswordResetToken object with token and expiration info - */ - static generatePasswordResetToken() { - try { - const token = this.generateSecureToken(); - const createdAt = new Date(); - const expiresAt = new Date(createdAt.getTime() + (this.PASSWORD_RESET_TOKEN_EXPIRES_HOURS * 60 * 60 * 1000)); - return { - token, - createdAt, - expiresAt - }; - } - catch (error) { - (0, Logger_1.logError)('TokenService.generatePasswordResetToken error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to generate password reset token'); - } - } - /** - * Check if a token has expired - * @param expiresAt - Expiration date of the token - * @returns True if token has expired, false otherwise - */ - static isTokenExpired(expiresAt) { - try { - return new Date() > expiresAt; - } - catch (error) { - (0, Logger_1.logError)('TokenService.isTokenExpired error', error instanceof Error ? error : new Error(String(error))); - return true; // Assume expired on error for security - } - } - /** - * Validate token format (basic validation) - * @param token - Token to validate - * @returns True if token format is valid, false otherwise - */ - static isValidTokenFormat(token) { - try { - if (!token || typeof token !== 'string') { - return false; - } - // Check if token is hexadecimal and has expected length - const hexRegex = /^[a-f0-9]+$/i; - const expectedLength = this.TOKEN_LENGTH * 2; // Each byte becomes 2 hex characters - return hexRegex.test(token) && token.length === expectedLength; - } - catch (error) { - (0, Logger_1.logError)('TokenService.isValidTokenFormat error', error instanceof Error ? error : new Error(String(error))); - return false; - } - } - /** - * Generate a verification URL with token - * @param baseUrl - Base URL of the application - * @param token - Verification token - * @returns Complete verification URL - */ - static generateVerificationUrl(baseUrl, token) { - try { - // Remove trailing slash from baseUrl if present - const cleanBaseUrl = baseUrl.replace(/\/$/, ''); - return `${cleanBaseUrl}/api/auth/verify-email?token=${encodeURIComponent(token)}`; - } - catch (error) { - (0, Logger_1.logError)('TokenService.generateVerificationUrl error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to generate verification URL'); - } - } - /** - * Generate a password reset URL with token - * @param baseUrl - Base URL of the application - * @param token - Password reset token - * @returns Complete password reset URL - */ - static generatePasswordResetUrl(baseUrl, token) { - try { - // Remove trailing slash from baseUrl if present - const cleanBaseUrl = baseUrl.replace(/\/$/, ''); - return `${cleanBaseUrl}/api/auth/reset-password?token=${encodeURIComponent(token)}`; - } - catch (error) { - (0, Logger_1.logError)('TokenService.generatePasswordResetUrl error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to generate password reset URL'); - } - } - /** - * Hash a token for secure storage in database - * @param token - Plain text token to hash - * @returns Hashed token - */ - static async hashToken(token) { - try { - if (!token || typeof token !== 'string') { - throw new Error('Token must be a non-empty string'); - } - return crypto.createHash('sha256').update(token).digest('hex'); - } - catch (error) { - (0, Logger_1.logError)('TokenService.hashToken error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to hash token'); - } - } - /** - * Verify a plain text token against a hashed token - * @param plainToken - Plain text token to verify - * @param hashedToken - Hashed token to compare against - * @returns True if tokens match, false otherwise - */ - static async verifyToken(plainToken, hashedToken) { - try { - if (!plainToken || !hashedToken) { - return false; - } - const hashedPlainToken = await this.hashToken(plainToken); - return hashedPlainToken === hashedToken; - } - catch (error) { - (0, Logger_1.logError)('TokenService.verifyToken error', error instanceof Error ? error : new Error(String(error))); - return false; - } - } - /** - * Get token expiration info in human-readable format - * @param expiresAt - Expiration date - * @returns Human-readable expiration info - */ - static getExpirationInfo(expiresAt) { - try { - const now = new Date(); - const expired = now > expiresAt; - if (expired) { - const timeAgo = Math.floor((now.getTime() - expiresAt.getTime()) / (1000 * 60)); - return { - expired: true, - timeLeft: `Expired ${timeAgo} minute(s) ago` - }; - } - const timeLeft = Math.floor((expiresAt.getTime() - now.getTime()) / (1000 * 60)); - const hours = Math.floor(timeLeft / 60); - const minutes = timeLeft % 60; - let timeString = ''; - if (hours > 0) { - timeString = `${hours} hour(s)`; - if (minutes > 0) { - timeString += ` and ${minutes} minute(s)`; - } - } - else { - timeString = `${minutes} minute(s)`; - } - return { - expired: false, - timeLeft: `Expires in ${timeString}` - }; - } - catch (error) { - (0, Logger_1.logError)('TokenService.getExpirationInfo error', error instanceof Error ? error : new Error(String(error))); - return { - expired: true, - timeLeft: 'Unable to determine expiration' - }; - } - } -} -exports.TokenService = TokenService; -TokenService.VERIFICATION_TOKEN_EXPIRES_HOURS = 24; -TokenService.PASSWORD_RESET_TOKEN_EXPIRES_HOURS = 1; -TokenService.TOKEN_LENGTH = 32; -//# sourceMappingURL=TokenService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/TokenService.js.map b/SerpentRace_Backend/dist/Application/Services/TokenService.js.map deleted file mode 100644 index eb73ba13..00000000 --- a/SerpentRace_Backend/dist/Application/Services/TokenService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TokenService.js","sourceRoot":"","sources":["../../../src/Application/Services/TokenService.ts"],"names":[],"mappings":";;;;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AE,cAAc,UAAU,EAAE;aACrC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,sCAAsC,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC5G,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,gCAAgC;aAC3C,CAAC;QACJ,CAAC;IACH,CAAC;;AApNH,oCAqNC;AApNyB,6CAAgC,GAAG,EAAE,CAAC;AACtC,+CAAkC,GAAG,CAAC,CAAC;AACvC,yBAAY,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.d.ts b/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.d.ts deleted file mode 100644 index 0d89fc80..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Request, Response, NextFunction } from 'express'; -/** - * Common validation middleware functions for request validation - */ -export declare class ValidationMiddleware { - /** - * Validates required fields in request body - * @param requiredFields Array of required field names - */ - static validateRequiredFields(requiredFields: string[]): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates field types in request body - * @param fieldTypes Object mapping field names to expected types - */ - static validateFieldTypes(fieldTypes: Record): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates string field length constraints - * @param constraints Object mapping field names to min/max length - */ - static validateStringLength(constraints: Record): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates email format - * @param emailFields Array of field names that should contain valid emails - */ - static validateEmailFormat(emailFields: string[]): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates UUIDs format - * @param uuidFields Array of field names that should contain valid UUIDs - */ - static validateUUIDFormat(uuidFields: string[]): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates numeric constraints - * @param constraints Object mapping field names to min/max values - */ - static validateNumericConstraints(constraints: Record): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates that arrays are not empty - * @param arrayFields Array of field names that should contain non-empty arrays - */ - static validateNonEmptyArrays(arrayFields: string[]): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Validates allowed values for enum-like fields - * @param allowedValues Object mapping field names to arrays of allowed values - */ - static validateAllowedValues(allowedValues: Record): (req: Request, res: Response, next: NextFunction) => Response> | undefined; - /** - * Combines multiple validation middlewares - * @param validations Array of validation middleware functions - */ - static combine(validations: Array<(req: Request, res: Response, next: NextFunction) => void>): (req: Request, res: Response, next: NextFunction) => Promise; - /** - * Helper method to get nested values from request - * @param req Request object - * @param path Dot-notation path like 'body.user.id' - */ - private static getNestedValue; -} -//# sourceMappingURL=ValidationMiddleware.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.d.ts.map b/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.d.ts.map deleted file mode 100644 index 9b0c9f28..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ValidationMiddleware.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/ValidationMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI1D;;GAEG;AACH,qBAAa,oBAAoB;IAE7B;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,cAAc,EAAE,MAAM,EAAE,IAC1C,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY;IAyB3D;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC,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KAAK,QAAQ,EAAE,MAAM,YAAY;IA+BjE;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;CAchC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.js b/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.js deleted file mode 100644 index 5105f541..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.js +++ /dev/null @@ -1,268 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValidationMiddleware = void 0; -const ErrorResponseService_1 = require("./ErrorResponseService"); -const Logger_1 = require("./Logger"); -/** - * Common validation middleware functions for request validation - */ -class ValidationMiddleware { - /** - * Validates required fields in request body - * @param requiredFields Array of required field names - */ - static validateRequiredFields(requiredFields) { - return (req, res, next) => { - const missingFields = []; - for (const field of requiredFields) { - if (!req.body || req.body[field] === undefined || req.body[field] === null || req.body[field] === '') { - missingFields.push(field); - } - } - if (missingFields.length > 0) { - (0, Logger_1.logWarning)('Validation failed - missing required fields', { - missingFields, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Missing required fields', { missingFields }); - } - next(); - }; - } - /** - * Validates field types in request body - * @param fieldTypes Object mapping field names to expected types - */ - static validateFieldTypes(fieldTypes) { - return (req, res, next) => { - const typeErrors = []; - for (const [field, expectedType] of Object.entries(fieldTypes)) { - if (req.body && req.body[field] !== undefined) { - const actualType = Array.isArray(req.body[field]) ? 'array' : typeof req.body[field]; - if (actualType !== expectedType) { - typeErrors.push(`Field '${field}' should be ${expectedType}, got ${actualType}`); - } - } - } - if (typeErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - invalid field types', { - typeErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Invalid field types', { errors: typeErrors }); - } - next(); - }; - } - /** - * Validates string field length constraints - * @param constraints Object mapping field names to min/max length - */ - static validateStringLength(constraints) { - return (req, res, next) => { - const lengthErrors = []; - for (const [field, constraint] of Object.entries(constraints)) { - if (req.body && typeof req.body[field] === 'string') { - const value = req.body[field]; - if (constraint.min !== undefined && value.length < constraint.min) { - lengthErrors.push(`Field '${field}' must be at least ${constraint.min} characters`); - } - if (constraint.max !== undefined && value.length > constraint.max) { - lengthErrors.push(`Field '${field}' must not exceed ${constraint.max} characters`); - } - } - } - if (lengthErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - string length constraints', { - lengthErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'String length validation failed', { errors: lengthErrors }); - } - next(); - }; - } - /** - * Validates email format - * @param emailFields Array of field names that should contain valid emails - */ - static validateEmailFormat(emailFields) { - return (req, res, next) => { - const emailErrors = []; - const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; - for (const field of emailFields) { - if (req.body && req.body[field] && typeof req.body[field] === 'string') { - if (!emailRegex.test(req.body[field])) { - emailErrors.push(`Field '${field}' must contain a valid email address`); - } - } - } - if (emailErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - invalid email format', { - emailErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Email format validation failed', { errors: emailErrors }); - } - next(); - }; - } - /** - * Validates UUIDs format - * @param uuidFields Array of field names that should contain valid UUIDs - */ - static validateUUIDFormat(uuidFields) { - return (req, res, next) => { - const uuidErrors = []; - const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; - for (const field of uuidFields) { - const value = field.includes('.') - ? this.getNestedValue(req, field) - : req.body?.[field] || req.params?.[field] || req.query?.[field]; - if (value && typeof value === 'string') { - if (!uuidRegex.test(value)) { - uuidErrors.push(`Field '${field}' must contain a valid UUID`); - } - } - } - if (uuidErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - invalid UUID format', { - uuidErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'UUID format validation failed', { errors: uuidErrors }); - } - next(); - }; - } - /** - * Validates numeric constraints - * @param constraints Object mapping field names to min/max values - */ - static validateNumericConstraints(constraints) { - return (req, res, next) => { - const numericErrors = []; - for (const [field, constraint] of Object.entries(constraints)) { - if (req.body && typeof req.body[field] === 'number') { - const value = req.body[field]; - if (constraint.min !== undefined && value < constraint.min) { - numericErrors.push(`Field '${field}' must be at least ${constraint.min}`); - } - if (constraint.max !== undefined && value > constraint.max) { - numericErrors.push(`Field '${field}' must not exceed ${constraint.max}`); - } - } - } - if (numericErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - numeric constraints', { - numericErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Numeric validation failed', { errors: numericErrors }); - } - next(); - }; - } - /** - * Validates that arrays are not empty - * @param arrayFields Array of field names that should contain non-empty arrays - */ - static validateNonEmptyArrays(arrayFields) { - return (req, res, next) => { - const arrayErrors = []; - for (const field of arrayFields) { - if (req.body && Array.isArray(req.body[field])) { - if (req.body[field].length === 0) { - arrayErrors.push(`Field '${field}' must not be empty`); - } - } - else if (req.body && req.body[field] !== undefined) { - arrayErrors.push(`Field '${field}' must be an array`); - } - } - if (arrayErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - empty arrays', { - arrayErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Array validation failed', { errors: arrayErrors }); - } - next(); - }; - } - /** - * Validates allowed values for enum-like fields - * @param allowedValues Object mapping field names to arrays of allowed values - */ - static validateAllowedValues(allowedValues) { - return (req, res, next) => { - const valueErrors = []; - for (const [field, allowed] of Object.entries(allowedValues)) { - if (req.body && req.body[field] !== undefined) { - if (!allowed.includes(req.body[field])) { - valueErrors.push(`Field '${field}' must be one of: ${allowed.join(', ')}`); - } - } - } - if (valueErrors.length > 0) { - (0, Logger_1.logWarning)('Validation failed - disallowed values', { - valueErrors, - endpoint: req.path - }, req, res); - return ErrorResponseService_1.ErrorResponseService.sendBadRequest(res, 'Value validation failed', { errors: valueErrors }); - } - next(); - }; - } - /** - * Combines multiple validation middlewares - * @param validations Array of validation middleware functions - */ - static combine(validations) { - return async (req, res, next) => { - let currentIndex = 0; - const runNext = (error) => { - if (error) { - return next(error); - } - if (currentIndex >= validations.length) { - return next(); - } - const currentValidation = validations[currentIndex++]; - try { - currentValidation(req, res, (err) => { - if (res.headersSent) { - return; // Response already sent, don't continue - } - runNext(err); - }); - } - catch (error) { - (0, Logger_1.logError)('Validation middleware error', error, req, res); - ErrorResponseService_1.ErrorResponseService.sendInternalServerError(res); - } - }; - runNext(); - }; - } - /** - * Helper method to get nested values from request - * @param req Request object - * @param path Dot-notation path like 'body.user.id' - */ - static getNestedValue(req, path) { - const parts = path.split('.'); - let current = req; - for (const part of parts) { - if (current && typeof current === 'object') { - current = current[part]; - } - else { - return undefined; - } - } - return current; - } -} -exports.ValidationMiddleware = ValidationMiddleware; -//# sourceMappingURL=ValidationMiddleware.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.js.map b/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.js.map deleted file mode 100644 index 33112c86..00000000 --- a/SerpentRace_Backend/dist/Application/Services/ValidationMiddleware.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ValidationMiddleware.js","sourceRoot":"","sources":["../../../src/Application/Services/ValidationMiddleware.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAC9D,qCAAgD;AAEhD;;GAEG;AACH,MAAa,oBAAoB;IAE7B;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,cAAwB;QAClD,OAAO,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACvD,MAAM,aAAa,GAAa,EAAE,CAAC;YAEnC,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CA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ACD,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAS,EAAE,EAAE;wBACtC,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;4BAClB,OAAO,CAAC,wCAAwC;wBACpD,CAAC;wBACD,OAAO,CAAC,GAAG,CAAC,CAAC;oBACjB,CAAC,CAAC,CAAC;gBACP,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,IAAA,iBAAQ,EAAC,6BAA6B,EAAE,KAAc,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;oBAClE,2CAAoB,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;gBACtD,CAAC;YACL,CAAC,CAAC;YAEF,OAAO,EAAE,CAAC;QACd,CAAC,CAAC;IACN,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,cAAc,CAAC,GAAY,EAAE,IAAY;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,OAAO,GAAQ,GAAG,CAAC;QAEvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;gBACzC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACJ,OAAO,SAAS,CAAC;YACrB,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AA7UD,oDA6UC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/WebSocketService.d.ts b/SerpentRace_Backend/dist/Application/Services/WebSocketService.d.ts deleted file mode 100644 index ecedf33c..00000000 --- a/SerpentRace_Backend/dist/Application/Services/WebSocketService.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Server as HttpServer } from 'http'; -import { ChatAggregate } from '../../Domain/Chat/ChatAggregate'; -export declare class WebSocketService { - private io; - private jwtService; - private chatRepository; - private chatArchiveRepository; - private userRepository; - private redisService; - private connectedUsers; - private chatTimeout; - private maxMessagesPerUser; - private messageCleanupWeeks; - private userMessageCounts; - constructor(httpServer: HttpServer); - private initializeRedis; - private setupSocketHandlers; - private handleConnection; - private handleJoinChat; - private handleLeaveChat; - private handleSendMessage; - private handleCreateGroup; - private handleCreateDirectChat; - private handleCreateGameChat; - private handleGetChatHistory; - private handleDeleteChat; - private handleDeleteChatArchive; - private handleDeleteMessage; - private handleDisconnection; - private calculateUnreadMessages; - private pruneMessages; - private notifyOfflineUsers; - private setupArchivingScheduler; - createGameChat(gameId: string, gameName: string, playerIds: string[]): Promise; - getConnectedUserCount(): number; - isUserConnected(userId: string): boolean; - cleanup(): Promise; - /** - * Manually trigger cleanup of old messages and chats - * This can be called by admin endpoints for maintenance - */ - triggerManualCleanup(): Promise<{ - deletedArchives: number; - deletedChats: number; - }>; - /** - * Clean up old messages from archived chats based on messageCleanupWeeks setting - */ - private cleanupOldMessages; - /** - * Check if user has exceeded message rate limit - * @param userId User ID to check - * @returns true if within limit, false if exceeded - */ - private checkMessageRateLimit; - /** - * Delete a specific message from chat history - * This can be used for moderation purposes - */ - deleteMessage(chatId: string, messageId: string, moderatorUserId: string): Promise; - /** - * Clean up old user message count entries (called periodically) - */ - private cleanupMessageCounts; -} -//# sourceMappingURL=WebSocketService.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/WebSocketService.d.ts.map b/SerpentRace_Backend/dist/Application/Services/WebSocketService.d.ts.map deleted file mode 100644 index 403b0ae8..00000000 --- a/SerpentRace_Backend/dist/Application/Services/WebSocketService.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebSocketService.d.ts","sourceRoot":"","sources":["../../../src/Application/Services/WebSocketService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAM5C,OAAO,EAAE,aAAa,EAAmC,MAAM,iCAAiC,CAAC;AAkDjG,qB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,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiFxG;;OAEG;IACH,OAAO,CAAC,oBAAoB;CAU/B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/WebSocketService.js b/SerpentRace_Backend/dist/Application/Services/WebSocketService.js deleted file mode 100644 index 8d19ccfc..00000000 --- a/SerpentRace_Backend/dist/Application/Services/WebSocketService.js +++ /dev/null @@ -1,966 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WebSocketService = void 0; -const socket_io_1 = require("socket.io"); -const JWTService_1 = require("./JWTService"); -const ChatRepository_1 = require("../../Infrastructure/Repository/ChatRepository"); -const ChatArchiveRepository_1 = require("../../Infrastructure/Repository/ChatArchiveRepository"); -const UserRepository_1 = require("../../Infrastructure/Repository/UserRepository"); -const ChatAggregate_1 = require("../../Domain/Chat/ChatAggregate"); -const UserAggregate_1 = require("../../Domain/User/UserAggregate"); -const Logger_1 = require("./Logger"); -const RedisService_1 = require("./RedisService"); -const uuid_1 = require("uuid"); -class WebSocketService { - constructor(httpServer) { - this.connectedUsers = new Map(); - this.userMessageCounts = new Map(); - this.io = new socket_io_1.Server(httpServer, { - cors: { - origin: ['http://localhost:3000', 'http://localhost:3001', 'http://localhost:8080'], - methods: ['GET', 'POST'], - credentials: true - } - }); - this.jwtService = new JWTService_1.JWTService(); - this.chatRepository = new ChatRepository_1.ChatRepository(); - this.chatArchiveRepository = new ChatArchiveRepository_1.ChatArchiveRepository(); - this.userRepository = new UserRepository_1.UserRepository(); - this.redisService = RedisService_1.RedisService.getInstance(); - this.chatTimeout = parseInt(process.env.CHAT_INACTIVITY_TIMEOUT_MINUTES || '30'); - this.maxMessagesPerUser = parseInt(process.env.CHAT_MAX_MESSAGES_PER_USER || '100'); - this.messageCleanupWeeks = parseInt(process.env.CHAT_MESSAGE_CLEANUP_WEEKS || '4'); - // Initialize Redis connection - this.initializeRedis(); - this.setupSocketHandlers(); - this.setupArchivingScheduler(); - (0, Logger_1.logRequest)('WebSocket service initialized', undefined, undefined, { - chatTimeoutMinutes: this.chatTimeout - }); - } - async initializeRedis() { - try { - await this.redisService.connect(); - } - catch (error) { - (0, Logger_1.logError)('Failed to initialize Redis connection', error); - } - } - setupSocketHandlers() { - this.io.use(async (socket, next) => { - try { - const token = socket.handshake.auth.token || socket.handshake.headers.cookie - ?.split(';') - .find(c => c.trim().startsWith('auth_token=')) - ?.split('=')[1]; - if (!token) { - (0, Logger_1.logWarning)('WebSocket connection rejected - No token provided', { - socketId: socket.id, - ip: socket.handshake.address - }); - return next(new Error('Authentication required')); - } - // Create a mock request object for JWT verification - const mockRequest = { - headers: { - authorization: `Bearer ${token}`, - cookie: `auth_token=${token}` - }, - cookies: { - auth_token: token - } - }; - const payload = this.jwtService.verify(mockRequest); - if (!payload) { - (0, Logger_1.logWarning)('WebSocket connection rejected - Invalid token', { - socketId: socket.id, - ip: socket.handshake.address - }); - return next(new Error('Invalid token')); - } - socket.userId = payload.userId; - socket.authLevel = payload.authLevel; - socket.userStatus = payload.userStatus; - socket.orgId = payload.orgId; - (0, Logger_1.logAuth)('WebSocket connection authenticated', payload.userId, { - socketId: socket.id, - authLevel: payload.authLevel, - userStatus: payload.userStatus, - orgId: payload.orgId - }); - next(); - } - catch (error) { - (0, Logger_1.logError)('WebSocket authentication error', error); - next(new Error('Authentication failed')); - } - }); - this.io.on('connection', (socket) => { - this.handleConnection(socket); - }); - } - async handleConnection(socket) { - const userId = socket.userId; - // Store connected user - this.connectedUsers.set(userId, socket); - // Load user's active chats and join rooms - try { - const userChats = await this.chatRepository.findActiveChatsForUser(userId); - const chatIds = userChats.map(chat => chat.id); - // Join all chat rooms - chatIds.forEach(chatId => { - socket.join(chatId); - }); - // Store user's chat memberships in Redis - await this.redisService.setActiveUser(userId, { - userId, - activeChatIds: chatIds, - lastActivity: new Date(), - isOnline: true - }); - // Also store each active chat in Redis - for (const chat of userChats) { - await this.redisService.setActiveChat(chat.id, { - chatId: chat.id, - participants: chat.users, - lastActivity: chat.lastActivity || new Date(), - messageCount: chat.messages.length, - chatType: chat.type, - gameId: chat.gameId || undefined, - name: chat.name || undefined - }); - } - (0, Logger_1.logAuth)('User connected to WebSocket', userId, { - socketId: socket.id, - activeChats: chatIds.length - }); - // Send user their active chats with unread counts - const chatsWithUnread = await Promise.all(userChats.map(async (chat) => ({ - id: chat.id, - type: chat.type, - name: chat.name, - gameId: chat.gameId, - users: chat.users, - lastActivity: chat.lastActivity, - unreadCount: this.calculateUnreadMessages(chat, userId), - isArchived: false - }))); - socket.emit('chats:list', chatsWithUnread); - } - catch (error) { - (0, Logger_1.logError)('Error loading user chats on connection', error, undefined, undefined); - socket.emit('error', { message: 'Failed to load chats' }); - } - // Setup event handlers - socket.on('chat:join', (data) => this.handleJoinChat(socket, data)); - socket.on('chat:leave', (data) => this.handleLeaveChat(socket, data)); - socket.on('message:send', (data) => this.handleSendMessage(socket, data)); - socket.on('group:create', (data) => this.handleCreateGroup(socket, data)); - socket.on('chat:direct', (data) => this.handleCreateDirectChat(socket, data)); - socket.on('game:chat:create', (data) => this.handleCreateGameChat(socket, data)); - socket.on('chat:history', (data) => this.handleGetChatHistory(socket, data)); - socket.on('chat:delete', (data) => this.handleDeleteChat(socket, data)); - socket.on('chat:archive:delete', (data) => this.handleDeleteChatArchive(socket, data)); - socket.on('message:delete', (data) => this.handleDeleteMessage(socket, data)); - socket.on('disconnect', () => this.handleDisconnection(socket)); - } - async handleJoinChat(socket, data) { - try { - const userId = socket.userId; - const chat = await this.chatRepository.findById(data.chatId); - if (!chat) { - socket.emit('error', { message: 'Chat not found' }); - return; - } - // Check if user is member of this chat - if (!chat.users.includes(userId)) { - socket.emit('error', { message: 'Unauthorized to join this chat' }); - return; - } - // Join the chat room - socket.join(data.chatId); - // Add to user's active chats in Redis - await this.redisService.addUserToChat(userId, data.chatId); - // Update chat activity in Redis - await this.redisService.updateChatActivity(data.chatId); - // Update last activity in database - await this.chatRepository.update(data.chatId, { lastActivity: new Date() }); - (0, Logger_1.logAuth)('User joined chat', userId, { - chatId: data.chatId, - chatType: chat.type - }); - socket.emit('chat:joined', { - chatId: data.chatId, - messages: chat.messages.slice(-10) // Last 10 messages - }); - } - catch (error) { - (0, Logger_1.logError)('Error joining chat', error); - socket.emit('error', { message: 'Failed to join chat' }); - } - } - async handleLeaveChat(socket, data) { - try { - const userId = socket.userId; - // Leave the chat room - socket.leave(data.chatId); - // Remove from user's active chats in Redis - await this.redisService.removeUserFromChat(userId, data.chatId); - (0, Logger_1.logAuth)('User left chat', userId, { - chatId: data.chatId - }); - socket.emit('chat:left', { chatId: data.chatId }); - } - catch (error) { - (0, Logger_1.logError)('Error leaving chat', error); - socket.emit('error', { message: 'Failed to leave chat' }); - } - } - async handleSendMessage(socket, data) { - try { - const userId = socket.userId; - // Rate limiting check - if (!this.checkMessageRateLimit(userId)) { - socket.emit('error', { message: `Rate limit exceeded. Maximum ${this.maxMessagesPerUser} messages per minute allowed.` }); - return; - } - // Validate message is string and not empty - if (typeof data.message !== 'string' || !data.message.trim()) { - socket.emit('error', { message: 'Message must be a non-empty string' }); - return; - } - const chat = await this.chatRepository.findById(data.chatId); - if (!chat) { - socket.emit('error', { message: 'Chat not found' }); - return; - } - // Check if user is member of this chat - if (!chat.users.includes(userId)) { - socket.emit('error', { message: 'Unauthorized to send message to this chat' }); - return; - } - // Create message - const message = { - id: (0, uuid_1.v4)(), - date: new Date(), - userid: userId, - text: data.message.trim() - }; - // Manage message history based on chat type - let updatedMessages = [...chat.messages, message]; - updatedMessages = this.pruneMessages(updatedMessages, chat.type); - // Update chat - await this.chatRepository.update(data.chatId, { - messages: updatedMessages, - lastActivity: new Date() - }); - // Update chat activity in Redis with new message count - await this.redisService.updateChatActivity(data.chatId, updatedMessages.length); - // Broadcast to all users in the chat room - this.io.to(data.chatId).emit('message:received', { - chatId: data.chatId, - message: message - }); - // Send notifications to offline users - await this.notifyOfflineUsers(chat, message); - (0, Logger_1.logAuth)('Message sent', userId, { - chatId: data.chatId, - messageLength: data.message.length, - chatType: chat.type - }); - } - catch (error) { - (0, Logger_1.logError)('Error sending message', error); - socket.emit('error', { message: 'Failed to send message' }); - } - } - async handleCreateGroup(socket, data) { - try { - const userId = socket.userId; - // Check if user is premium (required to create groups) - const user = await this.userRepository.findById(userId); - if (!user || user.state !== UserAggregate_1.UserState.VERIFIED_PREMIUM) { - socket.emit('error', { message: 'Premium subscription required to create groups' }); - return; - } - // Validate group data - if (!data.name?.trim()) { - socket.emit('error', { message: 'Group name is required' }); - return; - } - if (!data.userIds || data.userIds.length === 0) { - socket.emit('error', { message: 'At least one member is required' }); - return; - } - // Verify all users exist - const members = await Promise.all(data.userIds.map(id => this.userRepository.findById(id))); - if (members.some(member => !member)) { - socket.emit('error', { message: 'One or more users not found' }); - return; - } - // Create group chat - const groupChat = await this.chatRepository.create({ - type: ChatAggregate_1.ChatType.GROUP, - name: data.name.trim(), - createdBy: userId, - users: [userId, ...data.userIds], // Include creator - messages: [], - lastActivity: new Date() - }); - // Add all members to the group room and store in Redis - const allMemberIds = data.userIds.concat(userId); - for (const memberId of allMemberIds) { - const memberSocket = this.connectedUsers.get(memberId); - if (memberSocket) { - memberSocket.join(groupChat.id); - } - // Update user's chat list in Redis - await this.redisService.addUserToChat(memberId, groupChat.id); - } - // Store the group chat in Redis - await this.redisService.setActiveChat(groupChat.id, { - chatId: groupChat.id, - participants: allMemberIds, - lastActivity: new Date(), - messageCount: 0, - chatType: 'group', - name: groupChat.name || undefined - }); - // Notify all members - this.io.to(groupChat.id).emit('group:created', { - chat: { - id: groupChat.id, - type: groupChat.type, - name: groupChat.name, - createdBy: groupChat.createdBy, - users: groupChat.users, - messages: [] - } - }); - (0, Logger_1.logAuth)('Group created', userId, { - groupId: groupChat.id, - groupName: data.name, - memberCount: groupChat.users.length - }); - } - catch (error) { - (0, Logger_1.logError)('Error creating group', error); - socket.emit('error', { message: 'Failed to create group' }); - } - } - async handleCreateDirectChat(socket, data) { - try { - const userId = socket.userId; - // Validate target user exists - const targetUser = await this.userRepository.findById(data.targetUserId); - if (!targetUser) { - socket.emit('error', { message: 'Target user not found' }); - return; - } - // Check if direct chat already exists - const existingChats = await this.chatRepository.findByUserId(userId); - const existingDirectChat = existingChats.find(chat => chat.type === ChatAggregate_1.ChatType.DIRECT && - chat.users.length === 2 && - chat.users.includes(data.targetUserId)); - if (existingDirectChat) { - socket.emit('chat:direct:exists', { - chatId: existingDirectChat.id - }); - return; - } - // Create direct chat - const directChat = await this.chatRepository.create({ - type: ChatAggregate_1.ChatType.DIRECT, - users: [userId, data.targetUserId], - messages: [], - lastActivity: new Date() - }); - // Add both users to the chat room if they're online and store in Redis - const memberIds = [userId, data.targetUserId]; - for (const memberId of memberIds) { - const memberSocket = this.connectedUsers.get(memberId); - if (memberSocket) { - memberSocket.join(directChat.id); - } - // Update user's chat list in Redis - await this.redisService.addUserToChat(memberId, directChat.id); - } - // Store the direct chat in Redis - await this.redisService.setActiveChat(directChat.id, { - chatId: directChat.id, - participants: memberIds, - lastActivity: new Date(), - messageCount: 0, - chatType: 'direct' - }); - // Notify both users - this.io.to(directChat.id).emit('chat:direct:created', { - chat: { - id: directChat.id, - type: directChat.type, - users: directChat.users, - messages: [] - } - }); - (0, Logger_1.logAuth)('Direct chat created', userId, { - chatId: directChat.id, - targetUserId: data.targetUserId - }); - } - catch (error) { - (0, Logger_1.logError)('Error creating direct chat', error); - socket.emit('error', { message: 'Failed to create direct chat' }); - } - } - async handleCreateGameChat(socket, data) { - try { - const userId = socket.userId; - // Check if game chat already exists - const existingGameChat = await this.chatRepository.findByGameId(data.gameId); - if (existingGameChat) { - socket.emit('game:chat:exists', { - chatId: existingGameChat.id - }); - return; - } - // Create game chat - const gameChat = await this.chatRepository.create({ - type: ChatAggregate_1.ChatType.GAME, - name: data.gameName, - gameId: data.gameId, - users: data.playerIds, - messages: [], - lastActivity: new Date() - }); - // Add all players to the game chat room if they're online and store in Redis - for (const playerId of data.playerIds) { - const playerSocket = this.connectedUsers.get(playerId); - if (playerSocket) { - playerSocket.join(gameChat.id); - } - // Update user's chat list in Redis - await this.redisService.addUserToChat(playerId, gameChat.id); - } - // Store the game chat in Redis - await this.redisService.setActiveChat(gameChat.id, { - chatId: gameChat.id, - participants: data.playerIds, - lastActivity: new Date(), - messageCount: 0, - chatType: 'game', - gameId: gameChat.gameId || undefined, - name: gameChat.name || undefined - }); - // Notify all players - this.io.to(gameChat.id).emit('game:chat:created', { - chat: { - id: gameChat.id, - type: gameChat.type, - name: gameChat.name, - gameId: gameChat.gameId, - users: gameChat.users, - messages: [] - } - }); - (0, Logger_1.logAuth)('Game chat created', userId, { - chatId: gameChat.id, - gameId: data.gameId, - gameName: data.gameName, - playerCount: data.playerIds.length - }); - } - catch (error) { - (0, Logger_1.logError)('Error creating game chat', error); - socket.emit('error', { message: 'Failed to create game chat' }); - } - } - async handleGetChatHistory(socket, data) { - try { - const userId = socket.userId; - const chat = await this.chatRepository.findById(data.chatId); - if (!chat) { - // Check if it's archived - const archived = await this.chatRepository.getArchivedChat(data.chatId); - if (archived) { - socket.emit('chat:history:archived', { - chatId: data.chatId, - messages: archived.archivedMessages, - chatType: archived.chatType, - isGameChat: archived.chatType === ChatAggregate_1.ChatType.GAME - }); - } - else { - socket.emit('error', { message: 'Chat not found' }); - } - return; - } - // Check if user has access - if (!chat.users.includes(userId)) { - socket.emit('error', { message: 'Unauthorized to view this chat' }); - return; - } - socket.emit('chat:history', { - chatId: data.chatId, - messages: chat.messages, - chatInfo: { - type: chat.type, - name: chat.name, - gameId: chat.gameId, - users: chat.users - } - }); - } - catch (error) { - (0, Logger_1.logError)('Error getting chat history', error); - socket.emit('error', { message: 'Failed to get chat history' }); - } - } - async handleDeleteChat(socket, data) { - try { - const userId = socket.userId; - const chat = await this.chatRepository.findById(data.chatId); - if (!chat) { - socket.emit('error', { message: 'Chat not found' }); - return; - } - // Check if user is member of this chat - if (!chat.users.includes(userId)) { - socket.emit('error', { message: 'Unauthorized to delete this chat' }); - return; - } - // Perform soft delete - const deletedChat = await this.chatRepository.softDelete(data.chatId); - if (!deletedChat) { - socket.emit('error', { message: 'Failed to delete chat' }); - return; - } - // Remove from Redis active chats - await this.redisService.removeActiveChat(data.chatId); - // Notify all participants that the chat has been deleted - this.io.to(data.chatId).emit('chat:deleted', { - chatId: data.chatId, - deletedBy: userId - }); - // Remove all users from the chat room - for (const participantId of chat.users) { - const participantSocket = this.connectedUsers.get(participantId); - if (participantSocket) { - participantSocket.leave(data.chatId); - } - // Remove from user's active chats in Redis - await this.redisService.removeUserFromChat(participantId, data.chatId); - } - (0, Logger_1.logAuth)('Chat deleted', userId, { - chatId: data.chatId, - chatType: chat.type, - participantCount: chat.users.length - }); - socket.emit('chat:delete:success', { - chatId: data.chatId, - message: 'Chat deleted successfully' - }); - } - catch (error) { - (0, Logger_1.logError)('Error deleting chat', error); - socket.emit('error', { message: 'Failed to delete chat' }); - } - } - async handleDeleteChatArchive(socket, data) { - try { - const userId = socket.userId; - const archive = await this.chatArchiveRepository.findById(data.archiveId); - if (!archive) { - socket.emit('error', { message: 'Chat archive not found' }); - return; - } - // Check if user was a participant in the archived chat - if (!archive.participants.includes(userId)) { - socket.emit('error', { message: 'Unauthorized to delete this chat archive' }); - return; - } - // Hard delete the archive (since it's already archived) - await this.chatArchiveRepository.delete(data.archiveId); - (0, Logger_1.logAuth)('Chat archive deleted', userId, { - archiveId: data.archiveId, - originalChatId: archive.chatId, - chatType: archive.chatType, - participantCount: archive.participants.length - }); - socket.emit('chat:archive:delete:success', { - archiveId: data.archiveId, - message: 'Chat archive deleted successfully' - }); - } - catch (error) { - (0, Logger_1.logError)('Error deleting chat archive', error); - socket.emit('error', { message: 'Failed to delete chat archive' }); - } - } - async handleDeleteMessage(socket, data) { - try { - const userId = socket.userId; - // Check if user has admin/moderator privileges - const user = await this.userRepository.findById(userId); - if (!user || user.state !== UserAggregate_1.UserState.ADMIN) { // Check if user is admin - socket.emit('error', { message: 'Insufficient permissions to delete messages' }); - return; - } - const success = await this.deleteMessage(data.chatId, data.messageId, userId); - if (success) { - socket.emit('message:delete:success', { - chatId: data.chatId, - messageId: data.messageId, - message: 'Message deleted successfully' - }); - } - else { - socket.emit('error', { message: 'Failed to delete message or message not found' }); - } - } - catch (error) { - (0, Logger_1.logError)('Error handling delete message request', error); - socket.emit('error', { message: 'Failed to delete message' }); - } - } - async handleDisconnection(socket) { - const userId = socket.userId; - if (userId) { - this.connectedUsers.delete(userId); - // Update user status in Redis - const userData = await this.redisService.getActiveUser(userId); - if (userData) { - userData.isOnline = false; - userData.lastActivity = new Date(); - await this.redisService.setActiveUser(userId, userData); - } - (0, Logger_1.logAuth)('User disconnected from WebSocket', userId, { - socketId: socket.id - }); - } - } - // Utility methods - calculateUnreadMessages(chat, userId) { - // Simple implementation - count messages after user's last seen - // In production, you'd store lastSeen timestamp per user per chat - return chat.messages.filter(msg => msg.userid !== userId).length; - } - pruneMessages(messages, chatType) { - const twoWeeksAgo = new Date(Date.now() - 14 * 24 * 60 * 60 * 1000); - // Remove messages older than 2 weeks - let prunedMessages = messages.filter(msg => new Date(msg.date) > twoWeeksAgo); - // For group chats, only apply the 2-week time limit (unlimited messages per user) - if (chatType === ChatAggregate_1.ChatType.GROUP) { - return prunedMessages.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); - } - // For direct and game chats, apply both time limit and per-user message limit - // Group by user and keep last 10 messages per user - const messagesByUser = new Map(); - prunedMessages.forEach(msg => { - if (!messagesByUser.has(msg.userid)) { - messagesByUser.set(msg.userid, []); - } - messagesByUser.get(msg.userid).push(msg); - }); - // Keep only last 10 messages per user - const finalMessages = []; - messagesByUser.forEach((userMessages, userId) => { - const last10 = userMessages.slice(-10); - finalMessages.push(...last10); - }); - // Sort by date - return finalMessages.sort((a, b) => new Date(a.date).getTime() - new Date(b.date).getTime()); - } - async notifyOfflineUsers(chat, message) { - // Find users who are not currently connected - const offlineUsers = chat.users.filter(userId => userId !== message.userid && !this.connectedUsers.has(userId)); - // In a real implementation, you would send push notifications or emails here - if (offlineUsers.length > 0) { - (0, Logger_1.logRequest)('Offline users to notify', undefined, undefined, { - chatId: chat.id, - offlineUserCount: offlineUsers.length, - messageFrom: message.userid - }); - } - } - setupArchivingScheduler() { - // Run every hour to check for inactive chats - setInterval(async () => { - try { - // First, cleanup inactive chats from Redis and get their IDs - const inactiveChatIds = await this.redisService.cleanupInactiveChats(this.chatTimeout); - // Archive the inactive chats in the database - for (const chatId of inactiveChatIds) { - const chat = await this.chatRepository.findById(chatId); - if (chat) { - await this.chatRepository.archiveChat(chat); - (0, Logger_1.logRequest)('Chat archived due to inactivity', undefined, undefined, { - chatId: chat.id, - chatType: chat.type, - lastActivity: chat.lastActivity, - messageCount: chat.messages.length - }); - } - } - // Also find inactive chats from database that might not be in Redis - const dbInactiveChats = await this.chatRepository.findInactiveChats(this.chatTimeout); - const additionalInactiveChats = dbInactiveChats.filter(chat => !inactiveChatIds.includes(chat.id)); - for (const chat of additionalInactiveChats) { - await this.chatRepository.archiveChat(chat); - (0, Logger_1.logRequest)('Chat archived due to inactivity (from DB)', undefined, undefined, { - chatId: chat.id, - chatType: chat.type, - lastActivity: chat.lastActivity, - messageCount: chat.messages.length - }); - } - const totalArchived = inactiveChatIds.length + additionalInactiveChats.length; - if (totalArchived > 0) { - (0, Logger_1.logRequest)('Chat archiving completed', undefined, undefined, { - archivedCount: totalArchived, - redisCleanedUp: inactiveChatIds.length, - databaseCleanedUp: additionalInactiveChats.length, - timeoutMinutes: this.chatTimeout - }); - } - // Cleanup old messages from archived chats based on messageCleanupWeeks - await this.cleanupOldMessages(); - } - catch (error) { - (0, Logger_1.logError)('Error in chat archiving scheduler', error); - } - }, 60 * 60 * 1000); // 1 hour - // Also run message count cleanup every 5 minutes - setInterval(() => { - this.cleanupMessageCounts(); - }, 5 * 60 * 1000); // 5 minutes - } - // Public methods for game integration - async createGameChat(gameId, gameName, playerIds) { - try { - const existingGameChat = await this.chatRepository.findByGameId(gameId); - if (existingGameChat) { - return existingGameChat; - } - const gameChat = await this.chatRepository.create({ - type: ChatAggregate_1.ChatType.GAME, - name: gameName, - gameId: gameId, - users: playerIds, - messages: [], - lastActivity: new Date() - }); - // Notify connected players - playerIds.forEach(playerId => { - const playerSocket = this.connectedUsers.get(playerId); - if (playerSocket) { - playerSocket.join(gameChat.id); - playerSocket.emit('game:chat:created', { - chat: { - id: gameChat.id, - type: gameChat.type, - name: gameChat.name, - gameId: gameChat.gameId, - users: gameChat.users, - messages: [] - } - }); - } - }); - return gameChat; - } - catch (error) { - (0, Logger_1.logError)('Error creating game chat programmatically', error); - return null; - } - } - getConnectedUserCount() { - return this.connectedUsers.size; - } - isUserConnected(userId) { - return this.connectedUsers.has(userId); - } - async cleanup() { - try { - await this.redisService.disconnect(); - } - catch (error) { - (0, Logger_1.logError)('Error during WebSocket service cleanup', error); - } - } - /** - * Manually trigger cleanup of old messages and chats - * This can be called by admin endpoints for maintenance - */ - async triggerManualCleanup() { - try { - const cutoffDate = new Date(); - cutoffDate.setDate(cutoffDate.getDate() - (this.messageCleanupWeeks * 7)); - // Clean up old archived messages - const deletedArchivesCount = await this.chatArchiveRepository.cleanup(this.messageCleanupWeeks * 7); - // Clean up soft-deleted chats - const softDeletedChats = await this.chatRepository.findByPageIncludingDeleted(0, 1000); - let deletedChatsCount = 0; - for (const chat of softDeletedChats.chats) { - if (chat.state === 2 && chat.updateDate < cutoffDate) { // SOFT_DELETE state = 2 - await this.chatRepository.delete(chat.id); // Hard delete - deletedChatsCount++; - } - } - (0, Logger_1.logRequest)('Manual cleanup triggered', undefined, undefined, { - cutoffDate: cutoffDate.toISOString(), - cleanupWeeks: this.messageCleanupWeeks, - deletedArchives: deletedArchivesCount, - deletedChats: deletedChatsCount, - triggeredBy: 'manual' - }); - return { deletedArchives: deletedArchivesCount, deletedChats: deletedChatsCount }; - } - catch (error) { - (0, Logger_1.logError)('Error during manual cleanup', error); - throw error; - } - } - /** - * Clean up old messages from archived chats based on messageCleanupWeeks setting - */ - async cleanupOldMessages() { - try { - const cutoffDate = new Date(); - cutoffDate.setDate(cutoffDate.getDate() - (this.messageCleanupWeeks * 7)); - // Clean up old archived messages using ChatArchiveRepository - const deletedArchivesCount = await this.chatArchiveRepository.cleanup(this.messageCleanupWeeks * 7); - // Also clean up soft-deleted chats from the main repository - // Get all soft-deleted chats that are older than the cleanup period - const softDeletedChats = await this.chatRepository.findByPageIncludingDeleted(0, 1000); - let deletedChatsCount = 0; - for (const chat of softDeletedChats.chats) { - if (chat.state === 2 && chat.updateDate < cutoffDate) { // SOFT_DELETE state = 2 - await this.chatRepository.delete(chat.id); // Hard delete - deletedChatsCount++; - } - } - (0, Logger_1.logRequest)('Old message cleanup completed', undefined, undefined, { - cutoffDate: cutoffDate.toISOString(), - cleanupWeeks: this.messageCleanupWeeks, - deletedArchives: deletedArchivesCount, - deletedChats: deletedChatsCount, - note: 'Cleanup completed using both ChatRepository and ChatArchiveRepository' - }); - } - catch (error) { - (0, Logger_1.logError)('Error cleaning up old messages', error); - } - } - /** - * Check if user has exceeded message rate limit - * @param userId User ID to check - * @returns true if within limit, false if exceeded - */ - checkMessageRateLimit(userId) { - const now = Date.now(); - const minute = 60 * 1000; // 1 minute in milliseconds - const userStats = this.userMessageCounts.get(userId) || { count: 0, lastReset: now }; - // Reset counter if more than a minute has passed - if (now - userStats.lastReset >= minute) { - userStats.count = 0; - userStats.lastReset = now; - } - // Check if user is within limits - if (userStats.count >= this.maxMessagesPerUser) { - return false; - } - // Increment counter - userStats.count++; - this.userMessageCounts.set(userId, userStats); - return true; - } - /** - * Delete a specific message from chat history - * This can be used for moderation purposes - */ - async deleteMessage(chatId, messageId, moderatorUserId) { - try { - // Get the chat - const chat = await this.chatRepository.findById(chatId); - if (!chat) { - // Check archived chats - const archivedChat = await this.chatRepository.getArchivedChat(chatId); - if (!archivedChat) { - (0, Logger_1.logWarning)('Chat not found for message deletion', { - chatId, - messageId, - moderatorUserId - }); - return false; - } - // Remove message from archived chat - const updatedMessages = archivedChat.archivedMessages.filter(msg => msg.id !== messageId); - if (updatedMessages.length === archivedChat.archivedMessages.length) { - (0, Logger_1.logWarning)('Message not found in archived chat', { - chatId, - messageId, - moderatorUserId - }); - return false; - } - // Update archived chat - await this.chatArchiveRepository.create({ - ...archivedChat, - archivedMessages: updatedMessages - }); - (0, Logger_1.logAuth)('Message deleted from archived chat', moderatorUserId, { - chatId, - messageId, - originalMessageCount: archivedChat.archivedMessages.length, - newMessageCount: updatedMessages.length - }); - return true; - } - // Remove message from active chat - const updatedMessages = chat.messages.filter(msg => msg.id !== messageId); - if (updatedMessages.length === chat.messages.length) { - (0, Logger_1.logWarning)('Message not found in active chat', { - chatId, - messageId, - moderatorUserId - }); - return false; - } - // Update active chat - await this.chatRepository.update(chatId, { - messages: updatedMessages - }); - // Notify all users in the chat about message deletion - this.io.to(chatId).emit('message:deleted', { - chatId, - messageId, - deletedBy: moderatorUserId - }); - (0, Logger_1.logAuth)('Message deleted from active chat', moderatorUserId, { - chatId, - messageId, - originalMessageCount: chat.messages.length, - newMessageCount: updatedMessages.length - }); - return true; - } - catch (error) { - (0, Logger_1.logError)('Error deleting message', error); - return false; - } - } - /** - * Clean up old user message count entries (called periodically) - */ - cleanupMessageCounts() { - const now = Date.now(); - const minute = 60 * 1000; - for (const [userId, stats] of this.userMessageCounts.entries()) { - if (now - stats.lastReset >= minute * 5) { // Keep for 5 minutes - this.userMessageCounts.delete(userId); - } - } - } -} -exports.WebSocketService = WebSocketService; -//# sourceMappingURL=WebSocketService.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/Services/WebSocketService.js.map b/SerpentRace_Backend/dist/Application/Services/WebSocketService.js.map deleted file mode 100644 index 6c38c4c1..00000000 --- a/SerpentRace_Backend/dist/Application/Services/WebSocketService.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebSocketService.js","sourceRoot":"","sources":["../../../src/Application/Services/WebSocketService.ts"],"names":[],"mappings":";;;AACA,yCAA6D;AAC7D,6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,iBAAiB,CAAC,OAAO,EAAE,EAAE,CAAC;YAC7D,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC,qBAAqB;gBAC5D,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AA9lCD,4CA8lCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.d.ts deleted file mode 100644 index f4603b43..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface CreateUserCommand { - username: string; - password: string; - email: string; - fname: string; - lname: string; - code?: string; - orgid?: string; - type: string; - phone?: string; -} -//# sourceMappingURL=CreateUserCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.d.ts.map deleted file mode 100644 index 01e6f1dc..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateUserCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/CreateUserCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.js b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.js deleted file mode 100644 index 22c16988..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=CreateUserCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.js.map deleted file mode 100644 index ef4224fe..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateUserCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/CreateUserCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.d.ts deleted file mode 100644 index 159c4773..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { CreateUserCommand } from './CreateUserCommand'; -import { ShortUserDto } from '../../DTOs/UserDto'; -export declare class CreateUserCommandHandler { - private readonly userRepo; - private emailService; - constructor(userRepo: IUserRepository); - execute(cmd: CreateUserCommand): Promise; -} -//# sourceMappingURL=CreateUserCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.d.ts.map deleted file mode 100644 index 67ddda54..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateUserCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/CreateUserCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQlD,qBAAa,wBAAwB;IAGvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,OAAO,CAAC,YAAY,CAAe;gBAEN,QAAQ,EAAE,eAAe;IAIhD,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;CAuE7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.js deleted file mode 100644 index 67ebc941..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateUserCommandHandler = void 0; -const UserAggregate_1 = require("../../../Domain/User/UserAggregate"); -const UserMapper_1 = require("../../DTOs/Mappers/UserMapper"); -const PasswordService_1 = require("../../Services/PasswordService"); -const EmailService_1 = require("../../Services/EmailService"); -const TokenService_1 = require("../../Services/TokenService"); -const Logger_1 = require("../../Services/Logger"); -class CreateUserCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - this.emailService = new EmailService_1.EmailService(); - } - async execute(cmd) { - try { - // Validate password strength - const passwordValidation = PasswordService_1.PasswordService.validatePasswordStrength(cmd.password); - if (!passwordValidation.isValid) { - throw new Error(`Password validation failed: ${passwordValidation.errors.join(', ')}`); - } - const user = new UserAggregate_1.UserAggregate(); - user.username = cmd.username; - // Hash the password before storing - user.password = await PasswordService_1.PasswordService.hashPassword(cmd.password); - // Generate verification token - const verificationTokenData = TokenService_1.TokenService.generateVerificationToken(); - user.token = await TokenService_1.TokenService.hashToken(verificationTokenData.token); - user.TokenExpires = verificationTokenData.expiresAt; - user.email = cmd.email; - user.fname = cmd.fname; - user.lname = cmd.lname; - user.orgid = cmd.orgid || null; - user.token = cmd.code || null; - user.type = cmd.type; - user.phone = cmd.phone || null; - user.state = UserAggregate_1.UserState.REGISTERED_NOT_VERIFIED; - const created = await this.userRepo.create(user); - // Send verification email - try { - const baseUrl = process.env.APP_BASE_URL || 'http://localhost:3000'; - const verificationUrl = TokenService_1.TokenService.generateVerificationUrl(baseUrl, verificationTokenData.token); - const emailSent = await this.emailService.sendVerificationEmail(created.email, `${created.fname} ${created.lname}`, verificationTokenData.token, verificationUrl); - if (!emailSent) { - (0, Logger_1.logWarning)('Failed to send verification email', { email: created.email, userId: created.id }); - // Don't throw error - user creation should still succeed even if email fails - } - else { - (0, Logger_1.logAuth)('Verification email sent successfully', created.id, { email: created.email }); - } - } - catch (emailError) { - (0, Logger_1.logError)('Error sending verification email', emailError); - // Don't throw error - user creation should still succeed even if email fails - } - return UserMapper_1.UserMapper.toShortDto(created); - } - catch (error) { - (0, Logger_1.logError)('CreateUserCommandHandler error', error); - // Re-throw validation errors as-is - if (error instanceof Error && error.message.includes('Password validation failed')) { - throw error; - } - // Handle database constraint errors - if (error instanceof Error && (error.message.includes('duplicate') || error.message.includes('unique'))) { - throw new Error('User with this username or email already exists'); - } - // Generic error for other cases - throw new Error('Failed to create user'); - } - } -} -exports.CreateUserCommandHandler = CreateUserCommandHandler; -//# sourceMappingURL=CreateUserCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.js.map deleted file mode 100644 index 77073d8b..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/CreateUserCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CreateUserCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/CreateUserCommandHandler.ts"],"names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AED,OAAO,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,gCAAgC,EAAE,KAAc,CAAC,CAAC;YAE3D,mCAAmC;YACnC,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAE,CAAC;gBACnF,MAAM,KAAK,CAAC;YACd,CAAC;YAED,oCAAoC;YACpC,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;gBACxG,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;YACrE,CAAC;YAED,gCAAgC;YAChC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;CACF;AA9ED,4DA8EC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.d.ts deleted file mode 100644 index cd25211a..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface DeactivateUserCommand { - id: string; -} -//# sourceMappingURL=DeactivateUserCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.d.ts.map deleted file mode 100644 index 0fdc3524..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeactivateUserCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeactivateUserCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.js b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.js deleted file mode 100644 index 3f6302d5..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DeactivateUserCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.js.map deleted file mode 100644 index 728a3747..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeactivateUserCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeactivateUserCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.d.ts deleted file mode 100644 index 25e0068d..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { DeactivateUserCommand } from './DeactivateUserCommand'; -export declare class DeactivateUserCommandHandler { - private readonly userRepo; - constructor(userRepo: IUserRepository); - execute(cmd: DeactivateUserCommand): Promise; -} -//# sourceMappingURL=DeactivateUserCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.d.ts.map deleted file mode 100644 index 5d7aa9f1..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeactivateUserCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeactivateUserCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,qBAAa,4BAA4B;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,GAAG,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;CAI5D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.js deleted file mode 100644 index d30caa56..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeactivateUserCommandHandler = void 0; -class DeactivateUserCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(cmd) { - await this.userRepo.deactivate(cmd.id); - return true; - } -} -exports.DeactivateUserCommandHandler = DeactivateUserCommandHandler; -//# sourceMappingURL=DeactivateUserCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.js.map deleted file mode 100644 index 6c87c0c1..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeactivateUserCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeactivateUserCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeactivateUserCommandHandler.ts"],"names":[],"mappings":";;;AAIA,MAAa,4BAA4B;IACvC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,GAA0B;QACtC,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAPD,oEAOC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.d.ts deleted file mode 100644 index 38077b8f..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface DeleteUserCommand { - id: string; - soft?: boolean; -} -//# sourceMappingURL=DeleteUserCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.d.ts.map deleted file mode 100644 index a9331a4d..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteUserCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeleteUserCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.js b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.js deleted file mode 100644 index 6d9f8c49..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=DeleteUserCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.js.map deleted file mode 100644 index 96340b7c..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteUserCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeleteUserCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.d.ts deleted file mode 100644 index e2b25754..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { DeleteUserCommand } from './DeleteUserCommand'; -export declare class DeleteUserCommandHandler { - private readonly userRepo; - constructor(userRepo: IUserRepository); - execute(cmd: DeleteUserCommand): Promise; -} -//# sourceMappingURL=DeleteUserCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.d.ts.map deleted file mode 100644 index 41b3177c..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteUserCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeleteUserCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;CAQxD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.js deleted file mode 100644 index cae8f506..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteUserCommandHandler = void 0; -class DeleteUserCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(cmd) { - if (cmd.soft) { - await this.userRepo.softDelete(cmd.id); - } - else { - await this.userRepo.delete(cmd.id); - } - return true; - } -} -exports.DeleteUserCommandHandler = DeleteUserCommandHandler; -//# sourceMappingURL=DeleteUserCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.js.map deleted file mode 100644 index a53a2f77..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/DeleteUserCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeleteUserCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/DeleteUserCommandHandler.ts"],"names":[],"mappings":";;;AAIA,MAAa,wBAAwB;IACnC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,GAAsB;QAClC,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAXD,4DAWC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.d.ts deleted file mode 100644 index d9120a59..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface LoginCommand { - username: string; - password: string; -} -//# sourceMappingURL=LoginCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.d.ts.map deleted file mode 100644 index 29127c59..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoginCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/LoginCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.js b/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.js deleted file mode 100644 index 1c9c929a..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=LoginCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.js.map deleted file mode 100644 index f4f29b5c..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoginCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/LoginCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.d.ts deleted file mode 100644 index ea1bf42a..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { IOrganizationRepository } from '../../../Domain/IRepository/IOrganizationRepository'; -import { LoginCommand } from './LoginCommand'; -import { ShortUserDto } from '../../DTOs/UserDto'; -import { JWTService } from '../../Services/JWTService'; -export interface LoginResponse { - user: ShortUserDto; - token: string; - requiresOrgReauth?: boolean; - orgLoginUrl?: string; - organizationName?: string; -} -export declare class LoginCommandHandler { - private readonly userRepo; - private readonly jwtService; - private readonly orgRepo; - constructor(userRepo: IUserRepository, jwtService: JWTService, orgRepo: IOrganizationRepository); - execute(cmd: LoginCommand): Promise; -} -//# sourceMappingURL=LoginCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.d.ts.map deleted file mode 100644 index f14bf5f2..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoginCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/LoginCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAFP,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,uBAAuB;IAG7C,OAAO,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAkIhE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.js deleted file mode 100644 index ed3f89d8..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoginCommandHandler = void 0; -const UserMapper_1 = require("../../DTOs/Mappers/UserMapper"); -const PasswordService_1 = require("../../Services/PasswordService"); -const UserAggregate_1 = require("../../../Domain/User/UserAggregate"); -const Logger_1 = require("../../Services/Logger"); -class LoginCommandHandler { - constructor(userRepo, jwtService, orgRepo) { - this.userRepo = userRepo; - this.jwtService = jwtService; - this.orgRepo = orgRepo; - } - async execute(cmd) { - const startTime = Date.now(); - try { - (0, Logger_1.logAuth)('Login attempt', undefined, { username: cmd.username }); - const user = await this.userRepo.findByUsername(cmd.username) || - await this.userRepo.findByEmail(cmd.username); - (0, Logger_1.logDatabase)('User lookup completed', undefined, Date.now() - startTime, { - found: !!user, - searchBy: cmd.username.includes('@') ? 'email' : 'username' - }); - if (!user) { - (0, Logger_1.logAuth)('Login failed - User not found', undefined, { username: cmd.username }); - return null; - } - try { - const passwordStartTime = Date.now(); - const isPasswordValid = await PasswordService_1.PasswordService.verifyPassword(cmd.password, user.password); - (0, Logger_1.logAuth)('Password verification completed', user.id, { - valid: isPasswordValid, - verificationTime: Date.now() - passwordStartTime - }); - if (!isPasswordValid) { - (0, Logger_1.logWarning)('Login failed - Invalid password', { - userId: user.id, - username: cmd.username - }); - return null; - } - } - catch (error) { - (0, Logger_1.logError)('Password verification error', error); - return null; - } - const mockRes = { - cookie: () => { } - }; - const tokenPayload = { - userId: user.id, - authLevel: (user.state === UserAggregate_1.UserState.ADMIN ? 1 : 0), - userStatus: user.state, - orgId: user.orgid || '' - }; - try { - const token = this.jwtService.create(tokenPayload, mockRes); - // Check if user belongs to an organization and needs reauthentication - let requiresOrgReauth = false; - let orgLoginUrl; - let organizationName; - if (user.orgid) { - const organization = await this.orgRepo.findById(user.orgid); - if (organization) { - organizationName = organization.name; - // Check if user has logged in to organization within the last month - const oneMonthAgo = new Date(); - oneMonthAgo.setMonth(oneMonthAgo.getMonth() - 1); - const needsReauth = !user.Orglogindate || user.Orglogindate < oneMonthAgo; - if (needsReauth && organization.url) { - requiresOrgReauth = true; - orgLoginUrl = organization.url; - (0, Logger_1.logAuth)('User requires organization reauthentication', user.id, { - organizationId: user.orgid, - organizationName: organization.name, - lastOrgLogin: user.Orglogindate?.toISOString() || 'never', - orgLoginUrl: organization.url - }); - } - } - } - (0, Logger_1.logAuth)('Login successful', user.id, { - authLevel: tokenPayload.authLevel, - userStatus: tokenPayload.userStatus, - orgId: tokenPayload.orgId, - requiresOrgReauth, - organizationName, - totalLoginTime: Date.now() - startTime - }); - const response = { - user: UserMapper_1.UserMapper.toShortDto(user), - token - }; - if (requiresOrgReauth) { - response.requiresOrgReauth = true; - response.orgLoginUrl = orgLoginUrl; - response.organizationName = organizationName; - } - return response; - } - catch (error) { - (0, Logger_1.logError)('Token creation failed during login', error); - throw new Error('Login failed due to internal error'); - } - } - catch (error) { - if (error instanceof Error) { - (0, Logger_1.logError)('Login handler error', error); - // Handle database connection errors - if (error.message.includes('database connection')) { - (0, Logger_1.logDatabase)('Database connection error during login', undefined, Date.now() - startTime); - throw new Error('Database connection error'); - } - // If it's already a properly formatted error, re-throw it - if (error.message === 'Login failed due to internal error' || - error.message === 'Database connection error') { - throw error; - } - } - // Default database error handling - (0, Logger_1.logDatabase)('Unexpected database error during login', undefined, Date.now() - startTime); - throw new Error('Database connection error'); - } - } -} -exports.LoginCommandHandler = LoginCommandHandler; -//# sourceMappingURL=LoginCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.js.map deleted file mode 100644 index f6ed5860..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/LoginCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LoginCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/LoginCommandHandler.ts"],"names":[],"mappings":";;;AAIA,8DAA2D;AAC3D,oEAAiE;AAEjE,sEAA+D;AAC/D,kDAAmF;AAUnF,MAAa,mBAAmB;IAC9B,YACmB,QAAyB,EACzB,UAAsB,EACtB,OAAgC;QAFhC,aAAQ,GAAR,QAAQ,CAAiB;QACzB,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAyB;IAChD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,GAAiB;QAC7B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC;YACH,IAAA,gBAAO,EAAC,eAAe,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEhE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC;gBAC/C,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;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AAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC;oBACzF,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;gBAC/C,CAAC;gBAED,0DAA0D;gBAC1D,IAAI,KAAK,CAAC,OAAO,KAAK,oCAAoC;oBACtD,KAAK,CAAC,OAAO,KAAK,2BAA2B,EAAE,CAAC;oBAClD,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;YACD,kCAAkC;YAClC,IAAA,oBAAW,EAAC,wCAAwC,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC;YACzF,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;CACF;AAzID,kDAyIC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.d.ts deleted file mode 100644 index a8ff2460..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface RequestPasswordResetCommand { - email: string; -} -//# sourceMappingURL=RequestPasswordResetCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.d.ts.map deleted file mode 100644 index 08afb3cf..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestPasswordResetCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/RequestPasswordResetCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.js b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.js deleted file mode 100644 index 619ccf0a..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=RequestPasswordResetCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.js.map deleted file mode 100644 index 47fe24dc..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestPasswordResetCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/RequestPasswordResetCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.d.ts deleted file mode 100644 index a1e725a9..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RequestPasswordResetCommand } from './RequestPasswordResetCommand'; -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -export declare class RequestPasswordResetCommandHandler { - private userRepo; - private emailService; - constructor(userRepo: IUserRepository); - execute(cmd: RequestPasswordResetCommand): Promise; -} -//# sourceMappingURL=RequestPasswordResetCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.d.ts.map deleted file mode 100644 index ff82f640..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestPasswordResetCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/RequestPasswordResetCommandHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAK9E,qBAAa,kCAAkC;IAGjC,OAAO,CAAC,QAAQ;IAF5B,OAAO,CAAC,YAAY,CAAe;gBAEf,QAAQ,EAAE,eAAe;IAIvC,OAAO,CAAC,GAAG,EAAE,2BAA2B,GAAG,OAAO,CAAC,OAAO,CAAC;CAsDlE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.js deleted file mode 100644 index 26090cf3..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestPasswordResetCommandHandler = void 0; -const EmailService_1 = require("../../Services/EmailService"); -const TokenService_1 = require("../../Services/TokenService"); -const Logger_1 = require("../../Services/Logger"); -class RequestPasswordResetCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - this.emailService = new EmailService_1.EmailService(); - } - async execute(cmd) { - try { - if (!cmd.email) { - throw new Error('Email is required'); - } - // Find user by email - const user = await this.userRepo.findByEmail(cmd.email); - if (!user) { - // Don't reveal if user exists or not for security reasons - // Still return true but don't send email - (0, Logger_1.logAuth)(`Password reset requested for non-existent email: ${cmd.email}`); - return true; - } - // Generate password reset token - const resetTokenData = TokenService_1.TokenService.generatePasswordResetToken(); - // Update user with reset token - user.token = await TokenService_1.TokenService.hashToken(resetTokenData.token); - user.TokenExpires = resetTokenData.expiresAt; - await this.userRepo.update(user.id, user); - // Send password reset email - try { - const baseUrl = process.env.APP_BASE_URL || 'http://localhost:3000'; - const resetUrl = TokenService_1.TokenService.generatePasswordResetUrl(baseUrl, resetTokenData.token); - const emailSent = await this.emailService.sendPasswordResetEmail(user.email, `${user.fname} ${user.lname}`, resetTokenData.token, resetUrl); - if (!emailSent) { - (0, Logger_1.logWarning)(`Failed to send password reset email to ${user.email}`); - // Don't throw error - request should still succeed even if email fails - } - else { - (0, Logger_1.logAuth)(`Password reset email sent successfully to ${user.email}`); - } - } - catch (emailError) { - (0, Logger_1.logError)('Error sending password reset email', emailError instanceof Error ? emailError : new Error(String(emailError))); - // Don't throw error - request should still succeed even if email fails - } - return true; - } - catch (error) { - (0, Logger_1.logError)('Password reset request error', error instanceof Error ? error : new Error(String(error))); - throw error; - } - } -} -exports.RequestPasswordResetCommandHandler = RequestPasswordResetCommandHandler; -//# sourceMappingURL=RequestPasswordResetCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.js.map deleted file mode 100644 index 53d6e839..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/RequestPasswordResetCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RequestPasswordResetCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/RequestPasswordResetCommandHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,8DAA2D;AAC3D,kDAAsE;AAEtE,MAAa,kCAAkC;IAG7C,YAAoB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;QAC3C,IAAI,CAAC,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAgC;QAC5C,IAAI,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YAED,qBAAqB;YACrB,MAAM,IAAI,GAAG,MAAM,IAA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AE,CAAC;gBACpB,IAAA,iBAAQ,EAAC,oCAAoC,EAAE,UAAU,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBACzH,uEAAuE;YACzE,CAAC;YAED,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,8BAA8B,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACpG,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AA7DD,gFA6DC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.d.ts deleted file mode 100644 index 9c656982..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ResetPasswordCommand { - token: string; - newPassword: string; -} -//# sourceMappingURL=ResetPasswordCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.d.ts.map deleted file mode 100644 index e2bc2df2..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResetPasswordCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/ResetPasswordCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.js b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.js deleted file mode 100644 index cbe6b3e7..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=ResetPasswordCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.js.map deleted file mode 100644 index e796182e..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResetPasswordCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/ResetPasswordCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.d.ts deleted file mode 100644 index ab485d00..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ResetPasswordCommand } from './ResetPasswordCommand'; -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -export declare class ResetPasswordCommandHandler { - private userRepo; - constructor(userRepo: IUserRepository); - execute(cmd: ResetPasswordCommand): Promise; -} -//# sourceMappingURL=ResetPasswordCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.d.ts.map deleted file mode 100644 index aacae54b..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResetPasswordCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/ResetPasswordCommandHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAK9E,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEvC,OAAO,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;CA+C3D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.js deleted file mode 100644 index c414e88d..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResetPasswordCommandHandler = void 0; -const TokenService_1 = require("../../Services/TokenService"); -const PasswordService_1 = require("../../Services/PasswordService"); -const Logger_1 = require("../../Services/Logger"); -class ResetPasswordCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(cmd) { - try { - if (!cmd.token) { - throw new Error('Reset token is required'); - } - if (!cmd.newPassword) { - throw new Error('New password is required'); - } - // Validate password strength - const validation = PasswordService_1.PasswordService.validatePasswordStrength(cmd.newPassword); - if (!validation.isValid) { - throw new Error(`Password validation failed: ${validation.errors.join(', ')}`); - } - // Hash the token to compare with stored value - const hashedToken = await TokenService_1.TokenService.hashToken(cmd.token); - // Find user with this password reset token - const user = await this.userRepo.findByToken(hashedToken); - if (!user) { - throw new Error('Invalid or expired reset token'); - } - // Check if token is expired - if (user.TokenExpires && user.TokenExpires < new Date()) { - throw new Error('Reset token has expired'); - } - // Hash the new password - const hashedPassword = await PasswordService_1.PasswordService.hashPassword(cmd.newPassword); - // Update user password and clear reset token - user.password = hashedPassword; - user.token = null; - user.TokenExpires = null; - await this.userRepo.update(user.id, user); - return true; - } - catch (error) { - (0, Logger_1.logError)('Password reset error', error instanceof Error ? error : new Error(String(error))); - throw error; - } - } -} -exports.ResetPasswordCommandHandler = ResetPasswordCommandHandler; -//# sourceMappingURL=ResetPasswordCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.js.map deleted file mode 100644 index 8695d83d..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/ResetPasswordCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ResetPasswordCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/ResetPasswordCommandHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,oEAAiE;AACjE,kDAAiD;AAEjD,MAAa,2BAA2B;IACtC,YAAoB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAEjD,KAAK,CAAC,OAAO,CAAC,GAAyB;QACrC,IAAI,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7C,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAC9C,CAAC;YAED,6BAA6B;YAC7B,MAAM,UAAU,GAAG,iCAAe,CAAC,wBAAwB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAC7E,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;gBACxB,MAAM,IAAI,KAAK,CAAC,+BAA+B,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjF,CAAC;YAED,8CAA8C;YAC9C,MAAM,WAAW,GAAG,MAAM,2BAAY,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAE5D,2CAA2C;YAC3C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAE1D,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YAED,4BAA4B;YAC5B,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC;gBACxD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7C,CAAC;YAED,wBAAwB;YACxB,MAAM,cAAc,GAAG,MAAM,iCAAe,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAE3E,6CAA6C;YAC7C,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC;YAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YAEzB,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAE1C,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,sBAAsB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC5F,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAlDD,kEAkDC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.d.ts deleted file mode 100644 index 36afce54..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface UpdateUserCommand { - id: string; - orgid?: string; - username?: string; - password?: string; - email?: string; - fname?: string; - lname?: string; - code?: string; - type?: string; - phone?: string; - state?: number; -} -//# sourceMappingURL=UpdateUserCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.d.ts.map deleted file mode 100644 index 9b96563f..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateUserCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/UpdateUserCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.js b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.js deleted file mode 100644 index 01fb2e59..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=UpdateUserCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.js.map deleted file mode 100644 index 526ebf6e..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateUserCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/UpdateUserCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.d.ts deleted file mode 100644 index a8becc6f..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { UpdateUserCommand } from './UpdateUserCommand'; -import { ShortUserDto } from '../../DTOs/UserDto'; -export declare class UpdateUserCommandHandler { - private readonly userRepo; - constructor(userRepo: IUserRepository); - execute(cmd: UpdateUserCommand): Promise; -} -//# sourceMappingURL=UpdateUserCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.d.ts.map deleted file mode 100644 index 68a7b0f5..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateUserCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/UpdateUserCommandHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;CAkBpE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.js deleted file mode 100644 index 48e89a36..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateUserCommandHandler = void 0; -const UserMapper_1 = require("../../DTOs/Mappers/UserMapper"); -const PasswordService_1 = require("../../Services/PasswordService"); -class UpdateUserCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(cmd) { - const updateData = { ...cmd }; - // Hash the password if it's being updated - if (cmd.password) { - // Validate password strength - const passwordValidation = PasswordService_1.PasswordService.validatePasswordStrength(cmd.password); - if (!passwordValidation.isValid) { - throw new Error(`Password validation failed: ${passwordValidation.errors.join(', ')}`); - } - updateData.password = await PasswordService_1.PasswordService.hashPassword(cmd.password); - } - const updated = await this.userRepo.update(cmd.id, updateData); - if (!updated) - return null; - return UserMapper_1.UserMapper.toShortDto(updated); - } -} -exports.UpdateUserCommandHandler = UpdateUserCommandHandler; -//# sourceMappingURL=UpdateUserCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.js.map deleted file mode 100644 index 908e6f9e..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/UpdateUserCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UpdateUserCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/UpdateUserCommandHandler.ts"],"names":[],"mappings":";;;AAIA,8DAA2D;AAC3D,oEAAiE;AAEjE,MAAa,wBAAwB;IACnC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,GAAsB;QAClC,MAAM,UAAU,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;QAE9B,0CAA0C;QAC1C,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YACjB,6BAA6B;YAC7B,MAAM,kBAAkB,GAAG,iCAAe,CAAC,wBAAwB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAClF,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;gBAChC,MAAM,IAAI,KAAK,CAAC,+BAA+B,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzF,CAAC;YAED,UAAU,CAAC,QAAQ,GAAG,MAAM,iCAAe,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzE,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,OAAO,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;CACF;AArBD,4DAqBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.d.ts b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.d.ts deleted file mode 100644 index cf28fa54..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface VerifyEmailCommand { - token: string; -} -//# sourceMappingURL=VerifyEmailCommand.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.d.ts.map deleted file mode 100644 index d4bf431d..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VerifyEmailCommand.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/VerifyEmailCommand.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.js b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.js deleted file mode 100644 index cfd1fe4d..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=VerifyEmailCommand.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.js.map b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.js.map deleted file mode 100644 index 13e82a02..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VerifyEmailCommand.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/VerifyEmailCommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.d.ts b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.d.ts deleted file mode 100644 index 2cf6bce7..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { VerifyEmailCommand } from './VerifyEmailCommand'; -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -export declare class VerifyEmailCommandHandler { - private userRepo; - constructor(userRepo: IUserRepository); - execute(cmd: VerifyEmailCommand): Promise; -} -//# sourceMappingURL=VerifyEmailCommandHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.d.ts.map deleted file mode 100644 index 0d222913..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VerifyEmailCommandHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/commands/VerifyEmailCommandHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAK9E,qBAAa,yBAAyB;IACxB,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEvC,OAAO,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;CAkCzD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.js b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.js deleted file mode 100644 index 517df5a3..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VerifyEmailCommandHandler = void 0; -const TokenService_1 = require("../../Services/TokenService"); -const UserAggregate_1 = require("../../../Domain/User/UserAggregate"); -const Logger_1 = require("../../Services/Logger"); -class VerifyEmailCommandHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(cmd) { - try { - if (!cmd.token) { - throw new Error('Verification token is required'); - } - // Hash the token to compare with stored value - const hashedToken = await TokenService_1.TokenService.hashToken(cmd.token); - // Find user with this verification token - const user = await this.userRepo.findByToken(hashedToken); - if (!user) { - throw new Error('Invalid or expired verification token'); - } - // Check if token is expired - if (user.TokenExpires && user.TokenExpires < new Date()) { - throw new Error('Verification token has expired'); - } - // Update user verification status - user.token = null; - user.TokenExpires = null; - user.state = UserAggregate_1.UserState.VERIFIED_REGULAR; - await this.userRepo.update(user.id, user); - return true; - } - catch (error) { - (0, Logger_1.logError)('Email verification error', error instanceof Error ? error : new Error(String(error))); - throw error; - } - } -} -exports.VerifyEmailCommandHandler = VerifyEmailCommandHandler; -//# sourceMappingURL=VerifyEmailCommandHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.js.map b/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.js.map deleted file mode 100644 index 9c707912..00000000 --- a/SerpentRace_Backend/dist/Application/User/commands/VerifyEmailCommandHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VerifyEmailCommandHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/commands/VerifyEmailCommandHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,sEAA+D;AAC/D,kDAAiD;AAEjD,MAAa,yBAAyB;IACpC,YAAoB,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAEjD,KAAK,CAAC,OAAO,CAAC,GAAuB;QACnC,IAAI,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YAED,8CAA8C;YAC9C,MAAM,WAAW,GAAG,MAAM,2BAAY,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAE5D,yCAAyC;YACzC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YAE1D,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;YAC3D,CAAC;YAED,4BAA4B;YAC5B,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC;gBACxD,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YAED,kCAAkC;YAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,KAAK,GAAG,yBAAS,CAAC,gBAAgB,CAAC;YAExC,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YAE1C,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,0BAA0B,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAChG,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AArCD,8DAqCC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.d.ts b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.d.ts deleted file mode 100644 index 5fe3756d..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetUserByIdQuery { - id: string; -} -//# sourceMappingURL=GetUserByIdQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.d.ts.map b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.d.ts.map deleted file mode 100644 index a72115c9..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUserByIdQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUserByIdQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;CACZ"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.js b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.js deleted file mode 100644 index 44a291f9..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetUserByIdQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.js.map b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.js.map deleted file mode 100644 index 8fc43506..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUserByIdQuery.js","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUserByIdQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.d.ts deleted file mode 100644 index 46254eed..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { GetUserByIdQuery } from './GetUserByIdQuery'; -import { ShortUserDto } from '../../DTOs/UserDto'; -export declare class GetUserByIdQueryHandler { - private readonly userRepo; - constructor(userRepo: IUserRepository); - execute(query: GetUserByIdQuery): Promise; -} -//# sourceMappingURL=GetUserByIdQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.d.ts.map deleted file mode 100644 index 53a9a43e..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUserByIdQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUserByIdQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;CAsBrE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.js b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.js deleted file mode 100644 index d2a157c3..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetUserByIdQueryHandler = void 0; -const UserMapper_1 = require("../../DTOs/Mappers/UserMapper"); -const Logger_1 = require("../../Services/Logger"); -class GetUserByIdQueryHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(query) { - try { - const user = await this.userRepo.findById(query.id); - if (!user) - return null; - return UserMapper_1.UserMapper.toShortDto(user); - } - catch (error) { - (0, Logger_1.logError)('GetUserByIdQueryHandler error', error instanceof Error ? error : new Error(String(error))); - // Handle invalid ID format - if (error instanceof Error && error.message.includes('invalid') && error.message.includes('uuid')) { - return null; // Treat invalid UUID as not found - } - // Handle database errors - if (error instanceof Error && error.message.includes('database')) { - throw new Error('Database connection error'); - } - // Generic error for other cases - throw new Error('Failed to retrieve user'); - } - } -} -exports.GetUserByIdQueryHandler = GetUserByIdQueryHandler; -//# sourceMappingURL=GetUserByIdQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.js.map b/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.js.map deleted file mode 100644 index 56245d68..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUserByIdQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUserByIdQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUserByIdQueryHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,kDAAiD;AAEjD,MAAa,uBAAuB;IAClC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,KAAuB;QACnC,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpD,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;YACvB,OAAO,uBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAA,iBAAQ,EAAC,+BAA+B,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAErG,2BAA2B;YAC3B,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClG,OAAO,IAAI,CAAC,CAAC,kCAAkC;YACjD,CAAC;YAED,yBAAyB;YACzB,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBACjE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAC/C,CAAC;YAED,gCAAgC;YAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;CACF;AAzBD,0DAyBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.d.ts b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.d.ts deleted file mode 100644 index a570b1e4..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetUsersByPageQuery { - from: number; - to: number; - includeDeleted?: boolean; -} -//# sourceMappingURL=GetUsersByPageQuery.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.d.ts.map b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.d.ts.map deleted file mode 100644 index bf447d19..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUsersByPageQuery.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUsersByPageQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.js b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.js deleted file mode 100644 index 8672699e..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=GetUsersByPageQuery.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.js.map b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.js.map deleted file mode 100644 index 2989ee22..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQuery.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUsersByPageQuery.js","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUsersByPageQuery.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.d.ts b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.d.ts deleted file mode 100644 index f8c71d49..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IUserRepository } from '../../../Domain/IRepository/IUserRepository'; -import { GetUsersByPageQuery } from './GetUsersByPageQuery'; -import { ShortUserDto } from '../../DTOs/UserDto'; -export declare class GetUsersByPageQueryHandler { - private readonly userRepo; - constructor(userRepo: IUserRepository); - execute(query: GetUsersByPageQuery): Promise<{ - users: ShortUserDto[]; - totalCount: number; - }>; -} -//# sourceMappingURL=GetUsersByPageQueryHandler.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.d.ts.map b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.d.ts.map deleted file mode 100644 index 1ae4b293..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUsersByPageQueryHandler.d.ts","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUsersByPageQueryHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,qBAAa,0BAA0B;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,OAAO,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAkDlG"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.js b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.js deleted file mode 100644 index 9a6aafb6..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetUsersByPageQueryHandler = void 0; -const UserMapper_1 = require("../../DTOs/Mappers/UserMapper"); -const Logger_1 = require("../../Services/Logger"); -class GetUsersByPageQueryHandler { - constructor(userRepo) { - this.userRepo = userRepo; - } - async execute(query) { - try { - // Validate pagination parameters - if (query.from < 0 || query.to < query.from) { - throw new Error('Invalid pagination parameters'); - } - const limit = query.to - query.from + 1; - if (limit > 100) { - throw new Error('Page size too large. Maximum 100 records per request'); - } - (0, Logger_1.logRequest)('Get users by page query started', undefined, undefined, { - from: query.from, - to: query.to, - includeDeleted: query.includeDeleted || false - }); - const result = query.includeDeleted - ? await this.userRepo.findByPageIncludingDeleted(query.from, query.to) - : await this.userRepo.findByPage(query.from, query.to); - (0, Logger_1.logRequest)('Get users by page query completed', undefined, undefined, { - from: query.from, - to: query.to, - returned: result.users.length, - totalCount: result.totalCount, - includeDeleted: query.includeDeleted || false - }); - return { - users: UserMapper_1.UserMapper.toShortDtoList(result.users), - totalCount: result.totalCount - }; - } - catch (error) { - (0, Logger_1.logError)('GetUsersByPageQueryHandler error', error instanceof Error ? error : new Error(String(error))); - // Handle database errors - if (error instanceof Error && error.message.includes('database')) { - throw new Error('Database connection error'); - } - // Re-throw validation errors as-is - if (error instanceof Error && (error.message.includes('Invalid pagination') || error.message.includes('Page size'))) { - throw error; - } - throw new Error('Failed to retrieve users'); - } - } -} -exports.GetUsersByPageQueryHandler = GetUsersByPageQueryHandler; -//# sourceMappingURL=GetUsersByPageQueryHandler.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.js.map b/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.js.map deleted file mode 100644 index 035a1b02..00000000 --- a/SerpentRace_Backend/dist/Application/User/queries/GetUsersByPageQueryHandler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"GetUsersByPageQueryHandler.js","sourceRoot":"","sources":["../../../../src/Application/User/queries/GetUsersByPageQueryHandler.ts"],"names":[],"mappings":";;;AAGA,8DAA2D;AAC3D,kDAA6D;AAE7D,MAAa,0BAA0B;IACrC,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,OAAO,CAAC,KAA0B;QACtC,IAAI,CAAC;YACH,iCAAiC;YACjC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC5C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACnD,CAAC;YAED,MAAM,KAAK,GAAG,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;YACxC,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAC1E,CAAC;YAED,IAAA,mBAAU,EAAC,iCAAiC,EAAE,SAAS,EA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,CAAC;YAED,mCAAmC;YACnC,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC;gBACpH,MAAM,KAAK,CAAC;YACd,CAAC;YAED,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;CACF;AArDD,gEAqDC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.d.ts b/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.d.ts deleted file mode 100644 index a9f8d58e..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export interface Message { - id: string; - date: Date; - userid: string; - text: string; -} -export declare const ChatState: { - readonly ACTIVE: 0; - readonly ARCHIVE: 1; - readonly SOFT_DELETE: 2; -}; -export type ChatStateType = typeof ChatState[keyof typeof ChatState]; -export declare const ChatType: { - readonly DIRECT: "direct"; - readonly GROUP: "group"; - readonly GAME: "game"; -}; -export type ChatTypeType = typeof ChatType[keyof typeof ChatType]; -export declare class ChatAggregate { - id: string; - type: ChatTypeType; - name: string | null; - gameId: string | null; - createdBy: string | null; - users: string[]; - messages: Message[]; - lastActivity: Date | null; - createDate: Date; - updateDate: Date; - state: ChatStateType; - archiveDate: Date | null; -} -//# sourceMappingURL=ChatAggregate.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.d.ts.map b/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.d.ts.map deleted file mode 100644 index 1ca0f86e..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatAggregate.d.ts","sourceRoot":"","sources":["../../../src/Domain/Chat/ChatAggregate.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAErE,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAElE,qBACa,aAAa;IAEtB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,YAAY,CAAC;IAGpB,IAAI,EAAG,MAAM,GAAG,IAAI,CAAC;IAGrB,MAAM,EAAG,MAAM,GAAG,IAAI,CAAC;IAGvB,SAAS,EAAG,MAAM,GAAG,IAAI,CAAC;IAG1B,KAAK,EAAG,MAAM,EAAE,CAAC;IAGjB,QAAQ,EAAG,OAAO,EAAE,CAAC;IAGrB,YAAY,EAAG,IAAI,GAAG,IAAI,CAAC;IAG3B,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IAGlB,KAAK,EAAG,aAAa,CAAC;IAItB,WAAW,EAAG,IAAI,GAAG,IAAI,CAAC;CAC7B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.js b/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.js deleted file mode 100644 index 1cf28598..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChatAggregate = exports.ChatType = exports.ChatState = void 0; -const typeorm_1 = require("typeorm"); -exports.ChatState = { - ACTIVE: 0, - ARCHIVE: 1, - SOFT_DELETE: 2 -}; -exports.ChatType = { - DIRECT: 'direct', - GROUP: 'group', - GAME: 'game' -}; -let ChatAggregate = class ChatAggregate { -}; -exports.ChatAggregate = ChatAggregate; -__decorate([ - (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), - __metadata("design:type", String) -], ChatAggregate.prototype, "id", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 50, default: exports.ChatType.DIRECT }), - __metadata("design:type", String) -], ChatAggregate.prototype, "type", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }), - __metadata("design:type", Object) -], ChatAggregate.prototype, "name", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', nullable: true }), - __metadata("design:type", Object) -], ChatAggregate.prototype, "gameId", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', nullable: true }), - __metadata("design:type", Object) -], ChatAggregate.prototype, "createdBy", void 0); -__decorate([ - (0, typeorm_1.Column)('uuid', { array: true }), - __metadata("design:type", Array) -], ChatAggregate.prototype, "users", void 0); -__decorate([ - (0, typeorm_1.Column)('json', { default: [] }), - __metadata("design:type", Array) -], ChatAggregate.prototype, "messages", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }), - __metadata("design:type", Object) -], ChatAggregate.prototype, "lastActivity", void 0); -__decorate([ - (0, typeorm_1.CreateDateColumn)(), - __metadata("design:type", Date) -], ChatAggregate.prototype, "createDate", void 0); -__decorate([ - (0, typeorm_1.UpdateDateColumn)(), - __metadata("design:type", Date) -], ChatAggregate.prototype, "updateDate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: exports.ChatState.ACTIVE }), - __metadata("design:type", Number) -], ChatAggregate.prototype, "state", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }), - __metadata("design:type", Object) -], ChatAggregate.prototype, "archiveDate", void 0); -exports.ChatAggregate = ChatAggregate = __decorate([ - (0, typeorm_1.Entity)('Chats') -], ChatAggregate); -//# sourceMappingURL=ChatAggregate.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.js.map b/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.js.map deleted file mode 100644 index 68ebc4be..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatAggregate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatAggregate.js","sourceRoot":"","sources":["../../../src/Domain/Chat/ChatAggregate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAqG;AASxF,QAAA,SAAS,GAAG;IACrB,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC;CACR,CAAC;AAIE,QAAA,QAAQ,GAAG;IACpB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACN,CAAC;AAKJ,IAAM,aAAa,GAAnB,MAAM,aAAa;CAqCzB,CAAA;AArCY,sCAAa;AAEtB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;yCACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,gBAAQ,CAAC,MAAM,EAAE,CAAC;;2CAC9C;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACpC;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAClB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACf;AAG1B;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;4CACf;AAGjB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+CACX;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACnB;AAG3B;IADC,IAAA,0BAAgB,GAAE;8BACN,IAAI;iDAAC;AAGlB;IADC,IAAA,0BAAgB,GAAE;8BACN,IAAI;iDAAC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAS,CAAC,MAAM,EAAE,CAAC;;4CAC7B;AAItB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACpB;wBApCjB,aAAa;IADzB,IAAA,gBAAM,EAAC,OAAO,CAAC;GACH,aAAa,CAqCzB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.d.ts b/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.d.ts deleted file mode 100644 index 323fe672..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Message } from './ChatAggregate'; -export declare class ChatArchiveAggregate { - id: string; - chatId: string; - archivedMessages: Message[]; - archivedAt: Date; - createDate: Date; - chatType: string; - chatName: string | null; - gameId: string | null; - participants: string[]; -} -//# sourceMappingURL=ChatArchiveAggregate.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.d.ts.map b/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.d.ts.map deleted file mode 100644 index 50c3fdf1..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatArchiveAggregate.d.ts","sourceRoot":"","sources":["../../../src/Domain/Chat/ChatArchiveAggregate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,qBACa,oBAAoB;IAE7B,EAAE,EAAG,MAAM,CAAC;IAGZ,MAAM,EAAG,MAAM,CAAC;IAGhB,gBAAgB,EAAG,OAAO,EAAE,CAAC;IAG7B,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IAIlB,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,EAAG,MAAM,GAAG,IAAI,CAAC;IAGzB,MAAM,EAAG,MAAM,GAAG,IAAI,CAAC;IAGvB,YAAY,EAAG,MAAM,EAAE,CAAC;CAC3B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.js b/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.js deleted file mode 100644 index b18db602..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChatArchiveAggregate = void 0; -const typeorm_1 = require("typeorm"); -let ChatArchiveAggregate = class ChatArchiveAggregate { -}; -exports.ChatArchiveAggregate = ChatArchiveAggregate; -__decorate([ - (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), - __metadata("design:type", String) -], ChatArchiveAggregate.prototype, "id", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid' }), - __metadata("design:type", String) -], ChatArchiveAggregate.prototype, "chatId", void 0); -__decorate([ - (0, typeorm_1.Column)('json'), - __metadata("design:type", Array) -], ChatArchiveAggregate.prototype, "archivedMessages", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'timestamp' }), - __metadata("design:type", Date) -], ChatArchiveAggregate.prototype, "archivedAt", void 0); -__decorate([ - (0, typeorm_1.CreateDateColumn)(), - __metadata("design:type", Date) -], ChatArchiveAggregate.prototype, "createDate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 50 }), - __metadata("design:type", String) -], ChatArchiveAggregate.prototype, "chatType", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }), - __metadata("design:type", Object) -], ChatArchiveAggregate.prototype, "chatName", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', nullable: true }), - __metadata("design:type", Object) -], ChatArchiveAggregate.prototype, "gameId", void 0); -__decorate([ - (0, typeorm_1.Column)('uuid', { array: true }), - __metadata("design:type", Array) -], ChatArchiveAggregate.prototype, "participants", void 0); -exports.ChatArchiveAggregate = ChatArchiveAggregate = __decorate([ - (0, typeorm_1.Entity)('ChatArchives') -], ChatArchiveAggregate); -//# sourceMappingURL=ChatArchiveAggregate.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.js.map b/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.js.map deleted file mode 100644 index c2743308..00000000 --- a/SerpentRace_Backend/dist/Domain/Chat/ChatArchiveAggregate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatArchiveAggregate.js","sourceRoot":"","sources":["../../../src/Domain/Chat/ChatArchiveAggregate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAmF;AAI5E,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CA4BhC,CAAA;AA5BY,oDAAoB;AAE7B;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;gDACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDACT;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;8DACc;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BACjB,IAAI;wDAAC;AAGlB;IADC,IAAA,0BAAgB,GAAE;8BACN,IAAI;wDAAC;AAIlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;sDACtB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAChC;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAClB;AAGvB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;0DACR;+BA3Bf,oBAAoB;IADhC,IAAA,gBAAM,EAAC,cAAc,CAAC;GACV,oBAAoB,CA4BhC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.d.ts b/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.d.ts deleted file mode 100644 index dd91d566..00000000 --- a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export declare enum ContactType { - BUG = 0, - PROBLEM = 1, - QUESTION = 2, - SALES = 3, - OTHER = 4 -} -export declare enum ContactState { - ACTIVE = 0, - RESOLVED = 1, - SOFT_DELETE = 2 -} -export declare class ContactAggregate { - id: string; - name: string; - email: string; - userid: string | null; - type: ContactType; - txt: string; - state: ContactState; - createDate: Date; - updateDate: Date; - adminResponse: string | null; - responseDate: Date | null; - respondedBy: string | null; -} -//# sourceMappingURL=ContactAggregate.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.d.ts.map b/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.d.ts.map deleted file mode 100644 index 5babc11b..00000000 --- a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactAggregate.d.ts","sourceRoot":"","sources":["../../../src/Domain/Contact/ContactAggregate.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACnB,GAAG,IAAI;IACP,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,KAAK,IAAI;CACZ;AAED,oBAAY,YAAY;IACpB,MAAM,IAAI;IACV,QAAQ,IAAI;IACZ,WAAW,IAAI;CAClB;AAED,qBACa,gBAAgB;IAEzB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,KAAK,EAAG,MAAM,CAAC;IAGf,MAAM,EAAG,MAAM,GAAG,IAAI,CAAC;IAGvB,IAAI,EAAG,WAAW,CAAC;IAGnB,GAAG,EAAG,MAAM,CAAC;IAGb,KAAK,EAAG,YAAY,CAAC;IAGrB,UAAU,EAAG,IAAI,CAAC;IAGlB,UAAU,EAAG,IAAI,CAAC;IAIlB,aAAa,EAAG,MAAM,GAAG,IAAI,CAAC;IAG9B,YAAY,EAAG,IAAI,GAAG,IAAI,CAAC;IAG3B,WAAW,EAAG,MAAM,GAAG,IAAI,CAAC;CAC/B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.js b/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.js deleted file mode 100644 index 6accea8d..00000000 --- a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContactAggregate = exports.ContactState = exports.ContactType = void 0; -const typeorm_1 = require("typeorm"); -var ContactType; -(function (ContactType) { - ContactType[ContactType["BUG"] = 0] = "BUG"; - ContactType[ContactType["PROBLEM"] = 1] = "PROBLEM"; - ContactType[ContactType["QUESTION"] = 2] = "QUESTION"; - ContactType[ContactType["SALES"] = 3] = "SALES"; - ContactType[ContactType["OTHER"] = 4] = "OTHER"; -})(ContactType || (exports.ContactType = ContactType = {})); -var ContactState; -(function (ContactState) { - ContactState[ContactState["ACTIVE"] = 0] = "ACTIVE"; - ContactState[ContactState["RESOLVED"] = 1] = "RESOLVED"; - ContactState[ContactState["SOFT_DELETE"] = 2] = "SOFT_DELETE"; -})(ContactState || (exports.ContactState = ContactState = {})); -let ContactAggregate = class ContactAggregate { -}; -exports.ContactAggregate = ContactAggregate; -__decorate([ - (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), - __metadata("design:type", String) -], ContactAggregate.prototype, "id", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255 }), - __metadata("design:type", String) -], ContactAggregate.prototype, "name", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255 }), - __metadata("design:type", String) -], ContactAggregate.prototype, "email", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', nullable: true }), - __metadata("design:type", Object) -], ContactAggregate.prototype, "userid", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int' }), - __metadata("design:type", Number) -], ContactAggregate.prototype, "type", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'text' }), - __metadata("design:type", String) -], ContactAggregate.prototype, "txt", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: ContactState.ACTIVE }), - __metadata("design:type", Number) -], ContactAggregate.prototype, "state", void 0); -__decorate([ - (0, typeorm_1.CreateDateColumn)(), - __metadata("design:type", Date) -], ContactAggregate.prototype, "createDate", void 0); -__decorate([ - (0, typeorm_1.UpdateDateColumn)(), - __metadata("design:type", Date) -], ContactAggregate.prototype, "updateDate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'text', nullable: true }), - __metadata("design:type", Object) -], ContactAggregate.prototype, "adminResponse", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }), - __metadata("design:type", Object) -], ContactAggregate.prototype, "responseDate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', nullable: true }), - __metadata("design:type", Object) -], ContactAggregate.prototype, "respondedBy", void 0); -exports.ContactAggregate = ContactAggregate = __decorate([ - (0, typeorm_1.Entity)('Contacts') -], ContactAggregate); -//# sourceMappingURL=ContactAggregate.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.js.map b/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.js.map deleted file mode 100644 index 31940035..00000000 --- a/SerpentRace_Backend/dist/Domain/Contact/ContactAggregate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactAggregate.js","sourceRoot":"","sources":["../../../src/Domain/Contact/ContactAggregate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAqG;AAErG,IAAY,WAMX;AAND,WAAY,WAAW;IACnB,2CAAO,CAAA;IACP,mDAAW,CAAA;IACX,qDAAY,CAAA;IACZ,+CAAS,CAAA;IACT,+CAAS,CAAA;AACb,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mDAAU,CAAA;IACV,uDAAY,CAAA;IACZ,6DAAe,CAAA;AACnB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAqC5B,CAAA;AArCY,4CAAgB;AAEzB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;4CACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;8CAC3B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;+CAC1B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAClB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;8CACL;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,EAAE,CAAC;;+CACjC;AAGrB;IADC,IAAA,0BAAgB,GAAE;8BACN,IAAI;oDAAC;AAGlB;IADC,IAAA,0BAAgB,GAAE;8BACN,IAAI;oDAAC;AAIlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACX;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACnB;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACb;2BApCnB,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,UAAU,CAAC;GACN,gBAAgB,CAqC5B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.d.ts b/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.d.ts deleted file mode 100644 index 89fba18d..00000000 --- a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { OrganizationAggregate } from '../Organization/OrganizationAggregate'; -export declare enum Type { - LUCK = 0, - JOKER = 1, - QUESTION = 2 -} -export declare enum CType { - PUBLIC = 0, - PRIVATE = 1, - ORGANIZATION = 2 -} -export declare enum State { - ACTIVE = 0, - SOFT_DELETE = 1 -} -export declare enum CardType { - QUIZ = 0, - SENTENCE_PAIRING = 1, - OWN_ANSWER = 2, - TRUE_FALSE = 3, - CLOSER = 4 -} -export interface Card { - text: string; - type?: CardType; - answer?: string | null; -} -export declare class DeckAggregate { - id: string; - name: string; - type: Type; - userid: string; - creationdate: Date; - cards: Card[]; - playedNumber: number; - ctype: CType; - updatedate: Date; - state: State; - organization: OrganizationAggregate | null; -} -//# sourceMappingURL=DeckAggregate.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.d.ts.map b/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.d.ts.map deleted file mode 100644 index a8624c32..00000000 --- a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckAggregate.d.ts","sourceRoot":"","sources":["../../../src/Domain/Deck/DeckAggregate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,oBAAY,IAAI;IACZ,IAAI,IAAI;IACR,KAAK,IAAI;IACT,QAAQ,IAAI;CACf;AAED,oBAAY,KAAK;IACb,MAAM,IAAI;IACV,OAAO,IAAI;IACX,YAAY,IAAI;CACnB;AAED,oBAAY,KAAK;IACb,MAAM,IAAI;IACV,WAAW,IAAI;CAClB;AAED,oBAAY,QAAQ;IAChB,IAAI,IAAI;IACR,gBAAgB,IAAI;IACpB,UAAU,IAAI;IACd,UAAU,IAAI;IACd,MAAM,IAAI;CACb;AAED,MAAM,WAAW,IAAI;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,qBACa,aAAa;IAEtB,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,IAAI,EAAG,IAAI,CAAC;IAGZ,MAAM,EAAG,MAAM,CAAC;IAGhB,YAAY,EAAG,IAAI,CAAC;IAGpB,KAAK,EAAG,IAAI,EAAE,CAAC;IAGf,YAAY,EAAG,MAAM,CAAC;IAGtB,KAAK,EAAG,KAAK,CAAC;IAGd,UAAU,EAAG,IAAI,CAAC;IAGd,KAAK,EAAG,KAAK,CAAC;IAIlB,YAAY,EAAG,qBAAqB,GAAG,IAAI,CAAC;CAC/C"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.js b/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.js deleted file mode 100644 index cbff1d3f..00000000 --- a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeckAggregate = exports.CardType = exports.State = exports.CType = exports.Type = void 0; -const typeorm_1 = require("typeorm"); -const OrganizationAggregate_1 = require("../Organization/OrganizationAggregate"); -var Type; -(function (Type) { - Type[Type["LUCK"] = 0] = "LUCK"; - Type[Type["JOKER"] = 1] = "JOKER"; - Type[Type["QUESTION"] = 2] = "QUESTION"; -})(Type || (exports.Type = Type = {})); -var CType; -(function (CType) { - CType[CType["PUBLIC"] = 0] = "PUBLIC"; - CType[CType["PRIVATE"] = 1] = "PRIVATE"; - CType[CType["ORGANIZATION"] = 2] = "ORGANIZATION"; -})(CType || (exports.CType = CType = {})); -var State; -(function (State) { - State[State["ACTIVE"] = 0] = "ACTIVE"; - State[State["SOFT_DELETE"] = 1] = "SOFT_DELETE"; -})(State || (exports.State = State = {})); -var CardType; -(function (CardType) { - CardType[CardType["QUIZ"] = 0] = "QUIZ"; - CardType[CardType["SENTENCE_PAIRING"] = 1] = "SENTENCE_PAIRING"; - CardType[CardType["OWN_ANSWER"] = 2] = "OWN_ANSWER"; - CardType[CardType["TRUE_FALSE"] = 3] = "TRUE_FALSE"; - CardType[CardType["CLOSER"] = 4] = "CLOSER"; -})(CardType || (exports.CardType = CardType = {})); -let DeckAggregate = class DeckAggregate { -}; -exports.DeckAggregate = DeckAggregate; -__decorate([ - (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), - __metadata("design:type", String) -], DeckAggregate.prototype, "id", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255 }), - __metadata("design:type", String) -], DeckAggregate.prototype, "name", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int' }), - __metadata("design:type", Number) -], DeckAggregate.prototype, "type", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', name: 'user_id' }), - __metadata("design:type", String) -], DeckAggregate.prototype, "userid", void 0); -__decorate([ - (0, typeorm_1.CreateDateColumn)({ name: 'creation_date' }), - __metadata("design:type", Date) -], DeckAggregate.prototype, "creationdate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'json' }), - __metadata("design:type", Array) -], DeckAggregate.prototype, "cards", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: 0, name: 'played_number' }), - __metadata("design:type", Number) -], DeckAggregate.prototype, "playedNumber", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: CType.PUBLIC }), - __metadata("design:type", Number) -], DeckAggregate.prototype, "ctype", void 0); -__decorate([ - (0, typeorm_1.UpdateDateColumn)({ name: 'update_date' }), - __metadata("design:type", Date) -], DeckAggregate.prototype, "updatedate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: State.ACTIVE }), - __metadata("design:type", Number) -], DeckAggregate.prototype, "state", void 0); -__decorate([ - (0, typeorm_1.ManyToOne)(() => OrganizationAggregate_1.OrganizationAggregate, { nullable: true }), - (0, typeorm_1.JoinColumn)({ name: 'organization_id' }), - __metadata("design:type", Object) -], DeckAggregate.prototype, "organization", void 0); -exports.DeckAggregate = DeckAggregate = __decorate([ - (0, typeorm_1.Entity)('Decks') -], DeckAggregate); -//# sourceMappingURL=DeckAggregate.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.js.map b/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.js.map deleted file mode 100644 index 2b724067..00000000 --- a/SerpentRace_Backend/dist/Domain/Deck/DeckAggregate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckAggregate.js","sourceRoot":"","sources":["../../../src/Domain/Deck/DeckAggregate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4H;AAC5H,iFAA8E;AAE9E,IAAY,IAIX;AAJD,WAAY,IAAI;IACZ,+BAAQ,CAAA;IACR,iCAAS,CAAA;IACT,uCAAY,CAAA;AAChB,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf;AAED,IAAY,KAIX;AAJD,WAAY,KAAK;IACb,qCAAU,CAAA;IACV,uCAAW,CAAA;IACX,iDAAgB,CAAA;AACpB,CAAC,EAJW,KAAK,qBAAL,KAAK,QAIhB;AAED,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,qCAAU,CAAA;IACV,+CAAe,CAAA;AACnB,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB;AAED,IAAY,QAMX;AAND,WAAY,QAAQ;IAChB,uCAAQ,CAAA;IACR,+DAAoB,CAAA;IACpB,mDAAc,CAAA;IACd,mDAAc,CAAA;IACd,2CAAU,CAAA;AACd,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AASM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAkCzB,CAAA;AAlCY,sCAAa;AAEtB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;yCACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;2CAC3B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;;2CACX;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;6CAC1B;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;8BAC7B,IAAI;mDAAC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CACV;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;;mDACrC;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;;4CACjC;AAGd;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAC7B,IAAI;iDAAC;AAGd;IADH,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;;4CAC7B;AAIlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;;mDACI;wBAjCnC,aAAa;IADzB,IAAA,gBAAM,EAAC,OAAO,CAAC;GACH,aAAa,CAkCzB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.d.ts b/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.d.ts deleted file mode 100644 index c93c54d1..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ChatArchiveAggregate } from '../Chat/ChatArchiveAggregate'; -export interface IChatArchiveRepository { - create(archive: Partial): Promise; - findAll(): Promise; - findById(id: string): Promise; - findByChatId(chatId: string): Promise; - findByGameId(gameId: string): Promise; - delete(id: string): Promise; - cleanup(olderThanDays: number): Promise; -} -//# sourceMappingURL=IChatArchiveRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.d.ts.map b/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.d.ts.map deleted file mode 100644 index 75de25aa..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IChatArchiveRepository.d.ts","sourceRoot":"","sources":["../../../src/Domain/IRepository/IChatArchiveRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACnC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9E,OAAO,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAC3D,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC9D,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC9D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.js b/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.js deleted file mode 100644 index 2a5ca79f..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IChatArchiveRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.js.map b/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.js.map deleted file mode 100644 index d495499a..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatArchiveRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IChatArchiveRepository.js","sourceRoot":"","sources":["../../../src/Domain/IRepository/IChatArchiveRepository.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts b/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts deleted file mode 100644 index f35d75e9..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ChatAggregate } from '../Chat/ChatAggregate'; -import { ChatArchiveAggregate } from '../Chat/ChatArchiveAggregate'; -export interface IChatRepository { - create(chat: Partial): Promise; - findByPage(from: number, to: number): Promise<{ - chats: ChatAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - chats: ChatAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - findByUserId(userId: string): Promise; - findByUserIdIncludingDeleted(userId: string): Promise; - findByGameId(gameId: string): Promise; - findActiveChatsForUser(userId: string): Promise; - findInactiveChats(inactivityMinutes: number): Promise; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - archiveChat(chat: ChatAggregate): Promise; - getArchivedChat(chatId: string): Promise; - restoreFromArchive(chatId: string): Promise; -} -//# sourceMappingURL=IChatRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts.map b/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts.map deleted file mode 100644 index 926836fc..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IChatRepository.d.ts","sourceRoot":"","sources":["../../../src/Domain/IRepository/IChatRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,eAAe;IAC5B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC7D,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9F,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9G,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACpD,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACpE,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvD,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvE,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC5D,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACjE,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAClF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAChE,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IACtE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;CACrE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.js b/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.js deleted file mode 100644 index 1e002011..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IChatRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.js.map b/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.js.map deleted file mode 100644 index 23b45337..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IChatRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IChatRepository.js","sourceRoot":"","sources":["../../../src/Domain/IRepository/IChatRepository.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.d.ts b/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.d.ts deleted file mode 100644 index 0b3a488f..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ContactAggregate } from '../Contact/ContactAggregate'; -export interface IContactRepository { - create(contact: Partial): Promise; - findById(id: string): Promise; - findByPage(from: number, to: number): Promise<{ - contacts: ContactAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - contacts: ContactAggregate[]; - totalCount: number; - }>; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - search(searchTerm: string): Promise; - searchIncludingDeleted(searchTerm: string): Promise; -} -//# sourceMappingURL=IContactRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.d.ts.map b/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.d.ts.map deleted file mode 100644 index 72778a8d..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IContactRepository.d.ts","sourceRoot":"","sources":["../../../src/Domain/IRepository/IContactRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACtE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACvD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpG,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACxF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACzD,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACvE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACxD,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;CAC3E"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.js b/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.js deleted file mode 100644 index df4283f8..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IContactRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.js.map b/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.js.map deleted file mode 100644 index 4bdbecb2..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IContactRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IContactRepository.js","sourceRoot":"","sources":["../../../src/Domain/IRepository/IContactRepository.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.d.ts b/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.d.ts deleted file mode 100644 index 79418b01..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { DeckAggregate } from '../Deck/DeckAggregate'; -export interface IDeckRepository { - create(deck: Partial): Promise; - findByPage(from: number, to: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - search(query: string, limit?: number, offset?: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - searchIncludingDeleted(query: string, limit?: number, offset?: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - countActiveByUserId(userId: string): Promise; - countOrganizationalByUserId(userId: string): Promise; - findFilteredDecks(userId: string, userOrgId?: string | null, isAdmin?: boolean, from?: number, to?: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; -} -//# sourceMappingURL=IDeckRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.d.ts.map b/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.d.ts.map deleted file mode 100644 index f3e16827..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IDeckRepository.d.ts","sourceRoot":"","sources":["../../../src/Domain/IRepository/IDeckRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD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AE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAGtD,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7D,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxK"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.js b/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.js deleted file mode 100644 index cb1d812d..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IDeckRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.js.map b/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.js.map deleted file mode 100644 index 0597742e..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IDeckRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IDeckRepository.js","sourceRoot":"","sources":["../../../src/Domain/IRepository/IDeckRepository.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.d.ts b/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.d.ts deleted file mode 100644 index b2670168..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { OrganizationAggregate } from '../Organization/OrganizationAggregate'; -export interface IOrganizationRepository { - create(org: Partial): Promise; - findByPage(from: number, to: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - search(query: string, limit?: number, offset?: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - searchIncludingDeleted(query: string, limit?: number, offset?: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; -} -//# sourceMappingURL=IOrganizationRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.d.ts.map b/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.d.ts.map deleted file mode 100644 index def3f02a..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IOrganizationRepository.d.ts","sourceRoot":"","sources":["../../../src/Domain/IRepository/IOrganizationRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC5E,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9G,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9H,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IAC5D,wBAAwB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IAC5E,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChI,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChJ,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IAClG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CACjE"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.js b/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.js deleted file mode 100644 index ac3310d4..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IOrganizationRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.js.map b/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.js.map deleted file mode 100644 index 5aa04dd0..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IOrganizationRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IOrganizationRepository.js","sourceRoot":"","sources":["../../../src/Domain/IRepository/IOrganizationRepository.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.d.ts b/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.d.ts deleted file mode 100644 index be74d19f..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { UserAggregate } from '../User/UserAggregate'; -export interface IUserRepository { - create(user: Partial): Promise; - findByPage(from: number, to: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - findByUsername(username: string): Promise; - findByEmail(email: string): Promise; - findByToken(token: string): Promise; - search(query: string, limit?: number, offset?: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - searchIncludingDeleted(query: string, limit?: number, offset?: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - deactivate(id: string): Promise; -} -//# sourceMappingURL=IUserRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.d.ts.map b/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.d.ts.map deleted file mode 100644 index d0c46fe7..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IUserRep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AAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChI,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAClF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;CACzD"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.js b/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.js deleted file mode 100644 index 9536e110..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=IUserRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.js.map b/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.js.map deleted file mode 100644 index f6ea0182..00000000 --- a/SerpentRace_Backend/dist/Domain/IRepository/IUserRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IUserRepository.js","sourceRoot":"","sources":["../../../src/Domain/IRepository/IUserRepository.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.d.ts b/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.d.ts deleted file mode 100644 index 4ddbda3b..00000000 --- a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { UserAggregate } from '../User/UserAggregate'; -export declare const OrganizationState: { - readonly REGISTERED: 0; - readonly ACTIVE: 1; - readonly SOFT_DELETE: 2; -}; -export type OrganizationStateType = typeof OrganizationState[keyof typeof OrganizationState]; -export declare class OrganizationAggregate { - id: string; - name: string; - contactfname: string; - contactlname: string; - contactphone: string; - contactemail: string; - state: OrganizationStateType; - regdate: Date; - updatedate: Date; - url: string | null; - userinorg: number; - maxOrganizationalDecks: number | null; - users: UserAggregate[]; -} -//# sourceMappingURL=OrganizationAggregate.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.d.ts.map b/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.d.ts.map deleted file mode 100644 index 74d937e5..00000000 --- a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationAggregate.d.ts","sourceRoot":"","sources":["../../../src/Domain/Organization/OrganizationAggregate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,OAAO,iBAAiB,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7F,qBACa,qBAAqB;IAE9B,EAAE,EAAG,MAAM,CAAC;IAGZ,IAAI,EAAG,MAAM,CAAC;IAGd,YAAY,EAAG,MAAM,CAAC;IAGtB,YAAY,EAAG,MAAM,CAAC;IAGtB,YAAY,EAAG,MAAM,CAAC;IAGtB,YAAY,EAAG,MAAM,CAAC;IAGtB,KAAK,EAAG,qBAAqB,CAAC;IAG9B,OAAO,EAAG,IAAI,CAAC;IAGf,UAAU,EAAG,IAAI,CAAC;IAGlB,GAAG,EAAG,MAAM,GAAG,IAAI,CAAC;IAGpB,SAAS,EAAG,MAAM,CAAC;IAGnB,sBAAsB,EAAG,MAAM,GAAG,IAAI,CAAC;IAGvC,KAAK,EAAG,aAAa,EAAE,CAAC;CACvB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.js b/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.js deleted file mode 100644 index fb171b47..00000000 --- a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrganizationAggregate = exports.OrganizationState = void 0; -const typeorm_1 = require("typeorm"); -const UserAggregate_1 = require("../User/UserAggregate"); -exports.OrganizationState = { - REGISTERED: 0, - ACTIVE: 1, - SOFT_DELETE: 2 -}; -let OrganizationAggregate = class OrganizationAggregate { -}; -exports.OrganizationAggregate = OrganizationAggregate; -__decorate([ - (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), - __metadata("design:type", String) -], OrganizationAggregate.prototype, "id", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255 }), - __metadata("design:type", String) -], OrganizationAggregate.prototype, "name", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 100 }), - __metadata("design:type", String) -], OrganizationAggregate.prototype, "contactfname", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 100 }), - __metadata("design:type", String) -], OrganizationAggregate.prototype, "contactlname", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 20 }), - __metadata("design:type", String) -], OrganizationAggregate.prototype, "contactphone", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255 }), - __metadata("design:type", String) -], OrganizationAggregate.prototype, "contactemail", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: exports.OrganizationState.REGISTERED }), - __metadata("design:type", Number) -], OrganizationAggregate.prototype, "state", void 0); -__decorate([ - (0, typeorm_1.CreateDateColumn)(), - __metadata("design:type", Date) -], OrganizationAggregate.prototype, "regdate", void 0); -__decorate([ - (0, typeorm_1.UpdateDateColumn)(), - __metadata("design:type", Date) -], OrganizationAggregate.prototype, "updatedate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }), - __metadata("design:type", Object) -], OrganizationAggregate.prototype, "url", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', default: 0 }), - __metadata("design:type", Number) -], OrganizationAggregate.prototype, "userinorg", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'int', nullable: true }), - __metadata("design:type", Object) -], OrganizationAggregate.prototype, "maxOrganizationalDecks", void 0); -__decorate([ - (0, typeorm_1.OneToMany)(() => UserAggregate_1.UserAggregate, user => user.orgid), - __metadata("design:type", Array) -], OrganizationAggregate.prototype, "users", void 0); -exports.OrganizationAggregate = OrganizationAggregate = __decorate([ - (0, typeorm_1.Entity)('Organizations') -], OrganizationAggregate); -//# sourceMappingURL=OrganizationAggregate.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.js.map b/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.js.map deleted file mode 100644 index 2aa338e1..00000000 --- a/SerpentRace_Backend/dist/Domain/Organization/OrganizationAggregate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"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,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACjB;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEACD;AAGvC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6BAAa,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;;oDAC3B;gCAtCf,qBAAqB;IADjC,IAAA,gBAAM,EAAC,eAAe,CAAC;GACX,qBAAqB,CAuC7B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/User/UserAggregate.d.ts b/SerpentRace_Backend/dist/Domain/User/UserAggregate.d.ts deleted file mode 100644 index 1ee37a1e..00000000 --- a/SerpentRace_Backend/dist/Domain/User/UserAggregate.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export declare enum UserState { - REGISTERED_NOT_VERIFIED = 0, - VERIFIED_REGULAR = 1, - VERIFIED_PREMIUM = 2, - SOFT_DELETE = 3, - DEACTIVATED = 4, - ADMIN = 5 -} -export declare class UserAggregate { - id: string; - orgid: string | null; - username: string; - password: string; - email: string; - fname: string; - lname: string; - token: string | null; - TokenExpires: Date | null; - type: string; - phone: string | null; - state: UserState; - regdate: Date; - updatedate: Date; - Orglogindate: Date | null; -} -//# sourceMappingURL=UserAggregate.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/User/UserAggregate.d.ts.map b/SerpentRace_Backend/dist/Domain/User/UserAggregate.d.ts.map deleted file mode 100644 index dedef4a4..00000000 --- a/SerpentRace_Backend/dist/Domain/User/UserAggregate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserAggregate.d.ts","sourceRoot":"","sources":["../../../src/Domain/User/UserAggregate.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS;IACjB,uBAAuB,IAAI;IAC3B,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,WAAW,IAAI;IACf,WAAW,IAAI;IACf,KAAK,IAAI;CACZ;AAED,qBACa,aAAa;IAEtB,EAAE,EAAG,MAAM,CAAC;IAGZ,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,EAAG,MAAM,CAAC;IAGlB,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,EAAG,MAAM,CAAC;IAGf,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,YAAY,EAAG,IAAI,GAAG,IAAI,CAAC;IAG3B,IAAI,EAAG,MAAM,CAAC;IAGd,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAMtB,KAAK,EAAG,SAAS,CAAC;IAGlB,OAAO,EAAG,IAAI,CAAC;IAGf,UAAU,EAAG,IAAI,CAAC;IAGlB,YAAY,EAAG,IAAI,GAAG,IAAI,CAAC;CAC9B"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/User/UserAggregate.js b/SerpentRace_Backend/dist/Domain/User/UserAggregate.js deleted file mode 100644 index d9f65bba..00000000 --- a/SerpentRace_Backend/dist/Domain/User/UserAggregate.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserAggregate = exports.UserState = void 0; -const typeorm_1 = require("typeorm"); -var UserState; -(function (UserState) { - UserState[UserState["REGISTERED_NOT_VERIFIED"] = 0] = "REGISTERED_NOT_VERIFIED"; - UserState[UserState["VERIFIED_REGULAR"] = 1] = "VERIFIED_REGULAR"; - UserState[UserState["VERIFIED_PREMIUM"] = 2] = "VERIFIED_PREMIUM"; - UserState[UserState["SOFT_DELETE"] = 3] = "SOFT_DELETE"; - UserState[UserState["DEACTIVATED"] = 4] = "DEACTIVATED"; - UserState[UserState["ADMIN"] = 5] = "ADMIN"; -})(UserState || (exports.UserState = UserState = {})); -let UserAggregate = class UserAggregate { -}; -exports.UserAggregate = UserAggregate; -__decorate([ - (0, typeorm_1.PrimaryGeneratedColumn)('uuid'), - __metadata("design:type", String) -], UserAggregate.prototype, "id", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'uuid', nullable: true }), - __metadata("design:type", Object) -], UserAggregate.prototype, "orgid", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 100, unique: true }), - __metadata("design:type", String) -], UserAggregate.prototype, "username", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255 }), - __metadata("design:type", String) -], UserAggregate.prototype, "password", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255, unique: true }), - __metadata("design:type", String) -], UserAggregate.prototype, "email", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 100 }), - __metadata("design:type", String) -], UserAggregate.prototype, "fname", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 100 }), - __metadata("design:type", String) -], UserAggregate.prototype, "lname", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }), - __metadata("design:type", Object) -], UserAggregate.prototype, "token", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }), - __metadata("design:type", Object) -], UserAggregate.prototype, "TokenExpires", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 50 }), - __metadata("design:type", String) -], UserAggregate.prototype, "type", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: true }), - __metadata("design:type", Object) -], UserAggregate.prototype, "phone", void 0); -__decorate([ - (0, typeorm_1.Column)({ - type: 'int', - default: UserState.REGISTERED_NOT_VERIFIED - }), - __metadata("design:type", Number) -], UserAggregate.prototype, "state", void 0); -__decorate([ - (0, typeorm_1.CreateDateColumn)(), - __metadata("design:type", Date) -], UserAggregate.prototype, "regdate", void 0); -__decorate([ - (0, typeorm_1.UpdateDateColumn)(), - __metadata("design:type", Date) -], UserAggregate.prototype, "updatedate", void 0); -__decorate([ - (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }), - __metadata("design:type", Object) -], UserAggregate.prototype, "Orglogindate", void 0); -exports.UserAggregate = UserAggregate = __decorate([ - (0, typeorm_1.Entity)('Users') -], UserAggregate); -//# sourceMappingURL=UserAggregate.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Domain/User/UserAggregate.js.map b/SerpentRace_Backend/dist/Domain/User/UserAggregate.js.map deleted file mode 100644 index 0f0b2cb4..00000000 --- a/SerpentRace_Backend/dist/Domain/User/UserAggregate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserAggregate.js","sourceRoot":"","sources":["../../../src/Domain/User/UserAggregate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAqG;AAErG,IAAY,SAOX;AAPD,WAAY,SAAS;IACjB,+EAA2B,CAAA;IAC3B,iEAAoB,CAAA;IACpB,iEAAoB,CAAA;IACpB,uDAAe,CAAA;IACf,uDAAe,CAAA;IACf,2CAAS,CAAA;AACb,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAgDzB,CAAA;AAhDY,sCAAa;AAEtB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;yCACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,E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;AAGf;IADC,IAAA,0BAAgB,GAAE;8BACN,IAAI;iDAAC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACnB;wBA/ClB,aAAa;IADzB,IAAA,gBAAM,EAAC,OAAO,CAAC;GACH,aAAa,CAgDzB"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.d.ts deleted file mode 100644 index daeeae80..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class Test1755691733404 implements MigrationInterface { - name: string; - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755691733404-test.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.d.ts.map deleted file mode 100644 index 54363f50..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755691733404-test.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755691733404-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,iBAAkB,YAAW,kBAAkB;IACxD,IAAI,SAAsB;IAEb,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.js b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.js deleted file mode 100644 index c1233c26..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Test1755691733404 = void 0; -class Test1755691733404 { - constructor() { - this.name = 'Test1755691733404'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "Users" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "orgid" uuid, "username" character varying(100) NOT NULL, "password" character varying(255) NOT NULL, "email" character varying(255) NOT NULL, "fname" character varying(100) NOT NULL, "lname" character varying(100) NOT NULL, "code" character varying(50), "type" character varying(50) NOT NULL, "phone" character varying(20), "state" integer NOT NULL DEFAULT '0', "regdate" TIMESTAMP NOT NULL DEFAULT now(), "updatedate" TIMESTAMP NOT NULL DEFAULT now(), "Orglogindate" TIMESTAMP, CONSTRAINT "UQ_ffc81a3b97dcbf8e320d5106c0d" UNIQUE ("username"), CONSTRAINT "UQ_3c3ab3f49a87e6ddb607f3c4945" UNIQUE ("email"), CONSTRAINT "PK_16d4f7d636df336db11d87413e3" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TABLE "Organizations" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "contactfname" character varying(100) NOT NULL, "contactlname" character varying(100) NOT NULL, "contactphone" character varying(20) NOT NULL, "contactemail" character varying(255) NOT NULL, "state" integer NOT NULL DEFAULT '0', "regdate" TIMESTAMP NOT NULL DEFAULT now(), "updatedate" TIMESTAMP NOT NULL DEFAULT now(), "url" character varying(500), "userinorg" integer NOT NULL DEFAULT '0', CONSTRAINT "PK_e0690a31419f6666194423526f2" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TABLE "Decks" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "type" integer NOT NULL, "user_id" uuid NOT NULL, "creation_date" TIMESTAMP NOT NULL DEFAULT now(), "cards" json NOT NULL, "played_number" integer NOT NULL DEFAULT '0', "ctype" integer NOT NULL DEFAULT '0', "update_date" TIMESTAMP NOT NULL DEFAULT now(), "state" integer NOT NULL DEFAULT '0', "organization_id" uuid, CONSTRAINT "PK_001f26cb3ec39c1f25269943473" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TABLE "Chats" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "users" uuid array NOT NULL, "messages" json NOT NULL, "updateDate" TIMESTAMP NOT NULL DEFAULT now(), "state" integer NOT NULL DEFAULT '0', CONSTRAINT "PK_64c36c2b8d86a0d5de4cf64de8d" PRIMARY KEY ("id"))`); - await queryRunner.query(`ALTER TABLE "Decks" ADD CONSTRAINT "FK_06ee28f90d68543a03b14aebe13" FOREIGN KEY ("organization_id") REFERENCES "Organizations"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "Decks" DROP CONSTRAINT "FK_06ee28f90d68543a03b14aebe13"`); - await queryRunner.query(`DROP TABLE "Chats"`); - await queryRunner.query(`DROP TABLE "Decks"`); - await queryRunner.query(`DROP TABLE "Organizations"`); - await queryRunner.query(`DROP TABLE "Users"`); - } -} -exports.Test1755691733404 = Test1755691733404; -//# sourceMappingURL=1755691733404-test.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.js.map deleted file mode 100644 index 35516751..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755691733404-test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755691733404-test.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755691733404-test.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAA9B;QACI,SAAI,GAAG,mBAAmB,CAAA;IAkB9B,CAAC;IAhBU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,quBAAquB,CAAC,CAAC;QAC/vB,MAAM,WAAW,CAAC,KAAK,CAAC,8jBAA8jB,CAAC,CAAC;QACxlB,MAAM,WAAW,CAAC,KAAK,CAAC,2eAA2e,CAAC,CAAC;QACrgB,MAAM,WAAW,CAAC,KAAK,CAAC,kRAAkR,CAAC,CAAC;QAC5S,MAAM,WAAW,CAAC,KAAK,CAAC,8KAA8K,CAAC,CAAC;IAC5M,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;QAChG,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACtD,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAClD,CAAC;CAEJ;AAnBD,8CAmBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.d.ts deleted file mode 100644 index 4610b935..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class AddEmailVerificationFields1755706019351 implements MigrationInterface { - name: string; - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755706019351-AddEmailVerificationFields.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.d.ts.map deleted file mode 100644 index d0839321..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755706019351-AddEmailVerificationFields.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,uCAAwC,YAAW,kBAAkB;IAC9E,IAAI,SAA4C;IAEnC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAM7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.js b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.js deleted file mode 100644 index c511a32f..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddEmailVerificationFields1755706019351 = void 0; -class AddEmailVerificationFields1755706019351 { - constructor() { - this.name = 'AddEmailVerificationFields1755706019351'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "Users" DROP COLUMN "code"`); - await queryRunner.query(`ALTER TABLE "Users" ADD "token" character varying(255)`); - await queryRunner.query(`ALTER TABLE "Users" ADD "TokenExpires" TIMESTAMP`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "Users" DROP COLUMN "TokenExpires"`); - await queryRunner.query(`ALTER TABLE "Users" DROP COLUMN "token"`); - await queryRunner.query(`ALTER TABLE "Users" ADD "code" character varying(50)`); - } -} -exports.AddEmailVerificationFields1755706019351 = AddEmailVerificationFields1755706019351; -//# sourceMappingURL=1755706019351-AddEmailVerificationFields.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.js.map deleted file mode 100644 index 1f1b7cc4..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755706019351-AddEmailVerificationFields.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755706019351-AddEmailVerificationFields.ts"],"names":[],"mappings":";;;AAEA,MAAa,uCAAuC;IAApD;QACI,SAAI,GAAG,yCAAyC,CAAA;IAcpD,CAAC;IAZU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAClE,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAClF,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACnE,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACpF,CAAC;CAEJ;AAfD,0FAeC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.d.ts deleted file mode 100644 index 2ab27faa..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class AddChatMessagingSystem1755817306222 implements MigrationInterface { - name: string; - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755817306222-AddChatMessagingSystem.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.d.ts.map deleted file mode 100644 index 5d713781..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755817306222-AddChatMessagingSystem.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,mCAAoC,YAAW,kBAAkB;IAC1E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAY3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAY7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.js b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.js deleted file mode 100644 index 511fb906..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddChatMessagingSystem1755817306222 = void 0; -class AddChatMessagingSystem1755817306222 { - constructor() { - this.name = 'AddChatMessagingSystem1755817306222'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "ChatArchives" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "chatId" uuid NOT NULL, "archivedMessages" json NOT NULL, "archivedAt" TIMESTAMP NOT NULL, "createDate" TIMESTAMP NOT NULL DEFAULT now(), "chatType" character varying(50) NOT NULL, "chatName" character varying(255), "gameId" uuid, "participants" uuid array NOT NULL, CONSTRAINT "PK_fe62979fc2061d7afe278d3f14e" PRIMARY KEY ("id"))`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "type" character varying(50) NOT NULL DEFAULT 'direct'`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "name" character varying(255)`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "gameId" uuid`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "createdBy" uuid`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "lastActivity" TIMESTAMP`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "createDate" TIMESTAMP NOT NULL DEFAULT now()`); - await queryRunner.query(`ALTER TABLE "Chats" ADD "archiveDate" TIMESTAMP`); - await queryRunner.query(`ALTER TABLE "Chats" ALTER COLUMN "messages" SET DEFAULT '[]'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "Chats" ALTER COLUMN "messages" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "archiveDate"`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "createDate"`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "lastActivity"`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "createdBy"`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "gameId"`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "name"`); - await queryRunner.query(`ALTER TABLE "Chats" DROP COLUMN "type"`); - await queryRunner.query(`DROP TABLE "ChatArchives"`); - } -} -exports.AddChatMessagingSystem1755817306222 = AddChatMessagingSystem1755817306222; -//# sourceMappingURL=1755817306222-AddChatMessagingSystem.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.js.map deleted file mode 100644 index c011dcbf..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755817306222-AddChatMessagingSystem.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755817306222-AddChatMessagingSystem.ts"],"names":[],"mappings":";;;AAEA,MAAa,mCAAmC;IAAhD;QACI,SAAI,GAAG,qCAAqC,CAAA;IA0BhD,CAAC;IAxBU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,wZAAwZ,CAAC,CAAC;QAClb,MAAM,WAAW,CAAC,KAAK,CAAC,gFAAgF,CAAC,CAAC;QAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;QACjF,MAAM,WAAW,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,MAAM,WAAW,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACpE,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAC5E,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;QACjG,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC3E,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAC5F,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACpF,MAAM,WAAW,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACzE,MAAM,WAAW,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QACxE,MAAM,WAAW,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvE,MAAM,WAAW,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QACpE,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAClE,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAClE,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACzD,CAAC;CAEJ;AA3BD,kFA2BC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.d.ts deleted file mode 100644 index cbe2f1c0..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class CreateContactTable1755855028839 implements MigrationInterface { - name: string; - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755855028839-CreateContactTable.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.d.ts.map deleted file mode 100644 index 54ebe71b..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755855028839-CreateContactTable.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755855028839-CreateContactTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,+BAAgC,YAAW,kBAAkB;IACtE,IAAI,SAAoC;IAE3B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.js b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.js deleted file mode 100644 index 4107cbb1..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateContactTable1755855028839 = void 0; -class CreateContactTable1755855028839 { - constructor() { - this.name = 'CreateContactTable1755855028839'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "Contacts" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "email" character varying(255) NOT NULL, "userid" uuid, "type" integer NOT NULL, "txt" text NOT NULL, "state" integer NOT NULL DEFAULT '0', "createDate" TIMESTAMP NOT NULL DEFAULT now(), "updateDate" TIMESTAMP NOT NULL DEFAULT now(), "adminResponse" text, "responseDate" TIMESTAMP, "respondedBy" uuid, CONSTRAINT "PK_68782cec65c8eef577c62958273" PRIMARY KEY ("id"))`); - } - async down(queryRunner) { - await queryRunner.query(`DROP TABLE "Contacts"`); - } -} -exports.CreateContactTable1755855028839 = CreateContactTable1755855028839; -//# sourceMappingURL=1755855028839-CreateContactTable.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.js.map deleted file mode 100644 index 397f15a4..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755855028839-CreateContactTable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755855028839-CreateContactTable.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755855028839-CreateContactTable.ts"],"names":[],"mappings":";;;AAEA,MAAa,+BAA+B;IAA5C;QACI,SAAI,GAAG,iCAAiC,CAAA;IAU5C,CAAC;IARU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,+dAA+d,CAAC,CAAC;IAC7f,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACrD,CAAC;CAEJ;AAXD,0EAWC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.d.ts deleted file mode 100644 index c365cdad..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.d.ts +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=1755905000000-AddStateToChatArchives.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.d.ts.map deleted file mode 100644 index 74132976..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755905000000-AddStateToChatArchives.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.js b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.js deleted file mode 100644 index b60c2dd0..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -//# sourceMappingURL=1755905000000-AddStateToChatArchives.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.js.map deleted file mode 100644 index 39610d8b..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755905000000-AddStateToChatArchives.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/1755905000000-AddStateToChatArchives.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.d.ts deleted file mode 100644 index d1891039..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm'; -export declare class AddMaxOrganizationalDecksToOrganization1692712800000 implements MigrationInterface { - name: string; - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=AddMaxOrganizationalDecksToOrganization.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.d.ts.map deleted file mode 100644 index 6056d793..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AddMaxOrganizationalDecksToOrganization.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAe,MAAM,SAAS,CAAC;AAEvE,qBAAa,oDAAqD,YAAW,kBAAkB;IAC3F,IAAI,SAA0D;IAEjD,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.js b/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.js deleted file mode 100644 index 35e0a2f0..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddMaxOrganizationalDecksToOrganization1692712800000 = void 0; -const typeorm_1 = require("typeorm"); -class AddMaxOrganizationalDecksToOrganization1692712800000 { - constructor() { - this.name = 'AddMaxOrganizationalDecksToOrganization1692712800000'; - } - async up(queryRunner) { - // Add maxOrganizationalDecks column to Organizations table - await queryRunner.addColumn('Organizations', new typeorm_1.TableColumn({ - name: 'maxOrganizationalDecks', - type: 'int', - isNullable: true, // No default - set by admin - comment: 'Maximum number of organizational decks a premium user can create in this organization' - })); - // Add performance indexes for deck filtering queries - await queryRunner.query(`CREATE INDEX "IDX_DECK_USER_STATE_CTYPE" ON "Decks" ("user_id", "state", "ctype")`); - await queryRunner.query(`CREATE INDEX "IDX_DECK_ORG_CTYPE_STATE" ON "Decks" ("organization_id", "ctype", "state")`); - } - async down(queryRunner) { - // Drop indexes - await queryRunner.query(`DROP INDEX "IDX_DECK_ORG_CTYPE_STATE"`); - await queryRunner.query(`DROP INDEX "IDX_DECK_USER_STATE_CTYPE"`); - // Remove maxOrganizationalDecks column - await queryRunner.dropColumn('Organizations', 'maxOrganizationalDecks'); - } -} -exports.AddMaxOrganizationalDecksToOrganization1692712800000 = AddMaxOrganizationalDecksToOrganization1692712800000; -//# sourceMappingURL=AddMaxOrganizationalDecksToOrganization.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.js.map deleted file mode 100644 index e4cf7c4a..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AddMaxOrganizationalDecksToOrganization.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrations/AddMaxOrganizationalDecksToOrganization.ts"],"names":[],"mappings":";;;AAAA,qCAAuE;AAEvE,MAAa,oDAAoD;IAAjE;QACI,SAAI,GAAG,sDAAsD,CAAC;IAwBlE,CAAC;IAtBU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,2DAA2D;QAC3D,MAAM,WAAW,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,qBAAW,CAAC;YACzD,IAAI,EAAE,wBAAwB;YAC9B,IAAI,EAAE,KAAK;YACX,UAAU,EAAE,IAAI,EAAE,4BAA4B;YAC9C,OAAO,EAAE,uFAAuF;SACnG,CAAC,CAAC,CAAC;QAEJ,qDAAqD;QACrD,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;QAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;IACxH,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,eAAe;QACf,MAAM,WAAW,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAElE,uCAAuC;QACvC,MAAM,WAAW,CAAC,UAAU,CAAC,eAAe,EAAE,wBAAwB,CAAC,CAAC;IAC5E,CAAC;CACJ;AAzBD,oHAyBC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.d.ts deleted file mode 100644 index da0ed125..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class Test1755691732089 implements MigrationInterface { - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755691732089-test.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.d.ts.map deleted file mode 100644 index b07ad7c1..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755691732089-test.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrationsettings/1755691732089-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,iBAAkB,YAAW,kBAAkB;IAE3C,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAG3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.js b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.js deleted file mode 100644 index fee391e3..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Test1755691732089 = void 0; -class Test1755691732089 { - async up(queryRunner) { - } - async down(queryRunner) { - } -} -exports.Test1755691732089 = Test1755691732089; -//# sourceMappingURL=1755691732089-test.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.js.map deleted file mode 100644 index 2497b8a9..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755691732089-test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755691732089-test.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrationsettings/1755691732089-test.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAEnB,KAAK,CAAC,EAAE,CAAC,WAAwB;IACxC,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;IAC1C,CAAC;CAEJ;AARD,8CAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.d.ts deleted file mode 100644 index c26bc0ca..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class AddEmailVerificationFields1755706017175 implements MigrationInterface { - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755706017175-AddEmailVerificationFields.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.d.ts.map deleted file mode 100644 index c0aebeb2..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755706017175-AddEmailVerificationFields.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,uCAAwC,YAAW,kBAAkB;IAEjE,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAG3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.js b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.js deleted file mode 100644 index 62e0548b..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddEmailVerificationFields1755706017175 = void 0; -class AddEmailVerificationFields1755706017175 { - async up(queryRunner) { - } - async down(queryRunner) { - } -} -exports.AddEmailVerificationFields1755706017175 = AddEmailVerificationFields1755706017175; -//# sourceMappingURL=1755706017175-AddEmailVerificationFields.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.js.map deleted file mode 100644 index 87bdbb9c..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755706017175-AddEmailVerificationFields.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrationsettings/1755706017175-AddEmailVerificationFields.ts"],"names":[],"mappings":";;;AAEA,MAAa,uCAAuC;IAEzC,KAAK,CAAC,EAAE,CAAC,WAAwB;IACxC,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;IAC1C,CAAC;CAEJ;AARD,0FAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.d.ts b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.d.ts deleted file mode 100644 index 2d2689a3..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { MigrationInterface, QueryRunner } from "typeorm"; -export declare class FixEmailVerificationFields1755706055220 implements MigrationInterface { - up(queryRunner: QueryRunner): Promise; - down(queryRunner: QueryRunner): Promise; -} -//# sourceMappingURL=1755706055220-FixEmailVerificationFields.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.d.ts.map deleted file mode 100644 index b61f4377..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755706055220-FixEmailVerificationFields.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,uCAAwC,YAAW,kBAAkB;IAEjE,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAG3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7D"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.js b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.js deleted file mode 100644 index f2be8d40..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FixEmailVerificationFields1755706055220 = void 0; -class FixEmailVerificationFields1755706055220 { - async up(queryRunner) { - } - async down(queryRunner) { - } -} -exports.FixEmailVerificationFields1755706055220 = FixEmailVerificationFields1755706055220; -//# sourceMappingURL=1755706055220-FixEmailVerificationFields.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.js.map b/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.js.map deleted file mode 100644 index 7afe3c49..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"1755706055220-FixEmailVerificationFields.js","sourceRoot":"","sources":["../../../src/Infrastructure/Migrationsettings/1755706055220-FixEmailVerificationFields.ts"],"names":[],"mappings":";;;AAEA,MAAa,uCAAuC;IAEzC,KAAK,CAAC,EAAE,CAAC,WAAwB;IACxC,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;IAC1C,CAAC;CAEJ;AARD,0FAQC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.d.ts b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.d.ts deleted file mode 100644 index a400d7ed..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ChatArchiveAggregate } from '../../Domain/Chat/ChatArchiveAggregate'; -import { IChatArchiveRepository } from '../../Domain/IRepository/IChatArchiveRepository'; -export declare class ChatArchiveRepository implements IChatArchiveRepository { - private repo; - constructor(); - create(archive: Partial): Promise & ChatArchiveAggregate>; - findAll(): Promise; - findById(id: string): Promise; - findByChatId(chatId: string): Promise; - findByGameId(gameId: string): Promise; - delete(id: string): Promise; - cleanup(olderThanDays: number): Promise; -} -//# sourceMappingURL=ChatArchiveRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.d.ts.map deleted file mode 100644 index c792b29f..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatArchiveRepository.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/ChatArchiveRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AAIzF,qBAAa,qBAAsB,YAAW,sBAAsB;IAChE,OAAO,CAAC,IAAI,CAAmC;;IAMzC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAgB7C,OAAO;IAcP,QAAQ,CAAC,EAAE,EAAE,MAAM;IAenB,YAAY,CAAC,MAAM,EAAE,MAAM;IAoB3B,YAAY,CAAC,MAAM,EAAE,MAAM;IAoB3B,MAAM,CAAC,EAAE,EAAE,MAAM;IAejB,OAAO,CAAC,aAAa,EAAE,MAAM;CAuBtC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.js b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.js deleted file mode 100644 index 68abaf27..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChatArchiveRepository = void 0; -const ormconfig_1 = require("../ormconfig"); -const ChatArchiveAggregate_1 = require("../../Domain/Chat/ChatArchiveAggregate"); -const Logger_1 = require("../../Application/Services/Logger"); -class ChatArchiveRepository { - constructor() { - this.repo = ormconfig_1.AppDataSource.getRepository(ChatArchiveAggregate_1.ChatArchiveAggregate); - } - async create(archive) { - const startTime = Date.now(); - try { - const result = await this.repo.save(archive); - (0, Logger_1.logDatabase)('Chat archive created successfully', undefined, Date.now() - startTime, { - archiveId: result.id, - chatId: result.chatId, - messageCount: result.archivedMessages?.length || 0 - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.create error', error); - throw new Error('Failed to create chat archive in database'); - } - } - async findAll() { - const startTime = Date.now(); - try { - const result = await this.repo.find(); - (0, Logger_1.logDatabase)('All chat archives retrieved', undefined, Date.now() - startTime, { - count: result.length - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.findAll error', error); - throw new Error('Failed to retrieve chat archives from database'); - } - } - async findById(id) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ id }); - (0, Logger_1.logDatabase)('Chat archive retrieved by id', `findById(${id})`, Date.now() - startTime, { - archiveId: id, - found: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.findById error', error); - throw new Error('Failed to find chat archive by id'); - } - } - async findByChatId(chatId) { - const startTime = Date.now(); - try { - const result = await this.repo - .find({ - where: { chatId }, - order: { archivedAt: 'DESC' } - }); - (0, Logger_1.logDatabase)('Chat archives retrieved by chat id', `findByChatId(${chatId})`, Date.now() - startTime, { - chatId, - count: result.length - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.findByChatId error', error); - throw new Error('Failed to find chat archives by chat id'); - } - } - async findByGameId(gameId) { - const startTime = Date.now(); - try { - const result = await this.repo - .find({ - where: { gameId }, - order: { archivedAt: 'DESC' } - }); - (0, Logger_1.logDatabase)('Chat archives retrieved by game id', `findByGameId(${gameId})`, Date.now() - startTime, { - gameId, - count: result.length - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.findByGameId error', error); - throw new Error('Failed to find chat archives by game id'); - } - } - async delete(id) { - const startTime = Date.now(); - try { - const result = await this.repo.delete(id); - (0, Logger_1.logDatabase)('Chat archive deleted', `delete(${id})`, Date.now() - startTime, { - archiveId: id, - affected: result.affected - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.delete error', error); - throw new Error('Failed to delete chat archive'); - } - } - async cleanup(olderThanDays) { - const startTime = Date.now(); - try { - const cutoffDate = new Date(Date.now() - olderThanDays * 24 * 60 * 60 * 1000); - const result = await this.repo - .createQueryBuilder() - .delete() - .where('archivedAt < :cutoffDate', { cutoffDate }) - .execute(); - (0, Logger_1.logDatabase)('Chat archive cleanup completed', `cleanup(${olderThanDays} days)`, Date.now() - startTime, { - olderThanDays, - deleted: result.affected, - cutoffDate - }); - return result.affected || 0; - } - catch (error) { - (0, Logger_1.logError)('ChatArchiveRepository.cleanup error', error); - throw new Error('Failed to cleanup old chat archives'); - } - } -} -exports.ChatArchiveRepository = ChatArchiveRepository; -//# sourceMappingURL=ChatArchiveRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.js.map b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.js.map deleted file mode 100644 index e8e74d18..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatArchiveRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatArchiveRepository.js","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/ChatArchiveRepository.ts"],"names":[],"mappings":";;;AACA,4CAA6C;AAC7C,iFAA8E;AAE9E,8DAA0E;AAG1E,MAAa,qBAAqB;IAG9B;QACI,IAAI,CAA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IAED,KAAK,CAAC,OAAO,CAAC,aAAqB;QAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,aAAa,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;YAE9E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI;iBACzB,kBAAkB,EAAE;iBACpB,MAAM,EAAE;iBACR,KAAK,CAAC,0BAA0B,EAAE,EAAE,UAAU,EAAE,CAAC;iBACjD,OAAO,EAAE,CAAC;YAEf,IAAA,oBAAW,EAAC,gCAAgC,EAAE,WAAW,aAAa,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE;gBACpG,aAAa;gBACb,OAAO,EAAE,MAAM,CAAC,QAAQ;gBACxB,UAAU;aACb,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,qCAAqC,EAAE,KAAc,CAAC,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC;CACJ;AAlID,sDAkIC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.d.ts b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.d.ts deleted file mode 100644 index a4c82c8e..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ChatAggregate } from '../../Domain/Chat/ChatAggregate'; -import { ChatArchiveAggregate } from '../../Domain/Chat/ChatArchiveAggregate'; -import { IChatRepository } from '../../Domain/IRepository/IChatRepository'; -export declare class ChatRepository implements IChatRepository { - private repo; - private archiveRepo; - constructor(); - create(chat: Partial): Promise & ChatAggregate>; - findByPage(from: number, to: number): Promise<{ - chats: ChatAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - chats: ChatAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - findByUserId(userId: string): Promise; - findByUserIdIncludingDeleted(userId: string): Promise; - findByGameId(gameId: string): Promise; - findActiveChatsForUser(userId: string): Promise; - findInactiveChats(inactivityMinutes: number): Promise; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - archiveChat(chat: ChatAggregate): Promise; - getArchivedChat(chatId: string): Promise; - restoreFromArchive(chatId: string): Promise; -} -//# sourceMappingURL=ChatRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.d.ts.map deleted file mode 100644 index 6274573f..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatRepository.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/ChatRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAuB,MAAM,iCAAiC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAG3E,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,WAAW,CAAmC;;IAOhD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC;IAgBnC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA2B7F,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA0B7G,QAAQ,CAAC,EAAE,EAAE,MAAM;IAoBnB,wBAAwB,CAAC,EAAE,EAAE,MAAM;IAenC,YAAY,CAAC,MAAM,EAAE,MAAM;IAoB3B,4BAA4B,CAAC,MAAM,EAAE,MAAM;IAmB3C,YAAY,CAAC,MAAM,EAAE,MAAM;IAmB3B,sBAAsB,CAAC,MAAM,EAAE,MAAM;IAqBrC,iBAAiB,CAAC,iBAAiB,EAAE,MAAM;IAuB3C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC;IAiBjD,MAAM,CAAC,EAAE,EAAE,MAAM;IAejB,UAAU,CAAC,EAAE,EAAE,MAAM;IAgBrB,WAAW,CAAC,IAAI,EAAE,aAAa;IAiC/B,eAAe,CAAC,MAAM,EAAE,MAAM;IAe9B,kBAAkB,CAAC,MAAM,EAAE,MAAM;CAuC1C"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.js b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.js deleted file mode 100644 index c782b107..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.js +++ /dev/null @@ -1,339 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChatRepository = void 0; -const typeorm_1 = require("typeorm"); -const ormconfig_1 = require("../ormconfig"); -const ChatAggregate_1 = require("../../Domain/Chat/ChatAggregate"); -const ChatArchiveAggregate_1 = require("../../Domain/Chat/ChatArchiveAggregate"); -const Logger_1 = require("../../Application/Services/Logger"); -class ChatRepository { - constructor() { - this.repo = ormconfig_1.AppDataSource.getRepository(ChatAggregate_1.ChatAggregate); - this.archiveRepo = ormconfig_1.AppDataSource.getRepository(ChatArchiveAggregate_1.ChatArchiveAggregate); - } - async create(chat) { - const startTime = Date.now(); - try { - const result = await this.repo.save(chat); - (0, Logger_1.logDatabase)('Chat created successfully', undefined, Date.now() - startTime, { - chatId: result.id, - type: result.type, - participants: result.users?.length || 0 - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.create error', error); - throw new Error('Failed to create chat in database'); - } - } - async findByPage(from, to) { - const startTime = Date.now(); - try { - const skip = from; - const take = to - from + 1; - const [chats, totalCount] = await this.repo.findAndCount({ - where: { state: (0, typeorm_1.Not)(ChatAggregate_1.ChatState.SOFT_DELETE) }, - order: { createDate: 'DESC' }, - skip, - take - }); - (0, Logger_1.logDatabase)('Chats page retrieved successfully', undefined, Date.now() - startTime, { - from, - to, - returned: chats.length, - totalCount - }); - return { chats, totalCount }; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findByPage error', error); - throw new Error('Failed to retrieve chats page from database'); - } - } - async findByPageIncludingDeleted(from, to) { - const startTime = Date.now(); - try { - const skip = from; - const take = to - from + 1; - const [chats, totalCount] = await this.repo.findAndCount({ - order: { createDate: 'DESC' }, - skip, - take - }); - (0, Logger_1.logDatabase)('Chats page retrieved successfully (including deleted)', undefined, Date.now() - startTime, { - from, - to, - returned: chats.length, - totalCount - }); - return { chats, totalCount }; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findByPageIncludingDeleted error', error); - throw new Error('Failed to retrieve chats page from database'); - } - } - async findById(id) { - const startTime = Date.now(); - try { - const result = await this.repo.findOne({ - where: { - id, - state: (0, typeorm_1.Not)(ChatAggregate_1.ChatState.SOFT_DELETE) - } - }); - (0, Logger_1.logDatabase)('Chat findById query completed', undefined, Date.now() - startTime, { - found: !!result, - chatId: id - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findById error', error); - throw new Error('Failed to retrieve chat from database'); - } - } - async findByIdIncludingDeleted(id) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ id }); - (0, Logger_1.logDatabase)('Chat findByIdIncludingDeleted query completed', undefined, Date.now() - startTime, { - found: !!result, - chatId: id - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findByIdIncludingDeleted error', error); - throw new Error('Failed to retrieve chat from database'); - } - } - async findByUserId(userId) { - const startTime = Date.now(); - try { - const result = await this.repo - .createQueryBuilder('chat') - .where(':userId = ANY(chat.users)', { userId }) - .andWhere('chat.state != :softDelete', { softDelete: ChatAggregate_1.ChatState.SOFT_DELETE }) - .getMany(); - (0, Logger_1.logDatabase)('Chats retrieved by user id', `findByUserId(${userId})`, Date.now() - startTime, { - userId, - count: result.length - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findByUserId error', error); - throw new Error('Failed to find chats by user id'); - } - } - async findByUserIdIncludingDeleted(userId) { - const startTime = Date.now(); - try { - const result = await this.repo - .createQueryBuilder('chat') - .where(':userId = ANY(chat.users)', { userId }) - .getMany(); - (0, Logger_1.logDatabase)('Chats retrieved by user id (including deleted)', `findByUserIdIncludingDeleted(${userId})`, Date.now() - startTime, { - userId, - count: result.length - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findByUserIdIncludingDeleted error', error); - throw new Error('Failed to find all chats by user id'); - } - } - async findByGameId(gameId) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ - gameId, - type: ChatAggregate_1.ChatType.GAME, - state: ChatAggregate_1.ChatState.ACTIVE - }); - (0, Logger_1.logDatabase)('Chat retrieved by game id', `findByGameId(${gameId})`, Date.now() - startTime, { - gameId, - found: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findByGameId error', error); - throw new Error('Failed to find chat by game id'); - } - } - async findActiveChatsForUser(userId) { - const startTime = Date.now(); - try { - const result = await this.repo - .createQueryBuilder('chat') - .where(':userId = ANY(chat.users)', { userId }) - .andWhere('chat.state = :state', { state: ChatAggregate_1.ChatState.ACTIVE }) - .orderBy('chat.lastActivity', 'DESC') - .getMany(); - (0, Logger_1.logDatabase)('Active chats retrieved for user', `findActiveChatsForUser(${userId})`, Date.now() - startTime, { - userId, - count: result.length - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findActiveChatsForUser error', error); - throw new Error('Failed to find active chats for user'); - } - } - async findInactiveChats(inactivityMinutes) { - const startTime = Date.now(); - try { - const cutoffDate = new Date(Date.now() - inactivityMinutes * 60 * 1000); - const result = await this.repo - .createQueryBuilder('chat') - .where('chat.state = :state', { state: ChatAggregate_1.ChatState.ACTIVE }) - .andWhere('(chat.lastActivity < :cutoffDate OR chat.lastActivity IS NULL)', { cutoffDate }) - .getMany(); - (0, Logger_1.logDatabase)('Inactive chats retrieved', `findInactiveChats(${inactivityMinutes}min)`, Date.now() - startTime, { - inactivityMinutes, - count: result.length, - cutoffDate - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.findInactiveChats error', error); - throw new Error('Failed to find inactive chats'); - } - } - async update(id, update) { - const startTime = Date.now(); - try { - await this.repo.update(id, update); - const result = await this.findById(id); - (0, Logger_1.logDatabase)('Chat updated successfully', `update(${id})`, Date.now() - startTime, { - chatId: id, - updatedFields: Object.keys(update), - success: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.update error', error); - throw new Error('Failed to update chat in database'); - } - } - async delete(id) { - const startTime = Date.now(); - try { - const result = await this.repo.delete(id); - (0, Logger_1.logDatabase)('Chat deleted', `delete(${id})`, Date.now() - startTime, { - chatId: id, - affected: result.affected - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.delete error', error); - throw new Error('Failed to delete chat'); - } - } - async softDelete(id) { - const startTime = Date.now(); - try { - await this.repo.update(id, { state: ChatAggregate_1.ChatState.SOFT_DELETE }); - const result = await this.findById(id); - (0, Logger_1.logDatabase)('Chat soft deleted', `softDelete(${id})`, Date.now() - startTime, { - chatId: id, - success: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.softDelete error', error); - throw new Error('Failed to soft delete chat'); - } - } - async archiveChat(chat) { - const startTime = Date.now(); - try { - const archive = new ChatArchiveAggregate_1.ChatArchiveAggregate(); - archive.chatId = chat.id; - archive.archivedMessages = chat.messages; - archive.archivedAt = new Date(); - archive.chatType = chat.type; - archive.chatName = chat.name; - archive.gameId = chat.gameId; - archive.participants = chat.users; - const archivedResult = await this.archiveRepo.save(archive); - await this.repo.update(chat.id, { - state: ChatAggregate_1.ChatState.ARCHIVE, - messages: [], - archiveDate: new Date() - }); - (0, Logger_1.logDatabase)('Chat archived successfully', `archiveChat(${chat.id})`, Date.now() - startTime, { - chatId: chat.id, - messageCount: chat.messages.length, - archiveId: archivedResult.id - }); - return archivedResult; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.archiveChat error', error); - throw new Error('Failed to archive chat'); - } - } - async getArchivedChat(chatId) { - const startTime = Date.now(); - try { - const result = await this.archiveRepo.findOneBy({ chatId }); - (0, Logger_1.logDatabase)('Archived chat retrieved', `getArchivedChat(${chatId})`, Date.now() - startTime, { - chatId, - found: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.getArchivedChat error', error); - throw new Error('Failed to retrieve archived chat'); - } - } - async restoreFromArchive(chatId) { - const startTime = Date.now(); - try { - const archive = await this.archiveRepo.findOneBy({ chatId }); - if (!archive) { - return null; - } - // Game chats cannot be restored, only viewed - if (archive.chatType === ChatAggregate_1.ChatType.GAME) { - (0, Logger_1.logDatabase)('Game chat restore attempt blocked', `restoreFromArchive(${chatId})`, Date.now() - startTime, { - chatId, - chatType: archive.chatType, - blocked: true - }); - return null; - } - // Restore messages to the chat - await this.repo.update(chatId, { - state: ChatAggregate_1.ChatState.ACTIVE, - messages: archive.archivedMessages, - lastActivity: new Date(), - archiveDate: null - }); - const result = await this.findById(chatId); - (0, Logger_1.logDatabase)('Chat restored from archive', `restoreFromArchive(${chatId})`, Date.now() - startTime, { - chatId, - messageCount: archive.archivedMessages.length, - success: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('ChatRepository.restoreFromArchive error', error); - throw new Error('Failed to restore chat from archive'); - } - } -} -exports.ChatRepository = ChatRepository; -//# sourceMappingURL=ChatRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.js.map b/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.js.map deleted file mode 100644 index e92f51b2..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ChatRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChatRepository.js","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/ChatRepository.ts"],"names":[],"mappings":";;;AAAA,qCAAoD;AACpD,4CAA6C;AAC7C,mEAAqF;AACrF,iFAA8E;AAE9E,8DAA0E;AAE1E,MAAa,cAAc;IAIvB;QACI,IAAI,CAAC,IAAI,GAAG,yBAAa,CAAC,aAAa,CAAC,6BAAa,CAAC,CAAC;QACvD,IAAI,CAAC,WAAW,GAAG,yBAAa,CAAC,aAAa,CAAC,2CAAoB,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAA4B;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAA,oBAAW,EAAC,2BAA2B,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE;gBACxE,MAAM,EAAE,MAAM,CAAC,EAAE;gBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,YAAY,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;aAC1C,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,6BAA6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OAAO,CAAC,QAAQ;oBAC1B,OAAO,EAAE,IAAI;iBAChB,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;YAChB,CAAC;YAED,+BAA+B;YAC/B,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC3B,KAAK,EAAE,yBAAS,CAAC,MAAM;gBACvB,QAAQ,EAAE,OAAO,CAAC,gBAAgB;gBAClC,YAAY,EAAE,IAAI,IAAI,EAAE;gBACxB,WAAW,EAAE,IAAI;aACpB,CAAC,CAAC;YAEH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC3C,IAAA,oBAAW,EAAC,4BAA4B,EAAE,sBAAsB,MAAM,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE;gBAC/F,MAAM;gBACN,YAAY,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM;gBAC7C,OAAO,EAAE,CAAC,CAAC,MAAM;aACpB,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,yCAAyC,EAAE,KAAc,CAAC,CAAC;YACpE,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC;CACJ;AA9VD,wCA8VC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.d.ts b/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.d.ts deleted file mode 100644 index 56a83a7f..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ContactAggregate } from '../../Domain/Contact/ContactAggregate'; -import { IContactRepository } from '../../Domain/IRepository/IContactRepository'; -export declare class ContactRepository implements IContactRepository { - private repo; - constructor(); - create(contact: Partial): Promise & ContactAggregate>; - findById(id: string): Promise; - findByPage(from: number, to: number): Promise<{ - contacts: ContactAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - contacts: ContactAggregate[]; - totalCount: number; - }>; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - searchIncludingDeleted(searchTerm: string): Promise; - search(searchTerm: string): Promise; -} -//# sourceMappingURL=ContactRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.d.ts.map deleted file mode 100644 index 8a92ea69..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactRepository.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/ContactRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAgB,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAGjF,qBAAa,iBAAkB,YAAW,kBAAkB;IACxD,OAAO,CAAC,IAAI,CAA+B;;IAMrC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC;IAIzC,QAAQ,CAAC,EAAE,EAAE,MAAM;IAQnB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAkCnG,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA6BnH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC;IAKpD,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAE,MAAM;IAKrB,wBAAwB,CAAC,EAAE,EAAE,MAAM;IAInC,sBAAsB,CAAC,UAAU,EAAE,MAAM;IASzC,MAAM,CAAC,UAAU,EAAE,MAAM;CASlC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.js b/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.js deleted file mode 100644 index ebadaf2b..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContactRepository = void 0; -const typeorm_1 = require("typeorm"); -const ormconfig_1 = require("../ormconfig"); -const ContactAggregate_1 = require("../../Domain/Contact/ContactAggregate"); -const Logger_1 = require("../../Application/Services/Logger"); -class ContactRepository { - constructor() { - this.repo = ormconfig_1.AppDataSource.getRepository(ContactAggregate_1.ContactAggregate); - } - async create(contact) { - return this.repo.save(contact); - } - async findById(id) { - return this.repo - .createQueryBuilder('contact') - .where('contact.id = :id', { id }) - .andWhere('contact.state != :softDelete', { softDelete: ContactAggregate_1.ContactState.SOFT_DELETE }) - .getOne(); - } - async findByPage(from, to) { - const startTime = performance.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count({ - where: { - state: (0, typeorm_1.Not)(ContactAggregate_1.ContactState.SOFT_DELETE) - } - }); - // Get paginated results - const contacts = await this.repo - .createQueryBuilder('contact') - .where('contact.state != :softDelete', { softDelete: ContactAggregate_1.ContactState.SOFT_DELETE }) - .orderBy('contact.createDate', 'DESC') - .limit(limit) - .offset(offset) - .getMany(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Contact page query completed', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${contacts.length}, total: ${totalCount}, from: ${from}, to: ${to}`); - return { contacts, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Contact page query failed', `executionTime: ${Math.round(endTime - startTime)}ms, from: ${from}, to: ${to}`); - (0, Logger_1.logError)('ContactRepository.findByPage error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to get contacts page from database'); - } - } - async findByPageIncludingDeleted(from, to) { - const startTime = performance.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count(); - // Get paginated results - const contacts = await this.repo - .createQueryBuilder('contact') - .orderBy('contact.createDate', 'DESC') - .limit(limit) - .offset(offset) - .getMany(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Contact page query completed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${contacts.length}, total: ${totalCount}, from: ${from}, to: ${to}`); - return { contacts, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Contact page query failed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, from: ${from}, to: ${to}`); - (0, Logger_1.logError)('ContactRepository.findByPageIncludingDeleted error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to get contacts page from database'); - } - } - async update(id, update) { - await this.repo.update(id, update); - return this.findById(id); - } - async delete(id) { - return this.repo.delete(id); - } - async softDelete(id) { - await this.repo.update(id, { state: ContactAggregate_1.ContactState.SOFT_DELETE }); - return this.findById(id); - } - async findByIdIncludingDeleted(id) { - return this.repo.findOneBy({ id }); // Returns contact regardless of state - } - async searchIncludingDeleted(searchTerm) { - return this.repo - .createQueryBuilder('contact') - .where('contact.name ILIKE :searchTerm', { searchTerm: `%${searchTerm}%` }) - .orWhere('contact.email ILIKE :searchTerm', { searchTerm: `%${searchTerm}%` }) - .orWhere('contact.txt ILIKE :searchTerm', { searchTerm: `%${searchTerm}%` }) - .getMany(); - } - async search(searchTerm) { - return this.repo - .createQueryBuilder('contact') - .where('contact.name ILIKE :searchTerm', { searchTerm: `%${searchTerm}%` }) - .orWhere('contact.email ILIKE :searchTerm', { searchTerm: `%${searchTerm}%` }) - .orWhere('contact.txt ILIKE :searchTerm', { searchTerm: `%${searchTerm}%` }) - .andWhere('contact.state != :softDelete', { softDelete: ContactAggregate_1.ContactState.SOFT_DELETE }) - .getMany(); - } -} -exports.ContactRepository = ContactRepository; -//# sourceMappingURL=ContactRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.js.map b/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.js.map deleted file mode 100644 index 8b887878..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/ContactRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ContactRepository.js","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/ContactRepository.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,4CAA6C;AAC7C,4EAAuF;AAEvF,8DAA0E;AAE1E,MAAa,iBAAiB;IAG1B;QACI,IAAI,CAAC,IAAI,GAAG,yBAAa,CAAC,aAAa,CAAC,mCAAgB,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAkC;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,IAAI;aACX,kBAAkB,CAAC,SAAS,CAAC;aAC7B,KAAK,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,CAAC;aACjC,QAAQ,CAAC,8BAA8B,EAAE,EAAE,UAAU,EAAE,+BAAY,CAAC,WAAW,EAAE,CAAC;aAClF,MAAM,EAAE,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,EAAU;QACrC,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QACpC,IAAI,CAAC;YACD,MAAM,KAAK,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AM,CAAC,UAAkB;QAC3B,OAAO,IAAI,CAAC,IAAI;aACX,kBAAkB,CAAC,SAAS,CAAC;aAC7B,KAAK,CAAC,gCAAgC,EAAE,EAAE,UAAU,EAAE,IAAI,UAAU,GAAG,EAAE,CAAC;aAC1E,OAAO,CAAC,iCAAiC,EAAE,EAAE,UAAU,EAAE,IAAI,UAAU,GAAG,EAAE,CAAC;aAC7E,OAAO,CAAC,+BAA+B,EAAE,EAAE,UAAU,EAAE,IAAI,UAAU,GAAG,EAAE,CAAC;aAC3E,QAAQ,CAAC,8BAA8B,EAAE,EAAE,UAAU,EAAE,+BAAY,CAAC,WAAW,EAAE,CAAC;aAClF,OAAO,EAAE,CAAC;IACnB,CAAC;CACJ;AAtHD,8CAsHC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.d.ts b/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.d.ts deleted file mode 100644 index 9bbd4605..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { DeckAggregate } from '../../Domain/Deck/DeckAggregate'; -import { IDeckRepository } from '../../Domain/IRepository/IDeckRepository'; -export declare class DeckRepository implements IDeckRepository { - private repo; - constructor(); - create(deck: Partial): Promise & DeckAggregate>; - findByPage(from: number, to: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - search(query: string, limit?: number, offset?: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - searchIncludingDeleted(query: string, limit?: number, offset?: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; - /** - * Count active (non-soft-deleted) decks for a specific user - * @param userId - User ID to count decks for - * @returns Number of active decks - */ - countActiveByUserId(userId: string): Promise; - /** - * Count organizational decks for a specific user - * @param userId - User ID to count organizational decks for - * @returns Number of organizational decks - */ - countOrganizationalByUserId(userId: string): Promise; - /** - * Find decks with filtering based on user permissions and mandatory pagination - * @param userId - User ID for filtering - * @param userOrgId - User's organization ID (if any) - * @param isAdmin - Whether user is admin (bypasses filtering) - * @param from - Start index for pagination (default: 0) - * @param to - End index for pagination (default: 49) - * @returns Paginated filtered list of decks with total count - */ - findFilteredDecks(userId: string, userOrgId?: string | null, isAdmin?: boolean, from?: number, to?: number): Promise<{ - decks: DeckAggregate[]; - totalCount: number; - }>; -} -//# sourceMappingURL=DeckRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.d.ts.map deleted file mode 100644 index e9a42cea..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckRepository.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/DeckRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAgB,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAI3E,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,IAAI,CAA4B;;IAKlC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC;IAInC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA+B7F,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA4B7G,QAAQ,CAAC,EAAE,EAAE,MAAM;IASnB,wBAAwB,CAAC,EAAE,EAAE,MAAM;IAInC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC;IAKjD,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAE,MAAM;IAKrB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA6BtH,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA4B5I;;;;OAIG;IACG,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAsB1D;;;;OAIG;IACG,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuBlE;;;;;;;;OAQG;IACG,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAW,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAkFpL"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.js b/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.js deleted file mode 100644 index 485c5e06..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeckRepository = void 0; -const typeorm_1 = require("typeorm"); -const ormconfig_1 = require("../ormconfig"); -const DeckAggregate_1 = require("../../Domain/Deck/DeckAggregate"); -const Logger_1 = require("../../Application/Services/Logger"); -const AdminBypassService_1 = require("../../Application/Services/AdminBypassService"); -class DeckRepository { - constructor() { - this.repo = ormconfig_1.AppDataSource.getRepository(DeckAggregate_1.DeckAggregate); - } - async create(deck) { - return this.repo.save(deck); - } - async findByPage(from, to) { - const startTime = performance.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count({ - where: { state: (0, typeorm_1.Not)(DeckAggregate_1.State.SOFT_DELETE) } - }); - // Get paginated results - const decks = await this.repo.find({ - where: { state: (0, typeorm_1.Not)(DeckAggregate_1.State.SOFT_DELETE) }, - order: { updatedate: 'DESC' }, - take: limit, - skip: offset - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck page query completed', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${decks.length}, total: ${totalCount}, from: ${from}, to: ${to}`); - return { decks, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck page query failed', `executionTime: ${Math.round(endTime - startTime)}ms, from: ${from}, to: ${to}`); - (0, Logger_1.logError)('DeckRepository.findByPage error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to get decks page from database'); - } - } - async findByPageIncludingDeleted(from, to) { - const startTime = performance.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count(); - // Get paginated results - const decks = await this.repo.find({ - order: { updatedate: 'DESC' }, - take: limit, - skip: offset - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck page query completed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${decks.length}, total: ${totalCount}, from: ${from}, to: ${to}`); - return { decks, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck page query failed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, from: ${from}, to: ${to}`); - (0, Logger_1.logError)('DeckRepository.findByPageIncludingDeleted error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to get decks page from database'); - } - } - async findById(id) { - return this.repo.findOne({ - where: { - id, - state: (0, typeorm_1.Not)(DeckAggregate_1.State.SOFT_DELETE) - } - }); - } - async findByIdIncludingDeleted(id) { - return this.repo.findOneBy({ id }); - } - async update(id, update) { - await this.repo.update(id, update); - return this.findById(id); - } - async delete(id) { - return this.repo.delete(id); - } - async softDelete(id) { - await this.repo.update(id, { state: DeckAggregate_1.State.SOFT_DELETE }); - return this.findById(id); - } - async search(query, limit = 20, offset = 0) { - const startTime = performance.now(); - try { - const searchPattern = `%${query.toLowerCase()}%`; - const queryBuilder = this.repo.createQueryBuilder('deck') - .where('deck.state != :softDelete', { softDelete: DeckAggregate_1.State.SOFT_DELETE }) - .andWhere('LOWER(deck.name) LIKE :pattern', { pattern: searchPattern }); - const totalCount = await queryBuilder.getCount(); - const decks = await queryBuilder - .orderBy('deck.name', 'ASC') - .limit(limit) - .offset(offset) - .getMany(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck search completed', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${decks.length}, total: ${totalCount}, searchTerm: "${query}", limit: ${limit}, offset: ${offset}`); - return { decks, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck search failed', `executionTime: ${Math.round(endTime - startTime)}ms, searchTerm: "${query}"`); - (0, Logger_1.logError)('DeckRepository.search error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to search decks in database'); - } - } - async searchIncludingDeleted(query, limit = 20, offset = 0) { - const startTime = performance.now(); - try { - const searchPattern = `%${query.toLowerCase()}%`; - const queryBuilder = this.repo.createQueryBuilder('deck') - .where('LOWER(deck.name) LIKE :pattern', { pattern: searchPattern }); - const totalCount = await queryBuilder.getCount(); - const decks = await queryBuilder - .orderBy('deck.name', 'ASC') - .limit(limit) - .offset(offset) - .getMany(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck search completed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${decks.length}, total: ${totalCount}, searchTerm: "${query}", limit: ${limit}, offset: ${offset}`); - return { decks, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Deck search failed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, searchTerm: "${query}"`); - (0, Logger_1.logError)('DeckRepository.searchIncludingDeleted error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to search all decks in database'); - } - } - /** - * Count active (non-soft-deleted) decks for a specific user - * @param userId - User ID to count decks for - * @returns Number of active decks - */ - async countActiveByUserId(userId) { - const startTime = performance.now(); - try { - const count = await this.repo.count({ - where: { - userid: userId, - state: (0, typeorm_1.Not)(DeckAggregate_1.State.SOFT_DELETE) - } - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('User active deck count completed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}, count: ${count}`); - return count; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('User active deck count failed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}`); - (0, Logger_1.logError)('DeckRepository.countActiveByUserId error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to count active decks for user'); - } - } - /** - * Count organizational decks for a specific user - * @param userId - User ID to count organizational decks for - * @returns Number of organizational decks - */ - async countOrganizationalByUserId(userId) { - const startTime = performance.now(); - try { - const count = await this.repo.count({ - where: { - userid: userId, - ctype: DeckAggregate_1.CType.ORGANIZATION, - state: (0, typeorm_1.Not)(DeckAggregate_1.State.SOFT_DELETE) - } - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('User organizational deck count completed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}, count: ${count}`); - return count; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('User organizational deck count failed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}`); - (0, Logger_1.logError)('DeckRepository.countOrganizationalByUserId error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to count organizational decks for user'); - } - } - /** - * Find decks with filtering based on user permissions and mandatory pagination - * @param userId - User ID for filtering - * @param userOrgId - User's organization ID (if any) - * @param isAdmin - Whether user is admin (bypasses filtering) - * @param from - Start index for pagination (default: 0) - * @param to - End index for pagination (default: 49) - * @returns Paginated filtered list of decks with total count - */ - async findFilteredDecks(userId, userOrgId, isAdmin, from = 0, to = 49) { - const startTime = performance.now(); - try { - // Validate pagination parameters - if (from < 0 || to < from) { - throw new Error('Invalid pagination parameters'); - } - const limit = to - from + 1; - if (limit > 100) { - throw new Error('Page size too large. Maximum 100 records per request'); - } - const skip = from; - const take = limit; - // Admin gets ALL decks with pagination - if (isAdmin) { - AdminBypassService_1.AdminBypassService.logAdminBypass('FIND_FILTERED_DECKS_BYPASS', userId, 'all-decks-filtered', { - bypassType: 'admin-all-decks-filtered', - userOrgId, - from, - to, - operation: 'read' - }); - const [decks, totalCount] = await this.repo.findAndCount({ - where: { state: (0, typeorm_1.Not)(DeckAggregate_1.State.SOFT_DELETE) }, - relations: ['organization'], - order: { creationdate: 'DESC' }, - skip, - take - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Admin filtered deck query completed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}, found: ${decks.length}, totalCount: ${totalCount}, isAdmin: true`); - return { decks, totalCount }; - } - // Regular user complex filtering - const queryBuilder = this.repo.createQueryBuilder('deck') - .leftJoinAndSelect('deck.organization', 'org') - .where('deck.state != :deletedState', { deletedState: DeckAggregate_1.State.SOFT_DELETE }); - queryBuilder.andWhere('(' + - // User's private decks - '(deck.userid = :userId AND deck.ctype = :privateType) OR ' + - // All public decks - '(deck.ctype = :publicType)' + - // Organization decks from same org (if user has org) - (userOrgId ? ' OR (deck.ctype = :orgType AND org.id = :orgId)' : '') + - ')', { - userId, - privateType: DeckAggregate_1.CType.PRIVATE, - publicType: DeckAggregate_1.CType.PUBLIC, - ...(userOrgId && { orgType: DeckAggregate_1.CType.ORGANIZATION, orgId: userOrgId }) - }); - queryBuilder - .orderBy('deck.creationdate', 'DESC') - .skip(skip) - .take(take); - const [decks, totalCount] = await queryBuilder.getManyAndCount(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('User filtered deck query completed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}, userOrgId: ${userOrgId}, found: ${decks.length}, totalCount: ${totalCount}, isAdmin: false`); - return { decks, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Filtered deck query failed', `executionTime: ${Math.round(endTime - startTime)}ms, userId: ${userId}, isAdmin: ${isAdmin}`); - (0, Logger_1.logError)('DeckRepository.findFilteredDecks error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to find filtered decks'); - } - } -} -exports.DeckRepository = DeckRepository; -//# sourceMappingURL=DeckRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.js.map b/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.js.map deleted file mode 100644 index d17a0a4f..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/DeckRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DeckRepository.js","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/DeckRepository.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,4CAA6C;AAC7C,mEAA8E;AAE9E,8DAA0E;AAC1E,sFAAmF;AAEnF,MAAa,cAAc;IAEvB;QACI,IAAI,CAAC,IAAI,GAAG,yBAAa,CAAC,aAAa,CAAC,6BAAa,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAA4B;QACrC,OAA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W,EAAC,4BAA4B,EAAE,kBAAkB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,eAAe,MAAM,cAAc,OAAO,EAAE,CAAC,CAAC;YACzI,IAAA,iBAAQ,EAAC,wCAAwC,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9G,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACrD,CAAC;IACL,CAAC;CACJ;AA3SD,wCA2SC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.d.ts b/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.d.ts deleted file mode 100644 index 7d3c6e6d..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { OrganizationAggregate } from '../../Domain/Organization/OrganizationAggregate'; -import { IOrganizationRepository } from '../../Domain/IRepository/IOrganizationRepository'; -export declare class OrganizationRepository implements IOrganizationRepository { - private repo; - constructor(); - create(org: Partial): Promise & OrganizationAggregate>; - findByPage(from: number, to: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - search(query: string, limit?: number, offset?: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; - searchIncludingDeleted(query: string, limit?: number, offset?: number): Promise<{ - organizations: OrganizationAggregate[]; - totalCount: number; - }>; -} -//# sourceMappingURL=OrganizationRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.d.ts.map deleted file mode 100644 index 4d6ce71d..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationRepository.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/OrganizationRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,iDAAiD,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAG3F,qBAAa,sBAAuB,YAAW,uBAAuB;IAClE,OAAO,CAAC,IAAI,CAAoC;;IAK1C,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAI1C,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA+B7G,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA4B7H,QAAQ,CAAC,EAAE,EAAE,MAAM;IASnB,wBAAwB,CAAC,EAAE,EAAE,MAAM;IAInC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAKzD,MAAM,CAAC,EAAE,EAAE,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAE,MAAM;IAKrB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA6BtI,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAgC/J"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.js b/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.js deleted file mode 100644 index a6b35663..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrganizationRepository = void 0; -const typeorm_1 = require("typeorm"); -const ormconfig_1 = require("../ormconfig"); -const OrganizationAggregate_1 = require("../../Domain/Organization/OrganizationAggregate"); -const Logger_1 = require("../../Application/Services/Logger"); -class OrganizationRepository { - constructor() { - this.repo = ormconfig_1.AppDataSource.getRepository(OrganizationAggregate_1.OrganizationAggregate); - } - async create(org) { - return this.repo.save(org); - } - async findByPage(from, to) { - const startTime = performance.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count({ - where: { state: (0, typeorm_1.Not)(OrganizationAggregate_1.OrganizationState.SOFT_DELETE) } - }); - // Get paginated results - const organizations = await this.repo.find({ - where: { state: (0, typeorm_1.Not)(OrganizationAggregate_1.OrganizationState.SOFT_DELETE) }, - order: { name: 'ASC' }, - take: limit, - skip: offset - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization page query completed', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${organizations.length}, total: ${totalCount}, from: ${from}, to: ${to}`); - return { organizations, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization page query failed', `executionTime: ${Math.round(endTime - startTime)}ms, from: ${from}, to: ${to}`); - (0, Logger_1.logError)('OrganizationRepository.findByPage error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to get organizations page from database'); - } - } - async findByPageIncludingDeleted(from, to) { - const startTime = performance.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count(); - // Get paginated results - const organizations = await this.repo.find({ - order: { name: 'ASC' }, - take: limit, - skip: offset - }); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization page query completed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${organizations.length}, total: ${totalCount}, from: ${from}, to: ${to}`); - return { organizations, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization page query failed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, from: ${from}, to: ${to}`); - (0, Logger_1.logError)('OrganizationRepository.findByPageIncludingDeleted error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to get organizations page from database'); - } - } - async findById(id) { - return this.repo.findOne({ - where: { - id, - state: (0, typeorm_1.Not)(OrganizationAggregate_1.OrganizationState.SOFT_DELETE) - } - }); - } - async findByIdIncludingDeleted(id) { - return this.repo.findOneBy({ id }); - } - async update(id, update) { - await this.repo.update(id, update); - return this.findById(id); - } - async delete(id) { - return this.repo.delete(id); - } - async softDelete(id) { - await this.repo.update(id, { state: OrganizationAggregate_1.OrganizationState.SOFT_DELETE }); - return this.findById(id); - } - async search(query, limit = 20, offset = 0) { - const startTime = performance.now(); - try { - const searchPattern = `%${query.toLowerCase()}%`; - const queryBuilder = this.repo.createQueryBuilder('org') - .where('org.state != :softDelete', { softDelete: OrganizationAggregate_1.OrganizationState.SOFT_DELETE }) - .andWhere('(LOWER(org.name) LIKE :pattern OR LOWER(org.contactfname) LIKE :pattern OR LOWER(org.contactlname) LIKE :pattern OR LOWER(org.contactemail) LIKE :pattern OR LOWER(CONCAT(org.contactfname, \' \', org.contactlname)) LIKE :pattern)', { pattern: searchPattern }); - const totalCount = await queryBuilder.getCount(); - const organizations = await queryBuilder - .orderBy('org.name', 'ASC') - .limit(limit) - .offset(offset) - .getMany(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization search completed', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${organizations.length}, total: ${totalCount}, searchTerm: "${query}", limit: ${limit}, offset: ${offset}`); - return { organizations, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization search failed', `executionTime: ${Math.round(endTime - startTime)}ms, searchTerm: "${query}"`); - (0, Logger_1.logError)('OrganizationRepository.search error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to search organizations in database'); - } - } - async searchIncludingDeleted(query, limit = 20, offset = 0) { - const startTime = performance.now(); - try { - const searchPattern = `%${query.toLowerCase()}%`; - const queryBuilder = this.repo.createQueryBuilder('org') - .where('LOWER(org.name) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(org.contactfname) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(org.contactlname) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(org.contactemail) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(CONCAT(org.contactfname, \' \', org.contactlname)) LIKE :pattern', { pattern: searchPattern }); - const totalCount = await queryBuilder.getCount(); - const organizations = await queryBuilder - .orderBy('org.name', 'ASC') - .limit(limit) - .offset(offset) - .getMany(); - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization search completed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, found: ${organizations.length}, total: ${totalCount}, searchTerm: "${query}", limit: ${limit}, offset: ${offset}`); - return { organizations, totalCount }; - } - catch (error) { - const endTime = performance.now(); - (0, Logger_1.logDatabase)('Organization search failed (including deleted)', `executionTime: ${Math.round(endTime - startTime)}ms, searchTerm: "${query}"`); - (0, Logger_1.logError)('OrganizationRepository.searchIncludingDeleted error', error instanceof Error ? error : new Error(String(error))); - throw new Error('Failed to search all organizations in database'); - } - } -} -exports.OrganizationRepository = OrganizationRepository; -//# sourceMappingURL=OrganizationRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.js.map b/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.js.map deleted file mode 100644 index afef42a8..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/OrganizationRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OrganizationRepository.js","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/OrganizationRepository.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,4CAA6C;AAC7C,2FAA2G;AAE3G,8DAA0E;AAE1E,MAAa,sBAAsB;IAE/B;QACI,IAAI,CAAC,IAAI,GAAG,yBAAa,CAAC,aAAa,CAAC,6CAAqB,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,GAAmC;QAC5C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,EAAU;QACrC,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QACpC,IAAI,CAAC;YACD,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC;YAC5B,MAAM,MAAM,GAAG,IAAI,CAAC;YAEpB,iCAAiC;YACjC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;gBACrC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAA,aAAG,EAAC,yCAAiB,CAAC,WAAW,CAAC,EAAE;aACvD,CAAC,CAAC;YAEH,wBAAwB;YACxB,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBACvC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAA,aAAG,EAAC,yCAAiB,CAAC,WAAW,CAAC,EAAE;gBACpD,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;gBACtB,IAAI,E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E,OAAO,CAAC,wEAAwE,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;YAEnH,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,QAAQ,EAAE,CAAC;YAEjD,MAAM,aAAa,GAAG,MAAM,YAAY;iBACnC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;iBAC1B,KAAK,CAAC,KAAK,CAAC;iBACZ,MAAM,CAAC,MAAM,CAAC;iBACd,OAAO,EAAE,CAAC;YAEf,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAClC,IAAA,oBAAW,EAAC,mDAAmD,EAAE,kBAAkB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,cAAc,aAAa,CAAC,MAAM,YAAY,UAAU,kBAAkB,KAAK,aAAa,KAAK,aAAa,MAAM,EAAE,CAAC,CAAC;YAE1O,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;QACzC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAClC,IAAA,oBAAW,EAAC,gDAAgD,EAAE,kBAAkB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,oBAAoB,KAAK,GAAG,CAAC,CAAC;YAC7I,IAAA,iBAAQ,EAAC,qDAAqD,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC3H,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACtE,CAAC;IACL,CAAC;CAEJ;AA7JD,wDA6JC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.d.ts b/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.d.ts deleted file mode 100644 index 029a4b6f..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { UserAggregate } from '../../Domain/User/UserAggregate'; -import { IUserRepository } from '../../Domain/IRepository/IUserRepository'; -export declare class UserRepository implements IUserRepository { - private repo; - constructor(); - create(user: Partial): Promise & UserAggregate>; - findByPage(from: number, to: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - findByPageIncludingDeleted(from: number, to: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - findById(id: string): Promise; - findByIdIncludingDeleted(id: string): Promise; - findByUsername(username: string): Promise; - findByEmail(email: string): Promise; - findByToken(token: string): Promise; - update(id: string, update: Partial): Promise; - delete(id: string): Promise; - softDelete(id: string): Promise; - deactivate(id: string): Promise; - search(query: string, limit?: number, offset?: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; - searchIncludingDeleted(query: string, limit?: number, offset?: number): Promise<{ - users: UserAggregate[]; - totalCount: number; - }>; -} -//# sourceMappingURL=UserRepository.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.d.ts.map deleted file mode 100644 index 1d34747e..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserRepository.d.ts","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/UserRepository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAa,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAG3E,qBAAa,cAAe,YAAW,eAAe;IAClD,OAAO,CAAC,IAAI,CAA4B;;IAKlC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC;IAsBnC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA+B7F,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IA4B7G,QAAQ,CAAC,EAAE,EAAE,MAAM;IAyBnB,wBAAwB,CAAC,EAAE,EAAE,MAAM;IAoBnC,cAAc,CAAC,QAAQ,EAAE,MAAM;IAe/B,WAAW,CAAC,KAAK,EAAE,MAAM;IAezB,WAAW,CAAC,KAAK,EAAE,MAAM;IAezB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC;IA4BjD,MAAM,CAAC,EAAE,EAAE,MAAM;IAqBjB,UAAU,CAAC,EAAE,EAAE,MAAM;IAsBrB,UAAU,CAAC,EAAE,EAAE,MAAM;IAsBrB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAkCtH,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,aAAa,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAsC/I"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.js b/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.js deleted file mode 100644 index 78e34135..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.js +++ /dev/null @@ -1,312 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserRepository = void 0; -const typeorm_1 = require("typeorm"); -const ormconfig_1 = require("../ormconfig"); -const UserAggregate_1 = require("../../Domain/User/UserAggregate"); -const Logger_1 = require("../../Application/Services/Logger"); -class UserRepository { - constructor() { - this.repo = ormconfig_1.AppDataSource.getRepository(UserAggregate_1.UserAggregate); - } - async create(user) { - const startTime = Date.now(); - try { - const result = await this.repo.save(user); - (0, Logger_1.logDatabase)('User created successfully', undefined, Date.now() - startTime, { - userId: result.id, - username: user.username, - email: user.email - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.create error', error); - // Handle unique constraint violations - if (error instanceof Error && (error.message.includes('duplicate') || error.message.includes('unique'))) { - throw new Error('User with this username or email already exists'); - } - throw new Error('Failed to create user in database'); - } - } - async findByPage(from, to) { - const startTime = Date.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count({ - where: { state: (0, typeorm_1.Not)(UserAggregate_1.UserState.SOFT_DELETE) } - }); - // Get paginated results - const users = await this.repo.find({ - where: { state: (0, typeorm_1.Not)(UserAggregate_1.UserState.SOFT_DELETE) }, - order: { regdate: 'DESC' }, - take: limit, - skip: offset - }); - (0, Logger_1.logDatabase)('User page query completed', `from: ${from}, to: ${to}`, Date.now() - startTime, { - found: users.length, - total: totalCount - }); - return { users, totalCount }; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findByPage error', error); - throw new Error('Failed to get users page from database'); - } - } - async findByPageIncludingDeleted(from, to) { - const startTime = Date.now(); - try { - const limit = to - from + 1; - const offset = from; - // Get total count for pagination - const totalCount = await this.repo.count(); - // Get paginated results - const users = await this.repo.find({ - order: { regdate: 'DESC' }, - take: limit, - skip: offset - }); - (0, Logger_1.logDatabase)('User page query completed (including deleted)', `from: ${from}, to: ${to}`, Date.now() - startTime, { - found: users.length, - total: totalCount - }); - return { users, totalCount }; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findByPageIncludingDeleted error', error); - throw new Error('Failed to get users page from database'); - } - } - async findById(id) { - const startTime = Date.now(); - try { - const result = await this.repo.findOne({ - where: { - id, - state: (0, typeorm_1.Not)(UserAggregate_1.UserState.SOFT_DELETE) - } - }); - (0, Logger_1.logDatabase)('User findById query completed', `findOneBy({ id: ${id} })`, Date.now() - startTime, { - found: !!result, - userId: id - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findById error', error); - if (error instanceof Error && error.message.includes('invalid input syntax for type uuid')) { - return null; - } - throw new Error('Failed to retrieve user from database'); - } - } - async findByIdIncludingDeleted(id) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ id }); - (0, Logger_1.logDatabase)('User findByIdIncludingDeleted query completed', `findOneBy({ id: ${id} })`, Date.now() - startTime, { - found: !!result, - userId: id - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findByIdIncludingDeleted error', error); - if (error instanceof Error && error.message.includes('invalid input syntax for type uuid')) { - return null; - } - throw new Error('Failed to retrieve user from database'); - } - } - async findByUsername(username) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ username }); - (0, Logger_1.logDatabase)('User findByUsername query completed', `findOneBy({ username: ${username} })`, Date.now() - startTime, { - found: !!result, - username - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findByUsername error', error); - throw new Error('Failed to retrieve user by username from database'); - } - } - async findByEmail(email) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ email }); - (0, Logger_1.logDatabase)('User findByEmail query completed', `findOneBy({ email: ${email} })`, Date.now() - startTime, { - found: !!result, - email - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findByEmail error', error); - throw new Error('Failed to retrieve user by email from database'); - } - } - async findByToken(token) { - const startTime = Date.now(); - try { - const result = await this.repo.findOneBy({ token: token }); - (0, Logger_1.logDatabase)('User findByToken query completed', `findOneBy({ token })`, Date.now() - startTime, { - found: !!result, - tokenPrefix: token.substring(0, 8) + '...' - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.findByToken error', error); - throw new Error('Failed to retrieve user by token from database'); - } - } - async update(id, update) { - const startTime = Date.now(); - try { - await this.repo.update(id, update); - const result = await this.findById(id); - (0, Logger_1.logDatabase)('User updated successfully', `update(${id})`, Date.now() - startTime, { - userId: id, - updatedFields: Object.keys(update), - success: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.update error', error); - // Handle unique constraint violations - if (error instanceof Error && (error.message.includes('duplicate') || error.message.includes('unique'))) { - throw new Error('Username or email already exists'); - } - // Handle invalid UUID format - if (error instanceof Error && error.message.includes('invalid input syntax for type uuid')) { - throw new Error('Invalid user ID format'); - } - throw new Error('Failed to update user in database'); - } - } - async delete(id) { - const startTime = Date.now(); - try { - const result = await this.repo.delete(id); - (0, Logger_1.logDatabase)('User deleted successfully', `delete(${id})`, Date.now() - startTime, { - userId: id, - affected: result.affected - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.delete error', error); - // Handle invalid UUID format - if (error instanceof Error && error.message.includes('invalid input syntax for type uuid')) { - throw new Error('Invalid user ID format'); - } - throw new Error('Failed to delete user from database'); - } - } - async softDelete(id) { - const startTime = Date.now(); - try { - await this.repo.update(id, { state: UserAggregate_1.UserState.SOFT_DELETE }); - const result = await this.findById(id); - (0, Logger_1.logDatabase)('User soft deleted successfully', `update(${id}, { state: SOFT_DELETE })`, Date.now() - startTime, { - userId: id, - success: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.softDelete error', error); - // Handle invalid UUID format - if (error instanceof Error && error.message.includes('invalid input syntax for type uuid')) { - throw new Error('Invalid user ID format'); - } - throw new Error('Failed to soft delete user in database'); - } - } - async deactivate(id) { - const startTime = Date.now(); - try { - await this.repo.update(id, { state: UserAggregate_1.UserState.DEACTIVATED }); - const result = await this.findById(id); - (0, Logger_1.logDatabase)('User deactivated successfully', `update(${id}, { state: DEACTIVATED })`, Date.now() - startTime, { - userId: id, - success: !!result - }); - return result; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.deactivate error', error); - // Handle invalid UUID format - if (error instanceof Error && error.message.includes('invalid input syntax for type uuid')) { - throw new Error('Invalid user ID format'); - } - throw new Error('Failed to deactivate user in database'); - } - } - async search(query, limit = 20, offset = 0) { - const startTime = Date.now(); - try { - const searchPattern = `%${query.toLowerCase()}%`; - const queryBuilder = this.repo.createQueryBuilder('user') - .where('user.state != :softDelete', { softDelete: UserAggregate_1.UserState.SOFT_DELETE }) - .andWhere('(LOWER(user.username) LIKE :pattern OR LOWER(user.email) LIKE :pattern OR LOWER(user.fname) LIKE :pattern OR LOWER(user.lname) LIKE :pattern OR LOWER(CONCAT(user.fname, \' \', user.lname)) LIKE :pattern)', { pattern: searchPattern }); - const totalCount = await queryBuilder.getCount(); - const users = await queryBuilder - .orderBy('user.username', 'ASC') - .limit(limit) - .offset(offset) - .getMany(); - (0, Logger_1.logDatabase)('User search completed', `search query: ${query.substring(0, 50)}...`, Date.now() - startTime, { - query, - limit, - offset, - totalCount, - returnedCount: users.length - }); - return { users, totalCount }; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.search error', error); - throw new Error('Failed to search users in database'); - } - } - async searchIncludingDeleted(query, limit = 20, offset = 0) { - const startTime = Date.now(); - try { - const searchPattern = `%${query.toLowerCase()}%`; - const queryBuilder = this.repo.createQueryBuilder('user') - .where('LOWER(user.username) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(user.email) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(user.fname) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(user.lname) LIKE :pattern', { pattern: searchPattern }) - .orWhere('LOWER(CONCAT(user.fname, \' \', user.lname)) LIKE :pattern', { pattern: searchPattern }); - const totalCount = await queryBuilder.getCount(); - const users = await queryBuilder - .orderBy('user.username', 'ASC') - .limit(limit) - .offset(offset) - .getMany(); - (0, Logger_1.logDatabase)('User search completed (including deleted)', `search query: ${query.substring(0, 50)}...`, Date.now() - startTime, { - query, - limit, - offset, - totalCount, - returnedCount: users.length - }); - return { users, totalCount }; - } - catch (error) { - (0, Logger_1.logError)('UserRepository.searchIncludingDeleted error', error); - throw new Error('Failed to search all users in database'); - } - } -} -exports.UserRepository = UserRepository; -//# sourceMappingURL=UserRepository.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.js.map b/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.js.map deleted file mode 100644 index 83e8bbf4..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/Repository/UserRepository.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserRepository.js","sourceRoot":"","sources":["../../../src/Infrastructure/Repository/UserRepository.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,4CAA6C;AAC7C,mEAA2E;AAE3E,8DAA0E;AAE1E,MAAa,cAAc;IAEvB;QACI,IAAI,CAAC,IAAI,GAAG,yBAAa,CAAC,aAAa,CAAC,6BAAa,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAA4B;QACrC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAA,oBAAW,EAAC,2BAA2B,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE;gBACxE,MAAM,EAAE,MAAM,CAAC,EAAE;gBACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;aACpB,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,6BAA6B,EAAE,KAAc,CAAC,CAAC;YAExD,sCAAsC;YACtC,IAAI,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CA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G,MAAM,YAAY,CAAC,QAAQ,EAAE,CAAC;YAEjD,MAAM,KAAK,GAAG,MAAM,YAAY;iBAC3B,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC;iBAC/B,KAAK,CAAC,KAAK,CAAC;iBACZ,MAAM,CAAC,MAAM,CAAC;iBACd,OAAO,EAAE,CAAC;YAEf,IAAA,oBAAW,EAAC,2CAA2C,EACnD,iBAAiB,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,EAC5C,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE;gBACxB,KAAK;gBACL,KAAK;gBACL,MAAM;gBACN,UAAU;gBACV,aAAa,EAAE,KAAK,CAAC,MAAM;aAC9B,CAAC,CAAC;YAEH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,IAAA,iBAAQ,EAAC,6CAA6C,EAAE,KAAc,CAAC,CAAC;YACxE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC9D,CAAC;IACL,CAAC;CAGJ;AAtVD,wCAsVC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/ormconfig.d.ts b/SerpentRace_Backend/dist/Infrastructure/ormconfig.d.ts deleted file mode 100644 index 7c7f09c4..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/ormconfig.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { DataSource } from 'typeorm'; -export declare const AppDataSource: DataSource; -//# sourceMappingURL=ormconfig.d.ts.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/ormconfig.d.ts.map b/SerpentRace_Backend/dist/Infrastructure/ormconfig.d.ts.map deleted file mode 100644 index 45726959..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/ormconfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ormconfig.d.ts","sourceRoot":"","sources":["../../src/Infrastructure/ormconfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,eAAO,MAAM,aAAa,YAaxB,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/ormconfig.js b/SerpentRace_Backend/dist/Infrastructure/ormconfig.js deleted file mode 100644 index 0d6d1378..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/ormconfig.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AppDataSource = void 0; -const typeorm_1 = require("typeorm"); -const path_1 = require("path"); -exports.AppDataSource = new typeorm_1.DataSource({ - type: 'postgres', - host: process.env.DB_HOST || 'localhost', - port: parseInt(process.env.DB_PORT || '5432'), - username: process.env.DB_USERNAME || 'postgres', - password: process.env.DB_PASSWORD || 'password', - database: process.env.DB_NAME || 'serpentrace', - synchronize: false, // Set to false when using migrations - logging: process.env.NODE_ENV === 'development', - entities: [(0, path_1.join)(__dirname, '../Domain/**/*Aggregate.ts')], - migrations: [(0, path_1.join)(__dirname, './Migrations/*.ts')], - migrationsTableName: 'migrations', - migrationsRun: false // Let migrations run manually -}); -//# sourceMappingURL=ormconfig.js.map \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Infrastructure/ormconfig.js.map b/SerpentRace_Backend/dist/Infrastructure/ormconfig.js.map deleted file mode 100644 index e07ae8a5..00000000 --- a/SerpentRace_Backend/dist/Infrastructure/ormconfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ormconfig.js","sourceRoot":"","sources":["../../src/Infrastructure/ormconfig.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACrC,+BAA4B;AAEf,QAAA,aAAa,GAAG,IAAI,oBAAU,CAAC;IACxC,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW;IACxC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC;IAC7C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU;IAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU;IAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,aAAa;IAC9C,WAAW,EAAE,KAAK,EAAE,qCAAqC;IACzD,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;IAC/C,QAAQ,EAAE,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;IACzD,UAAU,EAAE,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IAClD,mBAAmB,EAAE,YAAY;IACjC,aAAa,EAAE,KAAK,CAAC,8BAA8B;CACtD,CAAC,CAAC"} \ No newline at end of file diff --git a/SerpentRace_Backend/dist/Templates/contact-response-de.html b/SerpentRace_Backend/dist/Templates/contact-response-de.html deleted file mode 100644 index bb5c8d03..00000000 --- a/SerpentRace_Backend/dist/Templates/contact-response-de.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - {{companyName}} - Antwort auf Ihre {{contactTypeString}} - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/contact-response-hu.html b/SerpentRace_Backend/dist/Templates/contact-response-hu.html deleted file mode 100644 index aeac09c3..00000000 --- a/SerpentRace_Backend/dist/Templates/contact-response-hu.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - {{companyName}} - Válasz az Ön {{contactTypeString}} üzenetére - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/contact-response.html b/SerpentRace_Backend/dist/Templates/contact-response.html deleted file mode 100644 index 4c928510..00000000 --- a/SerpentRace_Backend/dist/Templates/contact-response.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - {{companyName}} - Response to Your {{contactTypeString}} - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/password-reset-de.html b/SerpentRace_Backend/dist/Templates/password-reset-de.html deleted file mode 100644 index cba82184..00000000 --- a/SerpentRace_Backend/dist/Templates/password-reset-de.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - SerpentRace - Passwort zurücksetzen - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/password-reset-hu.html b/SerpentRace_Backend/dist/Templates/password-reset-hu.html deleted file mode 100644 index 5ac57bbd..00000000 --- a/SerpentRace_Backend/dist/Templates/password-reset-hu.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - SerpentRace - Jelszó visszaállítás kérése - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/password-reset.html b/SerpentRace_Backend/dist/Templates/password-reset.html deleted file mode 100644 index 9fbf46e4..00000000 --- a/SerpentRace_Backend/dist/Templates/password-reset.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - SerpentRace - Password Reset Request - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/verification-de.html b/SerpentRace_Backend/dist/Templates/verification-de.html deleted file mode 100644 index 068c35b0..00000000 --- a/SerpentRace_Backend/dist/Templates/verification-de.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - SerpentRace - Konto verifizieren - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/verification-hu.html b/SerpentRace_Backend/dist/Templates/verification-hu.html deleted file mode 100644 index ec8e6dc4..00000000 --- a/SerpentRace_Backend/dist/Templates/verification-hu.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - SerpentRace - Fiók megerősítése - - - - - - diff --git a/SerpentRace_Backend/dist/Templates/verification.html b/SerpentRace_Backend/dist/Templates/verification.html deleted file mode 100644 index 24dd5bc8..00000000 --- a/SerpentRace_Backend/dist/Templates/verification.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - SerpentRace - Verify Your Account - - - - - -