Skip to content

Commit fbdbe03

Browse files
committed
Fix for groups v2 api request
1 parent 380083a commit fbdbe03

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/notion-client/src/notion-api.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,18 @@ export class NotionAPI {
568568
reducers: {
569569
[reducerLabel]: {
570570
type: 'groups',
571+
version: 'v2',
571572
groupBy,
572573
...(collectionView?.query2?.filter && {
573574
filter: collectionView?.query2?.filter
574575
}),
575-
groupSortPreference: groups.map((group: any) => group?.value),
576+
groupSortPreference: groups.map((group: any) => ({
577+
property: group?.property,
578+
value: {
579+
type: group?.value?.type,
580+
value: group?.value?.value
581+
}
582+
})),
576583
limit
577584
},
578585
...reducersQuery

0 commit comments

Comments
 (0)