this big error shows in the webapp all the auth of notion is done and the deploying is working until i have change the response output generation of the gemini function.
SinglePageLayout.tsx:102 [DEPLOY] Deployment failed: Error: Failed to deploy workspace to Notion: Validation error in workspace data: body failed validation. Fix one:
body.children[3].embed should be defined, instead was `undefined`.
body.children[3].bookmark should be defined, instead was `undefined`.
body.children[3].image should be defined, instead was `undefined`.
body.children[3].video should be defined, instead was `undefined`.
body.children[3].pdf should be defined, instead was `undefined`.
body.children[3].file should be defined, instead was `undefined`.
body.children[3].audio should be defined, instead was `undefined`.
body.children[3].code should be defined, instead was `undefined`.
body.children[3].equation should be defined, instead was `undefined`.
body.children[3].divider should be defined, instead was `undefined`.
body.children[3].breadcrumb should be defined, instead was `undefined`.
body.children[3].table_of_contents should be defined, instead was `undefined`.
body.children[3].link_to_page should be defined, instead was `undefined`.
body.children[3].table_row should be defined, instead was `undefined`.
body.children[3].ai_block should be defined, instead was `undefined`.
body.children[3].table should be defined, instead was `undefined`.
body.children[3].column_list should be defined, instead was `undefined`.
body.children[3].column should be defined, instead was `undefined`.
body.children[3].heading_1 should be defined, instead was `undefined`.
body.children[3].heading_2 should be defined, instead was `undefined`.
body.children[3].heading_3 should be defined, instead was `undefined`.
body.children[3].paragraph should be defined, instead was `undefined`.
body.children[3].bulleted_list_item should be defined, instead was `undefined`.
body.children[3].numbered_list_item should be defined, instead was `undefined`.
body.children[3].quote should be defined, instead was `undefined`.
body.children[3].to_do should be defined, instead was `undefined`.
body.children[3].toggle should be defined, instead was `undefined`.
body.children[3].template should be defined, instead was `undefined`.
body.children[3].callout should be defined, instead was `undefined`.
body.children[3].synced_block should be defined, instead was `undefined`.
at throwIfResNotOk (queryClient.ts:20:22)
at async apiRequest (queryClient.ts:43:3)
at async Object.mutationFn (SinglePageLayout.tsx:82:24)
i want the fixation and how to build this application fully ready for the generating the whole notion template that can be deployed to the connected notion app this following is the system design in mermaid.live for this app
sequenceDiagram
participant U as User
participant UI as Frontend
participant API as Backend API
U->>UI: Input: Workspace Description
UI->>API: POST /api/workspaces/generate
API-->>UI: Response: Generated Workspace
U->>UI: Input: Deploy Request
UI->>API: POST /api/workspaces/:id/deploy
API-->>UI: Response: Deployment Success
U->>UI: Input: Chat Message
UI->>API: POST /api/chat
API-->>UI: Response: AI Reply
U->>UI: Input: Connect Notion
UI->>API: GET /api/connect/notion
API-->>UI: Response: OAuth Redirect ```