/** * Updates notes field for a specified Datawrapper chart, table or map. By default, this function looks for the API key in process.env.DATAWRAPPER_KEY. * * * @example * Basic usage * ```js * import { updateNotesDW, formatDate } from "journalism" * * const chartID = "myChartId" * const dateString = formatDate(new Date(), "Month DD, YYYY, at HH:MM period", { abbreviations: true }) * const note = `This chart was last updated on ${dateString}` * * await updateNotesDW(chartID, note) * * // If your API key is stored under a different name in process.env, use the options. * await updateNotesDW(chartID, note, { apiKey: "DW_KEY" }) * ``` * * @param chartId - The ID of the chart to update. * @param note - The note content to update in the chart. * @param options - Optional parameters. * @param options.apiKey - The process.env API key name to use for authentication. If not provided, defaults to process.env.DATAWRAPPER_KEY. * @param options.returnResponse - If true, the function returns the response object from the fetch call. * * @category Dataviz */ export default function updateNotesDW(chartId: string, note: string, options?: { apiKey?: string; returnResponse?: boolean; }): Promise;