{"openapi":"3.0.0","paths":{"/oauth/authorize":{"get":{"operationId":"AuthController_authorize","summary":"Authorization Endpoint","description":"OAuth 2.0 authorization endpoint for authorization_code flow. Returns an authorization code.","parameters":[],"responses":{"200":{"description":"Authorization code generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeResponseDto"}}}},"400":{"description":"Invalid parameters"}},"tags":["OAuth 2.0"]}},"/oauth/token":{"post":{"operationId":"AuthController_token","summary":"Token Endpoint","description":"Generates access tokens. Supports: client_credentials, password, refresh_token, authorization_code","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequestDto"}}}},"responses":{"200":{"description":"Token generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponseDto"}}}},"400":{"description":"Invalid grant type or missing parameters"},"401":{"description":"Invalid credentials"}},"tags":["OAuth 2.0"]}},"/oauth/introspect":{"post":{"operationId":"AuthController_introspect","summary":"Token Introspection (RFC 7662)","description":"Validates a token and returns information about it","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Token to inspect"}}}}}},"responses":{"200":{"description":"Token information"}},"tags":["OAuth 2.0"]}},"/oauth/revoke":{"post":{"operationId":"AuthController_revoke","summary":"Token Revocation (RFC 7009)","description":"Revokes a refresh token","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Token to revoke"},"token_type_hint":{"type":"string","description":"Token type (refresh_token)","required":["false"]}}}}}},"responses":{"200":{"description":"Token revoked successfully"}},"tags":["OAuth 2.0"]}},"/oauth/userinfo":{"get":{"operationId":"AuthController_userInfo","summary":"UserInfo Endpoint","description":"Returns user information based on the access token","parameters":[],"responses":{"200":{"description":"User information"}},"tags":["OAuth 2.0"]}},"/oauth/.well-known/oauth-authorization-server":{"get":{"operationId":"AuthController_metadata","summary":"OAuth Server Metadata (RFC 8414)","description":"Returns OAuth 2.0 server configuration","parameters":[],"responses":{"200":{"description":"OAuth server metadata"}},"tags":["OAuth 2.0"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","summary":"Get all users","description":"Returns the complete list of users","parameters":[],"responses":{"200":{"description":"List of users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}}}}},"401":{"description":"Unauthorized"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"post":{"operationId":"UsersController_create","summary":"Create user","description":"Creates a new user (stored in memory)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"201":{"description":"User created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/users/paginated":{"get":{"operationId":"UsersController_findAllPaginated","summary":"Get users with advanced filtering","description":"Returns paginated users with search, filters, date ranges, and field selection","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-based)","schema":{"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"default":10,"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort field (supports nested: address.city)","schema":{"example":"username","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Global search query","schema":{"example":"laptop","type":"string"}},{"name":"category","required":false,"in":"query","description":"Filter by specific field value. Format: field=value","schema":{"example":"Electronics","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status","schema":{"example":"active","type":"string"}},{"name":"brand","required":false,"in":"query","description":"Filter by brand","schema":{"example":"TechBrand","type":"string"}},{"name":"role","required":false,"in":"query","description":"Filter by role","schema":{"example":"admin","type":"string"}},{"name":"active","required":false,"in":"query","description":"Filter by active status","schema":{"example":true,"type":"boolean"}},{"name":"minPrice","required":false,"in":"query","description":"Minimum price","schema":{"example":100,"type":"number"}},{"name":"maxPrice","required":false,"in":"query","description":"Maximum price","schema":{"example":1000,"type":"number"}},{"name":"minStock","required":false,"in":"query","description":"Minimum stock","schema":{"example":10,"type":"number"}},{"name":"maxStock","required":false,"in":"query","description":"Maximum stock","schema":{"example":100,"type":"number"}},{"name":"minRating","required":false,"in":"query","description":"Minimum rating","schema":{"example":4,"type":"number"}},{"name":"minTotal","required":false,"in":"query","description":"Minimum total","schema":{"example":100,"type":"number"}},{"name":"maxTotal","required":false,"in":"query","description":"Maximum total","schema":{"example":5000,"type":"number"}},{"name":"createdAfter","required":false,"in":"query","description":"Created after date (ISO 8601)","schema":{"example":"2024-01-01T00:00:00Z","type":"string"}},{"name":"createdBefore","required":false,"in":"query","description":"Created before date (ISO 8601)","schema":{"example":"2024-12-31T23:59:59Z","type":"string"}},{"name":"updatedAfter","required":false,"in":"query","description":"Updated after date (ISO 8601)","schema":{"example":"2024-06-01T00:00:00Z","type":"string"}},{"name":"updatedBefore","required":false,"in":"query","description":"Updated before date (ISO 8601)","schema":{"example":"2024-12-31T23:59:59Z","type":"string"}},{"name":"tags","required":false,"in":"query","description":"Filter by tags (comma-separated)","schema":{"example":"gaming,rgb,wireless","type":"string"}},{"name":"country","required":false,"in":"query","description":"Filter by country","schema":{"example":"United States","type":"string"}},{"name":"city","required":false,"in":"query","description":"Filter by city","schema":{"example":"San Francisco","type":"string"}},{"name":"paymentMethod","required":false,"in":"query","description":"Filter by payment method","schema":{"example":"credit_card","type":"string"}},{"name":"productId","required":false,"in":"query","description":"Filter by product ID in items","schema":{"example":"prod-001","type":"string"}},{"name":"fields","required":false,"in":"query","description":"Select specific fields (comma-separated)","schema":{"example":"id,username,email,role","type":"string"}}],"responses":{"200":{"description":"Paginated and filtered list of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUserResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","summary":"Get user by ID","description":"Returns a specific user","parameters":[{"name":"id","required":true,"in":"path","description":"User ID","schema":{"example":"user-001","type":"string"}}],"responses":{"200":{"description":"User found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"User not found"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"put":{"operationId":"UsersController_update","summary":"Update user (full)","description":"Replaces all user fields","parameters":[{"name":"id","required":true,"in":"path","description":"User ID","schema":{"example":"user-001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"User not found"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"UsersController_partialUpdate","summary":"Update user (partial)","description":"Updates specific user fields","parameters":[{"name":"id","required":true,"in":"path","description":"User ID","schema":{"example":"user-001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"User updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"User not found"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"UsersController_remove","summary":"Delete user","description":"Removes a user from memory","parameters":[{"name":"id","required":true,"in":"path","description":"User ID","schema":{"example":"user-001","type":"string"}}],"responses":{"200":{"description":"User deleted successfully"},"401":{"description":"Unauthorized"},"404":{"description":"User not found"}},"tags":["Users"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/products":{"get":{"operationId":"ProductsController_findAll","summary":"Get all products","description":"Returns the complete list of products","parameters":[],"responses":{"200":{"description":"List of products","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductDto"}}}}},"401":{"description":"Unauthorized"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"post":{"operationId":"ProductsController_create","summary":"Create product","description":"Creates a new product (stored in memory)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"Product created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/products/paginated":{"get":{"operationId":"ProductsController_findAllPaginated","summary":"Get products with advanced filtering","description":"Returns paginated products with search, filters, date ranges, and field selection","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-based)","schema":{"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"default":10,"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort field (supports nested: pricing.total)","schema":{"example":"price","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Global search query","schema":{"example":"laptop","type":"string"}},{"name":"category","required":false,"in":"query","description":"Filter by category","schema":{"example":"Electronics","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status","schema":{"example":"active","type":"string"}},{"name":"brand","required":false,"in":"query","description":"Filter by brand","schema":{"example":"Apple","type":"string"}},{"name":"role","required":false,"in":"query","description":"Filter by role","schema":{"example":"admin","type":"string"}},{"name":"active","required":false,"in":"query","description":"Filter by active status","schema":{"example":true,"type":"boolean"}},{"name":"minPrice","required":false,"in":"query","description":"Minimum price","schema":{"example":100,"type":"number"}},{"name":"maxPrice","required":false,"in":"query","description":"Maximum price","schema":{"example":1000,"type":"number"}},{"name":"minStock","required":false,"in":"query","description":"Minimum stock","schema":{"example":10,"type":"number"}},{"name":"maxStock","required":false,"in":"query","description":"Maximum stock","schema":{"example":100,"type":"number"}},{"name":"minRating","required":false,"in":"query","description":"Minimum rating (1-5)","schema":{"example":4,"type":"number"}},{"name":"minTotal","required":false,"in":"query","description":"Minimum total","schema":{"example":100,"type":"number"}},{"name":"maxTotal","required":false,"in":"query","description":"Maximum total","schema":{"example":5000,"type":"number"}},{"name":"createdAfter","required":false,"in":"query","description":"Created after date (ISO 8601)","schema":{"example":"2024-01-01T00:00:00Z","type":"string"}},{"name":"createdBefore","required":false,"in":"query","description":"Created before date (ISO 8601)","schema":{"example":"2024-12-31T23:59:59Z","type":"string"}},{"name":"updatedAfter","required":false,"in":"query","description":"Updated after date (ISO 8601)","schema":{"example":"2024-06-01T00:00:00Z","type":"string"}},{"name":"updatedBefore","required":false,"in":"query","description":"Updated before date (ISO 8601)","schema":{"example":"2024-12-31T23:59:59Z","type":"string"}},{"name":"tags","required":false,"in":"query","description":"Filter by tags (comma-separated)","schema":{"example":"premium,wireless","type":"string"}},{"name":"country","required":false,"in":"query","description":"Filter by country","schema":{"example":"USA","type":"string"}},{"name":"city","required":false,"in":"query","description":"Filter by city","schema":{"example":"New York","type":"string"}},{"name":"paymentMethod","required":false,"in":"query","description":"Filter by payment method","schema":{"example":"credit_card","type":"string"}},{"name":"productId","required":false,"in":"query","description":"Filter by product ID in items","schema":{"example":"prod-001","type":"string"}},{"name":"fields","required":false,"in":"query","description":"Select specific fields (comma-separated)","schema":{"example":"id,name,price,brand","type":"string"}}],"responses":{"200":{"description":"Paginated and filtered list of products","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/products/{id}":{"get":{"operationId":"ProductsController_findOne","summary":"Get product by ID","description":"Returns a specific product","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"example":"prod-001","type":"string"}}],"responses":{"200":{"description":"Product found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"put":{"operationId":"ProductsController_update","summary":"Update product (full)","description":"Replaces all product fields","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"example":"prod-001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"Product updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"ProductsController_partialUpdate","summary":"Update product (partial)","description":"Updates specific product fields","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"example":"prod-001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"Product updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"ProductsController_remove","summary":"Delete product","description":"Removes a product from memory","parameters":[{"name":"id","required":true,"in":"path","description":"Product ID","schema":{"example":"prod-001","type":"string"}}],"responses":{"200":{"description":"Product deleted successfully"},"401":{"description":"Unauthorized"},"404":{"description":"Product not found"}},"tags":["Products"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/sales":{"get":{"operationId":"SalesController_findAll","summary":"Get all sales","description":"Returns the complete list of sales","parameters":[],"responses":{"200":{"description":"List of sales","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SaleDto"}}}}},"401":{"description":"Unauthorized"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"post":{"operationId":"SalesController_create","summary":"Create sale","description":"Creates a new sale (stored in memory)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSaleDto"}}}},"responses":{"201":{"description":"Sale created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/sales/paginated":{"get":{"operationId":"SalesController_findAllPaginated","summary":"Get sales with advanced filtering","description":"Returns paginated sales with search, filters, date ranges, and field selection","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (1-based)","schema":{"default":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page","schema":{"default":10,"example":10,"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Sort field (supports nested: pricing.total)","schema":{"example":"createdAt","type":"string"}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","description":"Global search query","schema":{"example":"laptop","type":"string"}},{"name":"category","required":false,"in":"query","description":"Filter by specific field value. Format: field=value","schema":{"example":"Electronics","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by status","schema":{"example":"delivered","type":"string"}},{"name":"brand","required":false,"in":"query","description":"Filter by brand","schema":{"example":"TechBrand","type":"string"}},{"name":"role","required":false,"in":"query","description":"Filter by role","schema":{"example":"admin","type":"string"}},{"name":"active","required":false,"in":"query","description":"Filter by active status","schema":{"example":true,"type":"boolean"}},{"name":"minPrice","required":false,"in":"query","description":"Minimum price","schema":{"example":100,"type":"number"}},{"name":"maxPrice","required":false,"in":"query","description":"Maximum price","schema":{"example":1000,"type":"number"}},{"name":"minStock","required":false,"in":"query","description":"Minimum stock","schema":{"example":10,"type":"number"}},{"name":"maxStock","required":false,"in":"query","description":"Maximum stock","schema":{"example":100,"type":"number"}},{"name":"minRating","required":false,"in":"query","description":"Minimum rating","schema":{"example":4,"type":"number"}},{"name":"minTotal","required":false,"in":"query","description":"Minimum total amount","schema":{"example":100,"type":"number"}},{"name":"maxTotal","required":false,"in":"query","description":"Maximum total amount","schema":{"example":5000,"type":"number"}},{"name":"createdAfter","required":false,"in":"query","description":"Created after date (ISO 8601)","schema":{"example":"2024-01-01T00:00:00Z","type":"string"}},{"name":"createdBefore","required":false,"in":"query","description":"Created before date (ISO 8601)","schema":{"example":"2024-12-31T23:59:59Z","type":"string"}},{"name":"updatedAfter","required":false,"in":"query","description":"Updated after date (ISO 8601)","schema":{"example":"2024-06-01T00:00:00Z","type":"string"}},{"name":"updatedBefore","required":false,"in":"query","description":"Updated before date (ISO 8601)","schema":{"example":"2024-12-31T23:59:59Z","type":"string"}},{"name":"tags","required":false,"in":"query","description":"Filter by tags (comma-separated)","schema":{"example":"priority,express","type":"string"}},{"name":"country","required":false,"in":"query","description":"Filter by shipping country","schema":{"example":"United States","type":"string"}},{"name":"city","required":false,"in":"query","description":"Filter by shipping city","schema":{"example":"San Francisco","type":"string"}},{"name":"paymentMethod","required":false,"in":"query","description":"Filter by payment method","schema":{"example":"credit_card","type":"string"}},{"name":"productId","required":false,"in":"query","description":"Filter by product in items","schema":{"example":"prod-001","type":"string"}},{"name":"fields","required":false,"in":"query","description":"Select specific fields (comma-separated)","schema":{"example":"id,orderId,status,pricing.total","type":"string"}}],"responses":{"200":{"description":"Paginated and filtered list of sales","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSaleResponseDto"}}}},"401":{"description":"Unauthorized"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/sales/{id}":{"get":{"operationId":"SalesController_findOne","summary":"Get sale by ID","description":"Returns a specific sale","parameters":[{"name":"id","required":true,"in":"path","description":"Sale ID","schema":{"example":"sale-001","type":"string"}}],"responses":{"200":{"description":"Sale found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Sale not found"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"put":{"operationId":"SalesController_update","summary":"Update sale (full)","description":"Replaces sale fields","parameters":[{"name":"id","required":true,"in":"path","description":"Sale ID","schema":{"example":"sale-001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSaleDto"}}}},"responses":{"200":{"description":"Sale updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Sale not found"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"patch":{"operationId":"SalesController_partialUpdate","summary":"Update sale (partial)","description":"Updates specific sale fields (e.g. status)","parameters":[{"name":"id","required":true,"in":"path","description":"Sale ID","schema":{"example":"sale-001","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSaleDto"}}}},"responses":{"200":{"description":"Sale updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleDto"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Sale not found"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]},"delete":{"operationId":"SalesController_remove","summary":"Delete sale","description":"Removes a sale from memory","parameters":[{"name":"id","required":true,"in":"path","description":"Sale ID","schema":{"example":"sale-001","type":"string"}}],"responses":{"200":{"description":"Sale deleted successfully"},"401":{"description":"Unauthorized"},"404":{"description":"Sale not found"}},"tags":["Sales"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/upload/single":{"post":{"operationId":"UploadController_uploadSingle","summary":"Upload single file","description":"Upload a single file and get a mock URL","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"File to upload"}},"required":["file"]}}}},"responses":{"201":{"description":"File uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"File uploaded successfully"},"file":{"type":"object","properties":{"id":{"type":"string","example":"f47ac10b-58cc-4372-a567-0e02b2c3d479"},"originalName":{"type":"string","example":"document.pdf"},"mimeType":{"type":"string","example":"application/pdf"},"size":{"type":"number","example":102400},"url":{"type":"string","example":"https://cdn.mockapi.local/uploads/f47ac10b-58cc-4372-a567-0e02b2c3d479/document.pdf"},"thumbnailUrl":{"type":"string","example":"https://cdn.mockapi.local/thumbnails/f47ac10b-58cc-4372-a567-0e02b2c3d479.jpg"},"uploadedAt":{"type":"string","example":"2024-01-22T10:30:00.000Z"}}}}}}}},"400":{"description":"No file provided"},"401":{"description":"Unauthorized"}},"tags":["Upload"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/upload/multiple":{"post":{"operationId":"UploadController_uploadMultiple","summary":"Upload multiple files","description":"Upload multiple files (max 10) and get mock URLs","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Files to upload (max 10)"}},"required":["files"]}}}},"responses":{"201":{"description":"Files uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Files uploaded successfully"},"totalFiles":{"type":"number","example":3},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"originalName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"url":{"type":"string"},"uploadedAt":{"type":"string"}}}}}}}}},"400":{"description":"No files provided"},"401":{"description":"Unauthorized"}},"tags":["Upload"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}},"/api/upload/image":{"post":{"operationId":"UploadController_uploadImage","summary":"Upload image","description":"Upload an image file with automatic thumbnail generation mock","parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"type":"string","format":"binary","description":"Image file to upload (jpg, png, gif, webp)"}},"required":["image"]}}}},"responses":{"201":{"description":"Image uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Image uploaded successfully"},"image":{"type":"object","properties":{"id":{"type":"string"},"originalName":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"url":{"type":"string"},"thumbnailUrl":{"type":"string"},"mediumUrl":{"type":"string"},"largeUrl":{"type":"string"},"uploadedAt":{"type":"string"}}}}}}}},"400":{"description":"No image provided or invalid image type"},"401":{"description":"Unauthorized"}},"tags":["Upload"],"security":[{"Basic-auth":[]},{"API-Key":[]},{"JWT-auth":[]}]}}},"info":{"title":"Mock API Server","description":"Mock API with OAuth 2.0, API Key and Basic Auth for integration testing","version":"1.0.0","contact":{"name":"Aldemi Tech","url":"https://aldemi.tech","email":"contact@aldemi.tech"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"tags":[{"name":"OAuth 2.0","description":"OAuth 2.0 authentication endpoints"},{"name":"Users","description":"User management (requires authentication)"},{"name":"Products","description":"Product management (requires authentication)"},{"name":"Sales","description":"Sales management (requires authentication)"},{"name":"Upload","description":"File upload endpoints (mock)"}],"servers":[],"components":{"securitySchemes":{"JWT-auth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"JWT token obtained from /oauth/token endpoint"},"API-Key":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API Key for authentication (e.g. api-key-123456)"},"Basic-auth":{"type":"http","scheme":"basic","description":"Credentials: admin:admin123 or user:user123"}},"schemas":{"AuthorizeResponseDto":{"type":"object","properties":{"code":{"type":"string","description":"Authorization code","example":"auth_code_abc123"},"state":{"type":"string","description":"State parameter for CSRF prevention"},"expires_in":{"type":"number","description":"Code expiration time in seconds","example":600}},"required":["code","expires_in"]},"TokenRequestDto":{"type":"object","properties":{"grant_type":{"type":"string","description":"OAuth grant type","enum":["client_credentials","password","refresh_token","authorization_code"],"example":"client_credentials"},"client_id":{"type":"string","description":"Client ID","example":"client123"},"client_secret":{"type":"string","description":"Client Secret","example":"secret123"},"username":{"type":"string","description":"Username (password grant only)","example":"admin"},"password":{"type":"string","description":"Password (password grant only)","example":"admin123"},"refresh_token":{"type":"string","description":"Refresh token (refresh_token grant only)"},"code":{"type":"string","description":"Authorization code (authorization_code grant only)"},"redirect_uri":{"type":"string","description":"Redirect URI (authorization_code grant only)","example":"http://localhost:8080/callback"},"scope":{"type":"string","description":"Requested scopes","example":"read write"}},"required":["grant_type","client_id","client_secret"]},"TokenResponseDto":{"type":"object","properties":{"access_token":{"type":"string","description":"JWT Access token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"token_type":{"type":"string","description":"Token type","example":"Bearer"},"expires_in":{"type":"number","description":"Expiration time in seconds","example":3600},"refresh_token":{"type":"string","description":"Refresh token to renew the access token"},"scope":{"type":"string","description":"Granted scopes","example":"read write"}},"required":["access_token","token_type","expires_in"]},"PaginationMetaDto":{"type":"object","properties":{"page":{"type":"number","example":1,"description":"Current page number"},"limit":{"type":"number","example":10,"description":"Number of items per page"},"total":{"type":"number","example":100,"description":"Total number of items"},"totalPages":{"type":"number","example":10,"description":"Total number of pages"},"hasNextPage":{"type":"boolean","example":true,"description":"Whether there is a next page"},"hasPrevPage":{"type":"boolean","example":false,"description":"Whether there is a previous page"}},"required":["page","limit","total","totalPages","hasNextPage","hasPrevPage"]},"PaginatedUserResponseDto":{"type":"object","properties":{"data":{"example":[{"id":"user-001","username":"johndoe","email":"john.doe@example.com","firstName":"John","lastName":"Doe","role":"admin","active":true,"createdAt":"2024-01-01T00:00:00.000Z","lastLogin":"2024-01-22T09:15:00.000Z"},{"id":"user-002","username":"janedoe","email":"jane.doe@example.com","firstName":"Jane","lastName":"Doe","role":"user","active":true,"createdAt":"2024-01-05T14:30:00.000Z","lastLogin":"2024-01-21T16:45:00.000Z"}],"description":"Array of users","type":"array","items":{"type":"string"}},"meta":{"$ref":"#/components/schemas/PaginationMetaDto"}},"required":["data","meta"]},"UserDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique user ID","example":"user-001"},"username":{"type":"string","description":"Username","example":"johndoe"},"email":{"type":"string","description":"User email","example":"john@example.com"},"firstName":{"type":"string","description":"First name","example":"John"},"lastName":{"type":"string","description":"Last name","example":"Doe"},"role":{"type":"string","description":"User role","enum":["admin","user","manager"],"example":"user"},"active":{"type":"boolean","description":"User active status","example":true},"createdAt":{"type":"string","description":"Creation date","example":"2024-01-15T10:30:00Z"}},"required":["id","username","email","firstName","lastName","role","active","createdAt"]},"CreateUserDto":{"type":"object","properties":{"username":{"type":"string","description":"Username","example":"newuser"},"email":{"type":"string","description":"User email","example":"newuser@example.com"},"firstName":{"type":"string","description":"First name","example":"Jane"},"lastName":{"type":"string","description":"Last name","example":"Smith"},"role":{"type":"string","description":"User role","enum":["admin","user","manager"],"default":"user"},"active":{"type":"boolean","description":"User active status","default":true}},"required":["username","email","firstName","lastName"]},"UpdateUserDto":{"type":"object","properties":{"username":{"type":"string","description":"Username","example":"updateduser"},"email":{"type":"string","description":"User email","example":"updated@example.com"},"firstName":{"type":"string","description":"First name","example":"Janet"},"lastName":{"type":"string","description":"Last name","example":"Smithson"},"role":{"type":"string","description":"User role","example":"admin"},"department":{"type":"string","description":"Department","example":"Engineering"},"phone":{"type":"string","description":"Phone number","example":"+1-555-0100"},"avatar":{"type":"string","description":"Avatar URL","example":"https://cdn.example.com/avatar.jpg"},"permissions":{"description":"User permissions","example":["read","write","delete"],"type":"array","items":{"type":"string"}},"preferences":{"type":"object","description":"User preferences","example":{"theme":"dark","language":"en"}},"address":{"type":"object","description":"User address","example":{"street":"123 Main St","city":"NYC","country":"USA"}},"socialLinks":{"type":"array","description":"Social links","example":[{"platform":"github","url":"https://github.com/user"}]},"active":{"type":"boolean","description":"User active status","example":true},"verified":{"type":"boolean","description":"Email verified","example":true},"twoFactorEnabled":{"type":"boolean","description":"Two factor enabled","example":false}}},"PaginatedProductResponseDto":{"type":"object","properties":{"data":{"example":[{"id":"prod-001","name":"MacBook Pro 16\"","description":"Apple M3 Pro chip, 18GB RAM, 512GB SSD","price":2499.99,"category":"Electronics","stock":45,"sku":"MBP16-M3-512","active":true,"createdAt":"2024-01-15T10:30:00.000Z","updatedAt":"2024-01-20T15:45:00.000Z"},{"id":"prod-002","name":"iPhone 15 Pro","description":"A17 Pro chip, 256GB, Titanium","price":1199.99,"category":"Electronics","stock":120,"sku":"IP15P-256-TI","active":true,"createdAt":"2024-01-10T08:00:00.000Z","updatedAt":"2024-01-18T12:30:00.000Z"}],"description":"Array of products","type":"array","items":{"type":"string"}},"meta":{"$ref":"#/components/schemas/PaginationMetaDto"}},"required":["data","meta"]},"ProductDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique product ID","example":"prod-001"},"name":{"type":"string","description":"Product name","example":"Laptop Pro 15"},"description":{"type":"string","description":"Product description","example":"High performance laptop with 15 inch display"},"category":{"type":"string","description":"Product category","example":"Electronics"},"price":{"type":"number","description":"Product price","example":1299.99},"currency":{"type":"string","description":"Currency","example":"USD"},"stock":{"type":"number","description":"Available stock","example":50},"sku":{"type":"string","description":"Product SKU","example":"LAP-PRO-15-001"},"brand":{"type":"string","description":"Product brand","example":"TechBrand"},"imageUrl":{"type":"string","description":"Image URL","example":"https://example.com/images/laptop.jpg"},"rating":{"type":"number","description":"Average rating","example":4.5},"reviews":{"type":"number","description":"Number of reviews","example":120},"active":{"type":"boolean","description":"Product active status","example":true},"createdAt":{"type":"string","description":"Creation date","example":"2024-01-15T10:30:00Z"},"updatedAt":{"type":"string","description":"Last update date","example":"2024-01-20T15:45:00Z"}},"required":["id","name","description","category","price","currency","stock","sku","brand","imageUrl","rating","reviews","active","createdAt","updatedAt"]},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","description":"Product name","example":"Gaming Laptop X1"},"description":{"type":"string","description":"Product description","example":"High-end gaming laptop with RTX 4080"},"category":{"type":"string","description":"Product category","example":"Electronics"},"price":{"type":"number","description":"Product price","example":1999.99},"currency":{"type":"string","description":"Currency","example":"USD","default":"USD"},"stock":{"type":"number","description":"Available stock","example":25},"sku":{"type":"string","description":"Product SKU","example":"GAM-LAP-X1-001"},"brand":{"type":"string","description":"Product brand","example":"TechBrand"},"imageUrl":{"type":"string","description":"Image URL","example":"https://example.com/images/laptop.jpg"},"active":{"type":"boolean","description":"Product active status","default":true}},"required":["name","description","category","price","stock","brand"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string","description":"Product name","example":"Gaming Laptop X1 Pro"},"description":{"type":"string","description":"Product description","example":"Updated gaming laptop description"},"category":{"type":"string","description":"Product category","example":"Electronics"},"subcategory":{"type":"string","description":"Product subcategory","example":"Laptops"},"price":{"type":"number","description":"Product price","example":2199.99},"currency":{"type":"string","description":"Currency","example":"USD"},"stock":{"type":"number","description":"Available stock","example":30},"sku":{"type":"string","description":"Product SKU","example":"GAM-LAP-X1P-001"},"brand":{"type":"string","description":"Product brand","example":"TechBrand"},"tags":{"description":"Product tags","example":["gaming","premium","laptop"],"type":"array","items":{"type":"string"}},"specifications":{"type":"object","description":"Product specifications (any structure)","example":{"processor":"Intel i9","ram":"32GB"}},"images":{"type":"array","description":"Product images","example":[{"url":"https://example.com/img.jpg","alt":"Image","isPrimary":true}]},"variants":{"type":"array","description":"Product variants","example":[{"id":"v1","name":"Black","priceModifier":0}]},"rating":{"type":"number","description":"Product rating","example":4.5},"shipping":{"type":"object","description":"Shipping info","example":{"weight":2.5,"freeShipping":true}},"active":{"type":"boolean","description":"Product active status","example":true},"featured":{"type":"boolean","description":"Featured product","example":true}}},"PaginatedSaleResponseDto":{"type":"object","properties":{"data":{"example":[{"id":"sale-001","customerId":"user-001","customerEmail":"john.doe@example.com","items":[{"productId":"prod-001","productName":"MacBook Pro 16\"","quantity":1,"unitPrice":2499.99,"total":2499.99}],"subtotal":2499.99,"tax":250,"shipping":15,"total":2764.99,"status":"completed","paymentMethod":"credit_card","shippingAddress":{"street":"123 Main St","city":"San Francisco","state":"CA","zipCode":"94102","country":"USA"},"createdAt":"2024-01-20T14:30:00.000Z","updatedAt":"2024-01-20T14:30:00.000Z"}],"description":"Array of sales","type":"array","items":{"type":"string"}},"meta":{"$ref":"#/components/schemas/PaginationMetaDto"}},"required":["data","meta"]},"SaleItemDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID","example":"prod-001"},"productName":{"type":"string","description":"Product name","example":"Laptop Pro 15"},"quantity":{"type":"number","description":"Quantity","example":2},"unitPrice":{"type":"number","description":"Unit price","example":1299.99},"total":{"type":"number","description":"Item total","example":2599.98}},"required":["productId","productName","quantity","unitPrice","total"]},"ShippingAddressDto":{"type":"object","properties":{"street":{"type":"string","description":"Street","example":"123 Main Street"},"city":{"type":"string","description":"City","example":"New York"},"state":{"type":"string","description":"State/Province","example":"NY"},"zipCode":{"type":"string","description":"Zip code","example":"10001"},"country":{"type":"string","description":"Country","example":"USA"}},"required":["street","city","state","zipCode","country"]},"SaleDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique sale ID","example":"sale-001"},"orderId":{"type":"string","description":"Order ID","example":"ORD-2024-001"},"userId":{"type":"string","description":"User ID","example":"user-001"},"customerName":{"type":"string","description":"Customer name","example":"John Doe"},"customerEmail":{"type":"string","description":"Customer email","example":"john@example.com"},"status":{"type":"string","description":"Sale status","enum":["pending","processing","shipped","delivered","cancelled"],"example":"delivered"},"items":{"description":"Sale items","type":"array","items":{"$ref":"#/components/schemas/SaleItemDto"}},"subtotal":{"type":"number","description":"Subtotal","example":2599.98},"tax":{"type":"number","description":"Tax","example":233.99},"shipping":{"type":"number","description":"Shipping cost","example":15},"total":{"type":"number","description":"Sale total","example":2848.97},"currency":{"type":"string","description":"Currency","example":"USD"},"paymentMethod":{"type":"string","description":"Payment method","example":"credit_card"},"shippingAddress":{"description":"Shipping address","allOf":[{"$ref":"#/components/schemas/ShippingAddressDto"}]},"createdAt":{"type":"string","description":"Creation date","example":"2024-01-15T10:30:00Z"},"updatedAt":{"type":"string","description":"Last update date","example":"2024-01-20T15:45:00Z"}},"required":["id","orderId","userId","customerName","customerEmail","status","items","subtotal","tax","shipping","total","currency","paymentMethod","shippingAddress","createdAt","updatedAt"]},"SaleItemInputDto":{"type":"object","properties":{"productId":{"type":"string","description":"Product ID","example":"prod-001"},"productName":{"type":"string","description":"Product name","example":"Laptop Pro 15"},"quantity":{"type":"number","description":"Quantity","example":2},"unitPrice":{"type":"number","description":"Unit price","example":1299.99}},"required":["productId","productName","quantity","unitPrice"]},"ShippingAddressInputDto":{"type":"object","properties":{"street":{"type":"string","description":"Street","example":"456 Oak Avenue"},"city":{"type":"string","description":"City","example":"Los Angeles"},"state":{"type":"string","description":"State/Province","example":"CA"},"zipCode":{"type":"string","description":"Zip code","example":"90001"},"country":{"type":"string","description":"Country","example":"USA"}},"required":["street","city","state","zipCode","country"]},"CreateSaleDto":{"type":"object","properties":{"userId":{"type":"string","description":"User ID","example":"user-001"},"customerName":{"type":"string","description":"Customer name","example":"John Doe"},"customerEmail":{"type":"string","description":"Customer email","example":"john@example.com"},"items":{"description":"Sale items","type":"array","items":{"$ref":"#/components/schemas/SaleItemInputDto"}},"paymentMethod":{"type":"string","description":"Payment method","example":"credit_card","default":"credit_card"},"shippingAddress":{"description":"Shipping address","allOf":[{"$ref":"#/components/schemas/ShippingAddressInputDto"}]},"currency":{"type":"string","description":"Currency","example":"USD","default":"USD"}},"required":["userId","customerName","customerEmail","items","shippingAddress"]},"UpdateSaleDto":{"type":"object","properties":{"status":{"type":"string","description":"Sale status","example":"shipped"},"paymentMethod":{"type":"string","description":"Payment method","example":"paypal"},"customerInfo":{"type":"object","description":"Customer info","example":{"name":"John Doe","email":"john@example.com","phone":"+1-555-0123"}},"items":{"type":"array","description":"Order items","example":[{"productId":"prod-001","quantity":2,"unitPrice":99.99}]},"pricing":{"type":"object","description":"Pricing details","example":{"subtotal":199.98,"tax":{"rate":0.1,"amount":19.99},"shipping":10,"total":229.97}},"paymentDetails":{"type":"object","description":"Payment details","example":{"cardLast4":"4242","cardBrand":"visa"}},"shippingAddress":{"type":"object","description":"Shipping address","example":{"street":"123 Main St","city":"NYC","country":"USA"}},"billingAddress":{"type":"object","description":"Billing address","example":{"street":"123 Main St","city":"NYC","country":"USA"}},"tracking":{"type":"object","description":"Tracking info","example":{"carrier":"FedEx","trackingNumber":"FDX123456"}},"notes":{"type":"string","description":"Order notes","example":"Gift wrap requested"},"tags":{"description":"Order tags","example":["priority","gift"],"type":"array","items":{"type":"string"}},"currency":{"type":"string","description":"Currency","example":"USD"}}}}}}