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
|
@@ -22,18 +22,21 @@ 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 ClientProbe(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
ClientProbe
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
description: Optional[StrictStr] = None
|
|
30
29
|
error: Optional[StrictStr] = None
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
final_url: Optional[StrictStr] = None
|
|
31
|
+
has_snapshot: Optional[StrictBool] = None
|
|
32
|
+
id: Optional[StrictStr] = None
|
|
33
|
+
is_ok: Optional[StrictBool] = None
|
|
34
|
+
method: Optional[StrictStr] = None
|
|
35
|
+
requested_url: Optional[StrictStr] = None
|
|
36
|
+
response_ms: Optional[StrictInt] = None
|
|
37
|
+
status_code: Optional[StrictInt] = None
|
|
38
|
+
ts_checked: Optional[StrictInt] = None
|
|
39
|
+
__properties: ClassVar[List[str]] = ["error", "final_url", "has_snapshot", "id", "is_ok", "method", "requested_url", "response_ms", "status_code", "ts_checked"]
|
|
37
40
|
|
|
38
41
|
model_config = ConfigDict(
|
|
39
42
|
populate_by_name=True,
|
|
@@ -53,7 +56,7 @@ class OrganizationsOrganizationSetAtlasResponse(BaseModel):
|
|
|
53
56
|
|
|
54
57
|
@classmethod
|
|
55
58
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
-
"""Create an instance of
|
|
59
|
+
"""Create an instance of ClientProbe from a JSON string"""
|
|
57
60
|
return cls.from_dict(json.loads(json_str))
|
|
58
61
|
|
|
59
62
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -78,7 +81,7 @@ class OrganizationsOrganizationSetAtlasResponse(BaseModel):
|
|
|
78
81
|
|
|
79
82
|
@classmethod
|
|
80
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of ClientProbe from a dict"""
|
|
82
85
|
if obj is None:
|
|
83
86
|
return None
|
|
84
87
|
|
|
@@ -86,13 +89,16 @@ class OrganizationsOrganizationSetAtlasResponse(BaseModel):
|
|
|
86
89
|
return cls.model_validate(obj)
|
|
87
90
|
|
|
88
91
|
_obj = cls.model_validate({
|
|
89
|
-
"description": obj.get("description"),
|
|
90
92
|
"error": obj.get("error"),
|
|
93
|
+
"final_url": obj.get("final_url"),
|
|
94
|
+
"has_snapshot": obj.get("has_snapshot"),
|
|
91
95
|
"id": obj.get("id"),
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
+
"is_ok": obj.get("is_ok"),
|
|
97
|
+
"method": obj.get("method"),
|
|
98
|
+
"requested_url": obj.get("requested_url"),
|
|
99
|
+
"response_ms": obj.get("response_ms"),
|
|
100
|
+
"status_code": obj.get("status_code"),
|
|
101
|
+
"ts_checked": obj.get("ts_checked")
|
|
96
102
|
})
|
|
97
103
|
return _obj
|
|
98
104
|
|
|
@@ -0,0 +1,89 @@
|
|
|
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 ClientProbeTodoRow(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ClientProbeTodoRow
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_url_id: Optional[StrictInt] = None
|
|
30
|
+
url: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["client_url_id", "url"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ClientProbeTodoRow from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of ClientProbeTodoRow from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"client_url_id": obj.get("client_url_id"),
|
|
85
|
+
"url": obj.get("url")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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 neurograph.v1.models.client_probe_todo_row import ClientProbeTodoRow
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ClientTriggerProbeResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ClientTriggerProbeResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
error: Optional[StrictStr] = None
|
|
31
|
+
query_client_id: Optional[StrictStr] = None
|
|
32
|
+
scheduled_count: Optional[StrictInt] = None
|
|
33
|
+
urls_todo: Optional[List[ClientProbeTodoRow]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["error", "query_client_id", "scheduled_count", "urls_todo"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of ClientTriggerProbeResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of each item in urls_todo (list)
|
|
76
|
+
_items = []
|
|
77
|
+
if self.urls_todo:
|
|
78
|
+
for _item_urls_todo in self.urls_todo:
|
|
79
|
+
if _item_urls_todo:
|
|
80
|
+
_items.append(_item_urls_todo.to_dict())
|
|
81
|
+
_dict['urls_todo'] = _items
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of ClientTriggerProbeResponse from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"error": obj.get("error"),
|
|
95
|
+
"query_client_id": obj.get("query_client_id"),
|
|
96
|
+
"scheduled_count": obj.get("scheduled_count"),
|
|
97
|
+
"urls_todo": [ClientProbeTodoRow.from_dict(_item) for _item in obj["urls_todo"]] if obj.get("urls_todo") is not None else None
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
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, 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 DbKnowledgeCustomer(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DbKnowledgeCustomer
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
client_id: Optional[StrictStr] = None
|
|
30
|
+
email: Optional[StrictStr] = None
|
|
31
|
+
entity_id: Optional[StrictStr] = None
|
|
32
|
+
first_name: Optional[StrictStr] = None
|
|
33
|
+
last_name: Optional[StrictStr] = None
|
|
34
|
+
phone: Optional[StrictStr] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["client_id", "email", "entity_id", "first_name", "last_name", "phone"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of DbKnowledgeCustomer from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of DbKnowledgeCustomer from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"client_id": obj.get("client_id"),
|
|
89
|
+
"email": obj.get("email"),
|
|
90
|
+
"entity_id": obj.get("entity_id"),
|
|
91
|
+
"first_name": obj.get("first_name"),
|
|
92
|
+
"last_name": obj.get("last_name"),
|
|
93
|
+
"phone": obj.get("phone")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,177 @@
|
|
|
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, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from neurograph.v1.models.pgtype_text import PgtypeText
|
|
23
|
+
from neurograph.v1.models.pgtype_timestamp import PgtypeTimestamp
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class DbKnowledgeOrder(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
DbKnowledgeOrder
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
billing_address_hash: Optional[PgtypeText] = None
|
|
32
|
+
billing_address_json: Optional[List[StrictInt]] = None
|
|
33
|
+
cancelled_at: Optional[PgtypeTimestamp] = None
|
|
34
|
+
channel: Optional[StrictStr] = None
|
|
35
|
+
client_id: Optional[StrictStr] = None
|
|
36
|
+
closed_at: Optional[PgtypeTimestamp] = None
|
|
37
|
+
currency: Optional[StrictStr] = None
|
|
38
|
+
customer_entity_id: Optional[PgtypeText] = None
|
|
39
|
+
discount_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
40
|
+
email_at_order: Optional[PgtypeText] = None
|
|
41
|
+
entity_id: Optional[StrictStr] = None
|
|
42
|
+
ext_order_id: Optional[PgtypeText] = None
|
|
43
|
+
ext_order_number: Optional[PgtypeText] = None
|
|
44
|
+
ext_store_id: Optional[PgtypeText] = None
|
|
45
|
+
financial_status: Optional[StrictStr] = None
|
|
46
|
+
fulfillment_status: Optional[StrictStr] = None
|
|
47
|
+
phone_at_order: Optional[PgtypeText] = None
|
|
48
|
+
placed_at: Optional[PgtypeTimestamp] = None
|
|
49
|
+
shipping_address_hash: Optional[PgtypeText] = None
|
|
50
|
+
shipping_address_json: Optional[List[StrictInt]] = None
|
|
51
|
+
shipping_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
52
|
+
source_name: Optional[StrictStr] = None
|
|
53
|
+
status: Optional[StrictStr] = None
|
|
54
|
+
store_entity_id: Optional[PgtypeText] = None
|
|
55
|
+
subtotal_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
56
|
+
tax_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
57
|
+
total_amount: Optional[Union[StrictFloat, StrictInt]] = None
|
|
58
|
+
__properties: ClassVar[List[str]] = ["billing_address_hash", "billing_address_json", "cancelled_at", "channel", "client_id", "closed_at", "currency", "customer_entity_id", "discount_amount", "email_at_order", "entity_id", "ext_order_id", "ext_order_number", "ext_store_id", "financial_status", "fulfillment_status", "phone_at_order", "placed_at", "shipping_address_hash", "shipping_address_json", "shipping_amount", "source_name", "status", "store_entity_id", "subtotal_amount", "tax_amount", "total_amount"]
|
|
59
|
+
|
|
60
|
+
model_config = ConfigDict(
|
|
61
|
+
populate_by_name=True,
|
|
62
|
+
validate_assignment=True,
|
|
63
|
+
protected_namespaces=(),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def to_str(self) -> str:
|
|
68
|
+
"""Returns the string representation of the model using alias"""
|
|
69
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
70
|
+
|
|
71
|
+
def to_json(self) -> str:
|
|
72
|
+
"""Returns the JSON representation of the model using alias"""
|
|
73
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
74
|
+
return json.dumps(self.to_dict())
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of DbKnowledgeOrder from a JSON string"""
|
|
79
|
+
return cls.from_dict(json.loads(json_str))
|
|
80
|
+
|
|
81
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
82
|
+
"""Return the dictionary representation of the model using alias.
|
|
83
|
+
|
|
84
|
+
This has the following differences from calling pydantic's
|
|
85
|
+
`self.model_dump(by_alias=True)`:
|
|
86
|
+
|
|
87
|
+
* `None` is only added to the output dict for nullable fields that
|
|
88
|
+
were set at model initialization. Other fields with value `None`
|
|
89
|
+
are ignored.
|
|
90
|
+
"""
|
|
91
|
+
excluded_fields: Set[str] = set([
|
|
92
|
+
])
|
|
93
|
+
|
|
94
|
+
_dict = self.model_dump(
|
|
95
|
+
by_alias=True,
|
|
96
|
+
exclude=excluded_fields,
|
|
97
|
+
exclude_none=True,
|
|
98
|
+
)
|
|
99
|
+
# override the default output from pydantic by calling `to_dict()` of billing_address_hash
|
|
100
|
+
if self.billing_address_hash:
|
|
101
|
+
_dict['billing_address_hash'] = self.billing_address_hash.to_dict()
|
|
102
|
+
# override the default output from pydantic by calling `to_dict()` of cancelled_at
|
|
103
|
+
if self.cancelled_at:
|
|
104
|
+
_dict['cancelled_at'] = self.cancelled_at.to_dict()
|
|
105
|
+
# override the default output from pydantic by calling `to_dict()` of closed_at
|
|
106
|
+
if self.closed_at:
|
|
107
|
+
_dict['closed_at'] = self.closed_at.to_dict()
|
|
108
|
+
# override the default output from pydantic by calling `to_dict()` of customer_entity_id
|
|
109
|
+
if self.customer_entity_id:
|
|
110
|
+
_dict['customer_entity_id'] = self.customer_entity_id.to_dict()
|
|
111
|
+
# override the default output from pydantic by calling `to_dict()` of email_at_order
|
|
112
|
+
if self.email_at_order:
|
|
113
|
+
_dict['email_at_order'] = self.email_at_order.to_dict()
|
|
114
|
+
# override the default output from pydantic by calling `to_dict()` of ext_order_id
|
|
115
|
+
if self.ext_order_id:
|
|
116
|
+
_dict['ext_order_id'] = self.ext_order_id.to_dict()
|
|
117
|
+
# override the default output from pydantic by calling `to_dict()` of ext_order_number
|
|
118
|
+
if self.ext_order_number:
|
|
119
|
+
_dict['ext_order_number'] = self.ext_order_number.to_dict()
|
|
120
|
+
# override the default output from pydantic by calling `to_dict()` of ext_store_id
|
|
121
|
+
if self.ext_store_id:
|
|
122
|
+
_dict['ext_store_id'] = self.ext_store_id.to_dict()
|
|
123
|
+
# override the default output from pydantic by calling `to_dict()` of phone_at_order
|
|
124
|
+
if self.phone_at_order:
|
|
125
|
+
_dict['phone_at_order'] = self.phone_at_order.to_dict()
|
|
126
|
+
# override the default output from pydantic by calling `to_dict()` of placed_at
|
|
127
|
+
if self.placed_at:
|
|
128
|
+
_dict['placed_at'] = self.placed_at.to_dict()
|
|
129
|
+
# override the default output from pydantic by calling `to_dict()` of shipping_address_hash
|
|
130
|
+
if self.shipping_address_hash:
|
|
131
|
+
_dict['shipping_address_hash'] = self.shipping_address_hash.to_dict()
|
|
132
|
+
# override the default output from pydantic by calling `to_dict()` of store_entity_id
|
|
133
|
+
if self.store_entity_id:
|
|
134
|
+
_dict['store_entity_id'] = self.store_entity_id.to_dict()
|
|
135
|
+
return _dict
|
|
136
|
+
|
|
137
|
+
@classmethod
|
|
138
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
139
|
+
"""Create an instance of DbKnowledgeOrder from a dict"""
|
|
140
|
+
if obj is None:
|
|
141
|
+
return None
|
|
142
|
+
|
|
143
|
+
if not isinstance(obj, dict):
|
|
144
|
+
return cls.model_validate(obj)
|
|
145
|
+
|
|
146
|
+
_obj = cls.model_validate({
|
|
147
|
+
"billing_address_hash": PgtypeText.from_dict(obj["billing_address_hash"]) if obj.get("billing_address_hash") is not None else None,
|
|
148
|
+
"billing_address_json": obj.get("billing_address_json"),
|
|
149
|
+
"cancelled_at": PgtypeTimestamp.from_dict(obj["cancelled_at"]) if obj.get("cancelled_at") is not None else None,
|
|
150
|
+
"channel": obj.get("channel"),
|
|
151
|
+
"client_id": obj.get("client_id"),
|
|
152
|
+
"closed_at": PgtypeTimestamp.from_dict(obj["closed_at"]) if obj.get("closed_at") is not None else None,
|
|
153
|
+
"currency": obj.get("currency"),
|
|
154
|
+
"customer_entity_id": PgtypeText.from_dict(obj["customer_entity_id"]) if obj.get("customer_entity_id") is not None else None,
|
|
155
|
+
"discount_amount": obj.get("discount_amount"),
|
|
156
|
+
"email_at_order": PgtypeText.from_dict(obj["email_at_order"]) if obj.get("email_at_order") is not None else None,
|
|
157
|
+
"entity_id": obj.get("entity_id"),
|
|
158
|
+
"ext_order_id": PgtypeText.from_dict(obj["ext_order_id"]) if obj.get("ext_order_id") is not None else None,
|
|
159
|
+
"ext_order_number": PgtypeText.from_dict(obj["ext_order_number"]) if obj.get("ext_order_number") is not None else None,
|
|
160
|
+
"ext_store_id": PgtypeText.from_dict(obj["ext_store_id"]) if obj.get("ext_store_id") is not None else None,
|
|
161
|
+
"financial_status": obj.get("financial_status"),
|
|
162
|
+
"fulfillment_status": obj.get("fulfillment_status"),
|
|
163
|
+
"phone_at_order": PgtypeText.from_dict(obj["phone_at_order"]) if obj.get("phone_at_order") is not None else None,
|
|
164
|
+
"placed_at": PgtypeTimestamp.from_dict(obj["placed_at"]) if obj.get("placed_at") is not None else None,
|
|
165
|
+
"shipping_address_hash": PgtypeText.from_dict(obj["shipping_address_hash"]) if obj.get("shipping_address_hash") is not None else None,
|
|
166
|
+
"shipping_address_json": obj.get("shipping_address_json"),
|
|
167
|
+
"shipping_amount": obj.get("shipping_amount"),
|
|
168
|
+
"source_name": obj.get("source_name"),
|
|
169
|
+
"status": obj.get("status"),
|
|
170
|
+
"store_entity_id": PgtypeText.from_dict(obj["store_entity_id"]) if obj.get("store_entity_id") is not None else None,
|
|
171
|
+
"subtotal_amount": obj.get("subtotal_amount"),
|
|
172
|
+
"tax_amount": obj.get("tax_amount"),
|
|
173
|
+
"total_amount": obj.get("total_amount")
|
|
174
|
+
})
|
|
175
|
+
return _obj
|
|
176
|
+
|
|
177
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
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, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from neurograph.v1.models.pgtype_int8 import PgtypeInt8
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DbKnowledgeProduct(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DbKnowledgeProduct
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
client_id: Optional[StrictStr] = None
|
|
31
|
+
entity_id: Optional[StrictStr] = None
|
|
32
|
+
handle: Optional[StrictStr] = None
|
|
33
|
+
overview: Optional[StrictStr] = None
|
|
34
|
+
product_hash: Optional[StrictStr] = None
|
|
35
|
+
product_id: Optional[PgtypeInt8] = None
|
|
36
|
+
summary: Optional[StrictStr] = None
|
|
37
|
+
title: Optional[StrictStr] = None
|
|
38
|
+
type: Optional[StrictStr] = None
|
|
39
|
+
__properties: ClassVar[List[str]] = ["client_id", "entity_id", "handle", "overview", "product_hash", "product_id", "summary", "title", "type"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of DbKnowledgeProduct from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of product_id
|
|
81
|
+
if self.product_id:
|
|
82
|
+
_dict['product_id'] = self.product_id.to_dict()
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of DbKnowledgeProduct from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"client_id": obj.get("client_id"),
|
|
96
|
+
"entity_id": obj.get("entity_id"),
|
|
97
|
+
"handle": obj.get("handle"),
|
|
98
|
+
"overview": obj.get("overview"),
|
|
99
|
+
"product_hash": obj.get("product_hash"),
|
|
100
|
+
"product_id": PgtypeInt8.from_dict(obj["product_id"]) if obj.get("product_id") is not None else None,
|
|
101
|
+
"summary": obj.get("summary"),
|
|
102
|
+
"title": obj.get("title"),
|
|
103
|
+
"type": obj.get("type")
|
|
104
|
+
})
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
|