"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