minikai 0.1.1__py3-none-any.whl → 0.1.3__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 minikai might be problematic. Click here for more details.
- minikai/__init__.py +1 -1
- minikai/api/__init__.py +1 -1
- minikai/api/groups/__init__.py +1 -1
- minikai/api/groups/add_minis_to_group.py +53 -33
- minikai/api/groups/add_users_to_group.py +53 -33
- minikai/api/groups/create_group.py +45 -27
- minikai/api/groups/delete_group.py +29 -9
- minikai/api/groups/get_group.py +47 -28
- minikai/api/groups/get_group_minis.py +52 -33
- minikai/api/groups/get_group_users.py +52 -33
- minikai/api/groups/get_groups.py +56 -34
- minikai/api/groups/remove_minis_from_group.py +53 -33
- minikai/api/groups/remove_users_from_group.py +53 -33
- minikai/api/groups/update_group.py +51 -33
- minikai/api/minis/__init__.py +1 -1
- minikai/api/minis/create_mini.py +45 -27
- minikai/api/minis/delete_mini.py +29 -9
- minikai/api/minis/get_external_mini.py +52 -33
- minikai/api/minis/get_minis.py +56 -34
- minikai/api/minis/patch_mini.py +51 -33
- minikai/api/minis/update_mini.py +51 -33
- minikai/api/records/__init__.py +1 -1
- minikai/api/records/add_attachments.py +59 -38
- minikai/api/records/add_relations.py +65 -43
- minikai/api/records/create_record.py +48 -28
- minikai/api/records/delete_record.py +29 -9
- minikai/api/records/download_attachment.py +119 -0
- minikai/api/records/get_records_by_external.py +68 -45
- minikai/api/records/remove_attachments.py +33 -11
- minikai/api/records/remove_relations.py +33 -11
- minikai/api/records/update_attachments.py +59 -38
- minikai/api/records/update_record.py +53 -33
- minikai/api/records/update_relations.py +65 -43
- minikai/api/users/__init__.py +1 -1
- minikai/api/users/delete_api_users_minis.py +31 -11
- minikai/api/users/get_api_users_minis.py +52 -33
- minikai/api/users/get_users.py +56 -34
- minikai/api/users/post_api_users_minis.py +52 -33
- minikai/client.py +6 -3
- minikai/errors.py +1 -3
- minikai/models/__init__.py +7 -3
- minikai/models/add_attachments_body.py +45 -13
- minikai/models/create_group_command.py +35 -10
- minikai/models/create_mini_command.py +34 -10
- minikai/models/create_record_command.py +87 -41
- minikai/models/create_record_command_tags.py +22 -3
- minikai/models/cursor_paginated_list_of_record_dto.py +122 -0
- minikai/models/document_file_dto.py +37 -13
- minikai/models/document_file_metadata_dto.py +27 -7
- minikai/models/form_field.py +38 -12
- minikai/models/form_field_dto.py +48 -16
- minikai/models/form_field_type.py +2 -8
- minikai/models/group_dto.py +50 -19
- minikai/models/http_validation_problem_details.py +41 -16
- minikai/models/http_validation_problem_details_errors.py +26 -3
- minikai/models/json_node.py +49 -24
- minikai/models/json_node_options.py +26 -7
- minikai/models/mini_dto.py +62 -27
- minikai/models/mini_template_dto.py +50 -18
- minikai/models/paginated_list_of_record_dto.py +39 -16
- minikai/models/patch_mini_command.py +30 -8
- minikai/models/problem_details.py +34 -11
- minikai/models/record.py +143 -61
- minikai/models/record_attachment.py +56 -27
- minikai/models/record_attachment_dto.py +56 -27
- minikai/models/record_attachment_dto_metadata_type_0.py +22 -3
- minikai/models/record_attachment_metadata_type_0.py +22 -3
- minikai/models/record_authorization.py +41 -9
- minikai/models/record_authorization_dto.py +41 -9
- minikai/models/record_dto.py +113 -54
- minikai/models/record_dto_tags.py +22 -3
- minikai/models/record_relation.py +35 -11
- minikai/models/record_relation_dto.py +35 -11
- minikai/models/record_tag.py +159 -0
- minikai/models/record_tag_dto.py +68 -0
- minikai/models/slim_mini_dto.py +51 -22
- minikai/models/tool_dto.py +29 -10
- minikai/models/update_attachments_body.py +45 -13
- minikai/models/update_group_command.py +37 -11
- minikai/models/update_mini_command.py +35 -11
- minikai/models/update_mini_template_workspaces_command.py +30 -7
- minikai/models/update_record_command.py +87 -42
- minikai/models/update_record_command_tags.py +22 -3
- minikai/models/user_dto.py +50 -17
- minikai/models/user_to_mini_dto.py +30 -9
- minikai/models/workspace_dto.py +30 -9
- minikai/types.py +5 -6
- {minikai-0.1.1.dist-info → minikai-0.1.3.dist-info}/METADATA +1 -1
- minikai-0.1.3.dist-info/RECORD +91 -0
- minikai/models/record_tags.py +0 -44
- minikai-0.1.1.dist-info/RECORD +0 -88
- {minikai-0.1.1.dist-info → minikai-0.1.3.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from dateutil.parser import isoparse
|
|
11
|
+
from typing import cast
|
|
12
|
+
from typing import cast, Union
|
|
13
|
+
from typing import Union
|
|
14
|
+
import datetime
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="RecordTag")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@_attrs_define
|
|
26
|
+
class RecordTag:
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
key (Union[Unset, str]):
|
|
30
|
+
value_string (Union[None, Unset, str]):
|
|
31
|
+
value_number (Union[None, Unset, float]):
|
|
32
|
+
value_boolean (Union[None, Unset, bool]):
|
|
33
|
+
value_date (Union[None, Unset, datetime.datetime]):
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
key: Union[Unset, str] = UNSET
|
|
37
|
+
value_string: Union[None, Unset, str] = UNSET
|
|
38
|
+
value_number: Union[None, Unset, float] = UNSET
|
|
39
|
+
value_boolean: Union[None, Unset, bool] = UNSET
|
|
40
|
+
value_date: Union[None, Unset, datetime.datetime] = UNSET
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_dict(self) -> dict[str, Any]:
|
|
47
|
+
key = self.key
|
|
48
|
+
|
|
49
|
+
value_string: Union[None, Unset, str]
|
|
50
|
+
if isinstance(self.value_string, Unset):
|
|
51
|
+
value_string = UNSET
|
|
52
|
+
else:
|
|
53
|
+
value_string = self.value_string
|
|
54
|
+
|
|
55
|
+
value_number: Union[None, Unset, float]
|
|
56
|
+
if isinstance(self.value_number, Unset):
|
|
57
|
+
value_number = UNSET
|
|
58
|
+
else:
|
|
59
|
+
value_number = self.value_number
|
|
60
|
+
|
|
61
|
+
value_boolean: Union[None, Unset, bool]
|
|
62
|
+
if isinstance(self.value_boolean, Unset):
|
|
63
|
+
value_boolean = UNSET
|
|
64
|
+
else:
|
|
65
|
+
value_boolean = self.value_boolean
|
|
66
|
+
|
|
67
|
+
value_date: Union[None, Unset, str]
|
|
68
|
+
if isinstance(self.value_date, Unset):
|
|
69
|
+
value_date = UNSET
|
|
70
|
+
elif isinstance(self.value_date, datetime.datetime):
|
|
71
|
+
value_date = self.value_date.isoformat()
|
|
72
|
+
else:
|
|
73
|
+
value_date = self.value_date
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
field_dict: dict[str, Any] = {}
|
|
77
|
+
|
|
78
|
+
field_dict.update({
|
|
79
|
+
})
|
|
80
|
+
if key is not UNSET:
|
|
81
|
+
field_dict["key"] = key
|
|
82
|
+
if value_string is not UNSET:
|
|
83
|
+
field_dict["valueString"] = value_string
|
|
84
|
+
if value_number is not UNSET:
|
|
85
|
+
field_dict["valueNumber"] = value_number
|
|
86
|
+
if value_boolean is not UNSET:
|
|
87
|
+
field_dict["valueBoolean"] = value_boolean
|
|
88
|
+
if value_date is not UNSET:
|
|
89
|
+
field_dict["valueDate"] = value_date
|
|
90
|
+
|
|
91
|
+
return field_dict
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
key = d.pop("key", UNSET)
|
|
99
|
+
|
|
100
|
+
def _parse_value_string(data: object) -> Union[None, Unset, str]:
|
|
101
|
+
if data is None:
|
|
102
|
+
return data
|
|
103
|
+
if isinstance(data, Unset):
|
|
104
|
+
return data
|
|
105
|
+
return cast(Union[None, Unset, str], data)
|
|
106
|
+
|
|
107
|
+
value_string = _parse_value_string(d.pop("valueString", UNSET))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _parse_value_number(data: object) -> Union[None, Unset, float]:
|
|
111
|
+
if data is None:
|
|
112
|
+
return data
|
|
113
|
+
if isinstance(data, Unset):
|
|
114
|
+
return data
|
|
115
|
+
return cast(Union[None, Unset, float], data)
|
|
116
|
+
|
|
117
|
+
value_number = _parse_value_number(d.pop("valueNumber", UNSET))
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def _parse_value_boolean(data: object) -> Union[None, Unset, bool]:
|
|
121
|
+
if data is None:
|
|
122
|
+
return data
|
|
123
|
+
if isinstance(data, Unset):
|
|
124
|
+
return data
|
|
125
|
+
return cast(Union[None, Unset, bool], data)
|
|
126
|
+
|
|
127
|
+
value_boolean = _parse_value_boolean(d.pop("valueBoolean", UNSET))
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def _parse_value_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
try:
|
|
136
|
+
if not isinstance(data, str):
|
|
137
|
+
raise TypeError()
|
|
138
|
+
value_date_type_0 = isoparse(data)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
return value_date_type_0
|
|
143
|
+
except: # noqa: E722
|
|
144
|
+
pass
|
|
145
|
+
return cast(Union[None, Unset, datetime.datetime], data)
|
|
146
|
+
|
|
147
|
+
value_date = _parse_value_date(d.pop("valueDate", UNSET))
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
record_tag = cls(
|
|
151
|
+
key=key,
|
|
152
|
+
value_string=value_string,
|
|
153
|
+
value_number=value_number,
|
|
154
|
+
value_boolean=value_boolean,
|
|
155
|
+
value_date=value_date,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
return record_tag
|
|
159
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import Union
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="RecordTagDto")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class RecordTagDto:
|
|
23
|
+
"""
|
|
24
|
+
Attributes:
|
|
25
|
+
key (Union[Unset, str]):
|
|
26
|
+
value (Union[Unset, Any]):
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
key: Union[Unset, str] = UNSET
|
|
30
|
+
value: Union[Unset, Any] = UNSET
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
key = self.key
|
|
38
|
+
|
|
39
|
+
value = self.value
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
|
|
44
|
+
field_dict.update({
|
|
45
|
+
})
|
|
46
|
+
if key is not UNSET:
|
|
47
|
+
field_dict["key"] = key
|
|
48
|
+
if value is not UNSET:
|
|
49
|
+
field_dict["value"] = value
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
key = d.pop("key", UNSET)
|
|
59
|
+
|
|
60
|
+
value = d.pop("value", UNSET)
|
|
61
|
+
|
|
62
|
+
record_tag_dto = cls(
|
|
63
|
+
key=key,
|
|
64
|
+
value=value,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
return record_tag_dto
|
|
68
|
+
|
minikai/models/slim_mini_dto.py
CHANGED
|
@@ -1,42 +1,56 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
5
6
|
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
8
14
|
if TYPE_CHECKING:
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
from ..models.mini_template_dto import MiniTemplateDto
|
|
16
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
|
|
12
21
|
|
|
13
22
|
T = TypeVar("T", bound="SlimMiniDto")
|
|
14
23
|
|
|
15
24
|
|
|
25
|
+
|
|
16
26
|
@_attrs_define
|
|
17
27
|
class SlimMiniDto:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
id (Union[Unset, int]):
|
|
31
|
+
name (Union[Unset, str]):
|
|
32
|
+
description (Union[None, Unset, str]):
|
|
33
|
+
instructions (Union[None, Unset, str]):
|
|
34
|
+
template_id (Union[None, Unset, str]):
|
|
35
|
+
template (Union['MiniTemplateDto', None, Unset]):
|
|
36
|
+
workspaces (Union[Unset, list['WorkspaceDto']]):
|
|
37
|
+
"""
|
|
28
38
|
|
|
29
39
|
id: Union[Unset, int] = UNSET
|
|
30
40
|
name: Union[Unset, str] = UNSET
|
|
31
41
|
description: Union[None, Unset, str] = UNSET
|
|
32
42
|
instructions: Union[None, Unset, str] = UNSET
|
|
33
43
|
template_id: Union[None, Unset, str] = UNSET
|
|
34
|
-
template: Union[
|
|
35
|
-
workspaces: Union[Unset, list[
|
|
44
|
+
template: Union['MiniTemplateDto', None, Unset] = UNSET
|
|
45
|
+
workspaces: Union[Unset, list['WorkspaceDto']] = UNSET
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
36
50
|
|
|
37
51
|
def to_dict(self) -> dict[str, Any]:
|
|
38
52
|
from ..models.mini_template_dto import MiniTemplateDto
|
|
39
|
-
|
|
53
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
40
54
|
id = self.id
|
|
41
55
|
|
|
42
56
|
name = self.name
|
|
@@ -74,9 +88,13 @@ class SlimMiniDto:
|
|
|
74
88
|
workspaces_item = workspaces_item_data.to_dict()
|
|
75
89
|
workspaces.append(workspaces_item)
|
|
76
90
|
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
77
94
|
field_dict: dict[str, Any] = {}
|
|
78
95
|
|
|
79
|
-
field_dict.update({
|
|
96
|
+
field_dict.update({
|
|
97
|
+
})
|
|
80
98
|
if id is not UNSET:
|
|
81
99
|
field_dict["id"] = id
|
|
82
100
|
if name is not UNSET:
|
|
@@ -94,11 +112,12 @@ class SlimMiniDto:
|
|
|
94
112
|
|
|
95
113
|
return field_dict
|
|
96
114
|
|
|
115
|
+
|
|
116
|
+
|
|
97
117
|
@classmethod
|
|
98
118
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
99
119
|
from ..models.mini_template_dto import MiniTemplateDto
|
|
100
120
|
from ..models.workspace_dto import WorkspaceDto
|
|
101
|
-
|
|
102
121
|
d = dict(src_dict)
|
|
103
122
|
id = d.pop("id", UNSET)
|
|
104
123
|
|
|
@@ -113,6 +132,7 @@ class SlimMiniDto:
|
|
|
113
132
|
|
|
114
133
|
description = _parse_description(d.pop("description", UNSET))
|
|
115
134
|
|
|
135
|
+
|
|
116
136
|
def _parse_instructions(data: object) -> Union[None, Unset, str]:
|
|
117
137
|
if data is None:
|
|
118
138
|
return data
|
|
@@ -122,6 +142,7 @@ class SlimMiniDto:
|
|
|
122
142
|
|
|
123
143
|
instructions = _parse_instructions(d.pop("instructions", UNSET))
|
|
124
144
|
|
|
145
|
+
|
|
125
146
|
def _parse_template_id(data: object) -> Union[None, Unset, str]:
|
|
126
147
|
if data is None:
|
|
127
148
|
return data
|
|
@@ -131,7 +152,8 @@ class SlimMiniDto:
|
|
|
131
152
|
|
|
132
153
|
template_id = _parse_template_id(d.pop("templateId", UNSET))
|
|
133
154
|
|
|
134
|
-
|
|
155
|
+
|
|
156
|
+
def _parse_template(data: object) -> Union['MiniTemplateDto', None, Unset]:
|
|
135
157
|
if data is None:
|
|
136
158
|
return data
|
|
137
159
|
if isinstance(data, Unset):
|
|
@@ -141,20 +163,26 @@ class SlimMiniDto:
|
|
|
141
163
|
raise TypeError()
|
|
142
164
|
template_type_0 = MiniTemplateDto.from_dict(data)
|
|
143
165
|
|
|
166
|
+
|
|
167
|
+
|
|
144
168
|
return template_type_0
|
|
145
|
-
except:
|
|
169
|
+
except: # noqa: E722
|
|
146
170
|
pass
|
|
147
|
-
return cast(Union[
|
|
171
|
+
return cast(Union['MiniTemplateDto', None, Unset], data)
|
|
148
172
|
|
|
149
173
|
template = _parse_template(d.pop("template", UNSET))
|
|
150
174
|
|
|
175
|
+
|
|
151
176
|
workspaces = []
|
|
152
177
|
_workspaces = d.pop("workspaces", UNSET)
|
|
153
|
-
for workspaces_item_data in _workspaces or []:
|
|
178
|
+
for workspaces_item_data in (_workspaces or []):
|
|
154
179
|
workspaces_item = WorkspaceDto.from_dict(workspaces_item_data)
|
|
155
180
|
|
|
181
|
+
|
|
182
|
+
|
|
156
183
|
workspaces.append(workspaces_item)
|
|
157
184
|
|
|
185
|
+
|
|
158
186
|
slim_mini_dto = cls(
|
|
159
187
|
id=id,
|
|
160
188
|
name=name,
|
|
@@ -166,3 +194,4 @@ class SlimMiniDto:
|
|
|
166
194
|
)
|
|
167
195
|
|
|
168
196
|
return slim_mini_dto
|
|
197
|
+
|
minikai/models/tool_dto.py
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar,
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
3
3
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
5
6
|
|
|
6
7
|
from ..types import UNSET, Unset
|
|
7
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import Union
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
8
17
|
T = TypeVar("T", bound="ToolDto")
|
|
9
18
|
|
|
10
19
|
|
|
20
|
+
|
|
11
21
|
@_attrs_define
|
|
12
22
|
class ToolDto:
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
"""
|
|
24
|
+
Attributes:
|
|
25
|
+
id (Union[Unset, int]):
|
|
26
|
+
name (Union[Unset, str]):
|
|
27
|
+
description (Union[Unset, str]):
|
|
28
|
+
endpoint (Union[Unset, str]):
|
|
29
|
+
schema (Union[Unset, str]):
|
|
30
|
+
"""
|
|
21
31
|
|
|
22
32
|
id: Union[Unset, int] = UNSET
|
|
23
33
|
name: Union[Unset, str] = UNSET
|
|
@@ -25,6 +35,10 @@ class ToolDto:
|
|
|
25
35
|
endpoint: Union[Unset, str] = UNSET
|
|
26
36
|
schema: Union[Unset, str] = UNSET
|
|
27
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
28
42
|
def to_dict(self) -> dict[str, Any]:
|
|
29
43
|
id = self.id
|
|
30
44
|
|
|
@@ -36,9 +50,11 @@ class ToolDto:
|
|
|
36
50
|
|
|
37
51
|
schema = self.schema
|
|
38
52
|
|
|
53
|
+
|
|
39
54
|
field_dict: dict[str, Any] = {}
|
|
40
55
|
|
|
41
|
-
field_dict.update({
|
|
56
|
+
field_dict.update({
|
|
57
|
+
})
|
|
42
58
|
if id is not UNSET:
|
|
43
59
|
field_dict["id"] = id
|
|
44
60
|
if name is not UNSET:
|
|
@@ -52,6 +68,8 @@ class ToolDto:
|
|
|
52
68
|
|
|
53
69
|
return field_dict
|
|
54
70
|
|
|
71
|
+
|
|
72
|
+
|
|
55
73
|
@classmethod
|
|
56
74
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
75
|
d = dict(src_dict)
|
|
@@ -74,3 +92,4 @@ class ToolDto:
|
|
|
74
92
|
)
|
|
75
93
|
|
|
76
94
|
return tool_dto
|
|
95
|
+
|
|
@@ -1,26 +1,43 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
|
-
from
|
|
3
|
-
from typing import Any, TypeVar, Union, cast
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
4
3
|
|
|
5
4
|
from attrs import define as _attrs_define
|
|
6
5
|
from attrs import field as _attrs_field
|
|
7
|
-
|
|
6
|
+
import json
|
|
8
7
|
from .. import types
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
from ..types import File, FileTypes
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
from io import BytesIO
|
|
14
|
+
from typing import cast
|
|
15
|
+
from typing import cast, Union
|
|
16
|
+
from typing import Union
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
10
22
|
|
|
11
23
|
T = TypeVar("T", bound="UpdateAttachmentsBody")
|
|
12
24
|
|
|
13
25
|
|
|
26
|
+
|
|
14
27
|
@_attrs_define
|
|
15
28
|
class UpdateAttachmentsBody:
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
29
|
+
"""
|
|
30
|
+
Attributes:
|
|
31
|
+
files (Union[None, Unset, list[File]]):
|
|
32
|
+
"""
|
|
20
33
|
|
|
21
34
|
files: Union[None, Unset, list[File]] = UNSET
|
|
22
35
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
36
|
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
24
41
|
def to_dict(self) -> dict[str, Any]:
|
|
25
42
|
files: Union[None, Unset, list[FileTypes]]
|
|
26
43
|
if isinstance(self.files, Unset):
|
|
@@ -32,36 +49,45 @@ class UpdateAttachmentsBody:
|
|
|
32
49
|
|
|
33
50
|
files.append(files_type_0_item)
|
|
34
51
|
|
|
52
|
+
|
|
35
53
|
else:
|
|
36
54
|
files = self.files
|
|
37
55
|
|
|
56
|
+
|
|
38
57
|
field_dict: dict[str, Any] = {}
|
|
39
58
|
field_dict.update(self.additional_properties)
|
|
40
|
-
field_dict.update({
|
|
59
|
+
field_dict.update({
|
|
60
|
+
})
|
|
41
61
|
if files is not UNSET:
|
|
42
62
|
field_dict["files"] = files
|
|
43
63
|
|
|
44
64
|
return field_dict
|
|
45
65
|
|
|
66
|
+
|
|
46
67
|
def to_multipart(self) -> types.RequestFiles:
|
|
47
68
|
files: types.RequestFiles = []
|
|
48
69
|
|
|
49
70
|
if not isinstance(self.files, Unset):
|
|
50
71
|
if isinstance(self.files, list):
|
|
72
|
+
|
|
51
73
|
for files_type_0_item_element in self.files:
|
|
52
74
|
files.append(("files", files_type_0_item_element.to_tuple()))
|
|
53
75
|
else:
|
|
54
76
|
files.append(("files", (None, str(self.files).encode(), "text/plain")))
|
|
55
77
|
|
|
78
|
+
|
|
79
|
+
|
|
56
80
|
for prop_name, prop in self.additional_properties.items():
|
|
57
81
|
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
58
82
|
|
|
83
|
+
|
|
84
|
+
|
|
59
85
|
return files
|
|
60
86
|
|
|
87
|
+
|
|
61
88
|
@classmethod
|
|
62
89
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
63
90
|
d = dict(src_dict)
|
|
64
|
-
|
|
65
91
|
def _parse_files(data: object) -> Union[None, Unset, list[File]]:
|
|
66
92
|
if data is None:
|
|
67
93
|
return data
|
|
@@ -72,22 +98,28 @@ class UpdateAttachmentsBody:
|
|
|
72
98
|
raise TypeError()
|
|
73
99
|
files_type_0 = []
|
|
74
100
|
_files_type_0 = data
|
|
75
|
-
for files_type_0_item_data in _files_type_0:
|
|
76
|
-
files_type_0_item = File(
|
|
101
|
+
for files_type_0_item_data in (_files_type_0):
|
|
102
|
+
files_type_0_item = File(
|
|
103
|
+
payload = BytesIO(files_type_0_item_data)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
77
107
|
|
|
78
108
|
files_type_0.append(files_type_0_item)
|
|
79
109
|
|
|
80
110
|
return files_type_0
|
|
81
|
-
except:
|
|
111
|
+
except: # noqa: E722
|
|
82
112
|
pass
|
|
83
113
|
return cast(Union[None, Unset, list[File]], data)
|
|
84
114
|
|
|
85
115
|
files = _parse_files(d.pop("files", UNSET))
|
|
86
116
|
|
|
117
|
+
|
|
87
118
|
update_attachments_body = cls(
|
|
88
119
|
files=files,
|
|
89
120
|
)
|
|
90
121
|
|
|
122
|
+
|
|
91
123
|
update_attachments_body.additional_properties = d
|
|
92
124
|
return update_attachments_body
|
|
93
125
|
|