@aifabrix/miso-client 3.4.2 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/CHANGELOG.md +306 -12
  2. package/dist/api/auth-cache.api.d.ts.map +1 -1
  3. package/dist/api/auth-cache.api.js +27 -5
  4. package/dist/api/auth-cache.api.js.map +1 -1
  5. package/dist/api/auth-login.api.d.ts.map +1 -1
  6. package/dist/api/auth-login.api.js +49 -6
  7. package/dist/api/auth-login.api.js.map +1 -1
  8. package/dist/api/auth-token.api.d.ts.map +1 -1
  9. package/dist/api/auth-token.api.js +99 -7
  10. package/dist/api/auth-token.api.js.map +1 -1
  11. package/dist/api/auth-user.api.d.ts.map +1 -1
  12. package/dist/api/auth-user.api.js +22 -4
  13. package/dist/api/auth-user.api.js.map +1 -1
  14. package/dist/api/auth.api.d.ts +2 -9
  15. package/dist/api/auth.api.d.ts.map +1 -1
  16. package/dist/api/auth.api.js +1 -66
  17. package/dist/api/auth.api.js.map +1 -1
  18. package/dist/api/logs-create.api.d.ts.map +1 -1
  19. package/dist/api/logs-create.api.js +57 -4
  20. package/dist/api/logs-create.api.js.map +1 -1
  21. package/dist/api/logs-export.api.d.ts.map +1 -1
  22. package/dist/api/logs-export.api.js +7 -1
  23. package/dist/api/logs-export.api.js.map +1 -1
  24. package/dist/api/logs-list.api.d.ts.map +1 -1
  25. package/dist/api/logs-list.api.js +32 -6
  26. package/dist/api/logs-list.api.js.map +1 -1
  27. package/dist/api/logs-stats.api.d.ts.map +1 -1
  28. package/dist/api/logs-stats.api.js +22 -4
  29. package/dist/api/logs-stats.api.js.map +1 -1
  30. package/dist/api/permissions.api.d.ts +2 -1
  31. package/dist/api/permissions.api.d.ts.map +1 -1
  32. package/dist/api/permissions.api.js +16 -5
  33. package/dist/api/permissions.api.js.map +1 -1
  34. package/dist/api/roles.api.d.ts +2 -1
  35. package/dist/api/roles.api.d.ts.map +1 -1
  36. package/dist/api/roles.api.js +16 -5
  37. package/dist/api/roles.api.js.map +1 -1
  38. package/dist/api/types/logs.types.d.ts +44 -7
  39. package/dist/api/types/logs.types.d.ts.map +1 -1
  40. package/dist/express/client-token-endpoint.d.ts.map +1 -1
  41. package/dist/express/client-token-endpoint.js +42 -5
  42. package/dist/express/client-token-endpoint.js.map +1 -1
  43. package/dist/express/error-handler.d.ts.map +1 -1
  44. package/dist/express/error-handler.js +32 -8
  45. package/dist/express/error-handler.js.map +1 -1
  46. package/dist/express/index.d.ts +1 -0
  47. package/dist/express/index.d.ts.map +1 -1
  48. package/dist/express/index.js +4 -1
  49. package/dist/express/index.js.map +1 -1
  50. package/dist/express/logger-context.middleware.d.ts +46 -0
  51. package/dist/express/logger-context.middleware.d.ts.map +1 -0
  52. package/dist/express/logger-context.middleware.js +99 -0
  53. package/dist/express/logger-context.middleware.js.map +1 -0
  54. package/dist/index.d.ts +6 -3
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +16 -5
  57. package/dist/index.js.map +1 -1
  58. package/dist/services/auth.service.d.ts.map +1 -1
  59. package/dist/services/auth.service.js +97 -8
  60. package/dist/services/auth.service.js.map +1 -1
  61. package/dist/services/browser-permission.service.d.ts +5 -0
  62. package/dist/services/browser-permission.service.d.ts.map +1 -1
  63. package/dist/services/browser-permission.service.js +39 -2
  64. package/dist/services/browser-permission.service.js.map +1 -1
  65. package/dist/services/browser-role.service.d.ts +5 -0
  66. package/dist/services/browser-role.service.d.ts.map +1 -1
  67. package/dist/services/browser-role.service.js +45 -2
  68. package/dist/services/browser-role.service.js.map +1 -1
  69. package/dist/services/logger/index.d.ts +10 -0
  70. package/dist/services/logger/index.d.ts.map +1 -0
  71. package/dist/services/logger/index.js +22 -0
  72. package/dist/services/logger/index.js.map +1 -0
  73. package/dist/services/logger/logger-chain.d.ts +90 -0
  74. package/dist/services/logger/logger-chain.d.ts.map +1 -0
  75. package/dist/services/logger/logger-chain.js +169 -0
  76. package/dist/services/logger/logger-chain.js.map +1 -0
  77. package/dist/services/logger/logger-context-storage.d.ts +73 -0
  78. package/dist/services/logger/logger-context-storage.d.ts.map +1 -0
  79. package/dist/services/logger/logger-context-storage.js +86 -0
  80. package/dist/services/logger/logger-context-storage.js.map +1 -0
  81. package/dist/services/logger/logger-context.d.ts +85 -0
  82. package/dist/services/logger/logger-context.d.ts.map +1 -0
  83. package/dist/services/logger/logger-context.js +192 -0
  84. package/dist/services/logger/logger-context.js.map +1 -0
  85. package/dist/services/{logger.service.d.ts → logger/logger.service.d.ts} +59 -72
  86. package/dist/services/logger/logger.service.d.ts.map +1 -0
  87. package/dist/services/logger/logger.service.js +403 -0
  88. package/dist/services/logger/logger.service.js.map +1 -0
  89. package/dist/services/logger/unified-logger.factory.d.ts +87 -0
  90. package/dist/services/logger/unified-logger.factory.d.ts.map +1 -0
  91. package/dist/services/logger/unified-logger.factory.js +120 -0
  92. package/dist/services/logger/unified-logger.factory.js.map +1 -0
  93. package/dist/services/logger/unified-logger.service.d.ts +89 -0
  94. package/dist/services/logger/unified-logger.service.d.ts.map +1 -0
  95. package/dist/services/logger/unified-logger.service.js +178 -0
  96. package/dist/services/logger/unified-logger.service.js.map +1 -0
  97. package/dist/services/permission.service.d.ts +5 -0
  98. package/dist/services/permission.service.d.ts.map +1 -1
  99. package/dist/services/permission.service.js +42 -2
  100. package/dist/services/permission.service.js.map +1 -1
  101. package/dist/services/redis.service.d.ts.map +1 -1
  102. package/dist/services/redis.service.js +2 -0
  103. package/dist/services/redis.service.js.map +1 -1
  104. package/dist/services/role.service.d.ts +5 -0
  105. package/dist/services/role.service.d.ts.map +1 -1
  106. package/dist/services/role.service.js +42 -2
  107. package/dist/services/role.service.js.map +1 -1
  108. package/dist/types/config.types.d.ts +1 -0
  109. package/dist/types/config.types.d.ts.map +1 -1
  110. package/dist/types/config.types.js.map +1 -1
  111. package/dist/types/filter.types.d.ts +6 -6
  112. package/dist/types/filter.types.d.ts.map +1 -1
  113. package/dist/types/filter.types.js +14 -5
  114. package/dist/types/filter.types.js.map +1 -1
  115. package/dist/utils/config-loader.d.ts.map +1 -1
  116. package/dist/utils/config-loader.js +10 -0
  117. package/dist/utils/config-loader.js.map +1 -1
  118. package/dist/utils/console-logger.d.ts +21 -0
  119. package/dist/utils/console-logger.d.ts.map +1 -0
  120. package/dist/utils/console-logger.js +58 -0
  121. package/dist/utils/console-logger.js.map +1 -0
  122. package/dist/utils/controller-url-resolver.d.ts.map +1 -1
  123. package/dist/utils/controller-url-resolver.js +5 -0
  124. package/dist/utils/controller-url-resolver.js.map +1 -1
  125. package/dist/utils/data-client-auth.d.ts.map +1 -1
  126. package/dist/utils/data-client-auth.js +34 -2
  127. package/dist/utils/data-client-auth.js.map +1 -1
  128. package/dist/utils/data-client-auto-init.d.ts.map +1 -1
  129. package/dist/utils/data-client-auto-init.js +59 -3
  130. package/dist/utils/data-client-auto-init.js.map +1 -1
  131. package/dist/utils/data-client-request.d.ts.map +1 -1
  132. package/dist/utils/data-client-request.js +78 -2
  133. package/dist/utils/data-client-request.js.map +1 -1
  134. package/dist/utils/data-client.d.ts.map +1 -1
  135. package/dist/utils/data-client.js +25 -19
  136. package/dist/utils/data-client.js.map +1 -1
  137. package/dist/utils/environment-token.d.ts.map +1 -1
  138. package/dist/utils/environment-token.js +37 -57
  139. package/dist/utils/environment-token.js.map +1 -1
  140. package/dist/utils/error-extractor.d.ts +52 -0
  141. package/dist/utils/error-extractor.d.ts.map +1 -0
  142. package/dist/utils/error-extractor.js +136 -0
  143. package/dist/utils/error-extractor.js.map +1 -0
  144. package/dist/utils/filter.utils.d.ts +115 -3
  145. package/dist/utils/filter.utils.d.ts.map +1 -1
  146. package/dist/utils/filter.utils.js +298 -27
  147. package/dist/utils/filter.utils.js.map +1 -1
  148. package/dist/utils/http-client-audit.d.ts +1 -1
  149. package/dist/utils/http-client-audit.d.ts.map +1 -1
  150. package/dist/utils/http-client.d.ts +1 -1
  151. package/dist/utils/http-client.d.ts.map +1 -1
  152. package/dist/utils/internal-http-client.d.ts +12 -0
  153. package/dist/utils/internal-http-client.d.ts.map +1 -1
  154. package/dist/utils/internal-http-client.js +235 -11
  155. package/dist/utils/internal-http-client.js.map +1 -1
  156. package/dist/utils/response-validator.d.ts +59 -0
  157. package/dist/utils/response-validator.d.ts.map +1 -0
  158. package/dist/utils/response-validator.js +115 -0
  159. package/dist/utils/response-validator.js.map +1 -0
  160. package/dist/utils/token-utils.d.ts.map +1 -1
  161. package/dist/utils/token-utils.js +75 -4
  162. package/dist/utils/token-utils.js.map +1 -1
  163. package/package.json +2 -1
  164. package/dist/services/logger.service.d.ts.map +0 -1
  165. package/dist/services/logger.service.js +0 -488
  166. package/dist/services/logger.service.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,24 +5,318 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [3.4.2] - 2025-12-30
