neurograph-core 1.202509071925__py3-none-any.whl → 1.202509160244__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neurograph/v1/__init__.py +295 -43
- neurograph/v1/api/__init__.py +28 -2
- neurograph/v1/api/client_api.py +541 -0
- neurograph/v1/api/knowledge_api.py +2281 -124
- neurograph/v1/api/knowledge_extract_api.py +1798 -0
- neurograph/v1/api_client.py +4 -1
- neurograph/v1/models/__init__.py +215 -21
- neurograph/v1/models/{client_client_creat_response.py → client_client_url_row.py} +21 -25
- neurograph/v1/models/client_client_url_snapshot_response.py +95 -0
- neurograph/v1/models/{atlas_atlas_version_response.py → client_client_url_snapshot_row.py} +20 -22
- neurograph/v1/models/client_client_urls_response.py +3 -3
- neurograph/v1/models/{organizations_organization_set_atlas_response.py → client_probe.py} +22 -16
- neurograph/v1/models/client_probe_todo_row.py +89 -0
- neurograph/v1/models/client_trigger_probe_response.py +101 -0
- neurograph/v1/models/db_knowledge_customer.py +97 -0
- neurograph/v1/models/db_knowledge_order.py +177 -0
- neurograph/v1/models/db_knowledge_product.py +107 -0
- neurograph/v1/models/{atlas_atlas_version_upsert_request.py → db_knowledge_store.py} +16 -12
- neurograph/v1/models/knowledge_assertion.py +111 -0
- neurograph/v1/models/knowledge_assertion_create_request.py +103 -0
- neurograph/v1/models/knowledge_assertion_list_response.py +103 -0
- neurograph/v1/models/knowledge_assertion_query.py +99 -0
- neurograph/v1/models/{atlas_atlas_version_many_response.py → knowledge_assertion_response.py} +9 -13
- neurograph/v1/models/knowledge_customer_query.py +99 -0
- neurograph/v1/models/knowledge_customer_response.py +103 -0
- neurograph/v1/models/knowledge_enrichment_artifact.py +137 -0
- neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +113 -0
- neurograph/v1/models/knowledge_enrichment_artifact_list_response.py +103 -0
- neurograph/v1/models/knowledge_enrichment_artifact_response.py +93 -0
- neurograph/v1/models/knowledge_enrichment_artifact_update_output_request.py +93 -0
- neurograph/v1/models/knowledge_enrichment_artifact_update_status_request.py +99 -0
- neurograph/v1/models/{organizations_atlas_config.py → knowledge_enrichment_query.py} +19 -17
- neurograph/v1/models/{knowledge_knowledge_entity.py → knowledge_entity.py} +13 -13
- neurograph/v1/models/{knowledge_knowledge_entity_upsert_request.py → knowledge_entity_create_request.py} +7 -7
- neurograph/v1/models/{knowledge_knowledge_entity_create_response.py → knowledge_entity_create_response.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_extra.py → knowledge_entity_extra.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_get_many_response.py → knowledge_entity_get_many_response.py} +7 -7
- neurograph/v1/models/{knowledge_knowledge_entity_in_db.py → knowledge_entity_in_db.py} +13 -13
- neurograph/v1/models/{knowledge_knowledge_entity_relations.py → knowledge_entity_relations.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_schema.py → knowledge_entity_schema.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_schema_row.py → knowledge_entity_schema_row.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_schema_upsert_request.py → knowledge_entity_schema_upsert_request.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_schemas_response.py → knowledge_entity_schemas_response.py} +7 -7
- neurograph/v1/models/{knowledge_knowledge_entity_schemas_upsert_response.py → knowledge_entity_schemas_upsert_response.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_type_row.py → knowledge_entity_type_row.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_entity_create_request.py → knowledge_entity_upsert_request.py} +9 -11
- neurograph/v1/models/{knowledge_knowledge_entity_upsert_row.py → knowledge_entity_upsert_row.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_ingest_raw_request.py → knowledge_ingest_raw_request.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_ingest_raw_response.py → knowledge_ingest_raw_response.py} +4 -4
- neurograph/v1/models/{knowledge_knowledge_kind_response.py → knowledge_kind_response.py} +4 -4
- neurograph/v1/models/knowledge_order_query.py +129 -0
- neurograph/v1/models/knowledge_order_response.py +103 -0
- neurograph/v1/models/knowledge_product_query.py +101 -0
- neurograph/v1/models/knowledge_product_response.py +103 -0
- neurograph/v1/models/{client_client_create_request.py → knowledge_store_query.py} +17 -15
- neurograph/v1/models/knowledge_store_response.py +103 -0
- neurograph/v1/models/{knowledge_knowledge_type_response.py → knowledge_type_response.py} +7 -7
- neurograph/v1/models/{tasks_sync_from_firebase_result.py → pgtype_int8.py} +10 -8
- neurograph/v1/models/pgtype_text.py +89 -0
- {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/METADATA +2 -1
- {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/RECORD +63 -42
- neurograph/v1/api/atlas_api.py +0 -588
- neurograph/v1/api/tasks_api.py +0 -286
- neurograph/v1/models/atlas_atlas_version.py +0 -99
- neurograph/v1/models/organizations_organization_set_atlas_request.py +0 -93
- {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/WHEEL +0 -0
- {neurograph_core-1.202509071925.dist-info → neurograph_core-1.202509160244.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class KnowledgeEnrichmentArtifactUpdateStatusRequest(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
KnowledgeEnrichmentArtifactUpdateStatusRequest
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
agent_engine_run_id: Optional[StrictStr] = None
|
|
30
|
+
attempt_count: Optional[StrictInt] = None
|
|
31
|
+
cloud_run_execution_id: Optional[StrictStr] = None
|
|
32
|
+
completed_at: Optional[StrictStr] = None
|
|
33
|
+
last_error: Optional[StrictStr] = None
|
|
34
|
+
started_at: Optional[StrictStr] = None
|
|
35
|
+
status: Optional[StrictStr] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["agent_engine_run_id", "attempt_count", "cloud_run_execution_id", "completed_at", "last_error", "started_at", "status"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of KnowledgeEnrichmentArtifactUpdateStatusRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of KnowledgeEnrichmentArtifactUpdateStatusRequest from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"agent_engine_run_id": obj.get("agent_engine_run_id"),
|
|
90
|
+
"attempt_count": obj.get("attempt_count"),
|
|
91
|
+
"cloud_run_execution_id": obj.get("cloud_run_execution_id"),
|
|
92
|
+
"completed_at": obj.get("completed_at"),
|
|
93
|
+
"last_error": obj.get("last_error"),
|
|
94
|
+
"started_at": obj.get("started_at"),
|
|
95
|
+
"status": obj.get("status")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -22,17 +22,18 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class KnowledgeEnrichmentQuery(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
KnowledgeEnrichmentQuery
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
client_id: Optional[StrictStr] = None
|
|
30
|
+
is_current: Optional[StrictBool] = None
|
|
31
|
+
job_name: Optional[StrictStr] = None
|
|
32
|
+
limit: Optional[StrictInt] = None
|
|
33
|
+
offset: Optional[StrictInt] = None
|
|
34
|
+
status: Optional[StrictStr] = None
|
|
35
|
+
subject_entity_id: Optional[StrictStr] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["client_id", "is_current", "job_name", "limit", "offset", "status", "subject_entity_id"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
39
|
populate_by_name=True,
|
|
@@ -52,7 +53,7 @@ class OrganizationsAtlasConfig(BaseModel):
|
|
|
52
53
|
|
|
53
54
|
@classmethod
|
|
54
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of
|
|
56
|
+
"""Create an instance of KnowledgeEnrichmentQuery from a JSON string"""
|
|
56
57
|
return cls.from_dict(json.loads(json_str))
|
|
57
58
|
|
|
58
59
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,7 +78,7 @@ class OrganizationsAtlasConfig(BaseModel):
|
|
|
77
78
|
|
|
78
79
|
@classmethod
|
|
79
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of
|
|
81
|
+
"""Create an instance of KnowledgeEnrichmentQuery from a dict"""
|
|
81
82
|
if obj is None:
|
|
82
83
|
return None
|
|
83
84
|
|
|
@@ -85,12 +86,13 @@ class OrganizationsAtlasConfig(BaseModel):
|
|
|
85
86
|
return cls.model_validate(obj)
|
|
86
87
|
|
|
87
88
|
_obj = cls.model_validate({
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
89
|
+
"client_id": obj.get("client_id"),
|
|
90
|
+
"is_current": obj.get("is_current"),
|
|
91
|
+
"job_name": obj.get("job_name"),
|
|
92
|
+
"limit": obj.get("limit"),
|
|
93
|
+
"offset": obj.get("offset"),
|
|
94
|
+
"status": obj.get("status"),
|
|
95
|
+
"subject_entity_id": obj.get("subject_entity_id")
|
|
94
96
|
})
|
|
95
97
|
return _obj
|
|
96
98
|
|
|
@@ -19,24 +19,24 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from neurograph.v1.models.
|
|
23
|
-
from neurograph.v1.models.
|
|
24
|
-
from neurograph.v1.models.
|
|
22
|
+
from neurograph.v1.models.knowledge_entity_extra import KnowledgeEntityExtra
|
|
23
|
+
from neurograph.v1.models.knowledge_entity_relations import KnowledgeEntityRelations
|
|
24
|
+
from neurograph.v1.models.knowledge_entity_schema import KnowledgeEntitySchema
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
28
|
-
class
|
|
28
|
+
class KnowledgeEntity(BaseModel):
|
|
29
29
|
"""
|
|
30
|
-
|
|
30
|
+
KnowledgeEntity
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
client_id: Optional[StrictStr] = Field(default=None, description="nullable.")
|
|
33
33
|
data: Optional[Dict[str, Any]] = None
|
|
34
|
-
ext: Optional[
|
|
34
|
+
ext: Optional[KnowledgeEntityExtra] = None
|
|
35
35
|
extra: Optional[Dict[str, Any]] = None
|
|
36
36
|
kind: Optional[StrictStr] = None
|
|
37
37
|
name: Optional[StrictStr] = None
|
|
38
|
-
relations: Optional[
|
|
39
|
-
var_schema: Optional[
|
|
38
|
+
relations: Optional[KnowledgeEntityRelations] = None
|
|
39
|
+
var_schema: Optional[KnowledgeEntitySchema] = Field(default=None, alias="schema")
|
|
40
40
|
ts_updated: Optional[StrictInt] = None
|
|
41
41
|
__properties: ClassVar[List[str]] = ["client_id", "data", "ext", "extra", "kind", "name", "relations", "schema", "ts_updated"]
|
|
42
42
|
|
|
@@ -58,7 +58,7 @@ class KnowledgeKnowledgeEntity(BaseModel):
|
|
|
58
58
|
|
|
59
59
|
@classmethod
|
|
60
60
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
61
|
-
"""Create an instance of
|
|
61
|
+
"""Create an instance of KnowledgeEntity from a JSON string"""
|
|
62
62
|
return cls.from_dict(json.loads(json_str))
|
|
63
63
|
|
|
64
64
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -92,7 +92,7 @@ class KnowledgeKnowledgeEntity(BaseModel):
|
|
|
92
92
|
|
|
93
93
|
@classmethod
|
|
94
94
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
95
|
-
"""Create an instance of
|
|
95
|
+
"""Create an instance of KnowledgeEntity from a dict"""
|
|
96
96
|
if obj is None:
|
|
97
97
|
return None
|
|
98
98
|
|
|
@@ -102,12 +102,12 @@ class KnowledgeKnowledgeEntity(BaseModel):
|
|
|
102
102
|
_obj = cls.model_validate({
|
|
103
103
|
"client_id": obj.get("client_id"),
|
|
104
104
|
"data": obj.get("data"),
|
|
105
|
-
"ext":
|
|
105
|
+
"ext": KnowledgeEntityExtra.from_dict(obj["ext"]) if obj.get("ext") is not None else None,
|
|
106
106
|
"extra": obj.get("extra"),
|
|
107
107
|
"kind": obj.get("kind"),
|
|
108
108
|
"name": obj.get("name"),
|
|
109
|
-
"relations":
|
|
110
|
-
"schema":
|
|
109
|
+
"relations": KnowledgeEntityRelations.from_dict(obj["relations"]) if obj.get("relations") is not None else None,
|
|
110
|
+
"schema": KnowledgeEntitySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None,
|
|
111
111
|
"ts_updated": obj.get("ts_updated")
|
|
112
112
|
})
|
|
113
113
|
return _obj
|
|
@@ -19,15 +19,15 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from neurograph.v1.models.
|
|
22
|
+
from neurograph.v1.models.knowledge_entity import KnowledgeEntity
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class KnowledgeEntityCreateRequest(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
KnowledgeEntityCreateRequest
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
data: Optional[List[
|
|
30
|
+
data: Optional[List[KnowledgeEntity]] = None
|
|
31
31
|
__properties: ClassVar[List[str]] = ["data"]
|
|
32
32
|
|
|
33
33
|
model_config = ConfigDict(
|
|
@@ -48,7 +48,7 @@ class KnowledgeKnowledgeEntityUpsertRequest(BaseModel):
|
|
|
48
48
|
|
|
49
49
|
@classmethod
|
|
50
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of KnowledgeEntityCreateRequest from a JSON string"""
|
|
52
52
|
return cls.from_dict(json.loads(json_str))
|
|
53
53
|
|
|
54
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -80,7 +80,7 @@ class KnowledgeKnowledgeEntityUpsertRequest(BaseModel):
|
|
|
80
80
|
|
|
81
81
|
@classmethod
|
|
82
82
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
-
"""Create an instance of
|
|
83
|
+
"""Create an instance of KnowledgeEntityCreateRequest from a dict"""
|
|
84
84
|
if obj is None:
|
|
85
85
|
return None
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ class KnowledgeKnowledgeEntityUpsertRequest(BaseModel):
|
|
|
88
88
|
return cls.model_validate(obj)
|
|
89
89
|
|
|
90
90
|
_obj = cls.model_validate({
|
|
91
|
-
"data": [
|
|
91
|
+
"data": [KnowledgeEntity.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
|
|
92
92
|
})
|
|
93
93
|
return _obj
|
|
94
94
|
|
|
@@ -23,9 +23,9 @@ from neurograph.v1.models.knowledge_err_entity_row import KnowledgeErrEntityRow
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class KnowledgeEntityCreateResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
KnowledgeEntityCreateResponse
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
error: Optional[StrictStr] = None
|
|
31
31
|
error_rows: Optional[List[KnowledgeErrEntityRow]] = None
|
|
@@ -50,7 +50,7 @@ class KnowledgeKnowledgeEntityCreateResponse(BaseModel):
|
|
|
50
50
|
|
|
51
51
|
@classmethod
|
|
52
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of KnowledgeEntityCreateResponse from a JSON string"""
|
|
54
54
|
return cls.from_dict(json.loads(json_str))
|
|
55
55
|
|
|
56
56
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -82,7 +82,7 @@ class KnowledgeKnowledgeEntityCreateResponse(BaseModel):
|
|
|
82
82
|
|
|
83
83
|
@classmethod
|
|
84
84
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
-
"""Create an instance of
|
|
85
|
+
"""Create an instance of KnowledgeEntityCreateResponse from a dict"""
|
|
86
86
|
if obj is None:
|
|
87
87
|
return None
|
|
88
88
|
|
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class KnowledgeEntityExtra(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
KnowledgeEntityExtra
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
customer_id: Optional[StrictInt] = None
|
|
30
30
|
domain: Optional[StrictStr] = None
|
|
@@ -49,7 +49,7 @@ class KnowledgeKnowledgeEntityExtra(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of KnowledgeEntityExtra from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -74,7 +74,7 @@ class KnowledgeKnowledgeEntityExtra(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
@classmethod
|
|
76
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
-
"""Create an instance of
|
|
77
|
+
"""Create an instance of KnowledgeEntityExtra from a dict"""
|
|
78
78
|
if obj is None:
|
|
79
79
|
return None
|
|
80
80
|
|
|
@@ -19,16 +19,16 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from neurograph.v1.models.
|
|
22
|
+
from neurograph.v1.models.knowledge_entity_in_db import KnowledgeEntityInDb
|
|
23
23
|
from neurograph.v1.models.knowledge_query import KnowledgeQuery
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class KnowledgeEntityGetManyResponse(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
|
|
29
|
+
KnowledgeEntityGetManyResponse
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
data: Optional[List[
|
|
31
|
+
data: Optional[List[KnowledgeEntityInDb]] = None
|
|
32
32
|
error: Optional[StrictStr] = None
|
|
33
33
|
query: Optional[KnowledgeQuery] = None
|
|
34
34
|
__properties: ClassVar[List[str]] = ["data", "error", "query"]
|
|
@@ -51,7 +51,7 @@ class KnowledgeKnowledgeEntityGetManyResponse(BaseModel):
|
|
|
51
51
|
|
|
52
52
|
@classmethod
|
|
53
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of
|
|
54
|
+
"""Create an instance of KnowledgeEntityGetManyResponse from a JSON string"""
|
|
55
55
|
return cls.from_dict(json.loads(json_str))
|
|
56
56
|
|
|
57
57
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -86,7 +86,7 @@ class KnowledgeKnowledgeEntityGetManyResponse(BaseModel):
|
|
|
86
86
|
|
|
87
87
|
@classmethod
|
|
88
88
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
-
"""Create an instance of
|
|
89
|
+
"""Create an instance of KnowledgeEntityGetManyResponse from a dict"""
|
|
90
90
|
if obj is None:
|
|
91
91
|
return None
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ class KnowledgeKnowledgeEntityGetManyResponse(BaseModel):
|
|
|
94
94
|
return cls.model_validate(obj)
|
|
95
95
|
|
|
96
96
|
_obj = cls.model_validate({
|
|
97
|
-
"data": [
|
|
97
|
+
"data": [KnowledgeEntityInDb.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None,
|
|
98
98
|
"error": obj.get("error"),
|
|
99
99
|
"query": KnowledgeQuery.from_dict(obj["query"]) if obj.get("query") is not None else None
|
|
100
100
|
})
|
|
@@ -19,25 +19,25 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from neurograph.v1.models.
|
|
23
|
-
from neurograph.v1.models.
|
|
24
|
-
from neurograph.v1.models.
|
|
22
|
+
from neurograph.v1.models.knowledge_entity_extra import KnowledgeEntityExtra
|
|
23
|
+
from neurograph.v1.models.knowledge_entity_relations import KnowledgeEntityRelations
|
|
24
|
+
from neurograph.v1.models.knowledge_entity_schema import KnowledgeEntitySchema
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
28
|
-
class
|
|
28
|
+
class KnowledgeEntityInDb(BaseModel):
|
|
29
29
|
"""
|
|
30
|
-
|
|
30
|
+
KnowledgeEntityInDb
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
client_id: Optional[StrictStr] = Field(default=None, description="nullable.")
|
|
33
33
|
data: Optional[Dict[str, Any]] = None
|
|
34
|
-
ext: Optional[
|
|
34
|
+
ext: Optional[KnowledgeEntityExtra] = None
|
|
35
35
|
extra: Optional[Dict[str, Any]] = None
|
|
36
36
|
id: Optional[StrictStr] = None
|
|
37
37
|
kind: Optional[StrictStr] = None
|
|
38
38
|
name: Optional[StrictStr] = None
|
|
39
|
-
relations: Optional[
|
|
40
|
-
var_schema: Optional[
|
|
39
|
+
relations: Optional[KnowledgeEntityRelations] = None
|
|
40
|
+
var_schema: Optional[KnowledgeEntitySchema] = Field(default=None, alias="schema")
|
|
41
41
|
ts_updated: Optional[StrictInt] = None
|
|
42
42
|
__properties: ClassVar[List[str]] = ["client_id", "data", "ext", "extra", "id", "kind", "name", "relations", "schema", "ts_updated"]
|
|
43
43
|
|
|
@@ -59,7 +59,7 @@ class KnowledgeKnowledgeEntityInDb(BaseModel):
|
|
|
59
59
|
|
|
60
60
|
@classmethod
|
|
61
61
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
-
"""Create an instance of
|
|
62
|
+
"""Create an instance of KnowledgeEntityInDb from a JSON string"""
|
|
63
63
|
return cls.from_dict(json.loads(json_str))
|
|
64
64
|
|
|
65
65
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -93,7 +93,7 @@ class KnowledgeKnowledgeEntityInDb(BaseModel):
|
|
|
93
93
|
|
|
94
94
|
@classmethod
|
|
95
95
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
-
"""Create an instance of
|
|
96
|
+
"""Create an instance of KnowledgeEntityInDb from a dict"""
|
|
97
97
|
if obj is None:
|
|
98
98
|
return None
|
|
99
99
|
|
|
@@ -103,13 +103,13 @@ class KnowledgeKnowledgeEntityInDb(BaseModel):
|
|
|
103
103
|
_obj = cls.model_validate({
|
|
104
104
|
"client_id": obj.get("client_id"),
|
|
105
105
|
"data": obj.get("data"),
|
|
106
|
-
"ext":
|
|
106
|
+
"ext": KnowledgeEntityExtra.from_dict(obj["ext"]) if obj.get("ext") is not None else None,
|
|
107
107
|
"extra": obj.get("extra"),
|
|
108
108
|
"id": obj.get("id"),
|
|
109
109
|
"kind": obj.get("kind"),
|
|
110
110
|
"name": obj.get("name"),
|
|
111
|
-
"relations":
|
|
112
|
-
"schema":
|
|
111
|
+
"relations": KnowledgeEntityRelations.from_dict(obj["relations"]) if obj.get("relations") is not None else None,
|
|
112
|
+
"schema": KnowledgeEntitySchema.from_dict(obj["schema"]) if obj.get("schema") is not None else None,
|
|
113
113
|
"ts_updated": obj.get("ts_updated")
|
|
114
114
|
})
|
|
115
115
|
return _obj
|
neurograph/v1/models/{knowledge_knowledge_entity_relations.py → knowledge_entity_relations.py}
RENAMED
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class KnowledgeEntityRelations(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
KnowledgeEntityRelations
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
children: Optional[List[StrictStr]] = None
|
|
30
30
|
parents: Optional[List[StrictStr]] = None
|
|
@@ -49,7 +49,7 @@ class KnowledgeKnowledgeEntityRelations(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of KnowledgeEntityRelations from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -74,7 +74,7 @@ class KnowledgeKnowledgeEntityRelations(BaseModel):
|
|
|
74
74
|
|
|
75
75
|
@classmethod
|
|
76
76
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
-
"""Create an instance of
|
|
77
|
+
"""Create an instance of KnowledgeEntityRelations from a dict"""
|
|
78
78
|
if obj is None:
|
|
79
79
|
return None
|
|
80
80
|
|
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class KnowledgeEntitySchema(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
KnowledgeEntitySchema
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
id: Optional[StrictStr] = None
|
|
30
30
|
params: Optional[Dict[str, Any]] = None
|
|
@@ -48,7 +48,7 @@ class KnowledgeKnowledgeEntitySchema(BaseModel):
|
|
|
48
48
|
|
|
49
49
|
@classmethod
|
|
50
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of KnowledgeEntitySchema from a JSON string"""
|
|
52
52
|
return cls.from_dict(json.loads(json_str))
|
|
53
53
|
|
|
54
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -73,7 +73,7 @@ class KnowledgeKnowledgeEntitySchema(BaseModel):
|
|
|
73
73
|
|
|
74
74
|
@classmethod
|
|
75
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
-
"""Create an instance of
|
|
76
|
+
"""Create an instance of KnowledgeEntitySchema from a dict"""
|
|
77
77
|
if obj is None:
|
|
78
78
|
return None
|
|
79
79
|
|
neurograph/v1/models/{knowledge_knowledge_entity_schema_row.py → knowledge_entity_schema_row.py}
RENAMED
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class KnowledgeEntitySchemaRow(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
KnowledgeEntitySchemaRow
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
description: Optional[StrictStr] = None
|
|
30
30
|
json_schema: Optional[Dict[str, Any]] = None
|
|
@@ -53,7 +53,7 @@ class KnowledgeKnowledgeEntitySchemaRow(BaseModel):
|
|
|
53
53
|
|
|
54
54
|
@classmethod
|
|
55
55
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of
|
|
56
|
+
"""Create an instance of KnowledgeEntitySchemaRow from a JSON string"""
|
|
57
57
|
return cls.from_dict(json.loads(json_str))
|
|
58
58
|
|
|
59
59
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -78,7 +78,7 @@ class KnowledgeKnowledgeEntitySchemaRow(BaseModel):
|
|
|
78
78
|
|
|
79
79
|
@classmethod
|
|
80
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
-
"""Create an instance of
|
|
81
|
+
"""Create an instance of KnowledgeEntitySchemaRow from a dict"""
|
|
82
82
|
if obj is None:
|
|
83
83
|
return None
|
|
84
84
|
|
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class KnowledgeEntitySchemaUpsertRequest(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
KnowledgeEntitySchemaUpsertRequest
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
description: Optional[StrictStr] = None
|
|
30
30
|
json_schema: Optional[StrictStr] = None
|
|
@@ -52,7 +52,7 @@ class KnowledgeKnowledgeEntitySchemaUpsertRequest(BaseModel):
|
|
|
52
52
|
|
|
53
53
|
@classmethod
|
|
54
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
-
"""Create an instance of
|
|
55
|
+
"""Create an instance of KnowledgeEntitySchemaUpsertRequest from a JSON string"""
|
|
56
56
|
return cls.from_dict(json.loads(json_str))
|
|
57
57
|
|
|
58
58
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,7 +77,7 @@ class KnowledgeKnowledgeEntitySchemaUpsertRequest(BaseModel):
|
|
|
77
77
|
|
|
78
78
|
@classmethod
|
|
79
79
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of
|
|
80
|
+
"""Create an instance of KnowledgeEntitySchemaUpsertRequest from a dict"""
|
|
81
81
|
if obj is None:
|
|
82
82
|
return None
|
|
83
83
|
|
|
@@ -19,16 +19,16 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from neurograph.v1.models.
|
|
22
|
+
from neurograph.v1.models.knowledge_entity_schema_row import KnowledgeEntitySchemaRow
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class KnowledgeEntitySchemasResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
KnowledgeEntitySchemasResponse
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
error: Optional[StrictStr] = None
|
|
31
|
-
schemas: Optional[List[
|
|
31
|
+
schemas: Optional[List[KnowledgeEntitySchemaRow]] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["error", "schemas"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -49,7 +49,7 @@ class KnowledgeKnowledgeEntitySchemasResponse(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of KnowledgeEntitySchemasResponse from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -81,7 +81,7 @@ class KnowledgeKnowledgeEntitySchemasResponse(BaseModel):
|
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
83
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of KnowledgeEntitySchemasResponse from a dict"""
|
|
85
85
|
if obj is None:
|
|
86
86
|
return None
|
|
87
87
|
|
|
@@ -90,7 +90,7 @@ class KnowledgeKnowledgeEntitySchemasResponse(BaseModel):
|
|
|
90
90
|
|
|
91
91
|
_obj = cls.model_validate({
|
|
92
92
|
"error": obj.get("error"),
|
|
93
|
-
"schemas": [
|
|
93
|
+
"schemas": [KnowledgeEntitySchemaRow.from_dict(_item) for _item in obj["schemas"]] if obj.get("schemas") is not None else None
|
|
94
94
|
})
|
|
95
95
|
return _obj
|
|
96
96
|
|