/**
 * HTTP Status Codes.
 */
export const HTTP_STATUS = {
  OK: 200,
  CREATED: 201,
  ACCEPTED: 202,
  BAD_REQUEST: 400,
  UNAUTHORIZED: 401,
  FORBIDDEN: 403,
  NOT_FOUND: 404,
  CONFLICT: 409,
  INTERNAL_ERROR: 500,
  INTERNAL_SERVER_ERROR: 500,
  TOO_MANY_REQUESTS: 429,
  SERVICE_UNAVAILABLE: 503,
} as const;

/**
 * Time constants.
 */
export const TIME = {
  MS_PER_SECOND: 1000,
  SECONDS_IN_MINUTE: 60,
  MS_PER_MINUTE: 60000,
  SECONDS_IN_HOUR: 3600,
  MS_PER_HOUR: 3600000,
  SECONDS_IN_DAY: 86400,
  MS_PER_DAY: 86400000,
  HEALTH_CHECK_CADENCE_MS: 900000, // 15 minutes
  HEALTH_PROBE_TIMEOUT_MS: 10000,
  EPOCH_2020_MS: 1577836800000, // 2020-01-01 00:00:00 UTC
} as const;

/**
 * Event Bus constants.
 */
export const BUS = {
  MAX_RETRIES: 3,
  INITIAL_BACKOFF_MS: 100,
  DLQ_TYPE: 'DLQ_EVENT',
  DLQ_PREFIX: 'EVENTBUS#DLQ',
  IDEMPOTENCY_TYPE: 'IDEMPOTENCY',
  IDEMPOTENCY_PREFIX: 'IDEMPOTENCY#',
  IDEMPOTENCY_TTL_SECONDS: 3600, // 1 hour
} as const;
