import * as drafts from './drafts.js' /** * Save a reply as a HEY draft. Never sends. Same as `createReplyDraft` in * `./drafts`. * * Without `to`, `cc`, or `bcc`, the draft goes to the thread's recipients * from the prefill. Passing any of them replaces those. * * @param {{ * entryId?: number|string, * topicId?: number|string, * text?: string, * html?: string, * subject?: string, * to?: string|string[], * cc?: string|string[], * bcc?: string|string[], * }} input * @returns {Promise<{ id: number, status: number, subject: string, url: string, edit_url: string, topic_url: string|null, to: string[], cc: string[], bcc: string[] }>} * * @example * import createReplyDraft from 'kody:@danj/hey-email/reply' * const draft = await createReplyDraft({ entryId: 123456789, text: 'Thanks, sounds good.' }) */ export async function createReplyDraft(input) { return drafts.createReplyDraft(input) } /** * Prefill a reply (subject, quote, recipients, acting sender). Does not * write. Same as `getReplyPrefill` in `./drafts`. * * @param {{ entryId?: number|string, topicId?: number|string }} input */ export async function getReplyPrefill(input) { return drafts.getReplyPrefill(input) } /** * Default export: `createReplyDraft`. * * @param {Parameters[0]} input */ export default async function reply(input) { return drafts.createReplyDraft(input) }