// bot/src/types.ts — all shared interfaces

export interface SlackConfig {
  session_name: string   // e.g. "cijira" → prefix "ciji"
  bot_token: string
  app_token: string
}

export interface JiraConfig {
  base_url: string
  project_key: string
  backlog_column: string
  api_token: string
  user: string
}

export interface BitbucketConfig {
  workspace: string
  repo_slug: string
  base_branch: string   // always "homolog"
  app_password: string
  user: string
}

export interface LLMConfig {
  provider: 'anthropic' | 'openai' | 'ollama'
  model: string
  api_key?: string
  openai_api_key?: string
  ollama_base_url?: string
}

export interface SddConfig {
  worktrees_root: string   // ".worktree"
}

export interface BotConfig {
  slack: SlackConfig
  jira: JiraConfig
  bitbucket: BitbucketConfig
  llm: LLMConfig
  sdd: SddConfig
}

export interface SessionEntry {
  slack_channel_id: string
  worktree_path: string
  agent_session_id: string
  owner_user_id: string
  card_id: string
  status: 'em_elaboracao' | 'aprovado'
  created_at: string
}

export type SessionMap = Record<string, SessionEntry>
