-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from notion-dotnet/2.0.0
Merge 2.0.0 release 🎉
- Loading branch information
Showing
135 changed files
with
1,161 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...ion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/ParagraphBlock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
namespace Notion.Client | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class ParagraphUpdateBlock : IUpdateBlock | ||
{ | ||
[JsonProperty("paragraph")] | ||
public TextContentUpdate Paragraph { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
....Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/TextContentUpdate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class TextContentUpdate | ||
{ | ||
[JsonProperty("text")] | ||
public IEnumerable<RichTextBaseInput> Text { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...Notion.Client/Api/Blocks/RequestParams/BlocksUpdateParameters/UpdateBlocks/ToggleBlock.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
namespace Notion.Client | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class ToggleUpdateBlock : IUpdateBlock | ||
{ | ||
[JsonProperty("toggle")] | ||
public TextContentUpdate Toggle { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
Src/Notion.Client/Api/Blocks/RequestParams/IBlocksAppendChildrenBodyParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
// TODO: need an input version of Block | ||
public interface IBlocksAppendChildrenBodyParameters | ||
{ | ||
[JsonProperty("children")] | ||
IEnumerable<Block> Children { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...Client/Api/Databases/RequestParams/DatabasesCreateParameters/DatabasesCreateParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class DatabasesCreateParameters : IDatabasesCreateBodyParameters, IDatabasesCreateQueryParameters | ||
{ | ||
[JsonProperty("parent")] | ||
public ParentPageInput Parent { get; set; } | ||
|
||
[JsonProperty("properties")] | ||
public Dictionary<string, IPropertySchema> Properties { get; set; } | ||
|
||
[JsonProperty("title")] | ||
public List<RichTextBaseInput> Title { get; set; } | ||
|
||
[JsonProperty("icon")] | ||
public IPageIcon Icon { get; set; } | ||
|
||
[JsonProperty("cover")] | ||
public FileObject Cover { get; set; } | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...t/Api/Databases/RequestParams/DatabasesCreateParameters/IDatabasesCreateBodyParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public interface IDatabasesCreateBodyParameters | ||
{ | ||
[JsonProperty("parent")] | ||
ParentPageInput Parent { get; set; } | ||
|
||
[JsonProperty("properties")] | ||
Dictionary<string, IPropertySchema> Properties { get; set; } | ||
|
||
[JsonProperty("title")] | ||
List<RichTextBaseInput> Title { get; set; } | ||
} | ||
} |
13 changes: 12 additions & 1 deletion
13
Src/Notion.Client/Api/Databases/RequestParams/DatabasesCreateParameters/MentionInput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
namespace Notion.Client | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class MentionInput | ||
{ | ||
[JsonProperty("type")] | ||
public string Type { get; set; } | ||
|
||
[JsonProperty("user")] | ||
public Person User { get; set; } | ||
|
||
[JsonProperty("page")] | ||
public ObjectId Page { get; set; } | ||
|
||
[JsonProperty("database")] | ||
public ObjectId Database { get; set; } | ||
|
||
[JsonProperty("date")] | ||
public DatePropertyValue Date { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...atabases/RequestParams/DatabasesCreateParameters/PropertySchema/CheckboxPropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class CheckboxPropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("checkbox")] | ||
public Dictionary<string, object> Checkbox { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...pi/Databases/RequestParams/DatabasesCreateParameters/PropertySchema/DatePropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class DatePropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("date")] | ||
public Dictionary<string, object> Date { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...i/Databases/RequestParams/DatabasesCreateParameters/PropertySchema/EmailPropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class EmailPropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("email")] | ||
public Dictionary<string, object> Email { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...pi/Databases/RequestParams/DatabasesCreateParameters/PropertySchema/FilePropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class FilePropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("files")] | ||
public Dictionary<string, object> Files { get; set; } | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
...Databases/RequestParams/DatabasesCreateParameters/PropertySchema/FormulaPropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
namespace Notion.Client | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class FormulaPropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("formula")] | ||
public Formula Formula { get; set; } | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
.../Databases/RequestParams/DatabasesCreateParameters/PropertySchema/NumberPropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
namespace Notion.Client | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class NumberPropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("number")] | ||
public Number Number { get; set; } | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
.../Databases/RequestParams/DatabasesCreateParameters/PropertySchema/PeoplePropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class PeoplePropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("people")] | ||
public Dictionary<string, object> People { get; set; } | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...atabases/RequestParams/DatabasesCreateParameters/PropertySchema/RelationPropertySchema.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Notion.Client | ||
{ | ||
public class RelationPropertySchema : IPropertySchema | ||
{ | ||
[JsonProperty("relation")] | ||
public RelationInfo Relation { get; set; } | ||
|
||
public class RelationInfo | ||
{ | ||
[JsonProperty("database_id")] | ||
public Guid DatabaseId { get; set; } | ||
|
||
[JsonProperty("synced_property_id")] | ||
public string SynchedPropertyId { get; set; } | ||
|
||
[JsonProperty("synced_property_name")] | ||
public string SynchedPropertyName { get; set; } | ||
} | ||
} | ||
} |
Oops, something went wrong.