8
+ ## [3.8.0] - 2026-01-10
9
+
10
+ ### Added
11
+
12
+ - **Unified Logging Interface**: New minimal API with automatic context extraction
13
+ - `getLogger()` factory function for automatic context detection from AsyncLocalStorage
14
+ - `setLoggerContext()` and `clearLoggerContext()` for manual context management
15
+ - `loggerContextMiddleware` Express middleware helper for automatic request context extraction
16
+ - AsyncLocalStorage-based context propagation across async boundaries
17
+ - Simplified API: `logger.info(message)`, `logger.error(message, error?)`, `logger.audit(action, resource, entityId?, oldValues?, newValues?)`
18
+ - Automatic context extraction from AsyncLocalStorage (set by Express middleware or manually)
19
+ - Works seamlessly in Express routes, service layers, and background jobs
20
+ - Zero configuration required when middleware is used
21
+
22
+ ### Documentation
23
+
24
+ - Added unified logging examples and guides (`docs/examples/unified-logging.md`)
25
+ - Updated Express middleware examples with unified logging pattern
26
+ - Added background job logging examples with unified interface
27
+ - Comprehensive API reference for UnifiedLogger interface in `docs/reference-services.md`
28
+
29
+ ## [3.7.2] - 2026-01-10
30
+
31
+ ### Added
32
+
33
+ - **Comprehensive Integration Tests** - Full end-to-end integration tests for Auth and Logs API endpoints
34
+ - New `tests/integration/api-endpoints.integration.test.ts` with comprehensive endpoint coverage
35
+ - Tests all Auth and Logs endpoints against real controller using credentials from `.env`
36
+ - Validates endpoint paths, HTTP methods, request bodies, and response structures against OpenAPI specs
37
+ - Tests error cases (invalid tokens, missing params, etc.) with proper status code verification
38
+ - Gracefully skips tests if controller is unavailable (CI/CD friendly)
39
+ - New npm script `test:integration:api` for running integration tests
40
+
41
+ ### Changed
42
+
43
+ - **Logger Service Refactoring** - Improved code organization and maintainability
44
+ - Moved logger service to modular structure in `src/services/logger/` directory
45
+ - Split `LoggerService` into focused modules: `logger-chain.ts`, `logger-context.ts`, `logger.service.ts`
46
+ - New barrel export `src/services/logger/index.ts` for cleaner imports
47
+ - Maintains backward compatibility (no breaking changes to public API)
48
+
49
+ - **Error Handling Improvements** - Enhanced error handling across API layer
50
+ - Updated error handling in integration tests to gracefully skip unavailable controllers
51
+ - Improved error reporting and logging throughout API files
52
+ - Enhanced user information retrieval functionality
53
+
54
+ - **Code Quality Improvements** - Refactoring for better readability and maintainability
55
+ - Updated various components for improved logging and error reporting
56
+ - Enhanced API response handling and validation
57
+ - Improved code organization and structure
9
58
 
