@@ -14,7 +14,7 @@ import {
14
14
RichTextItemResponse ,
15
15
} from "@notionhq/client/build/src/api-endpoints"
16
16
import { useMutation , useQuery } from "@tanstack/react-query"
17
- import { CollectionItemData , framer , ManagedCollection , ManagedCollectionField } from "framer-plugin"
17
+ import { CollectionItemData , framer , ManagedCollection , ManagedCollectionField , FieldData } from "framer-plugin"
18
18
import pLimit from "p-limit"
19
19
import { blocksToHtml , richTextToHTML } from "./blocksToHTML"
20
20
import { assert , assertNever , formatDate , isDefined , isString , slugify } from "./utils"
@@ -506,7 +506,7 @@ async function processItem(
506
506
) : Promise < CollectionItemData | null > {
507
507
let slugValue : null | string = null
508
508
509
- const fieldData : Record < string , unknown > = { }
509
+ const fieldData : FieldData = { }
510
510
511
511
assert ( isFullPage ( item ) )
512
512
@@ -539,12 +539,12 @@ async function processItem(
539
539
} )
540
540
}
541
541
542
- fieldData [ field . id ] = fieldValue
542
+ fieldData [ field . id ] = { type : field . type , value : fieldValue }
543
543
}
544
544
545
545
if ( fieldsById . has ( pageContentProperty . id ) && item . id ) {
546
546
const contentHTML = await getPageBlocksAsRichText ( item . id )
547
- fieldData [ pageContentProperty . id ] = contentHTML
547
+ fieldData [ pageContentProperty . id ] = { type : "formattedText" , value : contentHTML }
548
548
}
549
549
550
550
if ( ! slugValue ) {
0 commit comments