Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/morning-briefing

src/get-report.ts

16 lines · 611 B · TypeScript
import { getStoredReport } from './report.ts'
import type { BriefingInput } from './types.ts'

/**
 * Read the stored morning briefing report for a date without rebuilding sources
 * when a cached row already exists.
 *
 * @param input.date - Date (`YYYY-MM-DD`); defaults to today in `timezone`.
 * @example
 * import getReport from 'kody:@kody/morning-briefing/get-report'
 * const report = await getReport({ date: '2026-08-22' })
 * // => { date: '2026-08-22', sections: [...], markdown: '...' }
 */
export default async function getReport(input: BriefingInput = {}) {
	return await getStoredReport(input)
}