10
59
  ### Fixed
11
60
 
12
- - **Circuit breaker race conditions** - Improved atomic storage of pending requests to prevent race conditions
13
- - Fixed race condition where multiple concurrent requests could bypass deduplication
14
- - Enhanced promise storage to ensure atomic operations when checking and storing pending requests
15
- - Improved cleanup of pending requests to prevent memory leaks
61
+ - **Linting Issues** - Fixed ESLint errors in internal HTTP client
62
+ - Converted `require()` statements to use ESLint disable comments for Node.js-only code
63
+ - Fixed `@typescript-eslint/no-var-requires` errors in `src/utils/internal-http-client.ts`
64
+
65
+ ### Technical
66
+
67
+ - **New test infrastructure**:
68
+ - Comprehensive integration test suite (`tests/integration/api-endpoints.integration.test.ts` - 554 lines)
69
+ - New npm script: `test:integration:api` for running integration tests
70
+ - Enhanced validation plans and summaries for API calls
71
+
72
+ - **Code organization**:
73
+ - Logger service modularized into `src/services/logger/` directory structure
74
+ - Improved separation of concerns with focused modules
75
+ - Better code maintainability and testability
76
+
77
+ - **Documentation**:
78
+ - Added endpoint validation summary documentation
79
+ - Updated validation plans for API calls
80
+
81
+ ## [3.7.1] - 2026-01-09
82
+
83
+ ### Added
84
+
85
+ - **Enhanced Error Logging with Correlation IDs** - Comprehensive error logging system with structured error extraction
86
+ - New `extractErrorInfo()` utility in `src/utils/error-extractor.ts` for structured error information extraction
87
+ - New `logErrorWithContext()` utility in `src/utils/console-logger.ts` for enhanced console logging with correlation ID prefixes
88
+ - Supports all error types: `MisoClientError`, `ApiError`, `AuthenticationError`, `NetworkError`, `TimeoutError`, and generic `Error`
89
+ - Automatic correlation ID extraction from error responses or auto-generation when missing
90
+ - Enhanced error context includes endpoint, method, status codes, response bodies, and stack traces
91
+ - All API files updated with structured error logging (11 API files enhanced)
92
+ - DataClient and Express error handlers updated with enhanced logging
93
+
94
+ - **Logger Service Getter Methods** - Public methods for external logger integration
95
+ - New `getLogWithRequest()` method - Extracts IP, method, path, userAgent, correlationId, userId from Express Request
96
+ - New `getWithContext()` method - Returns LogEntry with provided context and auto-generated correlation ID
97
+ - New `getWithToken()` method - Extracts userId, sessionId, applicationId from JWT token
98
+ - New `getForRequest()` method - Alias for `getLogWithRequest()` for consistency
99
+ - All methods return complete `LogEntry` objects for integration with external logger tables
100
+ - `generateCorrelationId()` method made public for consistent correlation ID generation
101
+
102
+ - **Unified JSON Filter Model** - Standardized JSON format for all filter representations
103
+ - New filter operators: `isNull` and `isNotNull` for null/undefined checks
104
+ - JSON format parser supports multiple input formats: direct object, JSON string, URL-encoded JSON, array of filters
105
+ - Operator normalization (e.g., `equals` → `eq`, `>` → `gt`)
106
+ - Comprehensive validation with clear error messages and examples
107
+ - Filter conversion utilities: `filterQueryToJson()` and `jsonToFilterQuery()`
108
+ - Query string builder outputs URL-encoded JSON format
109
+ - Local filtering supports null checks with `isNull` and `isNotNull` operators
110
+
111
+ - **Server Code Improvements** - Enhanced Express server error handling and logging
112
+ - Replaced all `console.log/error/warn` with MisoClient logger service
113
+ - All route handlers wrapped with `asyncHandler()` wrapper for automatic error handling
114
+ - Error middleware uses `handleRouteError()` from SDK for RFC 7807 compliance
115
+ - Error logger configured with MisoClient logger via `setErrorLogger()`
116
+ - All business logic errors use `AppError` for consistent error formatting
117
+ - Automatic correlation ID extraction and error logging with full context
118
+
119
+ - **Frontend Code Improvements** - Enhanced React application error handling and code quality
120
+ - Centralized error handling utilities (`src/utils/error-handler.ts`)
121
+ - Centralized type definitions (`src/types/errors.ts`, `src/types/api.ts`)
122
+ - Input validation utilities (`src/utils/validation.ts`) for role names, permission names, endpoints
123
+ - Component refactoring: ApiTestingPage reduced from 589 to 79 lines (87% reduction)
124
+ - New custom hooks: `useApiTesting` for API testing logic, `useLoadingState` for loading state management
125
+ - Improved DataClientContext with retry logic and exponential backoff
126
+ - Simplified ErrorDetailsDialog component (115 lines, reduced from 193)
127
+
128
+ - **Comprehensive Integration Tests** - Real integration tests for all auth and logs endpoints
129
+ - New `tests/integration/api-endpoints.integration.test.ts` with comprehensive endpoint coverage
130
+ - Tests all 24 auth endpoints against real controller using credentials from `.env`
131
+ - Tests all 15 logs endpoints with proper request/response validation
132
+ - Validates endpoint paths, HTTP methods, request bodies, and response structures against OpenAPI specs
133
+ - Tests error cases (invalid tokens, missing params, etc.) with proper status code verification
134
+ - Gracefully skips tests if controller is unavailable (CI/CD friendly)
135
+ - New npm script `test:integration:api` for running integration tests
136
+
137
+ - **Logger Service Refactoring** - Improved code organization and maintainability
138
+ - Split `LoggerService` into modular structure following API layer pattern
139
+ - New `src/services/logger/logger-chain.ts` - LoggerChain class for method chaining
140
+ - New `src/services/logger/logger-context.ts` - Context extraction utilities (JWT, metadata, request)
141
+ - New `src/services/logger/index.ts` - Barrel export for logger modules
142
+ - Reduced main `logger.service.ts` from 866 lines to under 500 lines (code size compliance)
143
+ - Maintains backward compatibility (no breaking changes to public API)
16
144
 
