@@ -131,16 +131,45 @@ class FormulaPropertyConfiguration(NotionPropertyConfiguration):
131131 formula : FormulaConfigurationObject
132132
133133
134- class RelationConfigurationObject (BaseModel ):
134+ class RelationPropertyConfiguration (NotionPropertyConfiguration ):
135+ @property
136+ def _class_key_field (self ):
137+ return self .relation ["type" ]
138+
139+ _class_map = {
140+ "single_property" : "SinglePropertyConfiguration" ,
141+ "dual_property" : "DualPropertyConfiguration" ,
142+ }
143+
144+ relation : Dict
145+
146+
147+ class SinglePropertyConfigurationObject (BaseModel ):
135148 database_id : str
136- synced_property_name : Optional [ str ]
137- synced_property_id : Optional [ str ]
149+ relation_type : str = typeField
150+ single_property : Dict
138151
139152
140- class RelationPropertyConfiguration (NotionPropertyConfiguration ):
153+ class SinglePropertyConfiguration (RelationPropertyConfiguration ):
154+ _class_key_field = None
155+
156+ relation : SinglePropertyConfigurationObject
157+
158+
159+ class SyncedPropertyConfigurationObject (BaseModel ):
160+ synced_property_id : str
161+ synced_property_name : str
162+
163+
164+ class DualPropertyConfigurationObject (BaseModel ):
165+ database_id : str
166+ dual_property : SyncedPropertyConfigurationObject
167+
168+
169+ class DualPropertyConfiguration (RelationPropertyConfiguration ):
141170 _class_key_field = None
142171
143- relation : RelationConfigurationObject
172+ relation : DualPropertyConfigurationObject
144173
145174
146175class RollupConfigurationObject (BaseModel ):
0 commit comments