Skip to content

Commit dee24f4

Browse files
author
SDKgen-Bot
committed
Type "Database_Id" was removed
Type "Page_Id" was removed Property "Block.parent" (reference) target has changed from "Page" to "Parent_Id" Property "Block.has_children" (boolean) description has changed from "" to "Whether or not the block has children blocks nested within it" Property "Block.in_trash" (boolean) description has changed from "" to "Whether the block has been deleted" Property "Block.archived" was added Property "Comment.parent" (reference) target has changed from "Page_Id" to "Parent_Id" Type "Block_Bookmark" was added Type "Block_Breadcrumb" was added Type "Block_Bulleted_List_Item" was added Type "Block_Callout" was added Type "Block_Child_Database" was added Type "Block_Child_Page" was added Type "Block_Code" was added Type "Parent_Id" was added Type "Database_Parent_Id" was added Type "Page_Parent_Id" was added Type "Block_Parent_Id" was added Type "Workspace_Parent_Id" was added Type "Bookmark" was added Type "Icon" was added Type "Emoji_Icon" was added Type "File_Icon" was added Type "File" was added Type "External_Icon" was added Type "External" was added Type "Block_Divider" was added Type "Bulleted_List_Item" was added Type "Callout" was added Type "Child_Database" was added Type "Child_Page" was added Type "Code" was added
1 parent 354c024 commit dee24f4

28 files changed

+415
-15
lines changed

sdkgen.lock

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/SdkFabric.Notion/Block.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
namespace SdkFabric.Notion;
99

10-
public class Block
10+
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
11+
[JsonDerivedType(typeof(BlockBookmark), typeDiscriminator: "bookmark")]
12+
public abstract class Block
1113
{
1214
[JsonPropertyName("object")]
1315
public string? Object { get; set; }
@@ -16,28 +18,31 @@ public class Block
1618
public string? Id { get; set; }
1719

1820
[JsonPropertyName("parent")]
19-
public Page? Parent { get; set; }
21+
public ParentId? Parent { get; set; }
22+
23+
[JsonPropertyName("type")]
24+
public string? Type { get; set; }
2025

2126
[JsonPropertyName("created_time")]
2227
public System.DateTime? CreatedTime { get; set; }
2328

24-
[JsonPropertyName("last_edited_time")]
25-
public System.DateTime? LastEditedTime { get; set; }
26-
2729
[JsonPropertyName("created_by")]
2830
public User? CreatedBy { get; set; }
2931

32+
[JsonPropertyName("last_edited_time")]
33+
public System.DateTime? LastEditedTime { get; set; }
34+
3035
[JsonPropertyName("last_edited_by")]
3136
public User? LastEditedBy { get; set; }
3237

33-
[JsonPropertyName("has_children")]
34-
public bool? HasChildren { get; set; }
38+
[JsonPropertyName("archived")]
39+
public bool? Archived { get; set; }
3540

3641
[JsonPropertyName("in_trash")]
3742
public bool? InTrash { get; set; }
3843

39-
[JsonPropertyName("type")]
40-
public string? Type { get; set; }
44+
[JsonPropertyName("has_children")]
45+
public bool? HasChildren { get; set; }
4146

4247
}
4348

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* BlockBookmark automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockBookmark : Block
11+
{
12+
[JsonPropertyName("bookmark")]
13+
public Bookmark? Bookmark { get; set; }
14+
15+
}
16+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* BlockBreadcrumb automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockBreadcrumb : Block
11+
{
12+
}
13+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* BlockBulletedListItem automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockBulletedListItem : Block
11+
{
12+
[JsonPropertyName("bulleted_list_item")]
13+
public BulletedListItem? BulletedListItem { get; set; }
14+
15+
}
16+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* BlockCallout automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockCallout : Block
11+
{
12+
[JsonPropertyName("callout")]
13+
public Callout? Callout { get; set; }
14+
15+
}
16+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* BlockChildDatabase automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockChildDatabase : Block
11+
{
12+
[JsonPropertyName("child_database")]
13+
public ChildDatabase? ChildDatabase { get; set; }
14+
15+
}
16+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* BlockChildPage automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockChildPage : Block
11+
{
12+
[JsonPropertyName("child_page")]
13+
public ChildPage? ChildPage { get; set; }
14+
15+
}
16+

src/SdkFabric.Notion/BlockCode.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* BlockCode automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockCode : Block
11+
{
12+
[JsonPropertyName("code")]
13+
public Code? Code { get; set; }
14+
15+
}
16+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* BlockDivider automatically generated by SDKgen please do not edit this file manually
3+
* @see https://sdkgen.app
4+
*/
5+
6+
using System.Text.Json.Serialization;
7+
8+
namespace SdkFabric.Notion;
9+
10+
public class BlockDivider : Block
11+
{
12+
}
13+

0 commit comments

Comments
 (0)