minikai 0.1.0__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.

Files changed (87) hide show
  1. minikai/__init__.py +8 -0
  2. minikai/api/__init__.py +1 -0
  3. minikai/api/groups/__init__.py +1 -0
  4. minikai/api/groups/add_minis_to_group.py +176 -0
  5. minikai/api/groups/add_users_to_group.py +176 -0
  6. minikai/api/groups/create_group.py +160 -0
  7. minikai/api/groups/delete_group.py +95 -0
  8. minikai/api/groups/get_group.py +151 -0
  9. minikai/api/groups/get_group_minis.py +156 -0
  10. minikai/api/groups/get_group_users.py +156 -0
  11. minikai/api/groups/get_groups.py +128 -0
  12. minikai/api/groups/remove_minis_from_group.py +176 -0
  13. minikai/api/groups/remove_users_from_group.py +176 -0
  14. minikai/api/groups/update_group.py +177 -0
  15. minikai/api/minis/__init__.py +1 -0
  16. minikai/api/minis/create_mini.py +160 -0
  17. minikai/api/minis/delete_mini.py +95 -0
  18. minikai/api/minis/get_external_mini.py +164 -0
  19. minikai/api/minis/get_minis.py +128 -0
  20. minikai/api/minis/patch_mini.py +177 -0
  21. minikai/api/minis/update_mini.py +177 -0
  22. minikai/api/records/__init__.py +1 -0
  23. minikai/api/records/add_attachments.py +182 -0
  24. minikai/api/records/add_relations.py +187 -0
  25. minikai/api/records/create_record.py +162 -0
  26. minikai/api/records/delete_record.py +95 -0
  27. minikai/api/records/get_records_by_external.py +230 -0
  28. minikai/api/records/remove_attachments.py +110 -0
  29. minikai/api/records/remove_relations.py +110 -0
  30. minikai/api/records/update_attachments.py +182 -0
  31. minikai/api/records/update_record.py +179 -0
  32. minikai/api/records/update_relations.py +187 -0
  33. minikai/api/users/__init__.py +1 -0
  34. minikai/api/users/delete_api_users_minis.py +102 -0
  35. minikai/api/users/get_api_users_minis.py +156 -0
  36. minikai/api/users/get_users.py +128 -0
  37. minikai/api/users/post_api_users_minis.py +168 -0
  38. minikai/client.py +268 -0
  39. minikai/errors.py +16 -0
  40. minikai/models/__init__.py +89 -0
  41. minikai/models/add_attachments_body.py +98 -0
  42. minikai/models/create_group_command.py +102 -0
  43. minikai/models/create_mini_command.py +120 -0
  44. minikai/models/create_record_command.py +268 -0
  45. minikai/models/create_record_command_tags.py +44 -0
  46. minikai/models/document_file_dto.py +147 -0
  47. minikai/models/form_field.py +112 -0
  48. minikai/models/form_field_dto.py +149 -0
  49. minikai/models/form_field_type.py +16 -0
  50. minikai/models/group_dto.py +124 -0
  51. minikai/models/http_validation_problem_details.py +173 -0
  52. minikai/models/http_validation_problem_details_errors.py +51 -0
  53. minikai/models/json_node.py +119 -0
  54. minikai/models/json_node_options.py +42 -0
  55. minikai/models/mini_dto.py +189 -0
  56. minikai/models/mini_template_dto.py +135 -0
  57. minikai/models/paginated_list_of_record_dto.py +101 -0
  58. minikai/models/patch_mini_command.py +80 -0
  59. minikai/models/problem_details.py +151 -0
  60. minikai/models/record.py +379 -0
  61. minikai/models/record_attachment.py +236 -0
  62. minikai/models/record_attachment_dto.py +236 -0
  63. minikai/models/record_attachment_dto_metadata_type_0.py +44 -0
  64. minikai/models/record_attachment_metadata_type_0.py +44 -0
  65. minikai/models/record_authorization.py +75 -0
  66. minikai/models/record_authorization_dto.py +75 -0
  67. minikai/models/record_dto.py +377 -0
  68. minikai/models/record_dto_tags.py +44 -0
  69. minikai/models/record_relation.py +81 -0
  70. minikai/models/record_relation_dto.py +81 -0
  71. minikai/models/record_tags.py +44 -0
  72. minikai/models/slim_mini_dto.py +168 -0
  73. minikai/models/tool_dto.py +76 -0
  74. minikai/models/update_attachments_body.py +98 -0
  75. minikai/models/update_group_command.py +122 -0
  76. minikai/models/update_mini_command.py +129 -0
  77. minikai/models/update_mini_template_workspaces_command.py +51 -0
  78. minikai/models/update_record_command.py +266 -0
  79. minikai/models/update_record_command_tags.py +44 -0
  80. minikai/models/user_dto.py +182 -0
  81. minikai/models/user_to_mini_dto.py +78 -0
  82. minikai/models/workspace_dto.py +78 -0
  83. minikai/py.typed +1 -0
  84. minikai/types.py +54 -0
  85. minikai-0.1.0.dist-info/METADATA +133 -0
  86. minikai-0.1.0.dist-info/RECORD +87 -0
  87. minikai-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,151 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.group_dto import GroupDto
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ group_id: str,
14
+ ) -> dict[str, Any]:
15
+ _kwargs: dict[str, Any] = {
16
+ "method": "get",
17
+ "url": f"/api/Groups/{group_id}",
18
+ }
19
+
20
+ return _kwargs
21
+
22
+
23
+ def _parse_response(
24
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
+ ) -> Optional[Union[Any, GroupDto]]:
26
+ if response.status_code == 200:
27
+ response_200 = GroupDto.from_dict(response.json())
28
+
29
+ return response_200
30
+
31
+ if response.status_code == 404:
32
+ response_404 = cast(Any, None)
33
+ return response_404
34
+
35
+ if client.raise_on_unexpected_status:
36
+ raise errors.UnexpectedStatus(response.status_code, response.content)
37
+ else:
38
+ return None
39
+
40
+
41
+ def _build_response(
42
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
+ ) -> Response[Union[Any, GroupDto]]:
44
+ return Response(
45
+ status_code=HTTPStatus(response.status_code),
46
+ content=response.content,
47
+ headers=response.headers,
48
+ parsed=_parse_response(client=client, response=response),
49
+ )
50
+
51
+
52
+ def sync_detailed(
53
+ group_id: str,
54
+ *,
55
+ client: Union[AuthenticatedClient, Client],
56
+ ) -> Response[Union[Any, GroupDto]]:
57
+ """
58
+ Args:
59
+ group_id (str):
60
+
61
+ Raises:
62
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
63
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
64
+
65
+ Returns:
66
+ Response[Union[Any, GroupDto]]
67
+ """
68
+
69
+ kwargs = _get_kwargs(
70
+ group_id=group_id,
71
+ )
72
+
73
+ response = client.get_httpx_client().request(
74
+ **kwargs,
75
+ )
76
+
77
+ return _build_response(client=client, response=response)
78
+
79
+
80
+ def sync(
81
+ group_id: str,
82
+ *,
83
+ client: Union[AuthenticatedClient, Client],
84
+ ) -> Optional[Union[Any, GroupDto]]:
85
+ """
86
+ Args:
87
+ group_id (str):
88
+
89
+ Raises:
90
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
91
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
92
+
93
+ Returns:
94
+ Union[Any, GroupDto]
95
+ """
96
+
97
+ return sync_detailed(
98
+ group_id=group_id,
99
+ client=client,
100
+ ).parsed
101
+
102
+
103
+ async def asyncio_detailed(
104
+ group_id: str,
105
+ *,
106
+ client: Union[AuthenticatedClient, Client],
107
+ ) -> Response[Union[Any, GroupDto]]:
108
+ """
109
+ Args:
110
+ group_id (str):
111
+
112
+ Raises:
113
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
115
+
116
+ Returns:
117
+ Response[Union[Any, GroupDto]]
118
+ """
119
+
120
+ kwargs = _get_kwargs(
121
+ group_id=group_id,
122
+ )
123
+
124
+ response = await client.get_async_httpx_client().request(**kwargs)
125
+
126
+ return _build_response(client=client, response=response)
127
+
128
+
129
+ async def asyncio(
130
+ group_id: str,
131
+ *,
132
+ client: Union[AuthenticatedClient, Client],
133
+ ) -> Optional[Union[Any, GroupDto]]:
134
+ """
135
+ Args:
136
+ group_id (str):
137
+
138
+ Raises:
139
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
140
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
141
+
142
+ Returns:
143
+ Union[Any, GroupDto]
144
+ """
145
+
146
+ return (
147
+ await asyncio_detailed(
148
+ group_id=group_id,
149
+ client=client,
150
+ )
151
+ ).parsed
@@ -0,0 +1,156 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.slim_mini_dto import SlimMiniDto
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ group_id: str,
14
+ ) -> dict[str, Any]:
15
+ _kwargs: dict[str, Any] = {
16
+ "method": "get",
17
+ "url": f"/api/Groups/{group_id}/minis",
18
+ }
19
+
20
+ return _kwargs
21
+
22
+
23
+ def _parse_response(
24
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
+ ) -> Optional[Union[Any, list["SlimMiniDto"]]]:
26
+ if response.status_code == 200:
27
+ response_200 = []
28
+ _response_200 = response.json()
29
+ for response_200_item_data in _response_200:
30
+ response_200_item = SlimMiniDto.from_dict(response_200_item_data)
31
+
32
+ response_200.append(response_200_item)
33
+
34
+ return response_200
35
+
36
+ if response.status_code == 404:
37
+ response_404 = cast(Any, None)
38
+ return response_404
39
+
40
+ if client.raise_on_unexpected_status:
41
+ raise errors.UnexpectedStatus(response.status_code, response.content)
42
+ else:
43
+ return None
44
+
45
+
46
+ def _build_response(
47
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
48
+ ) -> Response[Union[Any, list["SlimMiniDto"]]]:
49
+ return Response(
50
+ status_code=HTTPStatus(response.status_code),
51
+ content=response.content,
52
+ headers=response.headers,
53
+ parsed=_parse_response(client=client, response=response),
54
+ )
55
+
56
+
57
+ def sync_detailed(
58
+ group_id: str,
59
+ *,
60
+ client: Union[AuthenticatedClient, Client],
61
+ ) -> Response[Union[Any, list["SlimMiniDto"]]]:
62
+ """
63
+ Args:
64
+ group_id (str):
65
+
66
+ Raises:
67
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
68
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
69
+
70
+ Returns:
71
+ Response[Union[Any, list['SlimMiniDto']]]
72
+ """
73
+
74
+ kwargs = _get_kwargs(
75
+ group_id=group_id,
76
+ )
77
+
78
+ response = client.get_httpx_client().request(
79
+ **kwargs,
80
+ )
81
+
82
+ return _build_response(client=client, response=response)
83
+
84
+
85
+ def sync(
86
+ group_id: str,
87
+ *,
88
+ client: Union[AuthenticatedClient, Client],
89
+ ) -> Optional[Union[Any, list["SlimMiniDto"]]]:
90
+ """
91
+ Args:
92
+ group_id (str):
93
+
94
+ Raises:
95
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
96
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
97
+
98
+ Returns:
99
+ Union[Any, list['SlimMiniDto']]
100
+ """
101
+
102
+ return sync_detailed(
103
+ group_id=group_id,
104
+ client=client,
105
+ ).parsed
106
+
107
+
108
+ async def asyncio_detailed(
109
+ group_id: str,
110
+ *,
111
+ client: Union[AuthenticatedClient, Client],
112
+ ) -> Response[Union[Any, list["SlimMiniDto"]]]:
113
+ """
114
+ Args:
115
+ group_id (str):
116
+
117
+ Raises:
118
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
119
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
120
+
121
+ Returns:
122
+ Response[Union[Any, list['SlimMiniDto']]]
123
+ """
124
+
125
+ kwargs = _get_kwargs(
126
+ group_id=group_id,
127
+ )
128
+
129
+ response = await client.get_async_httpx_client().request(**kwargs)
130
+
131
+ return _build_response(client=client, response=response)
132
+
133
+
134
+ async def asyncio(
135
+ group_id: str,
136
+ *,
137
+ client: Union[AuthenticatedClient, Client],
138
+ ) -> Optional[Union[Any, list["SlimMiniDto"]]]:
139
+ """
140
+ Args:
141
+ group_id (str):
142
+
143
+ Raises:
144
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
145
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
146
+
147
+ Returns:
148
+ Union[Any, list['SlimMiniDto']]
149
+ """
150
+
151
+ return (
152
+ await asyncio_detailed(
153
+ group_id=group_id,
154
+ client=client,
155
+ )
156
+ ).parsed
@@ -0,0 +1,156 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.user_dto import UserDto
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ group_id: str,
14
+ ) -> dict[str, Any]:
15
+ _kwargs: dict[str, Any] = {
16
+ "method": "get",
17
+ "url": f"/api/Groups/{group_id}/users",
18
+ }
19
+
20
+ return _kwargs
21
+
22
+
23
+ def _parse_response(
24
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
+ ) -> Optional[Union[Any, list["UserDto"]]]:
26
+ if response.status_code == 200:
27
+ response_200 = []
28
+ _response_200 = response.json()
29
+ for response_200_item_data in _response_200:
30
+ response_200_item = UserDto.from_dict(response_200_item_data)
31
+
32
+ response_200.append(response_200_item)
33
+
34
+ return response_200
35
+
36
+ if response.status_code == 404:
37
+ response_404 = cast(Any, None)
38
+ return response_404
39
+
40
+ if client.raise_on_unexpected_status:
41
+ raise errors.UnexpectedStatus(response.status_code, response.content)
42
+ else:
43
+ return None
44
+
45
+
46
+ def _build_response(
47
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
48
+ ) -> Response[Union[Any, list["UserDto"]]]:
49
+ return Response(
50
+ status_code=HTTPStatus(response.status_code),
51
+ content=response.content,
52
+ headers=response.headers,
53
+ parsed=_parse_response(client=client, response=response),
54
+ )
55
+
56
+
57
+ def sync_detailed(
58
+ group_id: str,
59
+ *,
60
+ client: Union[AuthenticatedClient, Client],
61
+ ) -> Response[Union[Any, list["UserDto"]]]:
62
+ """
63
+ Args:
64
+ group_id (str):
65
+
66
+ Raises:
67
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
68
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
69
+
70
+ Returns:
71
+ Response[Union[Any, list['UserDto']]]
72
+ """
73
+
74
+ kwargs = _get_kwargs(
75
+ group_id=group_id,
76
+ )
77
+
78
+ response = client.get_httpx_client().request(
79
+ **kwargs,
80
+ )
81
+
82
+ return _build_response(client=client, response=response)
83
+
84
+
85
+ def sync(
86
+ group_id: str,
87
+ *,
88
+ client: Union[AuthenticatedClient, Client],
89
+ ) -> Optional[Union[Any, list["UserDto"]]]:
90
+ """
91
+ Args:
92
+ group_id (str):
93
+
94
+ Raises:
95
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
96
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
97
+
98
+ Returns:
99
+ Union[Any, list['UserDto']]
100
+ """
101
+
102
+ return sync_detailed(
103
+ group_id=group_id,
104
+ client=client,
105
+ ).parsed
106
+
107
+
108
+ async def asyncio_detailed(
109
+ group_id: str,
110
+ *,
111
+ client: Union[AuthenticatedClient, Client],
112
+ ) -> Response[Union[Any, list["UserDto"]]]:
113
+ """
114
+ Args:
115
+ group_id (str):
116
+
117
+ Raises:
118
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
119
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
120
+
121
+ Returns:
122
+ Response[Union[Any, list['UserDto']]]
123
+ """
124
+
125
+ kwargs = _get_kwargs(
126
+ group_id=group_id,
127
+ )
128
+
129
+ response = await client.get_async_httpx_client().request(**kwargs)
130
+
131
+ return _build_response(client=client, response=response)
132
+
133
+
134
+ async def asyncio(
135
+ group_id: str,
136
+ *,
137
+ client: Union[AuthenticatedClient, Client],
138
+ ) -> Optional[Union[Any, list["UserDto"]]]:
139
+ """
140
+ Args:
141
+ group_id (str):
142
+
143
+ Raises:
144
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
145
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
146
+
147
+ Returns:
148
+ Union[Any, list['UserDto']]
149
+ """
150
+
151
+ return (
152
+ await asyncio_detailed(
153
+ group_id=group_id,
154
+ client=client,
155
+ )
156
+ ).parsed
@@ -0,0 +1,128 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.group_dto import GroupDto
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs() -> dict[str, Any]:
13
+ _kwargs: dict[str, Any] = {
14
+ "method": "get",
15
+ "url": "/api/Groups",
16
+ }
17
+
18
+ return _kwargs
19
+
20
+
21
+ def _parse_response(
22
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
23
+ ) -> Optional[list["GroupDto"]]:
24
+ if response.status_code == 200:
25
+ response_200 = []
26
+ _response_200 = response.json()
27
+ for response_200_item_data in _response_200:
28
+ response_200_item = GroupDto.from_dict(response_200_item_data)
29
+
30
+ response_200.append(response_200_item)
31
+
32
+ return response_200
33
+
34
+ if client.raise_on_unexpected_status:
35
+ raise errors.UnexpectedStatus(response.status_code, response.content)
36
+ else:
37
+ return None
38
+
39
+
40
+ def _build_response(
41
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
42
+ ) -> Response[list["GroupDto"]]:
43
+ return Response(
44
+ status_code=HTTPStatus(response.status_code),
45
+ content=response.content,
46
+ headers=response.headers,
47
+ parsed=_parse_response(client=client, response=response),
48
+ )
49
+
50
+
51
+ def sync_detailed(
52
+ *,
53
+ client: Union[AuthenticatedClient, Client],
54
+ ) -> Response[list["GroupDto"]]:
55
+ """
56
+ Raises:
57
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
58
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
59
+
60
+ Returns:
61
+ Response[list['GroupDto']]
62
+ """
63
+
64
+ kwargs = _get_kwargs()
65
+
66
+ response = client.get_httpx_client().request(
67
+ **kwargs,
68
+ )
69
+
70
+ return _build_response(client=client, response=response)
71
+
72
+
73
+ def sync(
74
+ *,
75
+ client: Union[AuthenticatedClient, Client],
76
+ ) -> Optional[list["GroupDto"]]:
77
+ """
78
+ Raises:
79
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
80
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
81
+
82
+ Returns:
83
+ list['GroupDto']
84
+ """
85
+
86
+ return sync_detailed(
87
+ client=client,
88
+ ).parsed
89
+
90
+
91
+ async def asyncio_detailed(
92
+ *,
93
+ client: Union[AuthenticatedClient, Client],
94
+ ) -> Response[list["GroupDto"]]:
95
+ """
96
+ Raises:
97
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
98
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
99
+
100
+ Returns:
101
+ Response[list['GroupDto']]
102
+ """
103
+
104
+ kwargs = _get_kwargs()
105
+
106
+ response = await client.get_async_httpx_client().request(**kwargs)
107
+
108
+ return _build_response(client=client, response=response)
109
+
110
+
111
+ async def asyncio(
112
+ *,
113
+ client: Union[AuthenticatedClient, Client],
114
+ ) -> Optional[list["GroupDto"]]:
115
+ """
116
+ Raises:
117
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
118
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
119
+
120
+ Returns:
121
+ list['GroupDto']
122
+ """
123
+
124
+ return (
125
+ await asyncio_detailed(
126
+ client=client,
127
+ )
128
+ ).parsed