Skip to content

Commit 556959a

Browse files
committed
feat: add table block support
1 parent 97f740c commit 556959a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

block.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ type Block struct {
4141
Breadcrumb *Breadcrumb `json:"breadcrumb,omitempty"`
4242
ColumnList *ColumnList `json:"column_list,omitempty"`
4343
Column *Column `json:"column,omitempty"`
44+
Table *Table `json:"table,omitempty"`
45+
TableRow *TableRow `json:"table_row,omitempty"`
4446
LinkPreview *LinkPreview `json:"link_preview,omitempty"`
4547
LinkToPage *LinkToPage `json:"link_to_page,omitempty"`
4648
SyncedBlock *SyncedBlock `json:"synced_block,omitempty"`
@@ -104,6 +106,17 @@ type Column struct {
104106
Children []Block `json:"children,omitempty"`
105107
}
106108

109+
type Table struct {
110+
TableWidth int `json:"table_width"`
111+
HasColumnHeader bool `json:"has_column_header"`
112+
HasRowHeader bool `json:"has_row_header"`
113+
Children []Block `json:"children,omitempty"`
114+
}
115+
116+
type TableRow struct {
117+
Cells [][]RichText `json:"cells"`
118+
}
119+
107120
type LinkToPage struct {
108121
Type LinkToPageType `json:"type"`
109122

0 commit comments

Comments
 (0)