hindsight-client 0.1.14__py3-none-any.whl → 0.1.15__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.
- hindsight_client/hindsight_client.py +11 -10
- {hindsight_client-0.1.14.dist-info → hindsight_client-0.1.15.dist-info}/METADATA +1 -1
- hindsight_client-0.1.15.dist-info/RECORD +109 -0
- hindsight_client_api/__init__.py +21 -3
- hindsight_client_api/api/__init__.py +5 -1
- hindsight_client_api/api/banks_api.py +2045 -0
- hindsight_client_api/api/documents_api.py +1234 -0
- hindsight_client_api/api/entities_api.py +921 -0
- hindsight_client_api/api/memory_api.py +1901 -0
- hindsight_client_api/api/monitoring_api.py +1 -1
- hindsight_client_api/api/operations_api.py +610 -0
- hindsight_client_api/api_client.py +1 -1
- hindsight_client_api/configuration.py +2 -2
- hindsight_client_api/docs/BankListItem.md +2 -2
- hindsight_client_api/docs/BankStatsResponse.md +39 -0
- hindsight_client_api/docs/BanksApi.md +517 -0
- hindsight_client_api/docs/CancelOperationResponse.md +32 -0
- hindsight_client_api/docs/DeleteDocumentResponse.md +33 -0
- hindsight_client_api/docs/DeleteResponse.md +2 -0
- hindsight_client_api/docs/DocumentsApi.md +313 -0
- hindsight_client_api/docs/EntitiesApi.md +230 -0
- hindsight_client_api/docs/MemoryApi.md +499 -0
- hindsight_client_api/docs/OperationResponse.md +36 -0
- hindsight_client_api/docs/OperationsApi.md +154 -0
- hindsight_client_api/docs/OperationsListResponse.md +31 -0
- hindsight_client_api/exceptions.py +1 -1
- hindsight_client_api/models/__init__.py +6 -1
- hindsight_client_api/models/add_background_request.py +1 -1
- hindsight_client_api/models/background_response.py +1 -1
- hindsight_client_api/models/bank_list_item.py +13 -3
- hindsight_client_api/models/bank_list_response.py +1 -1
- hindsight_client_api/models/bank_profile_response.py +1 -1
- hindsight_client_api/models/bank_stats_response.py +105 -0
- hindsight_client_api/models/budget.py +1 -1
- hindsight_client_api/models/cancel_operation_response.py +91 -0
- hindsight_client_api/models/chunk_data.py +1 -1
- hindsight_client_api/models/chunk_include_options.py +1 -1
- hindsight_client_api/models/chunk_response.py +1 -1
- hindsight_client_api/models/create_bank_request.py +1 -1
- hindsight_client_api/models/delete_document_response.py +93 -0
- hindsight_client_api/models/delete_response.py +19 -5
- hindsight_client_api/models/disposition_traits.py +1 -1
- hindsight_client_api/models/document_response.py +1 -1
- hindsight_client_api/models/entity_detail_response.py +1 -1
- hindsight_client_api/models/entity_include_options.py +1 -1
- hindsight_client_api/models/entity_list_item.py +1 -1
- hindsight_client_api/models/entity_list_response.py +1 -1
- hindsight_client_api/models/entity_observation_response.py +1 -1
- hindsight_client_api/models/entity_state_response.py +1 -1
- hindsight_client_api/models/graph_data_response.py +1 -1
- hindsight_client_api/models/http_validation_error.py +1 -1
- hindsight_client_api/models/include_options.py +1 -1
- hindsight_client_api/models/list_documents_response.py +1 -1
- hindsight_client_api/models/list_memory_units_response.py +1 -1
- hindsight_client_api/models/memory_item.py +1 -1
- hindsight_client_api/models/operation_response.py +109 -0
- hindsight_client_api/models/operations_list_response.py +97 -0
- hindsight_client_api/models/recall_request.py +1 -1
- hindsight_client_api/models/recall_response.py +1 -1
- hindsight_client_api/models/recall_result.py +1 -1
- hindsight_client_api/models/reflect_fact.py +1 -1
- hindsight_client_api/models/reflect_include_options.py +1 -1
- hindsight_client_api/models/reflect_request.py +1 -1
- hindsight_client_api/models/reflect_response.py +1 -1
- hindsight_client_api/models/retain_request.py +1 -1
- hindsight_client_api/models/retain_response.py +1 -1
- hindsight_client_api/models/update_disposition_request.py +1 -1
- hindsight_client_api/models/validation_error.py +1 -1
- hindsight_client_api/models/validation_error_loc_inner.py +1 -1
- hindsight_client_api/rest.py +1 -1
- hindsight_client-0.1.14.dist-info/RECORD +0 -131
- hindsight_client_api/api/default_api.py +0 -5976
- hindsight_client_api/docs/DefaultApi.md +0 -1568
- hindsight_client_api/test/__init__.py +0 -0
- hindsight_client_api/test/test_add_background_request.py +0 -53
- hindsight_client_api/test/test_background_response.py +0 -53
- hindsight_client_api/test/test_bank_list_item.py +0 -60
- hindsight_client_api/test/test_bank_list_response.py +0 -68
- hindsight_client_api/test/test_bank_profile_response.py +0 -58
- hindsight_client_api/test/test_budget.py +0 -33
- hindsight_client_api/test/test_chunk_data.py +0 -57
- hindsight_client_api/test/test_chunk_include_options.py +0 -51
- hindsight_client_api/test/test_chunk_response.py +0 -62
- hindsight_client_api/test/test_create_bank_request.py +0 -53
- hindsight_client_api/test/test_default_api.py +0 -178
- hindsight_client_api/test/test_delete_response.py +0 -52
- hindsight_client_api/test/test_disposition_traits.py +0 -56
- hindsight_client_api/test/test_document_response.py +0 -64
- hindsight_client_api/test/test_entity_detail_response.py +0 -71
- hindsight_client_api/test/test_entity_include_options.py +0 -51
- hindsight_client_api/test/test_entity_list_item.py +0 -61
- hindsight_client_api/test/test_entity_list_response.py +0 -56
- hindsight_client_api/test/test_entity_observation_response.py +0 -53
- hindsight_client_api/test/test_entity_state_response.py +0 -64
- hindsight_client_api/test/test_graph_data_response.py +0 -82
- hindsight_client_api/test/test_http_validation_error.py +0 -58
- hindsight_client_api/test/test_include_options.py +0 -54
- hindsight_client_api/test/test_list_documents_response.py +0 -66
- hindsight_client_api/test/test_list_memory_units_response.py +0 -66
- hindsight_client_api/test/test_memory_item.py +0 -58
- hindsight_client_api/test/test_monitoring_api.py +0 -45
- hindsight_client_api/test/test_recall_request.py +0 -64
- hindsight_client_api/test/test_recall_response.py +0 -76
- hindsight_client_api/test/test_recall_result.py +0 -67
- hindsight_client_api/test/test_reflect_fact.py +0 -57
- hindsight_client_api/test/test_reflect_include_options.py +0 -51
- hindsight_client_api/test/test_reflect_request.py +0 -56
- hindsight_client_api/test/test_reflect_response.py +0 -55
- hindsight_client_api/test/test_retain_request.py +0 -57
- hindsight_client_api/test/test_retain_response.py +0 -58
- hindsight_client_api/test/test_update_disposition_request.py +0 -52
- hindsight_client_api/test/test_validation_error.py +0 -60
- hindsight_client_api/test/test_validation_error_loc_inner.py +0 -50
- {hindsight_client-0.1.14.dist-info → hindsight_client-0.1.15.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# OperationsListResponse
|
|
2
|
+
|
|
3
|
+
Response model for list operations endpoint.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**bank_id** | **str** | |
|
|
10
|
+
**operations** | [**List[OperationResponse]**](OperationResponse.md) | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from hindsight_client_api.models.operations_list_response import OperationsListResponse
|
|
16
|
+
|
|
17
|
+
# TODO update the JSON string below
|
|
18
|
+
json = "{}"
|
|
19
|
+
# create an instance of OperationsListResponse from a JSON string
|
|
20
|
+
operations_list_response_instance = OperationsListResponse.from_json(json)
|
|
21
|
+
# print the JSON string representation of the object
|
|
22
|
+
print(OperationsListResponse.to_json())
|
|
23
|
+
|
|
24
|
+
# convert the object into a dict
|
|
25
|
+
operations_list_response_dict = operations_list_response_instance.to_dict()
|
|
26
|
+
# create an instance of OperationsListResponse from a dict
|
|
27
|
+
operations_list_response_from_dict = OperationsListResponse.from_dict(operations_list_response_dict)
|
|
28
|
+
```
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
30
|
+
|
|
31
|
+
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
HTTP API for Hindsight
|
|
8
8
|
|
|
9
|
-
The version of the OpenAPI document: 1.0
|
|
9
|
+
The version of the OpenAPI document: 0.1.0
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -18,11 +18,14 @@ from hindsight_client_api.models.background_response import BackgroundResponse
|
|
|
18
18
|
from hindsight_client_api.models.bank_list_item import BankListItem
|
|
19
19
|
from hindsight_client_api.models.bank_list_response import BankListResponse
|
|
20
20
|
from hindsight_client_api.models.bank_profile_response import BankProfileResponse
|
|
21
|
+
from hindsight_client_api.models.bank_stats_response import BankStatsResponse
|
|
21
22
|
from hindsight_client_api.models.budget import Budget
|
|
23
|
+
from hindsight_client_api.models.cancel_operation_response import CancelOperationResponse
|
|
22
24
|
from hindsight_client_api.models.chunk_data import ChunkData
|
|
23
25
|
from hindsight_client_api.models.chunk_include_options import ChunkIncludeOptions
|
|
24
26
|
from hindsight_client_api.models.chunk_response import ChunkResponse
|
|
25
27
|
from hindsight_client_api.models.create_bank_request import CreateBankRequest
|
|
28
|
+
from hindsight_client_api.models.delete_document_response import DeleteDocumentResponse
|
|
26
29
|
from hindsight_client_api.models.delete_response import DeleteResponse
|
|
27
30
|
from hindsight_client_api.models.disposition_traits import DispositionTraits
|
|
28
31
|
from hindsight_client_api.models.document_response import DocumentResponse
|
|
@@ -38,6 +41,8 @@ from hindsight_client_api.models.include_options import IncludeOptions
|
|
|
38
41
|
from hindsight_client_api.models.list_documents_response import ListDocumentsResponse
|
|
39
42
|
from hindsight_client_api.models.list_memory_units_response import ListMemoryUnitsResponse
|
|
40
43
|
from hindsight_client_api.models.memory_item import MemoryItem
|
|
44
|
+
from hindsight_client_api.models.operation_response import OperationResponse
|
|
45
|
+
from hindsight_client_api.models.operations_list_response import OperationsListResponse
|
|
41
46
|
from hindsight_client_api.models.recall_request import RecallRequest
|
|
42
47
|
from hindsight_client_api.models.recall_response import RecallResponse
|
|
43
48
|
from hindsight_client_api.models.recall_result import RecallResult
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
HTTP API for Hindsight
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: 1.0
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -28,9 +28,9 @@ class BankListItem(BaseModel):
|
|
|
28
28
|
Bank list item with profile summary.
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
bank_id: StrictStr
|
|
31
|
-
name: StrictStr
|
|
31
|
+
name: Optional[StrictStr] = None
|
|
32
32
|
disposition: DispositionTraits
|
|
33
|
-
background: StrictStr
|
|
33
|
+
background: Optional[StrictStr] = None
|
|
34
34
|
created_at: Optional[StrictStr] = None
|
|
35
35
|
updated_at: Optional[StrictStr] = None
|
|
36
36
|
__properties: ClassVar[List[str]] = ["bank_id", "name", "disposition", "background", "created_at", "updated_at"]
|
|
@@ -77,6 +77,16 @@ class BankListItem(BaseModel):
|
|
|
77
77
|
# override the default output from pydantic by calling `to_dict()` of disposition
|
|
78
78
|
if self.disposition:
|
|
79
79
|
_dict['disposition'] = self.disposition.to_dict()
|
|
80
|
+
# set to None if name (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.name is None and "name" in self.model_fields_set:
|
|
83
|
+
_dict['name'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if background (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.background is None and "background" in self.model_fields_set:
|
|
88
|
+
_dict['background'] = None
|
|
89
|
+
|
|
80
90
|
# set to None if created_at (nullable) is None
|
|
81
91
|
# and model_fields_set contains the field
|
|
82
92
|
if self.created_at is None and "created_at" in self.model_fields_set:
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class BankStatsResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Response model for bank statistics endpoint.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
bank_id: StrictStr
|
|
30
|
+
total_nodes: StrictInt
|
|
31
|
+
total_links: StrictInt
|
|
32
|
+
total_documents: StrictInt
|
|
33
|
+
nodes_by_fact_type: Dict[str, StrictInt]
|
|
34
|
+
links_by_link_type: Dict[str, StrictInt]
|
|
35
|
+
links_by_fact_type: Dict[str, StrictInt]
|
|
36
|
+
links_breakdown: Dict[str, Dict[str, StrictInt]]
|
|
37
|
+
pending_operations: StrictInt
|
|
38
|
+
failed_operations: StrictInt
|
|
39
|
+
__properties: ClassVar[List[str]] = ["bank_id", "total_nodes", "total_links", "total_documents", "nodes_by_fact_type", "links_by_link_type", "links_by_fact_type", "links_breakdown", "pending_operations", "failed_operations"]
|
|
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 BankStatsResponse 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
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of BankStatsResponse from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"bank_id": obj.get("bank_id"),
|
|
93
|
+
"total_nodes": obj.get("total_nodes"),
|
|
94
|
+
"total_links": obj.get("total_links"),
|
|
95
|
+
"total_documents": obj.get("total_documents"),
|
|
96
|
+
"nodes_by_fact_type": obj.get("nodes_by_fact_type"),
|
|
97
|
+
"links_by_link_type": obj.get("links_by_link_type"),
|
|
98
|
+
"links_by_fact_type": obj.get("links_by_fact_type"),
|
|
99
|
+
"links_breakdown": obj.get("links_breakdown"),
|
|
100
|
+
"pending_operations": obj.get("pending_operations"),
|
|
101
|
+
"failed_operations": obj.get("failed_operations")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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, StrictBool, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class CancelOperationResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Response model for cancel operation endpoint.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
success: StrictBool
|
|
30
|
+
message: StrictStr
|
|
31
|
+
operation_id: StrictStr
|
|
32
|
+
__properties: ClassVar[List[str]] = ["success", "message", "operation_id"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of CancelOperationResponse from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of CancelOperationResponse from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"success": obj.get("success"),
|
|
86
|
+
"message": obj.get("message"),
|
|
87
|
+
"operation_id": obj.get("operation_id")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.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, StrictBool, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class DeleteDocumentResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Response model for delete document endpoint.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
success: StrictBool
|
|
30
|
+
message: StrictStr
|
|
31
|
+
document_id: StrictStr
|
|
32
|
+
memory_units_deleted: StrictInt
|
|
33
|
+
__properties: ClassVar[List[str]] = ["success", "message", "document_id", "memory_units_deleted"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of DeleteDocumentResponse from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
return _dict
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of DeleteDocumentResponse from a dict"""
|
|
79
|
+
if obj is None:
|
|
80
|
+
return None
|
|
81
|
+
|
|
82
|
+
if not isinstance(obj, dict):
|
|
83
|
+
return cls.model_validate(obj)
|
|
84
|
+
|
|
85
|
+
_obj = cls.model_validate({
|
|
86
|
+
"success": obj.get("success"),
|
|
87
|
+
"message": obj.get("message"),
|
|
88
|
+
"document_id": obj.get("document_id"),
|
|
89
|
+
"memory_units_deleted": obj.get("memory_units_deleted")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
HTTP API for Hindsight
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: 1.0
|
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -17,8 +17,8 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr
|
|
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
|
|
|
@@ -27,7 +27,9 @@ class DeleteResponse(BaseModel):
|
|
|
27
27
|
Response model for delete operations.
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
success: StrictBool
|
|
30
|
-
|
|
30
|
+
message: Optional[StrictStr] = None
|
|
31
|
+
deleted_count: Optional[StrictInt] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["success", "message", "deleted_count"]
|
|
31
33
|
|
|
32
34
|
model_config = ConfigDict(
|
|
33
35
|
populate_by_name=True,
|
|
@@ -68,6 +70,16 @@ class DeleteResponse(BaseModel):
|
|
|
68
70
|
exclude=excluded_fields,
|
|
69
71
|
exclude_none=True,
|
|
70
72
|
)
|
|
73
|
+
# set to None if message (nullable) is None
|
|
74
|
+
# and model_fields_set contains the field
|
|
75
|
+
if self.message is None and "message" in self.model_fields_set:
|
|
76
|
+
_dict['message'] = None
|
|
77
|
+
|
|
78
|
+
# set to None if deleted_count (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.deleted_count is None and "deleted_count" in self.model_fields_set:
|
|
81
|
+
_dict['deleted_count'] = None
|
|
82
|
+
|
|
71
83
|
return _dict
|
|
72
84
|
|
|
73
85
|
@classmethod
|
|
@@ -80,7 +92,9 @@ class DeleteResponse(BaseModel):
|
|
|
80
92
|
return cls.model_validate(obj)
|
|
81
93
|
|
|
82
94
|
_obj = cls.model_validate({
|
|
83
|
-
"success": obj.get("success")
|
|
95
|
+
"success": obj.get("success"),
|
|
96
|
+
"message": obj.get("message"),
|
|
97
|
+
"deleted_count": obj.get("deleted_count")
|
|
84
98
|
})
|
|
85
99
|
return _obj
|
|
86
100
|
|