17
145
  ### Changed
18
146
 
19
- - **Circuit breaker enhancements** - Enhanced failure handling with exponential backoff for all HTTP methods
20
- - Extended circuit breaker pattern to work for all HTTP methods (previously only GET requests)
21
- - Implemented exponential backoff based on failure count: 5 seconds (first failure), 15 seconds (second failure), 30 seconds (third+ failures)
22
- - Increased cooldown period from fixed 2 seconds to dynamic exponential backoff to prevent retry storms
23
- - Added failure count tracking to enable progressive backoff
24
- - Extended cleanup timeout from 2 seconds to 30 seconds to match maximum cooldown period
25
- - Prevents React Query and other retry mechanisms from hammering the server during failures
147
+ - **Error Logging** - Enhanced error logging across all API layer files
148
+ - All API files now use `extractErrorInfo()` and `logErrorWithContext()` for structured error logging
149
+ - Error logs include correlation ID prefixes: `[MisoClient] [correlation-id] Error details`
150
+ - Authentication errors have special handling with detailed context (authFlow: 'token_validation_failed')
151
+ - Enhanced audit logs include structured error info (errorType, errorCategory, httpStatusCategory)
152
+
153
+ - **Filter Parsing** - Unified JSON format replaces colon-separated format
154
+ - Filter parser now accepts JSON format only: `{"field": {"op": value}}`
155
+ - Supports 12 operators: `eq`, `neq`, `in`, `nin`, `gt`, `lt`, `gte`, `lte`, `contains`, `like`, `isNull`, `isNotNull`
156
+ - FilterBuilder outputs JSON format (URL-encoded) in query strings
157
+ - Comprehensive validation with helpful error messages including examples
158
+
159
+ - **Server Error Handling** - Standardized error handling patterns
160
+ - All route handlers use `asyncHandler()` wrapper (no manual try-catch needed)
161
+ - All errors automatically formatted as RFC 7807 Problem Details
162
+ - Error logger uses MisoClient logger with `forRequest()` for automatic context extraction
163
+ - Consistent error responses across all routes with correlation IDs
164
+
165
+ - **Frontend Error Handling** - Centralized error handling patterns
166
+ - All components use shared error handling utilities
167
+ - RFC 7807 compliant error parsing with `parseError()` utility
168
+ - Consistent error message extraction with `getErrorMessage()` and `getErrorStatus()`
169
+ - Input validation integrated into authorization testing hooks
170
+
171
+ - **API Layer Cleanup** - Removed duplicate code and improved code quality
172
+ - Removed duplicate roles/permissions methods from `AuthApi` class
173
+ - Removed `getRoles()`, `refreshRoles()`, `getPermissions()`, `refreshPermissions()` from `AuthApi`
174
+ - Services now use dedicated `RolesApi` and `PermissionsApi` classes (DRY principle)
175
+ - Removed unused endpoint constants and type imports from `AuthApi`
176
+ - Updated class JSDoc to reflect removed methods
177
+
178
+ - **Error Handling Improvements** - Fixed duplicate throw statements across API layer
179
+ - Removed duplicate `throw error;` statements from `auth.api.ts`, `roles.api.ts`, `permissions.api.ts`
180
+ - Fixed duplicate throws in `logs-create.api.ts` and `logs-list.api.ts`
181
+ - Improved error handling consistency across all API files
182
+
183
+ ### Fixed
184
+
185
+ - **Server Error Handling** - Fixed logic bug in server.ts (dead code removed)
186
+ - **Server Logging** - Fixed inconsistent logging format (now uses MisoClient logger)
187
+ - **Server Error Responses** - Fixed non-RFC 7807 error responses (now uses `handleRouteError()`)
188
+ - **Frontend Component Size** - Fixed large component files exceeding 500-line limit
189
+ - ApiTestingPage: 589 → 79 lines (87% reduction)
190
+ - ConfigurationPage: 382 → 283 lines (26% reduction)
191
+ - **Frontend Error Handling** - Fixed duplicate error handling logic across components
192
+ - **Frontend Type Safety** - Fixed loose error typing with centralized type definitions
193
+ - **Code Size Compliance** - Fixed logger service file size violation
194
+ - Refactored `LoggerService` from 866 lines to under 500 lines
195
+ - Split into focused modules: logger-chain.ts, logger-context.ts, index.ts
196
+ - Maintains all functionality while improving maintainability
197
+ - **API Endpoint Validation** - Validated all endpoints against OpenAPI specifications
198
+ - Verified all 24 auth endpoints match OpenAPI spec paths and HTTP methods
199
+ - Verified all 15 logs endpoints match OpenAPI spec with proper request/response structures
200
+ - Confirmed audit logs include required fields (entityType, entityId, action) in data object
201
+ - Validated client token endpoints use correct paths (`/api/v1/auth/token` for legacy, `/api/v1/auth/client-token` for frontend)
202
+
203
+ ### Technical
204
+
205
+ - **New utility files**:
206
+ - `src/utils/error-extractor.ts` - Error extraction utility (172 lines)
207
+ - `src/utils/console-logger.ts` - Enhanced console logger (72 lines)
208
+ - `src/utils/error-handler.ts` - Frontend error handling utilities (175 lines)
209
+ - `src/utils/validation.ts` - Frontend input validation utilities (139 lines)
210
+ - `src/types/errors.ts` - Frontend error type definitions (25 lines)
211
+ - `src/types/api.ts` - Frontend API type definitions (63 lines)
212
+
213
+ - **Test coverage**:
214
+ - Error extraction utility: 18 tests (`tests/unit/utils/error-extractor.test.ts`)
215
+ - Console logger utility: 12 tests (`tests/unit/utils/console-logger.test.ts`)
216
+ - Logger getter methods: 31 tests (`tests/unit/services/logger-getter-methods.test.ts`)
217
+ - Filter utilities: 68 tests (`tests/unit/filter.utils.test.ts`)
218
+ - Frontend error handler: 21 tests (`server/frontend/src/utils/__tests__/error-handler.test.ts`)
219
+ - Frontend validation: 43 tests (`server/frontend/src/utils/__tests__/validation.test.ts`)
220
+ - Integration tests: Comprehensive tests for all 39 endpoints (`tests/integration/api-endpoints.integration.test.ts`)
221
+ - Total: 193+ new tests added, all passing
222
+
223
+ - **New logger module structure**:
224
+ - `src/services/logger/logger-chain.ts` - LoggerChain class (method chaining support)
225
+ - `src/services/logger/logger-context.ts` - Context extraction utilities
226
+ - `src/services/logger/index.ts` - Barrel export
227
+ - `src/services/logger.service.ts` - Core LoggerService class (reduced to <500 lines)
228
+
229
+ - **Code quality**:
230
+ - All new utilities follow camelCase naming convention
231
+ - All public methods have JSDoc comments with parameter types, return types, and examples
232
+ - File sizes within limits (all files ≤500 lines)
233
+ - Method sizes within limits (all methods ≤30 lines)
234
+ - Zero linting errors or warnings
235
+ - Proper error handling with try-catch for all async operations
236
+ - Removed duplicate code (roles/permissions methods from AuthApi)
237
+ - Fixed duplicate throw statements across API layer
238
+ - All endpoints validated against OpenAPI specs
239
+
240
+ - **Documentation**:
241
+ - Updated `docs/reference-services.md` with logger getter methods documentation
242
+ - Updated `docs/reference-utilities.md` with filter JSON format examples
243
+ - Updated `server/README.md` with factory function pattern and error logger configuration
244
+ - Updated `docs/examples/express-middleware.md` with error logger configuration examples
245
+ - Updated `AuthApi` class JSDoc to remove references to removed methods
246
+ - Added integration test documentation explaining test structure and requirements
247
+
248
+ ## [3.6.0] - 2024-12-31
249
+
250
+ ### Added
251
+
252
+ - **API Response Validation** - Runtime validation for API response structures
253
+ - New `validateSuccessResponse<T>()` type guard for standard success responses
254
+ - New `validatePaginatedResponse<T>()` type guard for paginated responses
255
+ - New `validateErrorResponse()` type guard for error responses (re-exports existing validation)
256
+ - New `getResponseType()` utility to determine response type (success, paginated, error)
257
+ - Response validation utilities in `src/utils/response-validator.ts` with comprehensive type guards
258
+ - All validation functions use TypeScript type guards for proper type narrowing
259
+ - Detailed validation error messages for debugging response structure mismatches
260
+
261
+ - **Response Validation Configuration** - Configurable validation control
262
+ - New `validateResponses?: boolean` configuration option in `MisoClientConfig`
263
+ - Environment variable support: `MISO_VALIDATE_RESPONSES` (defaults to `true` in development, `false` in production)
264
+ - Validation is opt-in and backward compatible (doesn't break existing code)
265
+ - Non-breaking validation failures (logs warnings instead of throwing errors)
266
+
267
+ ### Changed
268
+
269
+ - **HTTP Client Response Validation** - Enhanced HTTP client with response structure validation
270
+ - `InternalHttpClient` now validates all API responses when `validateResponses` is enabled
271
+ - All HTTP methods (`get`, `post`, `put`, `delete`, `request`, `authenticatedRequest`) validate responses
272
+ - Validation checks for standard success response format: `{ success: boolean, data?: T, message?: string, timestamp: string }`
273
+ - Validation checks for paginated response format: `{ data: T[], meta: {...}, links: {...} }`
274
+ - Validation handles both nested and flat response formats (backward compatibility)
275
+ - Validation failures log warnings with endpoint URL, expected structure, and actual response
276
+ - Graceful error handling - validation failures don't break existing functionality
277
+
278
+ ### Fixed
279
+
280
+ - **Circuit breaker priority** - Fixed critical ordering issue where circuit breaker check now occurs before cache check
281
+ - Circuit breaker check moved before cache and pending request checks to prevent requests to failing endpoints
282
+ - Ensures failed endpoints are blocked even if cache is cleared, preventing unnecessary API calls during failures
283
+ - Improved error consistency by using `throw` instead of `Promise.reject()` for circuit breaker errors
284
+
285
+ - **Cache key generation** - Fixed cache key generation to ensure HTTP method is always included
286
+ - Cache key now explicitly includes HTTP method from method parameter to ensure consistency
287
+ - Prevents potential cache key collisions when method might be undefined in options
288
+ - Ensures proper cache key generation for all HTTP methods (GET, POST, PUT, DELETE, etc.)
289
+
290
+ ### Technical
291
+
292
+ - **New utility file**: `src/utils/response-validator.ts` - Response validation utilities (174 lines)
293
+ - Type guard functions for runtime type checking
294
+ - Support for success, paginated, and error response formats
295
+ - Comprehensive JSDoc documentation for all public functions
296
+ - Proper TypeScript type narrowing with type guards
297
+
298
+ - **Test coverage**:
299
+ - Comprehensive tests in `tests/unit/utils/response-validator.test.ts` (413 lines)
300
+ - 36 test cases covering valid/invalid responses, edge cases, and backward compatibility
301
+ - Test coverage: **96.53%** (exceeds ≥80% requirement)
302
+ - Statements: 96.53% (167/173)
303
+ - Branches: 91.83% (45/49)
304
+ - Functions: 100% (4/4)
305
+ - Lines: 96.53% (167/173)
306
+ - All tests passing with execution time < 0.5 seconds
307
+
308
+ - **Configuration updates**:
309
+ - Added `validateResponses?: boolean` to `MisoClientConfig` interface
310
+ - Added `MISO_VALIDATE_RESPONSES` environment variable support in config loader
311
+ - Defaults to `true` in development, `false` in production for performance
312
+
313
+ - **Code quality**:
314
+ - All validation functions follow camelCase naming convention
315
+ - All public functions have JSDoc comments with parameter types and return types
316
+ - File size: 174 lines (≤500 lines requirement met)
317
+ - Method sizes: ≤30 lines (≤20-30 lines requirement met)
318
+ - Zero linting errors or warnings
319
+ - Proper error handling with try-catch for all async operations
26
320
 
27
321
  ## [3.4.1] - 2025-12-30
28
322
 
@@ -1 +1 @@
1
- {"version":3,"file":"auth-cache.api.d.ts","sourceRoot":"","sources":["../../src/api/auth-cache.api.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,kBA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xB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAI5B;;;GAGG;AACH,qBAAa,YAAY;IAQX,OAAO,CAAC,UAAU;IAN9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;IAC1E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAoC;IACtF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAmC;IACpF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;IAC1E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAmC;gBAEhE,UAAU,EAAE,UAAU;IAE1C;;;;OAIG;IACG,aAAa,CACjB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAiC9B;;;;OAIG;IACG,mBAAmB,CACvB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,wBAAwB,CAAC;IAiCpC;;;;OAIG;IACG,kBAAkB,CACtB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,uBAAuB,CAAC;IAiCnC;;;;OAIG;IACG,UAAU,CACd,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAiC9B;;;;;OAKG;IACG,eAAe,CACnB,MAAM,EAAE,sBAAsB,EAC9B,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,uBAAuB,CAAC;CAkCpC"}
@@ -5,6 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AuthCacheApi = void 0;
8
+ const error_extractor_1 = require("../utils/error-extractor");
9
+ const console_logger_1 = require("../utils/console-logger");
8
10
  /**
9
11
  * Auth Cache API class
10
12
  * Handles cache-related endpoints
@@ -29,7 +31,11 @@ class AuthCacheApi {
29
31
  return await this.httpClient.request('GET', AuthCacheApi.CACHE_STATS_ENDPOINT);
30
32
  }
31
33
  catch (error) {
32
- console.error('Get cache stats API call failed:', error);
34
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
35
+ endpoint: AuthCacheApi.CACHE_STATS_ENDPOINT,
36
+ method: 'GET',
37
+ });
38
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthCacheApi]');
33
39
  throw error;
34
40
  }
35
41
  }
@@ -49,7 +55,11 @@ class AuthCacheApi {
49
55
  return await this.httpClient.request('GET', AuthCacheApi.CACHE_PERFORMANCE_ENDPOINT);
50
56
  }
51
57
  catch (error) {
52
- console.error('Get cache performance API call failed:', error);
58
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
59
+ endpoint: AuthCacheApi.CACHE_PERFORMANCE_ENDPOINT,
60
+ method: 'GET',
61
+ });
62
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthCacheApi]');
53
63
  throw error;
54
64
  }
55
65
  }
@@ -69,7 +79,11 @@ class AuthCacheApi {
69
79
  return await this.httpClient.request('GET', AuthCacheApi.CACHE_EFFICIENCY_ENDPOINT);
70
80
  }
71
81
  catch (error) {
72
- console.error('Get cache efficiency API call failed:', error);
82
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
83
+ endpoint: AuthCacheApi.CACHE_EFFICIENCY_ENDPOINT,
84
+ method: 'GET',
85
+ });
86
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthCacheApi]');
73
87
  throw error;
74
88
  }
75
89
  }
@@ -89,7 +103,11 @@ class AuthCacheApi {
89
103
  return await this.httpClient.request('POST', AuthCacheApi.CACHE_CLEAR_ENDPOINT);
90
104
  }
91
105
  catch (error) {
92
- console.error('Clear cache API call failed:', error);
106
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
107
+ endpoint: AuthCacheApi.CACHE_CLEAR_ENDPOINT,
108
+ method: 'POST',
109
+ });
110
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthCacheApi]');
93
111
  throw error;
94
112
  }
95
113
  }
@@ -110,7 +128,11 @@ class AuthCacheApi {
110
128
  return await this.httpClient.request('POST', AuthCacheApi.CACHE_INVALIDATE_ENDPOINT, params);
111
129
  }
112
130
  catch (error) {
113
- console.error('Invalidate cache API call failed:', error);
131
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
132
+ endpoint: AuthCacheApi.CACHE_INVALIDATE_ENDPOINT,
133
+ method: 'POST',
134
+ });
135
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthCacheApi]');
114
136
  throw error;
115
137
  }
116
138
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auth-cache.api.js","sourceRoot":"","sources":["../../src/api/auth-cache.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAaH;;;GAGG;AACH,MAAa,YAAY;IAQvB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9C;;;;OAIG;IACH,KAAK,CAAC,aAAa,CACjB,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,WAAW,EAAE,CAAC;gBAC9B,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAC/C,KAAK,EACL,YAAY,CAAC,oBAAoB,EACjC,YAAY,CAAC,WAAW,EACxB,SAAS,EACT,SAAS,EACT,YAAY,CACb,CAAC;YACJ,CAAC;YACD,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,KAAK,EACL,YAAY,CAAC,oBAAoB,EACjC,YAAY,CACb,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,KAAK,EACL,YAAY,CAAC,oBAAoB,CAClC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;YACzD,MA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C;IAiBnC;;;;OAIG;IACG,mBAAmB,CACvB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,mBAAmB,CAAC;CAwChC"}
@@ -5,6 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AuthLoginApi = void 0;
8
+ const console_logger_1 = require("../utils/console-logger");
9
+ const error_extractor_1 = require("../utils/error-extractor");
8
10
  /**
9
11
  * Auth Login API class
10
12
  * Handles login-related endpoints
@@ -27,7 +29,11 @@ class AuthLoginApi {
27
29
  return await this.httpClient.request('GET', AuthLoginApi.LOGIN_ENDPOINT, undefined, { params });
28
30
  }
29
31
  catch (error) {
30
- console.error('Login API call failed:', error);
32
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
33
+ endpoint: AuthLoginApi.LOGIN_ENDPOINT,
34
+ method: 'GET',
35
+ });
36
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthLoginApi]');
31
37
  throw error;
32
38
  }
33
39
  }
@@ -45,7 +51,11 @@ class AuthLoginApi {
45
51
  return await this.httpClient.request('POST', AuthLoginApi.LOGIN_ENDPOINT, params);
46
52
  }
47
53
  catch (error) {
48
- console.error('Initiate device code API call failed:', error);
54
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
55
+ endpoint: AuthLoginApi.LOGIN_ENDPOINT,
56
+ method: 'POST',
57
+ });
58
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthLoginApi]');
49
59
  throw error;
50
60
  }
51
61
  }
@@ -59,7 +69,11 @@ class AuthLoginApi {
59
69
  return await this.httpClient.request('POST', AuthLoginApi.DEVICE_CODE_TOKEN_ENDPOINT, params);
60
70
  }
61
71
  catch (error) {
62
- console.error('Poll device code token API call failed:', error);
72
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
73
+ endpoint: AuthLoginApi.DEVICE_CODE_TOKEN_ENDPOINT,
74
+ method: 'POST',
75
+ });
76
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthLoginApi]');
63
77
  throw error;
64
78
  }
65
79
  }
@@ -73,7 +87,11 @@ class AuthLoginApi {
73
87
  return await this.httpClient.request('POST', AuthLoginApi.DEVICE_CODE_REFRESH_ENDPOINT, params);
74
88
  }
75
89
  catch (error) {
76
- console.error('Refresh device code token API call failed:', error);
90
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
91
+ endpoint: AuthLoginApi.DEVICE_CODE_REFRESH_ENDPOINT,
92
+ method: 'POST',
93
+ });
94
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthLoginApi]');
77
95
  throw error;
78
96
  }
79
97
  }
@@ -85,10 +103,35 @@ class AuthLoginApi {
85
103
  async getLoginDiagnostics(environment) {
86
104
  try {
87
105
  const params = environment ? { environment } : undefined;
88
- return await this.httpClient.request('GET', AuthLoginApi.LOGIN_DIAGNOSTICS_ENDPOINT, undefined, { params });
106
+ const response = await this.httpClient.request('GET', AuthLoginApi.LOGIN_DIAGNOSTICS_ENDPOINT, undefined, { params });
107
+ // Transform response to match DiagnosticsResponse format
108
+ // Handle both formats: {success: true, data: {...}} and {data: {...}}
109
+ if (response.success !== undefined) {
110
+ return response;
111
+ }
112
+ else if (response.data && typeof response.data === 'object') {
113
+ // New format without success field - add it
114
+ const data = response.data;
115
+ return {
116
+ success: true,
117
+ data: {
118
+ database: data.database || {},
119
+ controller: data.controller || {},
120
+ environment: data.environment || {},
121
+ keycloak: data.keycloak || {},
122
+ },
123
+ timestamp: typeof response.timestamp === 'string' ? response.timestamp : new Date().toISOString(),
124
+ };
125
+ }
126
+ // If we get here, response format is unexpected
127
+ throw new Error(`Unexpected response format from login diagnostics endpoint: ${JSON.stringify(response)}`);
89
128
  }
90
129
  catch (error) {
91
- console.error('Get login diagnostics API call failed:', error);
130
+ const errorInfo = (0, error_extractor_1.extractErrorInfo)(error, {
131
+ endpoint: AuthLoginApi.LOGIN_DIAGNOSTICS_ENDPOINT,
132
+ method: 'GET',
133
+ });
134
+ (0, console_logger_1.logErrorWithContext)(errorInfo, '[AuthLoginApi]');
92
135
  throw error;
93
136
  }
94
137
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auth-login.api.js","sourceRoot":"","sources":["../../src/api/auth-login.api.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH;;;GAGG;AACH,MAAa,YAAY;IAOvB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAE9C;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,MAAoB,EACpB,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,KAAK,EACL,YAAY,CAAC,cAAc,EAC3B,YAAY,EACZ,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,KAAK,EACL,YAAY,CAAC,cAAc,EAC3B,SAAS,EACT,EAAE,MAAM,EAAE,CACX,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;YAC/C,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,MAAyB,EACzB,YAA2B;QAE3B,IAAI,CAAC;YACH,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAClD,MAAM,EACN,YAAY,CAAC,cAAc,EAC3B,YAAY,EACZ,MAAM,CACP,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAClC,MAAM,EACN,YAAY,CAAC,cAAc,EAC3B,MAAM,CACP,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,C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