Skip to content

Commit a06723c

Browse files
committed
feat: support reducer result
1 parent 6493adc commit a06723c

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

packages/notion-types/src/collection-view.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export type CollectionViewType =
77
| 'list'
88
| 'board'
99
| 'calendar'
10+
| 'reducer'
1011

1112
export type CollectionCardCoverType =
1213
| 'page_cover'
@@ -123,9 +124,18 @@ export interface CalendarCollectionView extends BaseCollectionView {
123124
// TODO
124125
}
125126

127+
export interface ReducerCollectionView {
128+
type: 'reducer',
129+
reducerResults: {
130+
collection_group_results: object
131+
}
132+
sizeHint: number
133+
}
134+
126135
export type CollectionView =
127136
| TableCollectionView
128137
| GalleryCollectionView
129138
| ListCollectionView
130139
| BoardCollectionView
131140
| CalendarCollectionView
141+
| ReducerCollectionView

packages/notion-types/src/maps.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ export interface CollectionQueryResult {
8888
blockIds: ID[]
8989
hasMore: boolean
9090
}
91+
92+
reducerResults?: {
93+
collection_group_results: {
94+
type: string
95+
blockIds: ID[]
96+
hasMore: boolean
97+
}
98+
}
99+
100+
collectionIds: ID[]
101+
102+
recordMap?: ExtendedRecordMap
91103
}
92104

93105
export interface AggregationResult {

0 commit comments

Comments
 (0)