Skip to content

Commit a4e06fc

Browse files
Merge branch 'main' into 372-add-public_url-on-page-and-database
2 parents 9a39350 + 7193f39 commit a4e06fc

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

Src/Notion.Client/Models/PropertyValue/PropertyValue.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace Notion.Client
3030
[JsonSubtypes.KnownSubTypeAttribute(typeof(TitlePropertyValue), PropertyValueType.Title)]
3131
[JsonSubtypes.KnownSubTypeAttribute(typeof(UrlPropertyValue), PropertyValueType.Url)]
3232
[JsonSubtypes.KnownSubTypeAttribute(typeof(UniqueIdPropertyValue), PropertyValueType.UniqueId)]
33+
[JsonSubtypes.KnownSubTypeAttribute(typeof(VerificationPropertyValue), PropertyValueType.Verification)]
3334
[SuppressMessage("ReSharper", "UnusedMember.Global")]
3435
[SuppressMessage("ReSharper", "UnassignedGetOnlyAutoProperty")]
3536
public class PropertyValue

Src/Notion.Client/Models/PropertyValue/PropertyValueType.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,8 @@ public enum PropertyValueType
7474

7575
[EnumMember(Value = "unique_id")]
7676
UniqueId,
77+
78+
[EnumMember(Value = "verification")]
79+
Verification,
7780
}
7881
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Notion.Client
4+
{
5+
/// <summary>
6+
/// Verification property value.
7+
/// </summary>
8+
public class VerificationPropertyValue : PropertyValue
9+
{
10+
public override PropertyValueType Type => PropertyValueType.Verification;
11+
12+
/// <summary>
13+
/// Object containing verification type-specific data.
14+
/// </summary>
15+
[JsonProperty("verification")]
16+
public Info Verification { get; set; }
17+
18+
public class Info
19+
{
20+
/// <summary>
21+
/// The state of verification. Possible values are "verified" and "unverified".
22+
/// </summary>
23+
[JsonProperty("state")]
24+
public string State { get; set; }
25+
26+
/// <summary>
27+
/// Describes the user who verified this page.
28+
/// </summary>
29+
[JsonProperty("verified_by")]
30+
public User VerifiedBy { get; set; }
31+
32+
/// <summary>
33+
/// Date verification property values contain a date property value.
34+
/// </summary>
35+
[JsonProperty("date")]
36+
public Date Date { get; set; }
37+
}
38+
}
39+
}

Src/Notion.Client/NotionAPIErrorCode.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public enum NotionAPIErrorCode
1515
[EnumMember(Value = "invalid_request")]
1616
InvalidRequest,
1717

18+
[EnumMember(Value = "invalid_grant")]
19+
InvalidGrant,
20+
1821
[EnumMember(Value = "validation_error")]
1922
ValidationError,
2023

@@ -40,6 +43,12 @@ public enum NotionAPIErrorCode
4043
InternalServerError,
4144

4245
[EnumMember(Value = "service_unavailable")]
43-
ServiceUnavailable
46+
ServiceUnavailable,
47+
48+
[EnumMember(Value = "database_connection_unavailable")]
49+
DatabaseConnectionUnavailable,
50+
51+
[EnumMember(Value = "gateway_timeout")]
52+
GetewayTimeout
4453
}
4554
}

0 commit comments

Comments
 (0)