import apiClient from './client'
import type { RetentionSettings } from '@/types/assistant-chat'

/**
 * Chat retention settings API.
 *
 * Note: Chat CRUD methods were removed — the frontend uses aiSessionsApi
 * for all chat operations. Only retention settings remain on the /assistant prefix.
 */
export const assistantChatApi = {
  async getRetentionSettings(): Promise<RetentionSettings> {
    const response = await apiClient.get<RetentionSettings>('/assistant/retention')
    return response.data
  },

  async updateRetentionSettings(data: Partial<RetentionSettings>): Promise<RetentionSettings> {
    const response = await apiClient.patch<RetentionSettings>('/assistant/retention', data)
    return response.data
  },
}

export default assistantChatApi
