← Public packages
@noah/hey-email
HEY.com email integration with Kody: search threads, read messages/attachments, create drafts, and send with explicit confirmation.
src/boxes.js
16 lines · 434 B · JavaScriptimport { heyFetch } from './client.js'
/**
* List HEY boxes (Imbox, Feed, etc).
* Use when you need box ids/kinds before reading a mailbox.
*
* @returns {Promise<unknown[]>}
*
* @example
* import listBoxes from 'kody:@noah/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 || []
}