perceptic-core-client 0.29.0__py3-none-any.whl → 0.31.0__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.
Potentially problematic release.
This version of perceptic-core-client might be problematic. Click here for more details.
- perceptic_core_client/__init__.py +26 -0
- perceptic_core_client/api/__init__.py +1 -0
- perceptic_core_client/api/citations_resource_api.py +569 -0
- perceptic_core_client/api/user_resource_api.py +269 -0
- perceptic_core_client/api/worker_resource_api.py +273 -0
- perceptic_core_client/models/__init__.py +12 -0
- perceptic_core_client/models/biotech_analysis_api_dto.py +119 -0
- perceptic_core_client/models/biotech_analysis_image_annotated_citation_api_dto.py +91 -0
- perceptic_core_client/models/bulk_get_citations_request.py +87 -0
- perceptic_core_client/models/bulk_get_citations_response.py +95 -0
- perceptic_core_client/models/citation_api_dto.py +102 -0
- perceptic_core_client/models/citation_metadata_api_dto.py +189 -0
- perceptic_core_client/models/get_citation_output_uri_response.py +87 -0
- perceptic_core_client/models/get_worker_run_response.py +97 -0
- perceptic_core_client/models/highlighted_text_citation_metadata_api_dto.py +91 -0
- perceptic_core_client/models/image_detection_box_api_dto.py +97 -0
- perceptic_core_client/models/info_event.py +4 -1
- perceptic_core_client/models/progress_event.py +5 -2
- perceptic_core_client/models/request_for_input_event.py +4 -1
- perceptic_core_client/models/user_info_response.py +115 -0
- perceptic_core_client/models/web_page_citation_metadata_api_dto.py +89 -0
- perceptic_core_client/test/test_biotech_analysis_api_dto.py +77 -0
- perceptic_core_client/test/test_biotech_analysis_image_annotated_citation_api_dto.py +78 -0
- perceptic_core_client/test/test_bulk_get_citations_request.py +53 -0
- perceptic_core_client/test/test_bulk_get_citations_response.py +57 -0
- perceptic_core_client/test/test_citation_api_dto.py +54 -0
- perceptic_core_client/test/test_citation_metadata_api_dto.py +83 -0
- perceptic_core_client/test/test_citations_resource_api.py +45 -0
- perceptic_core_client/test/test_get_citation_output_uri_response.py +51 -0
- perceptic_core_client/test/test_get_worker_run_response.py +55 -0
- perceptic_core_client/test/test_highlighted_text_citation_metadata_api_dto.py +53 -0
- perceptic_core_client/test/test_image_detection_box_api_dto.py +56 -0
- perceptic_core_client/test/test_info_event.py +1 -0
- perceptic_core_client/test/test_progress_event.py +1 -0
- perceptic_core_client/test/test_request_for_input_event.py +1 -0
- perceptic_core_client/test/test_user_info_response.py +56 -0
- perceptic_core_client/test/test_user_resource_api.py +7 -0
- perceptic_core_client/test/test_web_page_citation_metadata_api_dto.py +52 -0
- perceptic_core_client/test/test_worker_event.py +1 -0
- perceptic_core_client/test/test_worker_resource_api.py +7 -0
- {perceptic_core_client-0.29.0.dist-info → perceptic_core_client-0.31.0.dist-info}/METADATA +1 -1
- {perceptic_core_client-0.29.0.dist-info → perceptic_core_client-0.31.0.dist-info}/RECORD +44 -18
- {perceptic_core_client-0.29.0.dist-info → perceptic_core_client-0.31.0.dist-info}/WHEEL +0 -0
- {perceptic_core_client-0.29.0.dist-info → perceptic_core_client-0.31.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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, Field, 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 GetCitationOutputUriResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
GetCitationOutputUriResponse
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
output_uri: Optional[StrictStr] = Field(default=None, alias="outputUri")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["outputUri"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of GetCitationOutputUriResponse from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of GetCitationOutputUriResponse from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"outputUri": obj.get("outputUri")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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 datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from perceptic_core_client.models.run_status_dto import RunStatusDto
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class GetWorkerRunResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GetWorkerRunResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
run_rid: Optional[StrictStr] = Field(default=None, alias="runRid")
|
|
32
|
+
status: Optional[RunStatusDto] = None
|
|
33
|
+
started_by_user_id: Optional[StrictStr] = Field(default=None, alias="startedByUserId")
|
|
34
|
+
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
|
|
35
|
+
inputs: Optional[Dict[str, Any]] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["runRid", "status", "startedByUserId", "createdAt", "inputs"]
|
|
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 GetWorkerRunResponse 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 GetWorkerRunResponse 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
|
+
"runRid": obj.get("runRid"),
|
|
90
|
+
"status": obj.get("status"),
|
|
91
|
+
"startedByUserId": obj.get("startedByUserId"),
|
|
92
|
+
"createdAt": obj.get("createdAt"),
|
|
93
|
+
"inputs": obj.get("inputs")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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, Field, 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 HighlightedTextCitationMetadataApiDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
HighlightedTextCitationMetadataApiDto
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
page_index: Optional[StrictInt] = Field(default=None, alias="pageIndex")
|
|
30
|
+
paragraph_index: Optional[StrictInt] = Field(default=None, alias="paragraphIndex")
|
|
31
|
+
text: Optional[StrictStr] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["pageIndex", "paragraphIndex", "text"]
|
|
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 HighlightedTextCitationMetadataApiDto 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 HighlightedTextCitationMetadataApiDto 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
|
+
"pageIndex": obj.get("pageIndex"),
|
|
86
|
+
"paragraphIndex": obj.get("paragraphIndex"),
|
|
87
|
+
"text": obj.get("text")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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, Field, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ImageDetectionBoxApiDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
ImageDetectionBoxApiDto
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
x_min: Optional[StrictInt] = Field(default=None, alias="xMin")
|
|
30
|
+
y_min: Optional[StrictInt] = Field(default=None, alias="yMin")
|
|
31
|
+
x_max: Optional[StrictInt] = Field(default=None, alias="xMax")
|
|
32
|
+
y_max: Optional[StrictInt] = Field(default=None, alias="yMax")
|
|
33
|
+
label: Optional[StrictStr] = None
|
|
34
|
+
confidence: Optional[Union[StrictFloat, StrictInt]] = None
|
|
35
|
+
__properties: ClassVar[List[str]] = ["xMin", "yMin", "xMax", "yMax", "label", "confidence"]
|
|
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 ImageDetectionBoxApiDto 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 ImageDetectionBoxApiDto 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
|
+
"xMin": obj.get("xMin"),
|
|
89
|
+
"yMin": obj.get("yMin"),
|
|
90
|
+
"xMax": obj.get("xMax"),
|
|
91
|
+
"yMax": obj.get("yMax"),
|
|
92
|
+
"label": obj.get("label"),
|
|
93
|
+
"confidence": obj.get("confidence")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -17,6 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
+
from datetime import datetime
|
|
20
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
23
|
from typing import Optional, Set
|
|
@@ -28,8 +29,9 @@ class InfoEvent(BaseModel):
|
|
|
28
29
|
""" # noqa: E501
|
|
29
30
|
sequence: Optional[StrictInt] = None
|
|
30
31
|
type_of: Optional[StrictStr] = Field(default=None, alias="typeOf")
|
|
32
|
+
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
|
|
31
33
|
type: Optional[StrictStr] = None
|
|
32
|
-
__properties: ClassVar[List[str]] = ["sequence", "typeOf", "type"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["sequence", "typeOf", "createdAt", "type"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -84,6 +86,7 @@ class InfoEvent(BaseModel):
|
|
|
84
86
|
_obj = cls.model_validate({
|
|
85
87
|
"sequence": obj.get("sequence"),
|
|
86
88
|
"typeOf": obj.get("typeOf"),
|
|
89
|
+
"createdAt": obj.get("createdAt"),
|
|
87
90
|
"type": obj.get("type")
|
|
88
91
|
})
|
|
89
92
|
return _obj
|
|
@@ -17,7 +17,8 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
@@ -28,8 +29,9 @@ class ProgressEvent(BaseModel):
|
|
|
28
29
|
""" # noqa: E501
|
|
29
30
|
sequence: Optional[StrictInt] = None
|
|
30
31
|
payload: Optional[Dict[str, Any]] = None
|
|
32
|
+
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
|
|
31
33
|
type: Optional[StrictStr] = None
|
|
32
|
-
__properties: ClassVar[List[str]] = ["sequence", "payload", "type"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["sequence", "payload", "createdAt", "type"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -84,6 +86,7 @@ class ProgressEvent(BaseModel):
|
|
|
84
86
|
_obj = cls.model_validate({
|
|
85
87
|
"sequence": obj.get("sequence"),
|
|
86
88
|
"payload": obj.get("payload"),
|
|
89
|
+
"createdAt": obj.get("createdAt"),
|
|
87
90
|
"type": obj.get("type")
|
|
88
91
|
})
|
|
89
92
|
return _obj
|
|
@@ -17,6 +17,7 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
+
from datetime import datetime
|
|
20
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
23
|
from typing import Optional, Set
|
|
@@ -29,8 +30,9 @@ class RequestForInputEvent(BaseModel):
|
|
|
29
30
|
sequence: Optional[StrictInt] = None
|
|
30
31
|
requested_data: Optional[Dict[str, Any]] = Field(default=None, alias="requestedData")
|
|
31
32
|
provided_data: Optional[Dict[str, Any]] = Field(default=None, alias="providedData")
|
|
33
|
+
created_at: Optional[datetime] = Field(default=None, alias="createdAt")
|
|
32
34
|
type: Optional[StrictStr] = None
|
|
33
|
-
__properties: ClassVar[List[str]] = ["sequence", "requestedData", "providedData", "type"]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["sequence", "requestedData", "providedData", "createdAt", "type"]
|
|
34
36
|
|
|
35
37
|
model_config = ConfigDict(
|
|
36
38
|
populate_by_name=True,
|
|
@@ -91,6 +93,7 @@ class RequestForInputEvent(BaseModel):
|
|
|
91
93
|
"sequence": obj.get("sequence"),
|
|
92
94
|
"requestedData": obj.get("requestedData"),
|
|
93
95
|
"providedData": obj.get("providedData"),
|
|
96
|
+
"createdAt": obj.get("createdAt"),
|
|
94
97
|
"type": obj.get("type")
|
|
95
98
|
})
|
|
96
99
|
return _obj
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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, Field, 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 UserInfoResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
User information response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
user_id: StrictStr = Field(description="User ID/subject from JWT", alias="userId")
|
|
30
|
+
username: Optional[StrictStr] = Field(default=None, description="Username")
|
|
31
|
+
email: Optional[StrictStr] = Field(default=None, description="Email address")
|
|
32
|
+
first_name: Optional[StrictStr] = Field(default=None, description="First name", alias="firstName")
|
|
33
|
+
last_name: Optional[StrictStr] = Field(default=None, description="Last name", alias="lastName")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["userId", "username", "email", "firstName", "lastName"]
|
|
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 UserInfoResponse 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
|
+
# set to None if username (nullable) is None
|
|
76
|
+
# and model_fields_set contains the field
|
|
77
|
+
if self.username is None and "username" in self.model_fields_set:
|
|
78
|
+
_dict['username'] = None
|
|
79
|
+
|
|
80
|
+
# set to None if email (nullable) is None
|
|
81
|
+
# and model_fields_set contains the field
|
|
82
|
+
if self.email is None and "email" in self.model_fields_set:
|
|
83
|
+
_dict['email'] = None
|
|
84
|
+
|
|
85
|
+
# set to None if first_name (nullable) is None
|
|
86
|
+
# and model_fields_set contains the field
|
|
87
|
+
if self.first_name is None and "first_name" in self.model_fields_set:
|
|
88
|
+
_dict['firstName'] = None
|
|
89
|
+
|
|
90
|
+
# set to None if last_name (nullable) is None
|
|
91
|
+
# and model_fields_set contains the field
|
|
92
|
+
if self.last_name is None and "last_name" in self.model_fields_set:
|
|
93
|
+
_dict['lastName'] = None
|
|
94
|
+
|
|
95
|
+
return _dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
99
|
+
"""Create an instance of UserInfoResponse from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return cls.model_validate(obj)
|
|
105
|
+
|
|
106
|
+
_obj = cls.model_validate({
|
|
107
|
+
"userId": obj.get("userId"),
|
|
108
|
+
"username": obj.get("username"),
|
|
109
|
+
"email": obj.get("email"),
|
|
110
|
+
"firstName": obj.get("firstName"),
|
|
111
|
+
"lastName": obj.get("lastName")
|
|
112
|
+
})
|
|
113
|
+
return _obj
|
|
114
|
+
|
|
115
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
perceptic-core-server API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1-SNAPSHOT
|
|
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 WebPageCitationMetadataApiDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WebPageCitationMetadataApiDto
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
url: Optional[StrictStr] = None
|
|
30
|
+
description: Optional[StrictStr] = None
|
|
31
|
+
__properties: ClassVar[List[str]] = ["url", "description"]
|
|
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 WebPageCitationMetadataApiDto 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 WebPageCitationMetadataApiDto 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
|
+
"url": obj.get("url"),
|
|
85
|
+
"description": obj.get("description")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|