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
|
@@ -1,24 +1,35 @@
|
|
|
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, Union
|
|
11
|
+
from typing import Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
8
18
|
T = TypeVar("T", bound="UpdateMiniCommand")
|
|
9
19
|
|
|
10
20
|
|
|
21
|
+
|
|
11
22
|
@_attrs_define
|
|
12
23
|
class UpdateMiniCommand:
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
id (Union[Unset, int]):
|
|
27
|
+
name (Union[Unset, str]):
|
|
28
|
+
description (Union[None, Unset, str]):
|
|
29
|
+
template_id (Union[None, Unset, str]):
|
|
30
|
+
external_id (Union[None, Unset, str]):
|
|
31
|
+
external_source (Union[None, Unset, str]):
|
|
32
|
+
"""
|
|
22
33
|
|
|
23
34
|
id: Union[Unset, int] = UNSET
|
|
24
35
|
name: Union[Unset, str] = UNSET
|
|
@@ -27,6 +38,10 @@ class UpdateMiniCommand:
|
|
|
27
38
|
external_id: Union[None, Unset, str] = UNSET
|
|
28
39
|
external_source: Union[None, Unset, str] = UNSET
|
|
29
40
|
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
30
45
|
def to_dict(self) -> dict[str, Any]:
|
|
31
46
|
id = self.id
|
|
32
47
|
|
|
@@ -56,9 +71,11 @@ class UpdateMiniCommand:
|
|
|
56
71
|
else:
|
|
57
72
|
external_source = self.external_source
|
|
58
73
|
|
|
74
|
+
|
|
59
75
|
field_dict: dict[str, Any] = {}
|
|
60
76
|
|
|
61
|
-
field_dict.update({
|
|
77
|
+
field_dict.update({
|
|
78
|
+
})
|
|
62
79
|
if id is not UNSET:
|
|
63
80
|
field_dict["id"] = id
|
|
64
81
|
if name is not UNSET:
|
|
@@ -74,6 +91,8 @@ class UpdateMiniCommand:
|
|
|
74
91
|
|
|
75
92
|
return field_dict
|
|
76
93
|
|
|
94
|
+
|
|
95
|
+
|
|
77
96
|
@classmethod
|
|
78
97
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
79
98
|
d = dict(src_dict)
|
|
@@ -90,6 +109,7 @@ class UpdateMiniCommand:
|
|
|
90
109
|
|
|
91
110
|
description = _parse_description(d.pop("description", UNSET))
|
|
92
111
|
|
|
112
|
+
|
|
93
113
|
def _parse_template_id(data: object) -> Union[None, Unset, str]:
|
|
94
114
|
if data is None:
|
|
95
115
|
return data
|
|
@@ -99,6 +119,7 @@ class UpdateMiniCommand:
|
|
|
99
119
|
|
|
100
120
|
template_id = _parse_template_id(d.pop("templateId", UNSET))
|
|
101
121
|
|
|
122
|
+
|
|
102
123
|
def _parse_external_id(data: object) -> Union[None, Unset, str]:
|
|
103
124
|
if data is None:
|
|
104
125
|
return data
|
|
@@ -108,6 +129,7 @@ class UpdateMiniCommand:
|
|
|
108
129
|
|
|
109
130
|
external_id = _parse_external_id(d.pop("externalId", UNSET))
|
|
110
131
|
|
|
132
|
+
|
|
111
133
|
def _parse_external_source(data: object) -> Union[None, Unset, str]:
|
|
112
134
|
if data is None:
|
|
113
135
|
return data
|
|
@@ -117,6 +139,7 @@ class UpdateMiniCommand:
|
|
|
117
139
|
|
|
118
140
|
external_source = _parse_external_source(d.pop("externalSource", UNSET))
|
|
119
141
|
|
|
142
|
+
|
|
120
143
|
update_mini_command = cls(
|
|
121
144
|
id=id,
|
|
122
145
|
name=name,
|
|
@@ -127,3 +150,4 @@ class UpdateMiniCommand:
|
|
|
127
150
|
)
|
|
128
151
|
|
|
129
152
|
return update_mini_command
|
|
153
|
+
|
|
@@ -1,24 +1,39 @@
|
|
|
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 Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
8
18
|
T = TypeVar("T", bound="UpdateMiniTemplateWorkspacesCommand")
|
|
9
19
|
|
|
10
20
|
|
|
21
|
+
|
|
11
22
|
@_attrs_define
|
|
12
23
|
class UpdateMiniTemplateWorkspacesCommand:
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
mini_template_id (Union[Unset, str]):
|
|
27
|
+
workspace_ids (Union[Unset, list[str]]):
|
|
28
|
+
"""
|
|
18
29
|
|
|
19
30
|
mini_template_id: Union[Unset, str] = UNSET
|
|
20
31
|
workspace_ids: Union[Unset, list[str]] = UNSET
|
|
21
32
|
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
22
37
|
def to_dict(self) -> dict[str, Any]:
|
|
23
38
|
mini_template_id = self.mini_template_id
|
|
24
39
|
|
|
@@ -26,9 +41,13 @@ class UpdateMiniTemplateWorkspacesCommand:
|
|
|
26
41
|
if not isinstance(self.workspace_ids, Unset):
|
|
27
42
|
workspace_ids = self.workspace_ids
|
|
28
43
|
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
29
47
|
field_dict: dict[str, Any] = {}
|
|
30
48
|
|
|
31
|
-
field_dict.update({
|
|
49
|
+
field_dict.update({
|
|
50
|
+
})
|
|
32
51
|
if mini_template_id is not UNSET:
|
|
33
52
|
field_dict["miniTemplateId"] = mini_template_id
|
|
34
53
|
if workspace_ids is not UNSET:
|
|
@@ -36,6 +55,8 @@ class UpdateMiniTemplateWorkspacesCommand:
|
|
|
36
55
|
|
|
37
56
|
return field_dict
|
|
38
57
|
|
|
58
|
+
|
|
59
|
+
|
|
39
60
|
@classmethod
|
|
40
61
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
41
62
|
d = dict(src_dict)
|
|
@@ -43,9 +64,11 @@ class UpdateMiniTemplateWorkspacesCommand:
|
|
|
43
64
|
|
|
44
65
|
workspace_ids = cast(list[str], d.pop("workspaceIds", UNSET))
|
|
45
66
|
|
|
67
|
+
|
|
46
68
|
update_mini_template_workspaces_command = cls(
|
|
47
69
|
mini_template_id=mini_template_id,
|
|
48
70
|
workspace_ids=workspace_ids,
|
|
49
71
|
)
|
|
50
72
|
|
|
51
73
|
return update_mini_template_workspaces_command
|
|
74
|
+
|
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
from collections.abc import Mapping
|
|
3
|
-
from typing import
|
|
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
|
|
9
15
|
|
|
10
16
|
if TYPE_CHECKING:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
from ..models.record_relation_dto import RecordRelationDto
|
|
18
|
+
from ..models.update_record_command_tags import UpdateRecordCommandTags
|
|
19
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
15
23
|
|
|
16
24
|
|
|
17
25
|
T = TypeVar("T", bound="UpdateRecordCommand")
|
|
18
26
|
|
|
19
27
|
|
|
28
|
+
|
|
20
29
|
@_attrs_define
|
|
21
30
|
class UpdateRecordCommand:
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
"""
|
|
32
|
+
Attributes:
|
|
33
|
+
id (Union[Unset, str]):
|
|
34
|
+
title (Union[Unset, str]):
|
|
35
|
+
description (Union[None, Unset, str]):
|
|
36
|
+
event_date (Union[None, Unset, datetime.datetime]):
|
|
37
|
+
schema (Union[Unset, Any]):
|
|
38
|
+
content (Union[Unset, Any]):
|
|
39
|
+
relations (Union[Unset, list['RecordRelationDto']]):
|
|
40
|
+
external_uri (Union[None, Unset, str]):
|
|
41
|
+
labels (Union[Unset, list[str]]):
|
|
42
|
+
tags (Union[Unset, UpdateRecordCommandTags]):
|
|
43
|
+
authorization (Union[Unset, RecordAuthorizationDto]):
|
|
44
|
+
archived (Union[Unset, bool]):
|
|
45
|
+
"""
|
|
37
46
|
|
|
38
47
|
id: Union[Unset, str] = UNSET
|
|
39
48
|
title: Union[Unset, str] = UNSET
|
|
40
49
|
description: Union[None, Unset, str] = UNSET
|
|
41
50
|
event_date: Union[None, Unset, datetime.datetime] = UNSET
|
|
42
|
-
schema: Union[
|
|
43
|
-
content: Union[
|
|
44
|
-
relations: Union[Unset, list[
|
|
51
|
+
schema: Union[Unset, Any] = UNSET
|
|
52
|
+
content: Union[Unset, Any] = UNSET
|
|
53
|
+
relations: Union[Unset, list['RecordRelationDto']] = UNSET
|
|
45
54
|
external_uri: Union[None, Unset, str] = UNSET
|
|
46
55
|
labels: Union[Unset, list[str]] = UNSET
|
|
47
|
-
tags: Union[Unset,
|
|
48
|
-
authorization: Union[Unset,
|
|
56
|
+
tags: Union[Unset, 'UpdateRecordCommandTags'] = UNSET
|
|
57
|
+
authorization: Union[Unset, 'RecordAuthorizationDto'] = UNSET
|
|
49
58
|
archived: Union[Unset, bool] = UNSET
|
|
50
59
|
|
|
51
|
-
def to_dict(self) -> dict[str, Any]:
|
|
52
|
-
from ..models.json_node import JsonNode
|
|
53
60
|
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> dict[str, Any]:
|
|
65
|
+
from ..models.record_relation_dto import RecordRelationDto
|
|
66
|
+
from ..models.update_record_command_tags import UpdateRecordCommandTags
|
|
67
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
54
68
|
id = self.id
|
|
55
69
|
|
|
56
70
|
title = self.title
|
|
@@ -69,21 +83,9 @@ class UpdateRecordCommand:
|
|
|
69
83
|
else:
|
|
70
84
|
event_date = self.event_date
|
|
71
85
|
|
|
72
|
-
schema
|
|
73
|
-
if isinstance(self.schema, Unset):
|
|
74
|
-
schema = UNSET
|
|
75
|
-
elif isinstance(self.schema, JsonNode):
|
|
76
|
-
schema = self.schema.to_dict()
|
|
77
|
-
else:
|
|
78
|
-
schema = self.schema
|
|
86
|
+
schema = self.schema
|
|
79
87
|
|
|
80
|
-
content
|
|
81
|
-
if isinstance(self.content, Unset):
|
|
82
|
-
content = UNSET
|
|
83
|
-
elif isinstance(self.content, JsonNode):
|
|
84
|
-
content = self.content.to_dict()
|
|
85
|
-
else:
|
|
86
|
-
content = self.content
|
|
88
|
+
content = self.content
|
|
87
89
|
|
|
88
90
|
relations: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
89
91
|
if not isinstance(self.relations, Unset):
|
|
@@ -92,6 +94,8 @@ class UpdateRecordCommand:
|
|
|
92
94
|
relations_item = relations_item_data.to_dict()
|
|
93
95
|
relations.append(relations_item)
|
|
94
96
|
|
|
97
|
+
|
|
98
|
+
|
|
95
99
|
external_uri: Union[None, Unset, str]
|
|
96
100
|
if isinstance(self.external_uri, Unset):
|
|
97
101
|
external_uri = UNSET
|
|
@@ -102,6 +106,8 @@ class UpdateRecordCommand:
|
|
|
102
106
|
if not isinstance(self.labels, Unset):
|
|
103
107
|
labels = self.labels
|
|
104
108
|
|
|
109
|
+
|
|
110
|
+
|
|
105
111
|
tags: Union[Unset, dict[str, Any]] = UNSET
|
|
106
112
|
if not isinstance(self.tags, Unset):
|
|
107
113
|
tags = self.tags.to_dict()
|
|
@@ -112,9 +118,11 @@ class UpdateRecordCommand:
|
|
|
112
118
|
|
|
113
119
|
archived = self.archived
|
|
114
120
|
|
|
121
|
+
|
|
115
122
|
field_dict: dict[str, Any] = {}
|
|
116
123
|
|
|
117
|
-
field_dict.update({
|
|
124
|
+
field_dict.update({
|
|
125
|
+
})
|
|
118
126
|
if id is not UNSET:
|
|
119
127
|
field_dict["id"] = id
|
|
120
128
|
if title is not UNSET:
|
|
@@ -142,13 +150,13 @@ class UpdateRecordCommand:
|
|
|
142
150
|
|
|
143
151
|
return field_dict
|
|
144
152
|
|
|
153
|
+
|
|
154
|
+
|
|
145
155
|
@classmethod
|
|
146
156
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
147
|
-
from ..models.json_node import JsonNode
|
|
148
|
-
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
149
157
|
from ..models.record_relation_dto import RecordRelationDto
|
|
150
158
|
from ..models.update_record_command_tags import UpdateRecordCommandTags
|
|
151
|
-
|
|
159
|
+
from ..models.record_authorization_dto import RecordAuthorizationDto
|
|
152
160
|
d = dict(src_dict)
|
|
153
161
|
id = d.pop("id", UNSET)
|
|
154
162
|
|
|
@@ -163,6 +171,7 @@ class UpdateRecordCommand:
|
|
|
163
171
|
|
|
164
172
|
description = _parse_description(d.pop("description", UNSET))
|
|
165
173
|
|
|
174
|
+
|
|
166
175
|
def _parse_event_date(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
167
176
|
if data is None:
|
|
168
177
|
return data
|
|
@@ -173,54 +182,30 @@ class UpdateRecordCommand:
|
|
|
173
182
|
raise TypeError()
|
|
174
183
|
event_date_type_0 = isoparse(data)
|
|
175
184
|
|
|
185
|
+
|
|
186
|
+
|
|
176
187
|
return event_date_type_0
|
|
177
|
-
except:
|
|
188
|
+
except: # noqa: E722
|
|
178
189
|
pass
|
|
179
190
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
180
191
|
|
|
181
192
|
event_date = _parse_event_date(d.pop("eventDate", UNSET))
|
|
182
193
|
|
|
183
|
-
def _parse_schema(data: object) -> Union["JsonNode", None, Unset]:
|
|
184
|
-
if data is None:
|
|
185
|
-
return data
|
|
186
|
-
if isinstance(data, Unset):
|
|
187
|
-
return data
|
|
188
|
-
try:
|
|
189
|
-
if not isinstance(data, dict):
|
|
190
|
-
raise TypeError()
|
|
191
|
-
schema_type_0 = JsonNode.from_dict(data)
|
|
192
|
-
|
|
193
|
-
return schema_type_0
|
|
194
|
-
except: # noqa: E722
|
|
195
|
-
pass
|
|
196
|
-
return cast(Union["JsonNode", None, Unset], data)
|
|
197
194
|
|
|
198
|
-
schema =
|
|
195
|
+
schema = d.pop("schema", UNSET)
|
|
199
196
|
|
|
200
|
-
|
|
201
|
-
if data is None:
|
|
202
|
-
return data
|
|
203
|
-
if isinstance(data, Unset):
|
|
204
|
-
return data
|
|
205
|
-
try:
|
|
206
|
-
if not isinstance(data, dict):
|
|
207
|
-
raise TypeError()
|
|
208
|
-
content_type_0 = JsonNode.from_dict(data)
|
|
209
|
-
|
|
210
|
-
return content_type_0
|
|
211
|
-
except: # noqa: E722
|
|
212
|
-
pass
|
|
213
|
-
return cast(Union["JsonNode", None, Unset], data)
|
|
214
|
-
|
|
215
|
-
content = _parse_content(d.pop("content", UNSET))
|
|
197
|
+
content = d.pop("content", UNSET)
|
|
216
198
|
|
|
217
199
|
relations = []
|
|
218
200
|
_relations = d.pop("relations", UNSET)
|
|
219
|
-
for relations_item_data in _relations or []:
|
|
201
|
+
for relations_item_data in (_relations or []):
|
|
220
202
|
relations_item = RecordRelationDto.from_dict(relations_item_data)
|
|
221
203
|
|
|
204
|
+
|
|
205
|
+
|
|
222
206
|
relations.append(relations_item)
|
|
223
207
|
|
|
208
|
+
|
|
224
209
|
def _parse_external_uri(data: object) -> Union[None, Unset, str]:
|
|
225
210
|
if data is None:
|
|
226
211
|
return data
|
|
@@ -230,22 +215,30 @@ class UpdateRecordCommand:
|
|
|
230
215
|
|
|
231
216
|
external_uri = _parse_external_uri(d.pop("externalUri", UNSET))
|
|
232
217
|
|
|
218
|
+
|
|
233
219
|
labels = cast(list[str], d.pop("labels", UNSET))
|
|
234
220
|
|
|
221
|
+
|
|
235
222
|
_tags = d.pop("tags", UNSET)
|
|
236
223
|
tags: Union[Unset, UpdateRecordCommandTags]
|
|
237
|
-
if isinstance(_tags,
|
|
224
|
+
if isinstance(_tags, Unset):
|
|
238
225
|
tags = UNSET
|
|
239
226
|
else:
|
|
240
227
|
tags = UpdateRecordCommandTags.from_dict(_tags)
|
|
241
228
|
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
242
232
|
_authorization = d.pop("authorization", UNSET)
|
|
243
233
|
authorization: Union[Unset, RecordAuthorizationDto]
|
|
244
|
-
if isinstance(_authorization,
|
|
234
|
+
if isinstance(_authorization, Unset):
|
|
245
235
|
authorization = UNSET
|
|
246
236
|
else:
|
|
247
237
|
authorization = RecordAuthorizationDto.from_dict(_authorization)
|
|
248
238
|
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
249
242
|
archived = d.pop("archived", UNSET)
|
|
250
243
|
|
|
251
244
|
update_record_command = cls(
|
|
@@ -264,3 +257,4 @@ class UpdateRecordCommand:
|
|
|
264
257
|
)
|
|
265
258
|
|
|
266
259
|
return update_record_command
|
|
260
|
+
|
|
@@ -1,28 +1,47 @@
|
|
|
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
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
7
15
|
T = TypeVar("T", bound="UpdateRecordCommandTags")
|
|
8
16
|
|
|
9
17
|
|
|
18
|
+
|
|
10
19
|
@_attrs_define
|
|
11
20
|
class UpdateRecordCommandTags:
|
|
12
|
-
"""
|
|
21
|
+
"""
|
|
22
|
+
"""
|
|
13
23
|
|
|
14
24
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
25
|
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
16
30
|
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
|
|
17
32
|
field_dict: dict[str, Any] = {}
|
|
18
33
|
field_dict.update(self.additional_properties)
|
|
19
34
|
|
|
20
35
|
return field_dict
|
|
21
36
|
|
|
37
|
+
|
|
38
|
+
|
|
22
39
|
@classmethod
|
|
23
40
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
41
|
d = dict(src_dict)
|
|
25
|
-
update_record_command_tags = cls(
|
|
42
|
+
update_record_command_tags = cls(
|
|
43
|
+
)
|
|
44
|
+
|
|
26
45
|
|
|
27
46
|
update_record_command_tags.additional_properties = d
|
|
28
47
|
return update_record_command_tags
|
minikai/models/user_dto.py
CHANGED
|
@@ -1,28 +1,40 @@
|
|
|
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="UserDto")
|
|
11
22
|
|
|
12
23
|
|
|
24
|
+
|
|
13
25
|
@_attrs_define
|
|
14
26
|
class UserDto:
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
"""
|
|
28
|
+
Attributes:
|
|
29
|
+
id (Union[Unset, str]):
|
|
30
|
+
email (Union[Unset, str]):
|
|
31
|
+
first_name (Union[None, Unset, str]):
|
|
32
|
+
last_name (Union[None, Unset, str]):
|
|
33
|
+
profile_picture_url (Union[None, Unset, str]):
|
|
34
|
+
created_at (Union[None, Unset, datetime.datetime]):
|
|
35
|
+
updated_at (Union[None, Unset, datetime.datetime]):
|
|
36
|
+
organization_ids (Union[Unset, list[str]]):
|
|
37
|
+
"""
|
|
26
38
|
|
|
27
39
|
id: Union[Unset, str] = UNSET
|
|
28
40
|
email: Union[Unset, str] = UNSET
|
|
@@ -33,6 +45,10 @@ class UserDto:
|
|
|
33
45
|
updated_at: Union[None, Unset, datetime.datetime] = UNSET
|
|
34
46
|
organization_ids: Union[Unset, list[str]] = UNSET
|
|
35
47
|
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
36
52
|
def to_dict(self) -> dict[str, Any]:
|
|
37
53
|
id = self.id
|
|
38
54
|
|
|
@@ -76,9 +92,13 @@ class UserDto:
|
|
|
76
92
|
if not isinstance(self.organization_ids, Unset):
|
|
77
93
|
organization_ids = self.organization_ids
|
|
78
94
|
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
79
98
|
field_dict: dict[str, Any] = {}
|
|
80
99
|
|
|
81
|
-
field_dict.update({
|
|
100
|
+
field_dict.update({
|
|
101
|
+
})
|
|
82
102
|
if id is not UNSET:
|
|
83
103
|
field_dict["id"] = id
|
|
84
104
|
if email is not UNSET:
|
|
@@ -98,6 +118,8 @@ class UserDto:
|
|
|
98
118
|
|
|
99
119
|
return field_dict
|
|
100
120
|
|
|
121
|
+
|
|
122
|
+
|
|
101
123
|
@classmethod
|
|
102
124
|
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
103
125
|
d = dict(src_dict)
|
|
@@ -114,6 +136,7 @@ class UserDto:
|
|
|
114
136
|
|
|
115
137
|
first_name = _parse_first_name(d.pop("firstName", UNSET))
|
|
116
138
|
|
|
139
|
+
|
|
117
140
|
def _parse_last_name(data: object) -> Union[None, Unset, str]:
|
|
118
141
|
if data is None:
|
|
119
142
|
return data
|
|
@@ -123,6 +146,7 @@ class UserDto:
|
|
|
123
146
|
|
|
124
147
|
last_name = _parse_last_name(d.pop("lastName", UNSET))
|
|
125
148
|
|
|
149
|
+
|
|
126
150
|
def _parse_profile_picture_url(data: object) -> Union[None, Unset, str]:
|
|
127
151
|
if data is None:
|
|
128
152
|
return data
|
|
@@ -132,6 +156,7 @@ class UserDto:
|
|
|
132
156
|
|
|
133
157
|
profile_picture_url = _parse_profile_picture_url(d.pop("profilePictureUrl", UNSET))
|
|
134
158
|
|
|
159
|
+
|
|
135
160
|
def _parse_created_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
136
161
|
if data is None:
|
|
137
162
|
return data
|
|
@@ -142,13 +167,16 @@ class UserDto:
|
|
|
142
167
|
raise TypeError()
|
|
143
168
|
created_at_type_0 = isoparse(data)
|
|
144
169
|
|
|
170
|
+
|
|
171
|
+
|
|
145
172
|
return created_at_type_0
|
|
146
|
-
except:
|
|
173
|
+
except: # noqa: E722
|
|
147
174
|
pass
|
|
148
175
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
149
176
|
|
|
150
177
|
created_at = _parse_created_at(d.pop("createdAt", UNSET))
|
|
151
178
|
|
|
179
|
+
|
|
152
180
|
def _parse_updated_at(data: object) -> Union[None, Unset, datetime.datetime]:
|
|
153
181
|
if data is None:
|
|
154
182
|
return data
|
|
@@ -159,15 +187,19 @@ class UserDto:
|
|
|
159
187
|
raise TypeError()
|
|
160
188
|
updated_at_type_0 = isoparse(data)
|
|
161
189
|
|
|
190
|
+
|
|
191
|
+
|
|
162
192
|
return updated_at_type_0
|
|
163
|
-
except:
|
|
193
|
+
except: # noqa: E722
|
|
164
194
|
pass
|
|
165
195
|
return cast(Union[None, Unset, datetime.datetime], data)
|
|
166
196
|
|
|
167
197
|
updated_at = _parse_updated_at(d.pop("updatedAt", UNSET))
|
|
168
198
|
|
|
199
|
+
|
|
169
200
|
organization_ids = cast(list[str], d.pop("organizationIds", UNSET))
|
|
170
201
|
|
|
202
|
+
|
|
171
203
|
user_dto = cls(
|
|
172
204
|
id=id,
|
|
173
205
|
email=email,
|
|
@@ -180,3 +212,4 @@ class UserDto:
|
|
|
180
212
|
)
|
|
181
213
|
|
|
182
214
|
return user_dto
|
|
215
|
+
|