File tree Expand file tree Collapse file tree 4 files changed +53
-1
lines changed Expand file tree Collapse file tree 4 files changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ namespace Notion.Client
30
30
[ JsonSubtypes . KnownSubTypeAttribute ( typeof ( TitlePropertyValue ) , PropertyValueType . Title ) ]
31
31
[ JsonSubtypes . KnownSubTypeAttribute ( typeof ( UrlPropertyValue ) , PropertyValueType . Url ) ]
32
32
[ JsonSubtypes . KnownSubTypeAttribute ( typeof ( UniqueIdPropertyValue ) , PropertyValueType . UniqueId ) ]
33
+ [ JsonSubtypes . KnownSubTypeAttribute ( typeof ( VerificationPropertyValue ) , PropertyValueType . Verification ) ]
33
34
[ SuppressMessage ( "ReSharper" , "UnusedMember.Global" ) ]
34
35
[ SuppressMessage ( "ReSharper" , "UnassignedGetOnlyAutoProperty" ) ]
35
36
public class PropertyValue
Original file line number Diff line number Diff line change @@ -74,5 +74,8 @@ public enum PropertyValueType
74
74
75
75
[ EnumMember ( Value = "unique_id" ) ]
76
76
UniqueId ,
77
+
78
+ [ EnumMember ( Value = "verification" ) ]
79
+ Verification ,
77
80
}
78
81
}
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ public enum NotionAPIErrorCode
15
15
[ EnumMember ( Value = "invalid_request" ) ]
16
16
InvalidRequest ,
17
17
18
+ [ EnumMember ( Value = "invalid_grant" ) ]
19
+ InvalidGrant ,
20
+
18
21
[ EnumMember ( Value = "validation_error" ) ]
19
22
ValidationError ,
20
23
@@ -40,6 +43,12 @@ public enum NotionAPIErrorCode
40
43
InternalServerError ,
41
44
42
45
[ 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
44
53
}
45
54
}
You can’t perform that action at this time.
0 commit comments