export enum QueryKeys {
  messages = 'messages',
  sharedMessages = 'sharedMessages',
  sharedLinks = 'sharedLinks',
  allConversations = 'allConversations',
  archivedConversations = 'archivedConversations',
  searchConversations = 'searchConversations',
  conversation = 'conversation',
  searchEnabled = 'searchEnabled',
  user = 'user',
  name = 'name', // user key name
  models = 'models',
  balance = 'balance',
  endpoints = 'endpoints',
  presets = 'presets',
  searchResults = 'searchResults',
  tokenCount = 'tokenCount',
  availablePlugins = 'availablePlugins',
  startupConfig = 'startupConfig',
  assistants = 'assistants',
  assistant = 'assistant',
  agents = 'agents',
  agent = 'agent',
  files = 'files',
  fileConfig = 'fileConfig',
  tools = 'tools',
  toolAuth = 'toolAuth',
  toolCalls = 'toolCalls',
  mcpTools = 'mcpTools',
  mcpConnectionStatus = 'mcpConnectionStatus',
  mcpAuthValues = 'mcpAuthValues',
  agentTools = 'agentTools',
  actions = 'actions',
  assistantDocs = 'assistantDocs',
  agentDocs = 'agentDocs',
  fileDownload = 'fileDownload',
  filePreview = 'filePreview',
  voices = 'voices',
  customConfigSpeech = 'customConfigSpeech',
  prompts = 'prompts',
  prompt = 'prompt',
  promptGroups = 'promptGroups',
  allPromptGroups = 'allPromptGroups',
  promptGroup = 'promptGroup',
  categories = 'categories',
  randomPrompts = 'randomPrompts',
  agentCategories = 'agentCategories',
  marketplaceAgents = 'marketplaceAgents',
  roles = 'roles',
  rolesList = 'rolesList',
  conversationTags = 'conversationTags',
  health = 'health',
  userTerms = 'userTerms',
  banner = 'banner',
  /* Memories */
  memories = 'memories',
  principalSearch = 'principalSearch',
  accessRoles = 'accessRoles',
  resourcePermissions = 'resourcePermissions',
  effectivePermissions = 'effectivePermissions',
  graphToken = 'graphToken',
  /* MCP Servers */
  mcpServers = 'mcpServers',
  mcpServer = 'mcpServer',
  /* Active Jobs */
  activeJobs = 'activeJobs',
  /* Agent API Keys */
  agentApiKeys = 'agentApiKeys',
  /* Skills */
  skills = 'skills',
  skill = 'skill',
  skillFiles = 'skillFiles',
  skillFileContent = 'skillFileContent',
  /* Skill tree (phase 2 — filesystem-style node view) */
  skillTree = 'skillTree',
  skillNodeContent = 'skillNodeContent',
  /* Skill favorites (star a skill in the sidebar) */
  skillFavorites = 'skillFavorites',
  /* Per-user skill active/inactive overrides */
  skillStates = 'skillStates',
  /* General user favorites */
  favorites = 'favorites',
}

// Dynamic query keys that require parameters
export const DynamicQueryKeys = {
  agentFiles: (agentId: string) => ['agentFiles', agentId] as const,
} as const;

export enum MutationKeys {
  createAgentApiKey = 'createAgentApiKey',
  deleteAgentApiKey = 'deleteAgentApiKey',
  fileUpload = 'fileUpload',
  fileDelete = 'fileDelete',
  updatePreset = 'updatePreset',
  deletePreset = 'deletePreset',
  loginUser = 'loginUser',
  logoutUser = 'logoutUser',
  refreshToken = 'refreshToken',
  avatarUpload = 'avatarUpload',
  speechToText = 'speechToText',
  textToSpeech = 'textToSpeech',
  assistantAvatarUpload = 'assistantAvatarUpload',
  agentAvatarUpload = 'agentAvatarUpload',
  updateAction = 'updateAction',
  updateAgentAction = 'updateAgentAction',
  deleteAction = 'deleteAction',
  deleteAgentAction = 'deleteAgentAction',
  revertAgentVersion = 'revertAgentVersion',
  deleteUser = 'deleteUser',
  updateRole = 'updateRole',
  enableTwoFactor = 'enableTwoFactor',
  verifyTwoFactor = 'verifyTwoFactor',
  updateMemoryPreferences = 'updateMemoryPreferences',
  /* Skill mutations from the original UI PR — tree/node operations are
   * phase 2 and currently stubbed in the data-service layer. */
  createSkillNode = 'createSkillNode',
  updateSkillNode = 'updateSkillNode',
  deleteSkillNode = 'deleteSkillNode',
  updateSkillNodeContent = 'updateSkillNodeContent',
}
