import { COLORING_PAGES } from './coloring.ts' import { PAINTINGS } from './paintings.ts' /** * List the paintings and coloring pages the Christ Paintings app shows, in order. * Use when an agent needs the titles, artists, or Church source pages (for example to * say which painting is which, or to link one). * * @param input - `{}` (no options) * @returns `{ count, paintings: [{ id, title, artist, sourceUrl }], coloringPages: [{ id, title, sourceUrl }] }` * * @example * import listPaintings from 'kody:@kentcdodds/christ-paintings' * * const { count, paintings } = await listPaintings({}) */ export default async function listPaintings(input: Record = {}) { if (input && Object.keys(input).length) throw new Error('listPaintings takes no options') return { count: PAINTINGS.length, paintings: PAINTINGS.map(({ id, title, artist, sourceUrl }) => ({ id, title, artist, sourceUrl })), coloringPages: COLORING_PAGES.map(({ id, title, sourceUrl }) => ({ id, title, sourceUrl })), } }