import { Client } from "@notionhq/client"; import { createMermaidCodeBlock } from "../blocks/createMermaidCodeBlock"; import { createParagraphBlock } from "../blocks/createParagraphBlock"; import { createStatGroupChildrenListItemBlock } from "./createStatGroupListItemBlock"; import { updatePageContent } from "./updatePageContent"; import { StatsGenerales, statsGeneralesDesc, } from "../../../statistiques/v2/generales/StatsGenerales"; export async function publishStatsGenerales( notionClient: Client, header: string, statsGenerales: StatsGenerales, mermaidDiagramStatsGeneralesMensuelles: string ) { const headerBlock = createParagraphBlock(header); const statsBlocks = createStatGroupChildrenListItemBlock( statsGeneralesDesc, statsGenerales ); const diagramBlock = createMermaidCodeBlock( mermaidDiagramStatsGeneralesMensuelles ); const blocks = [headerBlock, ...statsBlocks, diagramBlock]; await updatePageContent( notionClient, "313751fb-daed-4b33-992f-c86d7ac2de37", blocks ); }