{"version":3,"file":"acontplus-ng-infrastructure.mjs","sources":["../../../../packages/ng-infrastructure/src/lib/interceptors/api-interceptor.ts","../../../../packages/ng-infrastructure/src/lib/services/logging-service.ts","../../../../packages/ng-infrastructure/src/lib/services/tenant-info.ts","../../../../packages/ng-infrastructure/src/lib/services/correlation-info.ts","../../../../packages/ng-infrastructure/src/lib/interceptors/http-context-interceptor.ts","../../../../packages/ng-infrastructure/src/lib/interceptors/spinner-interceptor.ts","../../../../packages/ng-infrastructure/src/lib/repositories/base-http-repository.ts","../../../../packages/ng-infrastructure/src/lib/repositories/generic-repository.ts","../../../../packages/ng-infrastructure/src/lib/repositories/repository-factory.ts","../../../../packages/ng-infrastructure/src/lib/adapters/angular-http-adapter.ts","../../../../packages/ng-infrastructure/src/lib/services/core-config-service.ts","../../../../packages/ng-infrastructure/src/lib/use-cases/base-use-case.ts","../../../../packages/ng-infrastructure/src/lib/use-cases/commands.ts","../../../../packages/ng-infrastructure/src/lib/use-cases/queries.ts","../../../../packages/ng-infrastructure/src/acontplus-ng-infrastructure.ts"],"sourcesContent":["import {\n  HttpInterceptorFn,\n  HttpEvent,\n  HttpResponse,\n  HttpErrorResponse,\n  HttpRequest,\n  HttpContextToken,\n} from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { catchError, map, retry } from 'rxjs/operators';\nimport { throwError } from 'rxjs';\nimport { ApiResponse } from '@acontplus/core';\nimport { NotificationService } from '@acontplus/ng-notifications';\nimport { AUTH_TOKEN } from '@acontplus/ng-config';\n\n// A token to use with HttpContext for skipping notifications on specific requests.\nexport const SKIP_NOTIFICATION = new HttpContextToken<boolean>(() => false);\n\n// A token to use with HttpContext for forcing notifications on specific requests (overrides exclusion patterns).\nexport const SHOW_NOTIFICATIONS = new HttpContextToken<boolean | undefined>(() => undefined);\n\nexport const apiInterceptor: HttpInterceptorFn = (req, next) => {\n  const toastr = inject(NotificationService);\n  const tokenProvider = inject(AUTH_TOKEN, { optional: true });\n\n  // Add authorization header if token is available\n  let modifiedReq = req;\n  const token = tokenProvider?.getToken();\n  if (token) {\n    modifiedReq = req.clone({\n      setHeaders: { Authorization: `Bearer ${token}` },\n    });\n  }\n\n  return next(modifiedReq).pipe(\n    // Retries the request up to 2 times on failure with a 1-second delay.\n    retry({ count: 2, delay: 1000 }),\n    // Use the `map` operator to handle successful responses.\n    map((event: HttpEvent<unknown>) => {\n      if (event instanceof HttpResponse) {\n        return handleSuccessResponse(event, toastr, req);\n      }\n      return event;\n    }),\n    // Use the `catchError` operator to handle any errors that occur.\n    catchError((error: HttpErrorResponse) => handleErrorResponse(error, toastr)),\n  );\n};\n\n// --- Helper Functions ---\n\n/**\n * Handles successful HTTP responses, standardizes them, shows notifications, and transforms for consumers.\n */\nfunction handleSuccessResponse(\n  event: HttpResponse<unknown>,\n  notificationService: NotificationService,\n  req: HttpRequest<unknown>,\n): HttpResponse<unknown> {\n  const body = event.body;\n\n  // Standardize the response to always have ApiResponse structure\n  const standardizedResponse = standardizeApiResponse(body);\n\n  // Handle toast notifications based on standardized response\n  handleToastNotifications(standardizedResponse, notificationService, req);\n\n  // Return the appropriate data based on response type\n  return transformResponseForConsumers(standardizedResponse, event);\n}\n\n/**\n * Handles HTTP errors (from the interceptor chain, not backend ApiResponse).\n */\nfunction handleErrorResponse(error: HttpErrorResponse, notificationService: NotificationService) {\n  const status = error.status;\n\n  // Only show notifications for critical HTTP-level errors.\n  // We avoid showing toasts for 4xx errors, which are handled by the component.\n  if (status !== null && shouldShowCriticalErrorNotification(status)) {\n    const message = getCriticalErrorMessage(error);\n    const title = getErrorTitle(status);\n\n    notificationService.error({\n      message: message,\n      title: title,\n      config: { duration: 5000 },\n    });\n  }\n\n  // Always re-throw the error so components/services can handle it.\n  return throwError(() => error);\n}\n\n/**\n * Standardizes any response to follow the ApiResponse structure\n */\nfunction standardizeApiResponse(body: unknown): ApiResponse<unknown> {\n  // If it's already a proper ApiResponse, return as is\n  if (isValidApiResponse(body)) {\n    return body;\n  }\n\n  // If it's a raw data response (no wrapper), wrap it\n  if (body && typeof body === 'object' && !('status' in body)) {\n    return {\n      status: 'success',\n      code: '200',\n      message: 'Operation completed successfully',\n      data: body,\n      timestamp: new Date().toISOString(),\n    };\n  }\n\n  // If it's a primitive value, wrap it\n  if (body !== null && body !== undefined && typeof body !== 'object') {\n    return {\n      status: 'success',\n      code: '200',\n      message: 'Operation completed successfully',\n      data: body,\n      timestamp: new Date().toISOString(),\n    };\n  }\n\n  // If it's null/undefined, create a success response without data\n  return {\n    status: 'success',\n    code: '200',\n    message: 'Operation completed successfully',\n    timestamp: new Date().toISOString(),\n  };\n}\n\n/**\n * Handles toast notifications based on standardized response\n */\nfunction handleToastNotifications(\n  response: ApiResponse<unknown>,\n  notificationService: NotificationService,\n  req: HttpRequest<unknown>,\n): void {\n  const shouldShowToast = shouldShowSuccessToast(req);\n  const forceShow = req.context.get(SHOW_NOTIFICATIONS);\n  const skipNotification = req.context.get(SKIP_NOTIFICATION);\n\n  // Determine if we should show notifications, considering overrides\n  const showNotifications = forceShow !== undefined ? forceShow : shouldShowToast;\n\n  if (skipNotification) return;\n\n  // Dynamic handling: Use show() for runtime type selection\n  if (\n    response.message &&\n    showNotifications &&\n    ['success', 'warning', 'error'].includes(response.status)\n  ) {\n    notificationService.show({\n      type: response.status as 'success' | 'warning' | 'error',\n      message: response.message,\n    });\n  }\n\n  // Handle warnings separately if needed\n  if (response.status === 'warning' && response.warnings && response.warnings.length > 0) {\n    response.warnings.forEach((warning) => {\n      notificationService.show({\n        type: 'warning',\n        message: warning.message,\n      });\n    });\n  }\n\n  // Handle errors separately if needed\n  if (response.status === 'error' && response.errors && response.errors.length > 0) {\n    response.errors.forEach((error) => {\n      notificationService.show({\n        type: 'error',\n        message: error.message,\n      });\n    });\n  }\n}\n\n/**\n * Transforms the standardized response for consumers\n */\nfunction transformResponseForConsumers(\n  response: ApiResponse<unknown>,\n  originalEvent: HttpResponse<unknown>,\n): HttpResponse<unknown> {\n  switch (response.status) {\n    case 'success':\n      // For success responses, return the data if it exists, otherwise the full response\n      if (response.data !== undefined && response.data !== null) {\n        return originalEvent.clone({ body: response.data });\n      }\n      // For message-only success responses, return the full response\n      return originalEvent.clone({ body: response });\n\n    case 'warning':\n      // For warnings, return data if it exists, otherwise the full response\n      if (response.data !== undefined && response.data !== null) {\n        return originalEvent.clone({ body: response.data });\n      }\n      return originalEvent.clone({ body: response });\n\n    case 'error':\n      // Errors should be thrown, not returned\n      throw response;\n\n    default:\n      return originalEvent.clone({ body: response });\n  }\n}\n\n/**\n * Checks if a response is a valid ApiResponse\n */\nfunction isValidApiResponse(response: unknown): response is ApiResponse<unknown> {\n  if (response === null || typeof response !== 'object') return false;\n  const r = response as Record<string, unknown>;\n  return (\n    'status' in r &&\n    'code' in r &&\n    typeof r['status'] === 'string' &&\n    ['success', 'error', 'warning'].includes(r['status'])\n  );\n}\n\n/**\n * Determines whether to show success toast notifications based on the request type.\n */\nfunction shouldShowSuccessToast(req: HttpRequest<unknown>): boolean {\n  const url = req.url?.toLowerCase() || '';\n  const method = req.method?.toLowerCase() || '';\n\n  // Never show for these cases\n  const excludedPatterns = [\n    'get',\n    '/list',\n    '/search',\n    '/query',\n    '/page',\n    '/paginated',\n    '/health',\n    '/status',\n    '/ping',\n  ];\n\n  if (excludedPatterns.some((pattern) => method === pattern || url.includes(pattern))) {\n    return false;\n  }\n\n  // Always show for these methods\n  if (['post', 'put', 'patch', 'delete'].includes(method)) {\n    return true;\n  }\n\n  // Default behavior\n  return method !== 'get';\n}\n\n/**\n * Determines if we should show a notification for this HTTP error.\n */\nfunction shouldShowCriticalErrorNotification(status: number): boolean {\n  // Show notifications for:\n  // - Network errors (status 0)\n  // - Server errors (5xx)\n  return status === 0 || (status >= 500 && status < 600);\n}\n\n/**\n * Gets the appropriate title for error notifications.\n */\nfunction getErrorTitle(status: number): string {\n  if (status === 0) return 'Connection Error';\n  if (status >= 500) return 'Server Error';\n  return 'Error';\n}\n\n/**\n * Gets the appropriate message for critical errors.\n */\nfunction getCriticalErrorMessage(error: HttpErrorResponse): string {\n  if (error.status === 0) {\n    return 'Unable to connect to the server. Please check your network connection.';\n  }\n\n  if (error.status >= 500) {\n    return (\n      error.error?.message || error.message || 'A server error occurred. Please try again later.'\n    );\n  }\n\n  return error.error?.message || error.message || 'An unexpected error occurred';\n}\n","import { Injectable, inject } from '@angular/core';\nimport { ENVIRONMENT } from '@acontplus/ng-config';\nimport { HttpRequestLog, HttpErrorLog } from '../interceptors';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class LoggingService {\n  private environment = inject(ENVIRONMENT);\n\n  log(level: 'info' | 'warn' | 'error', message: string, context?: unknown): void {\n    if (this.environment.isProduction) {\n      // Production logging (e.g., to external service)\n      this.logToExternalService(level, message, context);\n    } else {\n      // Development logging - only log in development mode\n      if (!this.environment.isProduction) {\n        console[level](`[${level.toUpperCase()}] ${message}`, context);\n      }\n    }\n  }\n\n  info(message: string, context?: unknown): void {\n    this.log('info', message, context);\n  }\n\n  warn(message: string, context?: unknown): void {\n    this.log('warn', message, context);\n  }\n\n  error(message: string, context?: unknown): void {\n    this.log('error', message, context);\n  }\n\n  // HTTP Request Logging\n  logHttpRequest(log: HttpRequestLog): void {\n    this.info(`HTTP Request - ${log.method} ${log.url}`, {\n      requestId: log.requestId,\n      correlationId: log.correlationId,\n      tenantId: log.tenantId,\n      headers: log.headers,\n      isCustomUrl: log.isCustomUrl,\n      timestamp: log.timestamp,\n    });\n  }\n\n  // HTTP Error Logging\n  logHttpError(error: HttpErrorLog): void {\n    this.error(`HTTP Error - ${error.method} ${error.url}`, {\n      status: error.status,\n      statusText: error.statusText,\n      requestId: error.requestId,\n      correlationId: error.correlationId,\n      tenantId: error.tenantId,\n      errorDetails: error.errorDetails,\n      environment: error.environment,\n      timestamp: error.timestamp,\n    });\n  }\n\n  // Network Error Logging\n  logNetworkError(correlationId: string): void {\n    this.error('Network connection failed', {\n      type: 'network-error',\n      correlationId,\n      userAgent: navigator.userAgent,\n      online: navigator.onLine,\n    });\n  }\n\n  // Rate Limit Error Logging\n  logRateLimitError(correlationId: string, url: string): void {\n    this.warn('Rate limit exceeded', {\n      type: 'rate-limit-error',\n      correlationId,\n      url,\n    });\n  }\n\n  private logToExternalService(_level: string, _message: string, _context?: unknown): void {\n    // Implement external logging service integration\n    // e.g., Sentry, LogRocket, etc.\n    // This is a placeholder for production logging implementation\n  }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { LoggingService } from './logging-service';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class TenantInfo {\n  private tenantId: string | null = null;\n  private logger = inject(LoggingService);\n\n  getTenantId(): string {\n    if (!this.tenantId) {\n      // Get from localStorage, sessionStorage, or JWT token\n      this.tenantId =\n        localStorage.getItem('tenantId') ||\n        sessionStorage.getItem('tenantId') ||\n        this.extractTenantFromToken() ||\n        'default-tenant';\n    }\n    return this.tenantId;\n  }\n\n  getCurrentTenant(): string | null {\n    return this.tenantId;\n  }\n\n  setTenantId(tenantId: string): void {\n    this.tenantId = tenantId;\n    localStorage.setItem('tenantId', tenantId);\n  }\n\n  setTenant(tenantId: string): void {\n    this.setTenantId(tenantId);\n  }\n\n  handleForbidden(): void {\n    this.logger.error('Access forbidden for tenant:', this.tenantId);\n    // Redirect to tenant selection or show error message\n    // this.router.navigate(['/tenant-access-denied']);\n  }\n\n  private extractTenantFromToken(): string | null {\n    // Implementation depends on your JWT token structure\n    // This is a placeholder\n    return null;\n  }\n\n  clearTenant(): void {\n    this.tenantId = null;\n    localStorage.removeItem('tenantId');\n    sessionStorage.removeItem('tenantId');\n  }\n}\n","import { Injectable, signal, computed } from '@angular/core';\nimport { v4 as uuidv4 } from 'uuid';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class CorrelationInfo {\n  private correlationId = signal<string | null>(null);\n  private readonly CORRELATION_KEY = 'correlation-id';\n\n  // Signal-based getter for reactive updates\n  readonly currentCorrelationId = computed(() => this.correlationId());\n\n  getOrCreateCorrelationId(): string {\n    if (!this.correlationId()) {\n      // Try to get from sessionStorage first (for page refreshes)\n      const id = sessionStorage.getItem(this.CORRELATION_KEY) || uuidv4();\n      this.correlationId.set(id);\n      sessionStorage.setItem(this.CORRELATION_KEY, id);\n    }\n    return this.correlationId()!;\n  }\n\n  setCorrelationId(correlationId: string): void {\n    this.correlationId.set(correlationId);\n    sessionStorage.setItem(this.CORRELATION_KEY, correlationId);\n  }\n\n  resetCorrelationId(): void {\n    this.correlationId.set(null);\n    sessionStorage.removeItem(this.CORRELATION_KEY);\n  }\n\n  getId(): string {\n    return this.getOrCreateCorrelationId();\n  }\n}\n","import { inject, InjectionToken } from '@angular/core'; // Import InjectionToken\nimport { Router } from '@angular/router';\nimport {\n  HttpContextToken,\n  HttpContext,\n  HttpInterceptorFn,\n  HttpErrorResponse,\n} from '@angular/common/http';\nimport { catchError, throwError, switchMap, Observable } from 'rxjs';\nimport { v4 as uuidv4 } from 'uuid';\n\n// Environment and configuration\nimport { AUTH_TOKEN, ENVIRONMENT } from '@acontplus/ng-config';\n\n// Services\nimport { TenantInfo } from '../services/tenant-info';\nimport { CorrelationInfo } from '../services/correlation-info';\nimport { LoggingService } from '../services/logging-service';\n\n// HTTP Context tokens\nconst CUSTOM_URL = new HttpContextToken<boolean>(() => false);\nconst SKIP_CONTEXT_HEADERS = new HttpContextToken<boolean>(() => false);\nconst CUSTOM_HEADERS = new HttpContextToken<Record<string, string>>(() => ({}));\n\n// Helper functions for HTTP context\nexport function customUrl() {\n  return new HttpContext().set(CUSTOM_URL, true);\n}\n\nexport function skipContextHeaders() {\n  return new HttpContext().set(SKIP_CONTEXT_HEADERS, true);\n}\n\nexport function withCustomHeaders(headers: Record<string, string>) {\n  return new HttpContext().set(CUSTOM_HEADERS, headers);\n}\n\n// Configuration interface for library consumers\nexport interface HttpContextConfig {\n  enableCorrelationTracking?: boolean;\n  enableRequestLogging?: boolean;\n  enableErrorLogging?: boolean;\n  customHeaders?: Record<string, string | (() => string)>;\n  clientVersion?: string;\n  tenantIdHeader?: string;\n  correlationIdHeader?: string;\n  requestIdHeader?: string;\n  timestampHeader?: string;\n  excludeUrls?: string[];\n  includeAuthToken?: boolean;\n  baseUrlInjection?: boolean;\n  refreshTokenCallback?: () => Observable<{ token: string; refreshToken?: string }>;\n  logoutCallback?: () => void;\n}\n\n// Default configuration\nconst DEFAULT_CONFIG: Required<HttpContextConfig> = {\n  enableCorrelationTracking: true,\n  enableRequestLogging: false, // This will be overridden by environment.isProduction\n  enableErrorLogging: true,\n  customHeaders: {},\n  clientVersion: '1.0.0',\n  tenantIdHeader: 'Tenant-Id',\n  correlationIdHeader: 'Correlation-Id',\n  requestIdHeader: 'Request-Id',\n  timestampHeader: 'Timestamp',\n  excludeUrls: [],\n  includeAuthToken: true,\n  baseUrlInjection: true,\n  refreshTokenCallback: undefined as any,\n  logoutCallback: undefined as any,\n};\n\n// Injection token for configuration - FIXED\nexport const HTTP_CONTEXT_CONFIG = new InjectionToken<HttpContextConfig>('HTTP_CONTEXT_CONFIG', {\n  factory: () => DEFAULT_CONFIG, // Provide a default factory in case it's not provided\n});\n\nexport const httpContextInterceptor: HttpInterceptorFn = (req, next) => {\n  const tokenProvider = inject(AUTH_TOKEN, { optional: true });\n  const router = inject(Router);\n  const tenantService = inject(TenantInfo);\n  const correlationService = inject(CorrelationInfo);\n  const loggingService = inject(LoggingService);\n  const environment = inject(ENVIRONMENT);\n\n  // Get configuration (with fallback to default) - FIXED\n  const config: Required<HttpContextConfig> = {\n    ...DEFAULT_CONFIG,\n    // The default enableRequestLogging needs to be set based on environment here,\n    // as it's dynamic, and DEFAULT_CONFIG is static.\n    enableRequestLogging: !environment.isProduction,\n    ...inject(HTTP_CONTEXT_CONFIG, { optional: true }),\n  };\n\n  // Check HTTP context tokens\n  const isCustomUrl = req.context.get(CUSTOM_URL);\n  const skipHeaders = req.context.get(SKIP_CONTEXT_HEADERS);\n  const contextHeaders = req.context.get(CUSTOM_HEADERS);\n\n  // Skip processing if headers are disabled for this request\n  if (skipHeaders) {\n    return next(req);\n  }\n\n  // Check if URL should be excluded\n  const shouldExclude = config.excludeUrls.some(\n    (url) => req.url.includes(url) || new RegExp(url).test(req.url),\n  );\n\n  if (shouldExclude) {\n    return next(req);\n  }\n\n  // Skip auth for login, register, and refresh endpoints\n  const skipAuth =\n    req.url.includes('/login') || req.url.includes('/register') || req.url.includes('/refresh');\n\n  // Handle URL transformation\n  const baseUrl = environment.apiBaseUrl;\n  const finalUrl = isCustomUrl || !config.baseUrlInjection ? req.url : `${baseUrl}${req.url}`;\n\n  // Generate or get correlation context\n  const correlationId = config.enableCorrelationTracking\n    ? correlationService.getOrCreateCorrelationId()\n    : uuidv4();\n  const tenantId = tenantService.getTenantId();\n  const requestId = uuidv4();\n\n  // Build dynamic headers\n  const headers: Record<string, string> = {};\n\n  // Core context headers\n  headers[config.requestIdHeader] = requestId;\n\n  if (config.enableCorrelationTracking) {\n    headers[config.correlationIdHeader] = correlationId;\n  }\n\n  if (tenantId) {\n    headers[config.tenantIdHeader] = tenantId;\n  }\n\n  headers[config.timestampHeader] = new Date().toISOString();\n\n  // Client information\n  if (config.clientVersion) {\n    headers['Client-Version'] = config.clientVersion;\n  }\n\n  // Environment client ID\n  if (environment.clientId) {\n    headers['Client-Id'] = environment.clientId;\n  }\n\n  // Add authorization header if configured and available\n  if (config.includeAuthToken && !skipAuth) {\n    const authToken = tokenProvider?.getToken();\n    if (authToken) {\n      headers['Authorization'] = `Bearer ${authToken}`;\n    }\n  }\n\n  // Process custom headers from configuration (can be static values or dynamic functions)\n  Object.entries(config.customHeaders).forEach(([key, value]) => {\n    headers[key] = typeof value === 'function' ? value() : value;\n  });\n\n  // Add headers from HTTP context\n  Object.entries(contextHeaders).forEach(([key, value]) => {\n    headers[key] = value;\n  });\n\n  // Add content-type for data requests if not already set\n  if (\n    ['POST', 'PUT', 'PATCH'].includes(req.method.toUpperCase()) &&\n    !req.headers.has('Content-Type')\n  ) {\n    headers['Content-Type'] = 'application/json';\n  }\n\n  // Clone request with enhanced headers and URL\n  const enhancedReq = req.clone({\n    url: finalUrl,\n    setHeaders: headers,\n  });\n\n  // Log outgoing request if enabled\n  if (config.enableRequestLogging) {\n    loggingService.logHttpRequest({\n      method: req.method,\n      url: finalUrl,\n      originalUrl: req.url,\n      requestId,\n      correlationId,\n      tenantId,\n      timestamp: new Date().toISOString(),\n      headers: Object.keys(headers),\n      isCustomUrl,\n    });\n  }\n\n  // If request has auth header, handle with refresh logic\n  if (headers['Authorization'] && config.refreshTokenCallback) {\n    return next(enhancedReq).pipe(\n      catchError((error) => {\n        // If 401 Unauthorized, try to refresh token\n        if (error.status === 401) {\n          const refreshToken = tokenProvider?.getRefreshToken?.();\n          if (refreshToken && refreshToken.trim().length > 0) {\n            return config.refreshTokenCallback()!.pipe(\n              switchMap((newTokens) => {\n                // Retry the original request with new token\n                const retryReq = req.clone({\n                  url: finalUrl,\n                  setHeaders: { ...headers, Authorization: `Bearer ${newTokens.token}` },\n                });\n                return next(retryReq);\n              }),\n              catchError((refreshError) => {\n                // Refresh failed, logout user\n                config.logoutCallback?.();\n                return throwError(() => refreshError);\n              }),\n            );\n          }\n        }\n\n        // Enhanced error logging with context\n        if (config.enableErrorLogging) {\n          loggingService.logHttpError({\n            method: req.method,\n            url: finalUrl,\n            originalUrl: req.url,\n            requestId,\n            correlationId,\n            tenantId,\n            status: error.status,\n            statusText: error.statusText,\n            message: error.message,\n            timestamp: new Date().toISOString(),\n            errorDetails: error.error,\n            environment: environment.clientId,\n            isCustomUrl,\n            headers: [], // Headers are not included in HttpErrorResponse by default, adjust if needed\n          });\n        }\n\n        // Handle other error scenarios\n        switch (error.status) {\n          case 403:\n            tenantService.handleForbidden();\n            break;\n          case 0:\n            loggingService.logNetworkError(correlationId);\n            break;\n          case 429:\n            loggingService.logRateLimitError(correlationId, finalUrl);\n            break;\n        }\n\n        return throwError(() => error);\n      }),\n    );\n  } else {\n    // No auth header, use standard error handling\n    return next(enhancedReq).pipe(\n      catchError((error: HttpErrorResponse) => {\n        // Enhanced error logging with context\n        if (config.enableErrorLogging) {\n          loggingService.logHttpError({\n            method: req.method,\n            url: finalUrl,\n            originalUrl: req.url,\n            requestId,\n            correlationId,\n            tenantId,\n            status: error.status,\n            statusText: error.statusText,\n            message: error.message,\n            timestamp: new Date().toISOString(),\n            errorDetails: error.error,\n            environment: environment.clientId,\n            isCustomUrl,\n            headers: [], // Headers are not included in HttpErrorResponse by default, adjust if needed\n          });\n        }\n\n        // Handle specific error scenarios\n        switch (error.status) {\n          case 401: {\n            loggingService.error('Unauthorized access - token expired or invalid');\n            // Note: Token clearing should be handled by the auth service, not infrastructure\n            router.navigate([`/${environment.loginRoute}`]);\n            break;\n          }\n          case 403:\n            tenantService.handleForbidden();\n            break;\n          case 0:\n            loggingService.logNetworkError(correlationId);\n            break;\n          case 429:\n            loggingService.logRateLimitError(correlationId, finalUrl);\n            break;\n        }\n\n        return throwError(() => error);\n      }),\n    );\n  }\n};\n\n// Supporting repositories for type safety\nexport interface HttpRequestLog {\n  method: string;\n  url: string;\n  originalUrl: string;\n  requestId: string;\n  correlationId: string;\n  tenantId: string;\n  timestamp: string;\n  headers: string[];\n  isCustomUrl: boolean;\n}\n\nexport interface HttpErrorLog extends HttpRequestLog {\n  status: number;\n  statusText: string;\n  message: string;\n  errorDetails: unknown;\n  environment: string;\n}\n\n// Helper function to create configuration\nexport function createHttpContextConfig(\n  overrides: Partial<HttpContextConfig> = {},\n): HttpContextConfig {\n  return {\n    ...DEFAULT_CONFIG,\n    ...overrides,\n  };\n}\n\n// Provider function for easy setup\nexport function provideHttpContext(config: Partial<HttpContextConfig> = {}) {\n  return [\n    {\n      provide: HTTP_CONTEXT_CONFIG,\n      useValue: createHttpContextConfig(config),\n    },\n  ];\n}\n","import {\n  HttpContext,\n  HttpContextToken,\n  HttpInterceptorFn,\n  HttpRequest,\n} from '@angular/common/http';\n\nimport { finalize } from 'rxjs/operators';\nimport { inject, Injectable } from '@angular/core';\nimport { OverlayService } from '@acontplus/ng-components';\n/**\n * Token to determine if a request should show spinner\n * Default is true (show spinner for all requests)\n */\nconst SHOW_SPINNER = new HttpContextToken<boolean>(() => true);\n\nconst requests: HttpRequest<unknown>[] = [];\n\n/**\n * Helper function to disable spinner for specific requests\n * @returns HttpContext with spinner disabled\n */\nexport function withoutSpinner() {\n  return new HttpContext().set(SHOW_SPINNER, false);\n}\n\n/**\n * Service to track active HTTP requests\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class ActiveRequestsTracker {\n  get count(): number {\n    return requests.length;\n  }\n\n  add(request: HttpRequest<unknown>): void {\n    requests.push(request);\n  }\n\n  remove(request: HttpRequest<unknown>): void {\n    const index = requests.indexOf(request);\n    if (index >= 0) {\n      requests.splice(index, 1);\n    }\n  }\n}\n\n/**\n * Interceptor that shows/hides a loading spinner based on active HTTP requests\n */\nexport const spinnerInterceptor: HttpInterceptorFn = (req, next) => {\n  // Track active requests requiring spinner\n  const activeRequests = inject(ActiveRequestsTracker);\n  const overlayService = inject(OverlayService);\n\n  // Skip spinner if disabled for this request\n  if (!req.context.get(SHOW_SPINNER)) {\n    return next(req);\n  }\n\n  // Add request to tracking\n  activeRequests.add(req);\n\n  // Show spinner if this is the first active request\n  if (activeRequests.count === 1) {\n    overlayService.showSpinner();\n  }\n\n  return next(req).pipe(\n    finalize(() => {\n      // Remove request and hide spinner if no more active requests\n      activeRequests.remove(req);\n      if (activeRequests.count === 0) {\n        overlayService.hideSpinner();\n      }\n    }),\n  );\n};\n","import { Injectable, inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { RepositoryConfig } from '@acontplus/core';\n\n@Injectable()\nexport abstract class BaseHttpRepository {\n  protected http = inject(HttpClient);\n  protected abstract config: RepositoryConfig; // Abstract property\n\n  protected buildUrl(path = ''): string {\n    const baseUrl = this.config.baseUrl || '/api';\n    const version = this.config.version ? `/v${this.config.version}` : '';\n    const endpoint = path ? `${this.config.endpoint}/${path}` : this.config.endpoint;\n\n    return `${baseUrl}${version}/${endpoint}`.replace(/\\/+/g, '/');\n  }\n\n  protected get<T>(path = '', params?: Record<string, string | number | boolean>): Observable<T> {\n    return this.http.get<T>(this.buildUrl(path), { params });\n  }\n\n  protected post<T>(path = '', body: unknown): Observable<T> {\n    return this.http.post<T>(this.buildUrl(path), body);\n  }\n\n  protected put<T>(path = '', body: unknown): Observable<T> {\n    return this.http.put<T>(this.buildUrl(path), body);\n  }\n\n  protected patch<T>(path = '', body?: unknown): Observable<T> {\n    return this.http.patch<T>(this.buildUrl(path), body);\n  }\n\n  protected delete<T>(path = ''): Observable<T> {\n    return this.http.delete<T>(this.buildUrl(path));\n  }\n}\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { BaseHttpRepository } from './base-http-repository';\nimport { PagedResult, PaginationParams, RepositoryConfig } from '@acontplus/core';\nimport { BaseRepository, SearchableRepository } from '@acontplus/ng-config';\n\n// Create an injection token for RepositoryConfig\nexport const REPOSITORY_CONFIG = new InjectionToken<RepositoryConfig>('REPOSITORY_CONFIG');\n\n@Injectable()\nexport class GenericRepository<TEntity = any, TId extends string | number = number>\n  extends BaseHttpRepository\n  implements BaseRepository<TEntity, TId>\n{\n  protected override config: RepositoryConfig;\n\n  constructor() {\n    const config = inject<RepositoryConfig>(REPOSITORY_CONFIG);\n    super();\n    this.config = config;\n  }\n\n  getById(id: TId): Observable<TEntity> {\n    return this.get<TEntity>(id.toString());\n  }\n\n  getAll(pagination?: PaginationParams): Observable<PagedResult<TEntity>> {\n    const params = this.buildParams(pagination);\n    return this.get<PagedResult<TEntity>>('', params);\n  }\n\n  create(entity: Partial<TEntity>): Observable<TEntity> {\n    return this.post<TEntity>('', entity);\n  }\n\n  update(id: TId, entity: Partial<TEntity>): Observable<TEntity> {\n    return this.put<TEntity>(id.toString(), entity);\n  }\n\n  remove(id: TId): Observable<void> {\n    return super.delete<void>(id.toString());\n  }\n\n  protected buildParams(pagination?: PaginationParams, filters?: Record<string, any>): any {\n    const params: any = {};\n\n    if (pagination) {\n      params.pageIndex = pagination.pageIndex?.toString() || '1';\n      params.pageSize = pagination.pageSize?.toString() || '20';\n      if (pagination.sortBy) params.sortBy = pagination.sortBy;\n      if (pagination.sortDirection) params.sortDirection = pagination.sortDirection;\n    }\n\n    if (filters) {\n      Object.assign(params, filters);\n    }\n\n    return params;\n  }\n}\n\n@Injectable()\nexport class SearchableGenericRepository<TEntity = any, TId extends string | number = number>\n  extends GenericRepository<TEntity, TId>\n  implements SearchableRepository<TEntity, TId>\n{\n  search(query: string, pagination: PaginationParams): Observable<PagedResult<TEntity>> {\n    const searchFilters = { q: query };\n    const params = this.buildParams(pagination, searchFilters);\n    return this.get<PagedResult<TEntity>>('search', params);\n  }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { PagedResult, PaginationParams, RepositoryConfig } from '@acontplus/core';\nimport { BaseRepository } from '@acontplus/ng-config';\n\n@Injectable({ providedIn: 'root' })\nexport class RepositoryFactory {\n  private http = inject(HttpClient);\n\n  create<TEntity, TId extends string | number = number>(\n    config: RepositoryConfig,\n  ): BaseRepository<TEntity, TId> {\n    const buildUrl = (path = '') => {\n      const baseUrl = config.baseUrl || '/api';\n      const version = config.version ? `/v${config.version}` : '';\n      const endpoint = path ? `${config.endpoint}/${path}` : config.endpoint;\n      return `${baseUrl}${version}/${endpoint}`.replace(/\\/+/g, '/');\n    };\n\n    const buildParams = (pagination?: PaginationParams) => {\n      const params: any = {};\n      if (pagination) {\n        params.page = pagination.pageIndex?.toString() || '1';\n        params.pageSize = pagination.pageSize?.toString() || '20';\n        if (pagination.sortBy) params.sortBy = pagination.sortBy;\n        if (pagination.sortDirection) params.sortDirection = pagination.sortDirection;\n      }\n      return params;\n    };\n\n    // Safe ID conversion function\n    const idToString = (id: TId): string => {\n      if (typeof id === 'string' || typeof id === 'number' || typeof id === 'bigint') {\n        return id.toString();\n      }\n      // Fallback for other types - you might want to handle this differently\n      return String(id);\n    };\n\n    return {\n      getById: (id: TId) => this.http.get<TEntity>(buildUrl(idToString(id))),\n\n      getAll: (pagination?) =>\n        this.http.get<PagedResult<TEntity>>(buildUrl(), {\n          params: buildParams(pagination),\n        }),\n\n      create: (entity: Partial<TEntity>) => this.http.post<TEntity>(buildUrl(), entity),\n\n      update: (id: TId, entity: Partial<TEntity>) =>\n        this.http.put<TEntity>(buildUrl(idToString(id)), entity),\n\n      remove: (id: TId) => this.http.delete<void>(buildUrl(idToString(id))),\n    };\n  }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { lastValueFrom } from 'rxjs';\nimport { HttpOptions, HttpPort } from '@acontplus/core';\n\nfunction mergeUrl(baseURL: string | undefined, endpoint: string): string {\n  if (!baseURL) return endpoint;\n  return `${baseURL.replace(/\\/+$/, '')}/${endpoint.replace(/^\\/+/, '')}`;\n}\n\nexport class AngularHttpAdapter implements HttpPort {\n  constructor(\n    private readonly http: HttpClient,\n    private readonly baseURL?: string,\n  ) {}\n\n  private buildOptions(options?: HttpOptions) {\n    return {\n      headers: options?.headers ?? {},\n      params: options?.params ?? {},\n    };\n  }\n\n  private async request<T>(params: {\n    method: 'get' | 'post' | 'put' | 'delete';\n    url: string;\n    data?: unknown;\n    options?: HttpOptions;\n  }): Promise<T> {\n    const fullUrl = mergeUrl(this.baseURL, params.url);\n    const httpOptions = this.buildOptions(params.options);\n\n    const observable = this.http.request<T>(params.method, fullUrl, {\n      body: params.data,\n      ...httpOptions,\n    });\n\n    return await lastValueFrom(observable);\n  }\n\n  /** GET */\n  get<T>(url: string, options?: HttpOptions): Promise<T> {\n    return this.request({ method: 'get', url, options });\n  }\n\n  /** POST */\n  post<T>(url: string, data?: unknown, options?: HttpOptions): Promise<T> {\n    return this.request({ method: 'post', url, data, options });\n  }\n\n  /** PUT */\n  put<T>(url: string, data?: unknown, options?: HttpOptions): Promise<T> {\n    return this.request({ method: 'put', url, data, options });\n  }\n\n  /** DELETE */\n  delete<T>(url: string, options?: HttpOptions): Promise<T> {\n    return this.request({ method: 'delete', url, options });\n  }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { CORE_CONFIG, DEFAULT_CONFIG, ENVIRONMENT } from '@acontplus/ng-config';\nimport { CoreConfig } from '@acontplus/core';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class CoreConfigService {\n  private config: Required<CoreConfig>;\n  private environment = inject(ENVIRONMENT);\n\n  constructor() {\n    this.config = this.initializeConfig();\n  }\n\n  /**\n   * Initialize configuration with defaults and environment overrides\n   */\n  private initializeConfig(): Required<CoreConfig> {\n    const injectedConfig = inject(CORE_CONFIG, { optional: true });\n\n    return {\n      ...DEFAULT_CONFIG,\n      // Environment overrides\n      apiBaseUrl: this.environment.apiBaseUrl || DEFAULT_CONFIG.apiBaseUrl,\n      enableRequestLogging: !this.environment.isProduction,\n      // Injected config overrides\n      ...injectedConfig,\n    };\n  }\n\n  /**\n   * Get the current configuration\n   */\n  getConfig(): Required<CoreConfig> {\n    return { ...this.config };\n  }\n\n  /**\n   * Update configuration at runtime\n   */\n  updateConfig(updates: Partial<CoreConfig>): void {\n    this.config = { ...this.config, ...updates };\n  }\n\n  /**\n   * Get a specific configuration value\n   */\n  get<K extends keyof CoreConfig>(key: K): CoreConfig[K] {\n    return this.config[key];\n  }\n\n  /**\n   * Check if a feature is enabled\n   */\n  isFeatureEnabled(feature: keyof CoreConfig): boolean {\n    const value = this.config[feature];\n    return typeof value === 'boolean' ? value : false;\n  }\n\n  /**\n   * Get API URL for a specific entity\n   */\n  getApiUrl(entityName?: string): string {\n    const baseUrl = this.config.apiBaseUrl;\n    if (!entityName) return baseUrl;\n    return `${baseUrl}/${entityName}`.replace(/\\/+/g, '/');\n  }\n\n  /**\n   * Check if a URL should be excluded from processing\n   */\n  shouldExcludeUrl(url: string): boolean {\n    return this.config.excludeUrls.some(\n      (excludePattern) => url.includes(excludePattern) || new RegExp(excludePattern).test(url),\n    );\n  }\n\n  /**\n   * Check if a method should be excluded from processing\n   */\n  shouldExcludeMethod(method: string): boolean {\n    return this.config.excludeMethods.some(\n      (excludeMethod) => excludeMethod.toLowerCase() === method.toLowerCase(),\n    );\n  }\n\n  /**\n   * Get custom headers with dynamic values resolved\n   */\n  getCustomHeaders(): Record<string, string> {\n    const headers: Record<string, string> = {};\n\n    Object.entries(this.config.customHeaders).forEach(([key, value]) => {\n      headers[key] = typeof value === 'function' ? value() : value;\n    });\n\n    return headers;\n  }\n\n  /**\n   * Reset configuration to defaults\n   */\n  resetConfig(): void {\n    this.config = this.initializeConfig();\n  }\n}\n\n// Provider function for easy setup\nexport function provideCoreConfig(config: Partial<CoreConfig> = {}) {\n  return [\n    {\n      provide: CORE_CONFIG,\n      useValue: config,\n    },\n  ];\n}\n\n// Helper function to create configuration\nexport function createCoreConfig(overrides: Partial<CoreConfig> = {}): CoreConfig {\n  return {\n    ...DEFAULT_CONFIG,\n    ...overrides,\n  };\n}\n","import { Observable } from 'rxjs';\n\nexport interface UseCase<TRequest = void, TResponse = void> {\n  execute(request: TRequest): Observable<TResponse>;\n}\n\nexport abstract class BaseUseCase<TRequest = void, TResponse = void>\n  implements UseCase<TRequest, TResponse>\n{\n  abstract execute(request: TRequest): Observable<TResponse>;\n}\n","import { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport { inject } from '@angular/core';\nimport { BaseUseCase } from './base-use-case';\nimport { LoggingService } from '../services/logging-service';\n\n// Only create commands if you have complex validation logic\nexport abstract class Command<TRequest, TResponse = void> extends BaseUseCase<TRequest, TResponse> {\n  // Simple validation - override only when needed\n  protected validate(_request: TRequest): string[] {\n    return []; // Return array of error messages\n  }\n\n  override execute(request: TRequest): Observable<TResponse> {\n    const errors = this.validate(request);\n    if (errors.length > 0) {\n      return throwError(() => ({\n        status: 'error',\n        code: 'VALIDATION_FAILED',\n        message: 'Validation failed',\n        errors: errors.map((msg) => ({ code: 'VALIDATION', message: msg })),\n        timestamp: new Date().toISOString(),\n      }));\n    }\n\n    return this.executeInternal(request).pipe(\n      catchError((error) => {\n        // Log the error for debugging\n        const logger = inject(LoggingService);\n        logger.error('An error occurred during command execution:', error);\n\n        // Re-throw the error so the caller can handle it\n        return throwError(() => error);\n      }),\n    );\n  }\n\n  protected abstract executeInternal(request: TRequest): Observable<TResponse>;\n}\n","import { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport { inject } from '@angular/core';\nimport { BaseUseCase } from './base-use-case';\nimport { LoggingService } from '../services/logging-service';\n\nexport abstract class Query<TRequest, TResponse> extends BaseUseCase<TRequest, TResponse> {\n  override execute(request: TRequest): Observable<TResponse> {\n    return this.executeInternal(request).pipe(\n      catchError((error) => {\n        const logger = inject(LoggingService);\n        logger.error('An error occurred during query execution:', error);\n        return throwError(() => error);\n      }),\n    );\n  }\n\n  protected abstract executeInternal(request: TRequest): Observable<TResponse>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuidv4","catchError","DEFAULT_CONFIG"],"mappings":";;;;;;;;;;;AAeA;AACO,MAAM,iBAAiB,GAAG,IAAI,gBAAgB,CAAU,MAAM,KAAK;AAE1E;AACO,MAAM,kBAAkB,GAAG,IAAI,gBAAgB,CAAsB,MAAM,SAAS;MAE9E,cAAc,GAAsB,CAAC,GAAG,EAAE,IAAI,KAAI;AAC7D,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAC1C,IAAA,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;IAG5D,IAAI,WAAW,GAAG,GAAG;AACrB,IAAA,MAAM,KAAK,GAAG,aAAa,EAAE,QAAQ,EAAE;IACvC,IAAI,KAAK,EAAE;AACT,QAAA,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC;AACtB,YAAA,UAAU,EAAE,EAAE,aAAa,EAAE,CAAA,OAAA,EAAU,KAAK,EAAE,EAAE;AACjD,SAAA,CAAC;IACJ;AAEA,IAAA,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI;;I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