minikai 0.1.2__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 +5 -1
- 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 +134 -55
- 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 +40 -13
- 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.2.dist-info → minikai-0.1.3.dist-info}/METADATA +1 -1
- minikai-0.1.3.dist-info/RECORD +91 -0
- minikai-0.1.2.dist-info/RECORD +0 -88
- {minikai-0.1.2.dist-info → minikai-0.1.3.dist-info}/WHEEL +0 -0
minikai/models/record_tag.py
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
from collections.abc import Mapping
|
|
3
|
-
from typing import Any, TypeVar,
|
|
2
|
+
from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
4
3
|
|
|
5
4
|
from attrs import define as _attrs_define
|
|
6
|
-
from
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
7
8
|
|
|
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
|
+
|
|
9
20
|
|
|
10
21
|
T = TypeVar("T", bound="RecordTag")
|
|
11
22
|
|
|
12
23
|
|
|
24
|
+
|
|
13
25
|
@_attrs_define
|
|
14
26
|
class RecordTag:
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
"""
|
|
23
35
|
|
|
24
36
|
key: Union[Unset, str] = UNSET
|
|
25
37
|
value_string: Union[None, Unset, str] = UNSET
|
|
@@ -27,6 +39,10 @@ class RecordTag:
|
|
|
27
39
|
value_boolean: Union[None, Unset, bool] = UNSET
|
|
28
40
|
value_date: Union[None, Unset, datetime.datetime] = UNSET
|
|
29
41
|
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
30
46
|
def to_dict(self) -> dict[str, Any]:
|
|
31
47
|
key = self.key
|
|
32
48
|
|
|
@@ -56,9 +72,11 @@ class RecordTag:
|
|
|
56
72
|
else:
|
|
57
73
|
value_date = self.value_date
|
|
58
74
|
|
|
75
|
+
|
|
59
76
|
field_dict: dict[str, Any] = {}
|
|
60
77
|
|
|
61
|
-
field_dict.update({
|
|
78
|
+
field_dict.update({
|
|
79
|
+
})
|
|
62
80
|
if key is not UNSET:
|
|
63
81
|
field_dict["key"] = key
|
|
64
82
|
if value_string is not UNSET:
|
|
@@ -72,6 +90,8 @@ class RecordTag:
|
|
|
72
90
|
|
|
73
91
|
return field_dict
|
|
74
92
|
|
|
93
|
+
|
|
94
|
+
|
|
75
95
|
@classmethod
|
|
76
96
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
97
|
d = dict(src_dict)
|
|
@@ -86,6 +106,7 @@ class RecordTag:
|
|
|
86
106
|
|
|
87
107
|
value_string = _parse_value_string(d.pop("valueString", UNSET))
|
|
88
108
|
|
|
109
|
+
|
|
89
110
|
def _parse_value_number(data: object) -> Union[None, Unset, float]:
|
|
90
111
|
if data is None:
|
|
91
112
|
return data
|
|
@@ -95,6 +116,7 @@ class RecordTag:
|
|
|
95
116
|
|
|
96
117
|
value_number = _parse_value_number(d.pop("valueNumber", UNSET))
|
|
97
118
|
|
|
119
|
+
|
|
98
120
|
def _parse_value_boolean(data: object) -> Union[None, Unset, bool]:
|
|
99
121
|
if data is None:
|
|
100
122
|
return data
|
|
@@ -104,6 +126,7 @@ class RecordTag:
|
|
|
104
126
|
|
|
105
127
|
value_boolean = _parse_value_boolean(d.pop("valueBoolean", UNSET))
|
|
106
128
|
|
|
129
|
+
|
|
107
130
|
def _parse_value_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
108
131
|
if data is None:
|
|
109
132
|
return data
|
|
@@ -114,13 +137,16 @@ class RecordTag:
|
|
|
114
137
|
raise TypeError()
|
|
115
138
|
value_date_type_0 = isoparse(data)
|
|
116
139
|
|
|
140
|
+
|
|
141
|
+
|
|
117
142
|
return value_date_type_0
|
|
118
|
-
except:
|
|
143
|
+
except: # noqa: E722
|
|
119
144
|
pass
|
|
120
145
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
121
146
|
|
|
122
147
|
value_date = _parse_value_date(d.pop("valueDate", UNSET))
|
|
123
148
|
|
|
149
|
+
|
|
124
150
|
record_tag = cls(
|
|
125
151
|
key=key,
|
|
126
152
|
value_string=value_string,
|
|
@@ -130,3 +156,4 @@ class RecordTag:
|
|
|
130
156
|
)
|
|
131
157
|
|
|
132
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
|
|
|
@@ -1,28 +1,44 @@
|
|
|
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 cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
8
19
|
T = TypeVar("T", bound="UpdateGroupCommand")
|
|
9
20
|
|
|
10
21
|
|
|
22
|
+
|
|
11
23
|
@_attrs_define
|
|
12
24
|
class UpdateGroupCommand:
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
"""
|
|
26
|
+
Attributes:
|
|
27
|
+
group_id (Union[Unset, str]):
|
|
28
|
+
name (Union[None, Unset, str]):
|
|
29
|
+
user_ids (Union[None, Unset, list[str]]):
|
|
30
|
+
mini_ids (Union[None, Unset, list[int]]):
|
|
31
|
+
"""
|
|
20
32
|
|
|
21
33
|
group_id: Union[Unset, str] = UNSET
|
|
22
34
|
name: Union[None, Unset, str] = UNSET
|
|
23
35
|
user_ids: Union[None, Unset, list[str]] = UNSET
|
|
24
36
|
mini_ids: Union[None, Unset, list[int]] = UNSET
|
|
25
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
26
42
|
def to_dict(self) -> dict[str, Any]:
|
|
27
43
|
group_id = self.group_id
|
|
28
44
|
|
|
@@ -38,6 +54,7 @@ class UpdateGroupCommand:
|
|
|
38
54
|
elif isinstance(self.user_ids, list):
|
|
39
55
|
user_ids = self.user_ids
|
|
40
56
|
|
|
57
|
+
|
|
41
58
|
else:
|
|
42
59
|
user_ids = self.user_ids
|
|
43
60
|
|
|
@@ -47,12 +64,15 @@ class UpdateGroupCommand:
|
|
|
47
64
|
elif isinstance(self.mini_ids, list):
|
|
48
65
|
mini_ids = self.mini_ids
|
|
49
66
|
|
|
67
|
+
|
|
50
68
|
else:
|
|
51
69
|
mini_ids = self.mini_ids
|
|
52
70
|
|
|
71
|
+
|
|
53
72
|
field_dict: dict[str, Any] = {}
|
|
54
73
|
|
|
55
|
-
field_dict.update({
|
|
74
|
+
field_dict.update({
|
|
75
|
+
})
|
|
56
76
|
if group_id is not UNSET:
|
|
57
77
|
field_dict["groupId"] = group_id
|
|
58
78
|
if name is not UNSET:
|
|
@@ -64,6 +84,8 @@ class UpdateGroupCommand:
|
|
|
64
84
|
|
|
65
85
|
return field_dict
|
|
66
86
|
|
|
87
|
+
|
|
88
|
+
|
|
67
89
|
@classmethod
|
|
68
90
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
91
|
d = dict(src_dict)
|
|
@@ -78,6 +100,7 @@ class UpdateGroupCommand:
|
|
|
78
100
|
|
|
79
101
|
name = _parse_name(d.pop("name", UNSET))
|
|
80
102
|
|
|
103
|
+
|
|
81
104
|
def _parse_user_ids(data: object) -> Union[None, Unset, list[str]]:
|
|
82
105
|
if data is None:
|
|
83
106
|
return data
|
|
@@ -89,12 +112,13 @@ class UpdateGroupCommand:
|
|
|
89
112
|
user_ids_type_0 = cast(list[str], data)
|
|
90
113
|
|
|
91
114
|
return user_ids_type_0
|
|
92
|
-
except:
|
|
115
|
+
except: # noqa: E722
|
|
93
116
|
pass
|
|
94
117
|
return cast(Union[None, Unset, list[str]], data)
|
|
95
118
|
|
|
96
119
|
user_ids = _parse_user_ids(d.pop("userIds", UNSET))
|
|
97
120
|
|
|
121
|
+
|
|
98
122
|
def _parse_mini_ids(data: object) -> Union[None, Unset, list[int]]:
|
|
99
123
|
if data is None:
|
|
100
124
|
return data
|
|
@@ -106,12 +130,13 @@ class UpdateGroupCommand:
|
|
|
106
130
|
mini_ids_type_0 = cast(list[int], data)
|
|
107
131
|
|
|
108
132
|
return mini_ids_type_0
|
|
109
|
-
except:
|
|
133
|
+
except: # noqa: E722
|
|
110
134
|
pass
|
|
111
135
|
return cast(Union[None, Unset, list[int]], data)
|
|
112
136
|
|
|
113
137
|
mini_ids = _parse_mini_ids(d.pop("miniIds", UNSET))
|
|
114
138
|
|
|
139
|
+
|
|
115
140
|
update_group_command = cls(
|
|
116
141
|
group_id=group_id,
|
|
117
142
|
name=name,
|
|
@@ -120,3 +145,4 @@ class UpdateGroupCommand:
|
|
|
120
145
|
)
|
|
121
146
|
|
|
122
147
|
return update_group_command
|
|
148
|
+
|