minikai 0.1.7__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 +8 -0
- minikai/api/__init__.py +1 -0
- minikai/api/groups/__init__.py +1 -0
- minikai/api/groups/add_minis_to_group.py +196 -0
- minikai/api/groups/add_users_to_group.py +196 -0
- minikai/api/groups/create_group.py +178 -0
- minikai/api/groups/delete_group.py +115 -0
- minikai/api/groups/get_group.py +170 -0
- minikai/api/groups/get_group_minis.py +175 -0
- minikai/api/groups/get_group_users.py +175 -0
- minikai/api/groups/get_groups.py +150 -0
- minikai/api/groups/remove_minis_from_group.py +196 -0
- minikai/api/groups/remove_users_from_group.py +196 -0
- minikai/api/groups/update_group.py +195 -0
- minikai/api/minis/__init__.py +1 -0
- minikai/api/minis/create_mini.py +178 -0
- minikai/api/minis/delete_mini.py +115 -0
- minikai/api/minis/get_external_mini.py +183 -0
- minikai/api/minis/get_minis.py +150 -0
- minikai/api/minis/patch_mini.py +195 -0
- minikai/api/minis/update_mini.py +195 -0
- minikai/api/records/__init__.py +1 -0
- minikai/api/records/add_attachments.py +203 -0
- minikai/api/records/add_relations.py +209 -0
- minikai/api/records/create_record.py +182 -0
- minikai/api/records/delete_record.py +115 -0
- minikai/api/records/download_attachment.py +119 -0
- minikai/api/records/get_created_by.py +202 -0
- minikai/api/records/get_labels.py +194 -0
- minikai/api/records/get_records_by_external.py +248 -0
- minikai/api/records/get_states.py +194 -0
- minikai/api/records/get_updated_by.py +202 -0
- minikai/api/records/remove_attachments.py +132 -0
- minikai/api/records/remove_relations.py +132 -0
- minikai/api/records/update_attachments.py +203 -0
- minikai/api/records/update_record.py +199 -0
- minikai/api/records/update_relations.py +209 -0
- minikai/api/records/upsert_records_by_external_uri.py +182 -0
- minikai/api/users/__init__.py +1 -0
- minikai/api/users/delete_api_users_minis.py +122 -0
- minikai/api/users/get_api_users_minis.py +175 -0
- minikai/api/users/get_users.py +150 -0
- minikai/api/users/post_api_users_minis.py +187 -0
- minikai/client.py +271 -0
- minikai/errors.py +14 -0
- minikai/models/__init__.py +103 -0
- minikai/models/add_attachments_body.py +140 -0
- minikai/models/batch_upsert_result.py +124 -0
- minikai/models/create_group_command.py +127 -0
- minikai/models/create_mini_command.py +144 -0
- minikai/models/create_record_command.py +263 -0
- minikai/models/create_record_command_tags.py +63 -0
- minikai/models/cursor_paginated_list_of_record_dto.py +122 -0
- minikai/models/document_file_dto.py +171 -0
- minikai/models/document_file_metadata_dto.py +72 -0
- minikai/models/failed_upsert_item.py +83 -0
- minikai/models/form_field.py +138 -0
- minikai/models/form_field_dto.py +181 -0
- minikai/models/form_field_type.py +10 -0
- minikai/models/group_dto.py +155 -0
- minikai/models/http_validation_problem_details.py +198 -0
- minikai/models/http_validation_problem_details_errors.py +74 -0
- minikai/models/mini_dto.py +224 -0
- minikai/models/mini_template_dto.py +167 -0
- minikai/models/paginated_list_of_record_dto.py +124 -0
- minikai/models/patch_mini_command.py +102 -0
- minikai/models/problem_details.py +174 -0
- minikai/models/record.py +441 -0
- minikai/models/record_attachment.py +265 -0
- minikai/models/record_attachment_dto.py +265 -0
- minikai/models/record_attachment_dto_metadata_type_0.py +63 -0
- minikai/models/record_attachment_metadata_type_0.py +63 -0
- minikai/models/record_authorization.py +107 -0
- minikai/models/record_authorization_dto.py +107 -0
- minikai/models/record_dto.py +385 -0
- minikai/models/record_dto_tags.py +63 -0
- minikai/models/record_relation.py +105 -0
- minikai/models/record_relation_dto.py +105 -0
- minikai/models/record_state.py +10 -0
- minikai/models/record_tag.py +159 -0
- minikai/models/record_tag_dto.py +68 -0
- minikai/models/slim_mini_dto.py +197 -0
- minikai/models/tool_dto.py +95 -0
- minikai/models/update_attachments_body.py +140 -0
- minikai/models/update_group_command.py +148 -0
- minikai/models/update_mini_command.py +153 -0
- minikai/models/update_mini_template_workspaces_command.py +74 -0
- minikai/models/update_record_command.py +274 -0
- minikai/models/update_record_command_tags.py +63 -0
- minikai/models/upsert_record_dto.py +275 -0
- minikai/models/upsert_record_dto_tags.py +63 -0
- minikai/models/upsert_records_by_external_uri_command.py +79 -0
- minikai/models/user_dto.py +215 -0
- minikai/models/user_to_mini_dto.py +99 -0
- minikai/models/workspace_dto.py +99 -0
- minikai/py.typed +1 -0
- minikai/types.py +53 -0
- minikai-0.1.7.dist-info/METADATA +133 -0
- minikai-0.1.7.dist-info/RECORD +100 -0
- minikai-0.1.7.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,124 @@
|
|
|
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 cast
|
|
11
|
+
from typing import Union
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.record_dto import RecordDto
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="PaginatedListOfRecordDto")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class PaginatedListOfRecordDto:
|
|
26
|
+
"""
|
|
27
|
+
Attributes:
|
|
28
|
+
items (Union[Unset, list['RecordDto']]):
|
|
29
|
+
page_number (Union[Unset, int]):
|
|
30
|
+
total_pages (Union[Unset, int]):
|
|
31
|
+
total_count (Union[Unset, int]):
|
|
32
|
+
has_previous_page (Union[Unset, bool]):
|
|
33
|
+
has_next_page (Union[Unset, bool]):
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
items: Union[Unset, list['RecordDto']] = UNSET
|
|
37
|
+
page_number: Union[Unset, int] = UNSET
|
|
38
|
+
total_pages: Union[Unset, int] = UNSET
|
|
39
|
+
total_count: Union[Unset, int] = UNSET
|
|
40
|
+
has_previous_page: Union[Unset, bool] = UNSET
|
|
41
|
+
has_next_page: Union[Unset, bool] = UNSET
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
from ..models.record_dto import RecordDto
|
|
49
|
+
items: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
50
|
+
if not isinstance(self.items, Unset):
|
|
51
|
+
items = []
|
|
52
|
+
for items_item_data in self.items:
|
|
53
|
+
items_item = items_item_data.to_dict()
|
|
54
|
+
items.append(items_item)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
page_number = self.page_number
|
|
59
|
+
|
|
60
|
+
total_pages = self.total_pages
|
|
61
|
+
|
|
62
|
+
total_count = self.total_count
|
|
63
|
+
|
|
64
|
+
has_previous_page = self.has_previous_page
|
|
65
|
+
|
|
66
|
+
has_next_page = self.has_next_page
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
field_dict: dict[str, Any] = {}
|
|
70
|
+
|
|
71
|
+
field_dict.update({
|
|
72
|
+
})
|
|
73
|
+
if items is not UNSET:
|
|
74
|
+
field_dict["items"] = items
|
|
75
|
+
if page_number is not UNSET:
|
|
76
|
+
field_dict["pageNumber"] = page_number
|
|
77
|
+
if total_pages is not UNSET:
|
|
78
|
+
field_dict["totalPages"] = total_pages
|
|
79
|
+
if total_count is not UNSET:
|
|
80
|
+
field_dict["totalCount"] = total_count
|
|
81
|
+
if has_previous_page is not UNSET:
|
|
82
|
+
field_dict["hasPreviousPage"] = has_previous_page
|
|
83
|
+
if has_next_page is not UNSET:
|
|
84
|
+
field_dict["hasNextPage"] = has_next_page
|
|
85
|
+
|
|
86
|
+
return field_dict
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
92
|
+
from ..models.record_dto import RecordDto
|
|
93
|
+
d = dict(src_dict)
|
|
94
|
+
items = []
|
|
95
|
+
_items = d.pop("items", UNSET)
|
|
96
|
+
for items_item_data in (_items or []):
|
|
97
|
+
items_item = RecordDto.from_dict(items_item_data)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
items.append(items_item)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
page_number = d.pop("pageNumber", UNSET)
|
|
105
|
+
|
|
106
|
+
total_pages = d.pop("totalPages", UNSET)
|
|
107
|
+
|
|
108
|
+
total_count = d.pop("totalCount", UNSET)
|
|
109
|
+
|
|
110
|
+
has_previous_page = d.pop("hasPreviousPage", UNSET)
|
|
111
|
+
|
|
112
|
+
has_next_page = d.pop("hasNextPage", UNSET)
|
|
113
|
+
|
|
114
|
+
paginated_list_of_record_dto = cls(
|
|
115
|
+
items=items,
|
|
116
|
+
page_number=page_number,
|
|
117
|
+
total_pages=total_pages,
|
|
118
|
+
total_count=total_count,
|
|
119
|
+
has_previous_page=has_previous_page,
|
|
120
|
+
has_next_page=has_next_page,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
return paginated_list_of_record_dto
|
|
124
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 cast, Union
|
|
11
|
+
from typing import Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="PatchMiniCommand")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class PatchMiniCommand:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
id (Union[Unset, int]):
|
|
27
|
+
name (Union[None, Unset, str]):
|
|
28
|
+
description (Union[None, Unset, str]):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
id: Union[Unset, int] = UNSET
|
|
32
|
+
name: Union[None, Unset, str] = UNSET
|
|
33
|
+
description: Union[None, Unset, str] = UNSET
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
id = self.id
|
|
41
|
+
|
|
42
|
+
name: Union[None, Unset, str]
|
|
43
|
+
if isinstance(self.name, Unset):
|
|
44
|
+
name = UNSET
|
|
45
|
+
else:
|
|
46
|
+
name = self.name
|
|
47
|
+
|
|
48
|
+
description: Union[None, Unset, str]
|
|
49
|
+
if isinstance(self.description, Unset):
|
|
50
|
+
description = UNSET
|
|
51
|
+
else:
|
|
52
|
+
description = self.description
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
field_dict: dict[str, Any] = {}
|
|
56
|
+
|
|
57
|
+
field_dict.update({
|
|
58
|
+
})
|
|
59
|
+
if id is not UNSET:
|
|
60
|
+
field_dict["id"] = id
|
|
61
|
+
if name is not UNSET:
|
|
62
|
+
field_dict["name"] = name
|
|
63
|
+
if description is not UNSET:
|
|
64
|
+
field_dict["description"] = description
|
|
65
|
+
|
|
66
|
+
return field_dict
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
72
|
+
d = dict(src_dict)
|
|
73
|
+
id = d.pop("id", UNSET)
|
|
74
|
+
|
|
75
|
+
def _parse_name(data: object) -> Union[None, Unset, str]:
|
|
76
|
+
if data is None:
|
|
77
|
+
return data
|
|
78
|
+
if isinstance(data, Unset):
|
|
79
|
+
return data
|
|
80
|
+
return cast(Union[None, Unset, str], data)
|
|
81
|
+
|
|
82
|
+
name = _parse_name(d.pop("name", UNSET))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
86
|
+
if data is None:
|
|
87
|
+
return data
|
|
88
|
+
if isinstance(data, Unset):
|
|
89
|
+
return data
|
|
90
|
+
return cast(Union[None, Unset, str], data)
|
|
91
|
+
|
|
92
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
patch_mini_command = cls(
|
|
96
|
+
id=id,
|
|
97
|
+
name=name,
|
|
98
|
+
description=description,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return patch_mini_command
|
|
102
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
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 cast, Union
|
|
11
|
+
from typing import Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="ProblemDetails")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class ProblemDetails:
|
|
24
|
+
"""
|
|
25
|
+
Attributes:
|
|
26
|
+
type_ (Union[None, Unset, str]):
|
|
27
|
+
title (Union[None, Unset, str]):
|
|
28
|
+
status (Union[None, Unset, int]):
|
|
29
|
+
detail (Union[None, Unset, str]):
|
|
30
|
+
instance (Union[None, Unset, str]):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
type_: Union[None, Unset, str] = UNSET
|
|
34
|
+
title: Union[None, Unset, str] = UNSET
|
|
35
|
+
status: Union[None, Unset, int] = UNSET
|
|
36
|
+
detail: Union[None, Unset, str] = UNSET
|
|
37
|
+
instance: Union[None, Unset, str] = UNSET
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_dict(self) -> dict[str, Any]:
|
|
45
|
+
type_: Union[None, Unset, str]
|
|
46
|
+
if isinstance(self.type_, Unset):
|
|
47
|
+
type_ = UNSET
|
|
48
|
+
else:
|
|
49
|
+
type_ = self.type_
|
|
50
|
+
|
|
51
|
+
title: Union[None, Unset, str]
|
|
52
|
+
if isinstance(self.title, Unset):
|
|
53
|
+
title = UNSET
|
|
54
|
+
else:
|
|
55
|
+
title = self.title
|
|
56
|
+
|
|
57
|
+
status: Union[None, Unset, int]
|
|
58
|
+
if isinstance(self.status, Unset):
|
|
59
|
+
status = UNSET
|
|
60
|
+
else:
|
|
61
|
+
status = self.status
|
|
62
|
+
|
|
63
|
+
detail: Union[None, Unset, str]
|
|
64
|
+
if isinstance(self.detail, Unset):
|
|
65
|
+
detail = UNSET
|
|
66
|
+
else:
|
|
67
|
+
detail = self.detail
|
|
68
|
+
|
|
69
|
+
instance: Union[None, Unset, str]
|
|
70
|
+
if isinstance(self.instance, Unset):
|
|
71
|
+
instance = UNSET
|
|
72
|
+
else:
|
|
73
|
+
instance = self.instance
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
field_dict: dict[str, Any] = {}
|
|
77
|
+
field_dict.update(self.additional_properties)
|
|
78
|
+
field_dict.update({
|
|
79
|
+
})
|
|
80
|
+
if type_ is not UNSET:
|
|
81
|
+
field_dict["type"] = type_
|
|
82
|
+
if title is not UNSET:
|
|
83
|
+
field_dict["title"] = title
|
|
84
|
+
if status is not UNSET:
|
|
85
|
+
field_dict["status"] = status
|
|
86
|
+
if detail is not UNSET:
|
|
87
|
+
field_dict["detail"] = detail
|
|
88
|
+
if instance is not UNSET:
|
|
89
|
+
field_dict["instance"] = instance
|
|
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
|
+
def _parse_type_(data: object) -> Union[None, Unset, str]:
|
|
99
|
+
if data is None:
|
|
100
|
+
return data
|
|
101
|
+
if isinstance(data, Unset):
|
|
102
|
+
return data
|
|
103
|
+
return cast(Union[None, Unset, str], data)
|
|
104
|
+
|
|
105
|
+
type_ = _parse_type_(d.pop("type", UNSET))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _parse_title(data: object) -> Union[None, Unset, str]:
|
|
109
|
+
if data is None:
|
|
110
|
+
return data
|
|
111
|
+
if isinstance(data, Unset):
|
|
112
|
+
return data
|
|
113
|
+
return cast(Union[None, Unset, str], data)
|
|
114
|
+
|
|
115
|
+
title = _parse_title(d.pop("title", UNSET))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def _parse_status(data: object) -> Union[None, Unset, int]:
|
|
119
|
+
if data is None:
|
|
120
|
+
return data
|
|
121
|
+
if isinstance(data, Unset):
|
|
122
|
+
return data
|
|
123
|
+
return cast(Union[None, Unset, int], data)
|
|
124
|
+
|
|
125
|
+
status = _parse_status(d.pop("status", UNSET))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def _parse_detail(data: object) -> Union[None, Unset, str]:
|
|
129
|
+
if data is None:
|
|
130
|
+
return data
|
|
131
|
+
if isinstance(data, Unset):
|
|
132
|
+
return data
|
|
133
|
+
return cast(Union[None, Unset, str], data)
|
|
134
|
+
|
|
135
|
+
detail = _parse_detail(d.pop("detail", UNSET))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def _parse_instance(data: object) -> Union[None, Unset, str]:
|
|
139
|
+
if data is None:
|
|
140
|
+
return data
|
|
141
|
+
if isinstance(data, Unset):
|
|
142
|
+
return data
|
|
143
|
+
return cast(Union[None, Unset, str], data)
|
|
144
|
+
|
|
145
|
+
instance = _parse_instance(d.pop("instance", UNSET))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
problem_details = cls(
|
|
149
|
+
type_=type_,
|
|
150
|
+
title=title,
|
|
151
|
+
status=status,
|
|
152
|
+
detail=detail,
|
|
153
|
+
instance=instance,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
problem_details.additional_properties = d
|
|
158
|
+
return problem_details
|
|
159
|
+
|
|
160
|
+
@property
|
|
161
|
+
def additional_keys(self) -> list[str]:
|
|
162
|
+
return list(self.additional_properties.keys())
|
|
163
|
+
|
|
164
|
+
def __getitem__(self, key: str) -> Any:
|
|
165
|
+
return self.additional_properties[key]
|
|
166
|
+
|
|
167
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
168
|
+
self.additional_properties[key] = value
|
|
169
|
+
|
|
170
|
+
def __delitem__(self, key: str) -> None:
|
|
171
|
+
del self.additional_properties[key]
|
|
172
|
+
|
|
173
|
+
def __contains__(self, key: str) -> bool:
|
|
174
|
+
return key in self.additional_properties
|