minikai 0.1.2__py3-none-any.whl → 0.1.4__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 -5
- 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 +76 -81
- 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/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 +153 -94
- 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 +104 -96
- 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 +76 -82
- 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.4.dist-info}/METADATA +1 -1
- minikai-0.1.4.dist-info/RECORD +89 -0
- minikai/models/json_node.py +0 -119
- minikai/models/json_node_options.py +0 -42
- minikai-0.1.2.dist-info/RECORD +0 -88
- {minikai-0.1.2.dist-info → minikai-0.1.4.dist-info}/WHEEL +0 -0
minikai/models/group_dto.py
CHANGED
|
@@ -1,38 +1,54 @@
|
|
|
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.user_dto import UserDto
|
|
16
|
+
from ..models.slim_mini_dto import SlimMiniDto
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
|
|
12
21
|
|
|
13
22
|
T = TypeVar("T", bound="GroupDto")
|
|
14
23
|
|
|
15
24
|
|
|
25
|
+
|
|
16
26
|
@_attrs_define
|
|
17
27
|
class GroupDto:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
id (Union[Unset, str]):
|
|
31
|
+
name (Union[Unset, str]):
|
|
32
|
+
description (Union[None, Unset, str]):
|
|
33
|
+
workspace_id (Union[Unset, str]):
|
|
34
|
+
users (Union[Unset, list['UserDto']]):
|
|
35
|
+
minis (Union[Unset, list['SlimMiniDto']]):
|
|
36
|
+
"""
|
|
27
37
|
|
|
28
38
|
id: Union[Unset, str] = UNSET
|
|
29
39
|
name: Union[Unset, str] = UNSET
|
|
30
40
|
description: Union[None, Unset, str] = UNSET
|
|
31
41
|
workspace_id: Union[Unset, str] = UNSET
|
|
32
|
-
users: Union[Unset, list[
|
|
33
|
-
minis: Union[Unset, list[
|
|
42
|
+
users: Union[Unset, list['UserDto']] = UNSET
|
|
43
|
+
minis: Union[Unset, list['SlimMiniDto']] = UNSET
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
34
48
|
|
|
35
49
|
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
from ..models.user_dto import UserDto
|
|
51
|
+
from ..models.slim_mini_dto import SlimMiniDto
|
|
36
52
|
id = self.id
|
|
37
53
|
|
|
38
54
|
name = self.name
|
|
@@ -52,6 +68,8 @@ class GroupDto:
|
|
|
52
68
|
users_item = users_item_data.to_dict()
|
|
53
69
|
users.append(users_item)
|
|
54
70
|
|
|
71
|
+
|
|
72
|
+
|
|
55
73
|
minis: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
56
74
|
if not isinstance(self.minis, Unset):
|
|
57
75
|
minis = []
|
|
@@ -59,9 +77,13 @@ class GroupDto:
|
|
|
59
77
|
minis_item = minis_item_data.to_dict()
|
|
60
78
|
minis.append(minis_item)
|
|
61
79
|
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
62
83
|
field_dict: dict[str, Any] = {}
|
|
63
84
|
|
|
64
|
-
field_dict.update({
|
|
85
|
+
field_dict.update({
|
|
86
|
+
})
|
|
65
87
|
if id is not UNSET:
|
|
66
88
|
field_dict["id"] = id
|
|
67
89
|
if name is not UNSET:
|
|
@@ -77,11 +99,12 @@ class GroupDto:
|
|
|
77
99
|
|
|
78
100
|
return field_dict
|
|
79
101
|
|
|
102
|
+
|
|
103
|
+
|
|
80
104
|
@classmethod
|
|
81
105
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
82
|
-
from ..models.slim_mini_dto import SlimMiniDto
|
|
83
106
|
from ..models.user_dto import UserDto
|
|
84
|
-
|
|
107
|
+
from ..models.slim_mini_dto import SlimMiniDto
|
|
85
108
|
d = dict(src_dict)
|
|
86
109
|
id = d.pop("id", UNSET)
|
|
87
110
|
|
|
@@ -96,22 +119,29 @@ class GroupDto:
|
|
|
96
119
|
|
|
97
120
|
description = _parse_description(d.pop("description", UNSET))
|
|
98
121
|
|
|
122
|
+
|
|
99
123
|
workspace_id = d.pop("workspaceId", UNSET)
|
|
100
124
|
|
|
101
125
|
users = []
|
|
102
126
|
_users = d.pop("users", UNSET)
|
|
103
|
-
for users_item_data in _users or []:
|
|
127
|
+
for users_item_data in (_users or []):
|
|
104
128
|
users_item = UserDto.from_dict(users_item_data)
|
|
105
129
|
|
|
130
|
+
|
|
131
|
+
|
|
106
132
|
users.append(users_item)
|
|
107
133
|
|
|
134
|
+
|
|
108
135
|
minis = []
|
|
109
136
|
_minis = d.pop("minis", UNSET)
|
|
110
|
-
for minis_item_data in _minis or []:
|
|
137
|
+
for minis_item_data in (_minis or []):
|
|
111
138
|
minis_item = SlimMiniDto.from_dict(minis_item_data)
|
|
112
139
|
|
|
140
|
+
|
|
141
|
+
|
|
113
142
|
minis.append(minis_item)
|
|
114
143
|
|
|
144
|
+
|
|
115
145
|
group_dto = cls(
|
|
116
146
|
id=id,
|
|
117
147
|
name=name,
|
|
@@ -122,3 +152,4 @@ class GroupDto:
|
|
|
122
152
|
)
|
|
123
153
|
|
|
124
154
|
return group_dto
|
|
155
|
+
|
|
@@ -1,39 +1,53 @@
|
|
|
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
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
7
|
from ..types import UNSET, Unset
|
|
8
8
|
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
from typing import cast
|
|
11
|
+
from typing import cast, Union
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
9
14
|
if TYPE_CHECKING:
|
|
10
|
-
|
|
15
|
+
from ..models.http_validation_problem_details_errors import HttpValidationProblemDetailsErrors
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
11
19
|
|
|
12
20
|
|
|
13
21
|
T = TypeVar("T", bound="HttpValidationProblemDetails")
|
|
14
22
|
|
|
15
23
|
|
|
24
|
+
|
|
16
25
|
@_attrs_define
|
|
17
26
|
class HttpValidationProblemDetails:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
type_ (Union[None, Unset, str]):
|
|
30
|
+
title (Union[None, Unset, str]):
|
|
31
|
+
status (Union[None, Unset, int]):
|
|
32
|
+
detail (Union[None, Unset, str]):
|
|
33
|
+
instance (Union[None, Unset, str]):
|
|
34
|
+
errors (Union[Unset, HttpValidationProblemDetailsErrors]):
|
|
35
|
+
"""
|
|
27
36
|
|
|
28
37
|
type_: Union[None, Unset, str] = UNSET
|
|
29
38
|
title: Union[None, Unset, str] = UNSET
|
|
30
39
|
status: Union[None, Unset, int] = UNSET
|
|
31
40
|
detail: Union[None, Unset, str] = UNSET
|
|
32
41
|
instance: Union[None, Unset, str] = UNSET
|
|
33
|
-
errors: Union[Unset,
|
|
42
|
+
errors: Union[Unset, 'HttpValidationProblemDetailsErrors'] = UNSET
|
|
34
43
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
44
|
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
36
49
|
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
from ..models.http_validation_problem_details_errors import HttpValidationProblemDetailsErrors
|
|
37
51
|
type_: Union[None, Unset, str]
|
|
38
52
|
if isinstance(self.type_, Unset):
|
|
39
53
|
type_ = UNSET
|
|
@@ -68,9 +82,11 @@ class HttpValidationProblemDetails:
|
|
|
68
82
|
if not isinstance(self.errors, Unset):
|
|
69
83
|
errors = self.errors.to_dict()
|
|
70
84
|
|
|
85
|
+
|
|
71
86
|
field_dict: dict[str, Any] = {}
|
|
72
87
|
field_dict.update(self.additional_properties)
|
|
73
|
-
field_dict.update({
|
|
88
|
+
field_dict.update({
|
|
89
|
+
})
|
|
74
90
|
if type_ is not UNSET:
|
|
75
91
|
field_dict["type"] = type_
|
|
76
92
|
if title is not UNSET:
|
|
@@ -86,12 +102,12 @@ class HttpValidationProblemDetails:
|
|
|
86
102
|
|
|
87
103
|
return field_dict
|
|
88
104
|
|
|
105
|
+
|
|
106
|
+
|
|
89
107
|
@classmethod
|
|
90
108
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
91
109
|
from ..models.http_validation_problem_details_errors import HttpValidationProblemDetailsErrors
|
|
92
|
-
|
|
93
110
|
d = dict(src_dict)
|
|
94
|
-
|
|
95
111
|
def _parse_type_(data: object) -> Union[None, Unset, str]:
|
|
96
112
|
if data is None:
|
|
97
113
|
return data
|
|
@@ -101,6 +117,7 @@ class HttpValidationProblemDetails:
|
|
|
101
117
|
|
|
102
118
|
type_ = _parse_type_(d.pop("type", UNSET))
|
|
103
119
|
|
|
120
|
+
|
|
104
121
|
def _parse_title(data: object) -> Union[None, Unset, str]:
|
|
105
122
|
if data is None:
|
|
106
123
|
return data
|
|
@@ -110,6 +127,7 @@ class HttpValidationProblemDetails:
|
|
|
110
127
|
|
|
111
128
|
title = _parse_title(d.pop("title", UNSET))
|
|
112
129
|
|
|
130
|
+
|
|
113
131
|
def _parse_status(data: object) -> Union[None, Unset, int]:
|
|
114
132
|
if data is None:
|
|
115
133
|
return data
|
|
@@ -119,6 +137,7 @@ class HttpValidationProblemDetails:
|
|
|
119
137
|
|
|
120
138
|
status = _parse_status(d.pop("status", UNSET))
|
|
121
139
|
|
|
140
|
+
|
|
122
141
|
def _parse_detail(data: object) -> Union[None, Unset, str]:
|
|
123
142
|
if data is None:
|
|
124
143
|
return data
|
|
@@ -128,6 +147,7 @@ class HttpValidationProblemDetails:
|
|
|
128
147
|
|
|
129
148
|
detail = _parse_detail(d.pop("detail", UNSET))
|
|
130
149
|
|
|
150
|
+
|
|
131
151
|
def _parse_instance(data: object) -> Union[None, Unset, str]:
|
|
132
152
|
if data is None:
|
|
133
153
|
return data
|
|
@@ -137,13 +157,17 @@ class HttpValidationProblemDetails:
|
|
|
137
157
|
|
|
138
158
|
instance = _parse_instance(d.pop("instance", UNSET))
|
|
139
159
|
|
|
160
|
+
|
|
140
161
|
_errors = d.pop("errors", UNSET)
|
|
141
162
|
errors: Union[Unset, HttpValidationProblemDetailsErrors]
|
|
142
|
-
if isinstance(_errors,
|
|
163
|
+
if isinstance(_errors, Unset):
|
|
143
164
|
errors = UNSET
|
|
144
165
|
else:
|
|
145
166
|
errors = HttpValidationProblemDetailsErrors.from_dict(_errors)
|
|
146
167
|
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
147
171
|
http_validation_problem_details = cls(
|
|
148
172
|
type_=type_,
|
|
149
173
|
title=title,
|
|
@@ -153,6 +177,7 @@ class HttpValidationProblemDetails:
|
|
|
153
177
|
errors=errors,
|
|
154
178
|
)
|
|
155
179
|
|
|
180
|
+
|
|
156
181
|
http_validation_problem_details.additional_properties = d
|
|
157
182
|
return http_validation_problem_details
|
|
158
183
|
|
|
@@ -1,29 +1,52 @@
|
|
|
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
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
from typing import cast
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
7
16
|
T = TypeVar("T", bound="HttpValidationProblemDetailsErrors")
|
|
8
17
|
|
|
9
18
|
|
|
19
|
+
|
|
10
20
|
@_attrs_define
|
|
11
21
|
class HttpValidationProblemDetailsErrors:
|
|
12
|
-
"""
|
|
22
|
+
"""
|
|
23
|
+
"""
|
|
13
24
|
|
|
14
25
|
additional_properties: dict[str, list[str]] = _attrs_field(init=False, factory=dict)
|
|
15
26
|
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
16
31
|
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
|
|
17
33
|
field_dict: dict[str, Any] = {}
|
|
18
34
|
for prop_name, prop in self.additional_properties.items():
|
|
19
35
|
field_dict[prop_name] = prop
|
|
20
36
|
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
21
40
|
return field_dict
|
|
22
41
|
|
|
42
|
+
|
|
43
|
+
|
|
23
44
|
@classmethod
|
|
24
45
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
25
46
|
d = dict(src_dict)
|
|
26
|
-
http_validation_problem_details_errors = cls(
|
|
47
|
+
http_validation_problem_details_errors = cls(
|
|
48
|
+
)
|
|
49
|
+
|
|
27
50
|
|
|
28
51
|
additional_properties = {}
|
|
29
52
|
for prop_name, prop_dict in d.items():
|
minikai/models/mini_dto.py
CHANGED
|
@@ -1,45 +1,60 @@
|
|
|
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
|
-
|
|
11
|
-
|
|
15
|
+
from ..models.mini_template_dto import MiniTemplateDto
|
|
16
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
17
|
+
from ..models.document_file_dto import DocumentFileDto
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
12
21
|
|
|
13
22
|
|
|
14
23
|
T = TypeVar("T", bound="MiniDto")
|
|
15
24
|
|
|
16
25
|
|
|
26
|
+
|
|
17
27
|
@_attrs_define
|
|
18
28
|
class MiniDto:
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
"""
|
|
30
|
+
Attributes:
|
|
31
|
+
id (Union[Unset, int]):
|
|
32
|
+
name (Union[Unset, str]):
|
|
33
|
+
description (Union[None, Unset, str]):
|
|
34
|
+
instructions (Union[None, Unset, str]):
|
|
35
|
+
template_id (Union[None, Unset, str]):
|
|
36
|
+
template (Union['MiniTemplateDto', None, Unset]):
|
|
37
|
+
workspaces (Union[Unset, list['WorkspaceDto']]):
|
|
38
|
+
document_files (Union[Unset, list['DocumentFileDto']]):
|
|
39
|
+
"""
|
|
30
40
|
|
|
31
41
|
id: Union[Unset, int] = UNSET
|
|
32
42
|
name: Union[Unset, str] = UNSET
|
|
33
43
|
description: Union[None, Unset, str] = UNSET
|
|
34
44
|
instructions: Union[None, Unset, str] = UNSET
|
|
35
45
|
template_id: Union[None, Unset, str] = UNSET
|
|
36
|
-
template: Union[
|
|
37
|
-
workspaces: Union[Unset, list[
|
|
38
|
-
document_files: Union[Unset, list[
|
|
46
|
+
template: Union['MiniTemplateDto', None, Unset] = UNSET
|
|
47
|
+
workspaces: Union[Unset, list['WorkspaceDto']] = UNSET
|
|
48
|
+
document_files: Union[Unset, list['DocumentFileDto']] = UNSET
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
39
53
|
|
|
40
54
|
def to_dict(self) -> dict[str, Any]:
|
|
41
55
|
from ..models.mini_template_dto import MiniTemplateDto
|
|
42
|
-
|
|
56
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
57
|
+
from ..models.document_file_dto import DocumentFileDto
|
|
43
58
|
id = self.id
|
|
44
59
|
|
|
45
60
|
name = self.name
|
|
@@ -77,6 +92,8 @@ class MiniDto:
|
|
|
77
92
|
workspaces_item = workspaces_item_data.to_dict()
|
|
78
93
|
workspaces.append(workspaces_item)
|
|
79
94
|
|
|
95
|
+
|
|
96
|
+
|
|
80
97
|
document_files: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
81
98
|
if not isinstance(self.document_files, Unset):
|
|
82
99
|
document_files = []
|
|
@@ -84,9 +101,13 @@ class MiniDto:
|
|
|
84
101
|
document_files_item = document_files_item_data.to_dict()
|
|
85
102
|
document_files.append(document_files_item)
|
|
86
103
|
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
87
107
|
field_dict: dict[str, Any] = {}
|
|
88
108
|
|
|
89
|
-
field_dict.update({
|
|
109
|
+
field_dict.update({
|
|
110
|
+
})
|
|
90
111
|
if id is not UNSET:
|
|
91
112
|
field_dict["id"] = id
|
|
92
113
|
if name is not UNSET:
|
|
@@ -106,12 +127,13 @@ class MiniDto:
|
|
|
106
127
|
|
|
107
128
|
return field_dict
|
|
108
129
|
|
|
130
|
+
|
|
131
|
+
|
|
109
132
|
@classmethod
|
|
110
133
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
111
|
-
from ..models.document_file_dto import DocumentFileDto
|
|
112
134
|
from ..models.mini_template_dto import MiniTemplateDto
|
|
113
135
|
from ..models.workspace_dto import WorkspaceDto
|
|
114
|
-
|
|
136
|
+
from ..models.document_file_dto import DocumentFileDto
|
|
115
137
|
d = dict(src_dict)
|
|
116
138
|
id = d.pop("id", UNSET)
|
|
117
139
|
|
|
@@ -126,6 +148,7 @@ class MiniDto:
|
|
|
126
148
|
|
|
127
149
|
description = _parse_description(d.pop("description", UNSET))
|
|
128
150
|
|
|
151
|
+
|
|
129
152
|
def _parse_instructions(data: object) -> Union[None, Unset, str]:
|
|
130
153
|
if data is None:
|
|
131
154
|
return data
|
|
@@ -135,6 +158,7 @@ class MiniDto:
|
|
|
135
158
|
|
|
136
159
|
instructions = _parse_instructions(d.pop("instructions", UNSET))
|
|
137
160
|
|
|
161
|
+
|
|
138
162
|
def _parse_template_id(data: object) -> Union[None, Unset, str]:
|
|
139
163
|
if data is None:
|
|
140
164
|
return data
|
|
@@ -144,7 +168,8 @@ class MiniDto:
|
|
|
144
168
|
|
|
145
169
|
template_id = _parse_template_id(d.pop("templateId", UNSET))
|
|
146
170
|
|
|
147
|
-
|
|
171
|
+
|
|
172
|
+
def _parse_template(data: object) -> Union['MiniTemplateDto', None, Unset]:
|
|
148
173
|
if data is None:
|
|
149
174
|
return data
|
|
150
175
|
if isinstance(data, Unset):
|
|
@@ -154,27 +179,36 @@ class MiniDto:
|
|
|
154
179
|
raise TypeError()
|
|
155
180
|
template_type_0 = MiniTemplateDto.from_dict(data)
|
|
156
181
|
|
|
182
|
+
|
|
183
|
+
|
|
157
184
|
return template_type_0
|
|
158
|
-
except:
|
|
185
|
+
except: # noqa: E722
|
|
159
186
|
pass
|
|
160
|
-
return cast(Union[
|
|
187
|
+
return cast(Union['MiniTemplateDto', None, Unset], data)
|
|
161
188
|
|
|
162
189
|
template = _parse_template(d.pop("template", UNSET))
|
|
163
190
|
|
|
191
|
+
|
|
164
192
|
workspaces = []
|
|
165
193
|
_workspaces = d.pop("workspaces", UNSET)
|
|
166
|
-
for workspaces_item_data in _workspaces or []:
|
|
194
|
+
for workspaces_item_data in (_workspaces or []):
|
|
167
195
|
workspaces_item = WorkspaceDto.from_dict(workspaces_item_data)
|
|
168
196
|
|
|
197
|
+
|
|
198
|
+
|
|
169
199
|
workspaces.append(workspaces_item)
|
|
170
200
|
|
|
201
|
+
|
|
171
202
|
document_files = []
|
|
172
203
|
_document_files = d.pop("documentFiles", UNSET)
|
|
173
|
-
for document_files_item_data in _document_files or []:
|
|
204
|
+
for document_files_item_data in (_document_files or []):
|
|
174
205
|
document_files_item = DocumentFileDto.from_dict(document_files_item_data)
|
|
175
206
|
|
|
207
|
+
|
|
208
|
+
|
|
176
209
|
document_files.append(document_files_item)
|
|
177
210
|
|
|
211
|
+
|
|
178
212
|
mini_dto = cls(
|
|
179
213
|
id=id,
|
|
180
214
|
name=name,
|
|
@@ -187,3 +221,4 @@ class MiniDto:
|
|
|
187
221
|
)
|
|
188
222
|
|
|
189
223
|
return mini_dto
|
|
224
|
+
|
|
@@ -1,38 +1,54 @@
|
|
|
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.tool_dto import ToolDto
|
|
16
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
|
|
12
21
|
|
|
13
22
|
T = TypeVar("T", bound="MiniTemplateDto")
|
|
14
23
|
|
|
15
24
|
|
|
25
|
+
|
|
16
26
|
@_attrs_define
|
|
17
27
|
class MiniTemplateDto:
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
"""
|
|
29
|
+
Attributes:
|
|
30
|
+
id (Union[Unset, str]):
|
|
31
|
+
name (Union[Unset, str]):
|
|
32
|
+
description (Union[None, Unset, str]):
|
|
33
|
+
instructions (Union[None, Unset, str]):
|
|
34
|
+
workspaces (Union[Unset, list['WorkspaceDto']]):
|
|
35
|
+
tools (Union[Unset, list['ToolDto']]):
|
|
36
|
+
"""
|
|
27
37
|
|
|
28
38
|
id: Union[Unset, str] = UNSET
|
|
29
39
|
name: Union[Unset, str] = UNSET
|
|
30
40
|
description: Union[None, Unset, str] = UNSET
|
|
31
41
|
instructions: Union[None, Unset, str] = UNSET
|
|
32
|
-
workspaces: Union[Unset, list[
|
|
33
|
-
tools: Union[Unset, list[
|
|
42
|
+
workspaces: Union[Unset, list['WorkspaceDto']] = UNSET
|
|
43
|
+
tools: Union[Unset, list['ToolDto']] = UNSET
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
34
48
|
|
|
35
49
|
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
from ..models.tool_dto import ToolDto
|
|
51
|
+
from ..models.workspace_dto import WorkspaceDto
|
|
36
52
|
id = self.id
|
|
37
53
|
|
|
38
54
|
name = self.name
|
|
@@ -56,6 +72,8 @@ class MiniTemplateDto:
|
|
|
56
72
|
workspaces_item = workspaces_item_data.to_dict()
|
|
57
73
|
workspaces.append(workspaces_item)
|
|
58
74
|
|
|
75
|
+
|
|
76
|
+
|
|
59
77
|
tools: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
60
78
|
if not isinstance(self.tools, Unset):
|
|
61
79
|
tools = []
|
|
@@ -63,9 +81,13 @@ class MiniTemplateDto:
|
|
|
63
81
|
tools_item = tools_item_data.to_dict()
|
|
64
82
|
tools.append(tools_item)
|
|
65
83
|
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
66
87
|
field_dict: dict[str, Any] = {}
|
|
67
88
|
|
|
68
|
-
field_dict.update({
|
|
89
|
+
field_dict.update({
|
|
90
|
+
})
|
|
69
91
|
if id is not UNSET:
|
|
70
92
|
field_dict["id"] = id
|
|
71
93
|
if name is not UNSET:
|
|
@@ -81,11 +103,12 @@ class MiniTemplateDto:
|
|
|
81
103
|
|
|
82
104
|
return field_dict
|
|
83
105
|
|
|
106
|
+
|
|
107
|
+
|
|
84
108
|
@classmethod
|
|
85
109
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
110
|
from ..models.tool_dto import ToolDto
|
|
87
111
|
from ..models.workspace_dto import WorkspaceDto
|
|
88
|
-
|
|
89
112
|
d = dict(src_dict)
|
|
90
113
|
id = d.pop("id", UNSET)
|
|
91
114
|
|
|
@@ -100,6 +123,7 @@ class MiniTemplateDto:
|
|
|
100
123
|
|
|
101
124
|
description = _parse_description(d.pop("description", UNSET))
|
|
102
125
|
|
|
126
|
+
|
|
103
127
|
def _parse_instructions(data: object) -> Union[None, Unset, str]:
|
|
104
128
|
if data is None:
|
|
105
129
|
return data
|
|
@@ -109,20 +133,27 @@ class MiniTemplateDto:
|
|
|
109
133
|
|
|
110
134
|
instructions = _parse_instructions(d.pop("instructions", UNSET))
|
|
111
135
|
|
|
136
|
+
|
|
112
137
|
workspaces = []
|
|
113
138
|
_workspaces = d.pop("workspaces", UNSET)
|
|
114
|
-
for workspaces_item_data in _workspaces or []:
|
|
139
|
+
for workspaces_item_data in (_workspaces or []):
|
|
115
140
|
workspaces_item = WorkspaceDto.from_dict(workspaces_item_data)
|
|
116
141
|
|
|
142
|
+
|
|
143
|
+
|
|
117
144
|
workspaces.append(workspaces_item)
|
|
118
145
|
|
|
146
|
+
|
|
119
147
|
tools = []
|
|
120
148
|
_tools = d.pop("tools", UNSET)
|
|
121
|
-
for tools_item_data in _tools or []:
|
|
149
|
+
for tools_item_data in (_tools or []):
|
|
122
150
|
tools_item = ToolDto.from_dict(tools_item_data)
|
|
123
151
|
|
|
152
|
+
|
|
153
|
+
|
|
124
154
|
tools.append(tools_item)
|
|
125
155
|
|
|
156
|
+
|
|
126
157
|
mini_template_dto = cls(
|
|
127
158
|
id=id,
|
|
128
159
|
name=name,
|
|
@@ -133,3 +164,4 @@ class MiniTemplateDto:
|
|
|
133
164
|
)
|
|
134
165
|
|
|
135
166
|
return mini_template_dto
|
|
167
|
+
|