import { request } from './client.js'

export function getDecodeItemDetail(itemId, { signal } = {}) {
  return request(`/api/decode/items/${encodeURIComponent(itemId)}/detail`, { signal })
}

export function ingestDecodeItem(itemId, { dryRun = true, signal } = {}) {
  return request(`/api/decode/items/${encodeURIComponent(itemId)}/ingest`, {
    method: 'POST',
    json: { dry_run: dryRun },
    signal,
  })
}
