/**
 * Web API Service Types
 * Defines required services for web API handlers
 */

import type { ServiceTypes } from '@stock-bot/types';

/**
 * Services required by web API handlers
 * Makes specific services non-nullable since they're always enabled
 */
export type WebApiServices = ServiceTypes & {
  // Always required services
  logger: NonNullable<ServiceTypes['logger']>;
  mongodb: NonNullable<ServiceTypes['mongodb']>;
  postgres: NonNullable<ServiceTypes['postgres']>;
  cache: NonNullable<ServiceTypes['cache']>;
  queue: NonNullable<ServiceTypes['queue']>;
  queueManager: NonNullable<ServiceTypes['queueManager']>;
  // Optional services remain optional
  browser: ServiceTypes['browser'];
  proxy: ServiceTypes['proxy'];
  questdb: ServiceTypes['questdb'];
  globalCache: ServiceTypes['globalCache'];
};