import { api } from './client'

export async function fetchKdocsStatus(params = {}, requestConfig = {}) {
  const { data } = await api.get('/kdocs/status', { params, ...requestConfig })
  return data
}

export async function fetchKdocsQr(payload = {}) {
  const body = { force: true, ...payload }
  const { data } = await api.post('/kdocs/qr', body)
  return data
}

export async function clearKdocsLogin() {
  const { data } = await api.post('/kdocs/clear-login', {})
  return data
}
