@@ -27,16 +27,6 @@ class AttributeAssignment:
2727 value : "Value"
2828
2929
30- @dataclass
31- class AttributeType :
32- """Attribute type for an entity type."""
33-
34- description : str
35- entity_type : str
36- name : str
37- type : "Type"
38-
39-
4030@dataclass
4131class BooleanValue :
4232 """Value to assign for a boolean attribute type."""
@@ -59,27 +49,15 @@ def __init__(self, config: "Config") -> None:
5949 """Return a new client with the given configuration."""
6050 self ._config = config
6151
62- def create_attribute_type (self , type_ : AttributeType ) -> None :
63- """Create a new attribute type."""
64- body = _encode_attribute_type (type_ )
65- self ._post (body , "attributeTypes" )
66-
6752 def create_connector_logs (self , logs : Iterable ["ConnectorLog" ]) -> None :
6853 """Create connector logs."""
6954 body = map (_encode_connector_log , logs )
70- self ._post (body , "connectorLogs" )
71-
72- def create_relationship_attribute_type (
73- self , type_ : "RelationshipAttributeType"
74- ) -> None :
75- """Create a new relationship attribute type."""
76- body = _encode_relationship_attribute_type (type_ )
77- self ._post (body , "relationshipAttributeTypes" )
55+ self ._post (body , "custom-connector-logs" )
7856
7957 def reload_domain_graph (self , graph : "DomainGraph" ) -> None :
8058 """Reload a domain graph."""
8159 body = _encode_domain_graph (graph )
82- self ._post (body , "domain-graph/reload " )
60+ self ._post (body , "custom-connector- domain-graphs " )
8361
8462 def _post (self , body : Any , path : str ) -> None :
8563 data = _encode (body )
@@ -176,17 +154,6 @@ class Relationship:
176154 to_entity_type : str
177155
178156
179- @dataclass
180- class RelationshipAttributeType :
181- """Attribute type for relationships between entities of specific types."""
182-
183- description : str
184- from_entity_type : str
185- name : str
186- to_entity_type : str
187- type : "Type"
188-
189-
190157@dataclass
191158class StringValue :
192159 """Value to assign for a string attribute type."""
@@ -201,17 +168,6 @@ class TimeValue:
201168 value : time
202169
203170
204- class Type (Enum ):
205- """Type of an attribute type, determining valid assignment values."""
206-
207- BOOLEAN = auto ()
208- DATE = auto ()
209- DATE_TIME = auto ()
210- NUMBER = auto ()
211- STRING = auto ()
212- TIME = auto ()
213-
214-
215171Value = Union [
216172 BooleanValue , DateValue , DateTimeValue , NumberValue , StringValue , TimeValue
217173]
@@ -249,16 +205,6 @@ def _encode_attribute_assignment(assignment: AttributeAssignment) -> Any:
249205 }
250206
251207
252- def _encode_attribute_type (type_ : AttributeType ) -> Any :
253- type__ = _encode_type (type_ .type )
254- return {
255- "category" : type_ .entity_type ,
256- "description" : type_ .description ,
257- "name" : type_ .name ,
258- "type" : type__ ,
259- }
260-
261-
262208def _encode_bool (bool_ : bool ) -> Any :
263209 return "true" if bool_ else "false"
264210
@@ -327,17 +273,6 @@ def _encode_relationship(relationship: Relationship) -> Any:
327273 }
328274
329275
330- def _encode_relationship_attribute_type (type_ : RelationshipAttributeType ) -> Any :
331- type__ = _encode_type (type_ .type )
332- return {
333- "childType" : type_ .to_entity_type ,
334- "description" : type_ .description ,
335- "name" : type_ .name ,
336- "parentType" : type_ .from_entity_type ,
337- "type" : type__ ,
338- }
339-
340-
341276def _encode_time (time_ : time ) -> Any :
342277 datetime_ = datetime (
343278 2000 , 1 , 1 , time_ .hour , time_ .minute , time_ .second , tzinfo = time_ .tzinfo ,
@@ -346,21 +281,6 @@ def _encode_time(time_: time) -> Any:
346281 return f"{ datetime__ :%H:%M:%S} Z"
347282
348283
349- def _encode_type (type_ : Type ) -> Any :
350- if type_ == Type .BOOLEAN :
351- return "boolean"
352- elif type_ == Type .DATE :
353- return "date"
354- elif type_ == Type .DATE_TIME :
355- return "dateTime"
356- elif type_ == Type .NUMBER :
357- return "number"
358- elif type_ == Type .STRING :
359- return "string"
360- else :
361- return "time"
362-
363-
364284def _encode_value (value : Value ) -> Any :
365285 if isinstance (value , BooleanValue ):
366286 boolean_value = _encode_bool (value .value )
0 commit comments