import { heyFetch } from './client.js' /** * List HEY boxes (Imbox, Feed, etc). * Use when you need box ids/kinds before reading a mailbox. * * @returns {Promise} * * @example * import listBoxes from 'kody:@danj/hey-email/boxes' * const boxes = await listBoxes() */ export default async function listBoxes() { const data = await heyFetch('/boxes.json') return Array.isArray(data) ? data : data?.boxes || [] }