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,182 @@
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.http_validation_problem_details import HttpValidationProblemDetails
9
+ from ...models.record_attachment import RecordAttachment
10
+ from ...models.update_attachments_body import UpdateAttachmentsBody
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ record_id: str,
16
+ *,
17
+ body: UpdateAttachmentsBody,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/Records/{record_id}/attachments",
24
+ }
25
+
26
+ _kwargs["files"] = body.to_multipart()
27
+
28
+ _kwargs["headers"] = headers
29
+ return _kwargs
30
+
31
+
32
+ def _parse_response(
33
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
34
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, list["RecordAttachment"]]]:
35
+ if response.status_code == 200:
36
+ response_200 = []
37
+ _response_200 = response.json()
38
+ for response_200_item_data in _response_200:
39
+ response_200_item = RecordAttachment.from_dict(response_200_item_data)
40
+
41
+ response_200.append(response_200_item)
42
+
43
+ return response_200
44
+
45
+ if response.status_code == 400:
46
+ response_400 = HttpValidationProblemDetails.from_dict(response.json())
47
+
48
+ return response_400
49
+
50
+ if response.status_code == 404:
51
+ response_404 = cast(Any, None)
52
+ return response_404
53
+
54
+ if client.raise_on_unexpected_status:
55
+ raise errors.UnexpectedStatus(response.status_code, response.content)
56
+ else:
57
+ return None
58
+
59
+
60
+ def _build_response(
61
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
62
+ ) -> Response[Union[Any, HttpValidationProblemDetails, list["RecordAttachment"]]]:
63
+ return Response(
64
+ status_code=HTTPStatus(response.status_code),
65
+ content=response.content,
66
+ headers=response.headers,
67
+ parsed=_parse_response(client=client, response=response),
68
+ )
69
+
70
+
71
+ def sync_detailed(
72
+ record_id: str,
73
+ *,
74
+ client: Union[AuthenticatedClient, Client],
75
+ body: UpdateAttachmentsBody,
76
+ ) -> Response[Union[Any, HttpValidationProblemDetails, list["RecordAttachment"]]]:
77
+ """
78
+ Args:
79
+ record_id (str):
80
+ body (UpdateAttachmentsBody):
81
+
82
+ Raises:
83
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
84
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
85
+
86
+ Returns:
87
+ Response[Union[Any, HttpValidationProblemDetails, list['RecordAttachment']]]
88
+ """
89
+
90
+ kwargs = _get_kwargs(
91
+ record_id=record_id,
92
+ body=body,
93
+ )
94
+
95
+ response = client.get_httpx_client().request(
96
+ **kwargs,
97
+ )
98
+
99
+ return _build_response(client=client, response=response)
100
+
101
+
102
+ def sync(
103
+ record_id: str,
104
+ *,
105
+ client: Union[AuthenticatedClient, Client],
106
+ body: UpdateAttachmentsBody,
107
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, list["RecordAttachment"]]]:
108
+ """
109
+ Args:
110
+ record_id (str):
111
+ body (UpdateAttachmentsBody):
112
+
113
+ Raises:
114
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
116
+
117
+ Returns:
118
+ Union[Any, HttpValidationProblemDetails, list['RecordAttachment']]
119
+ """
120
+
121
+ return sync_detailed(
122
+ record_id=record_id,
123
+ client=client,
124
+ body=body,
125
+ ).parsed
126
+
127
+
128
+ async def asyncio_detailed(
129
+ record_id: str,
130
+ *,
131
+ client: Union[AuthenticatedClient, Client],
132
+ body: UpdateAttachmentsBody,
133
+ ) -> Response[Union[Any, HttpValidationProblemDetails, list["RecordAttachment"]]]:
134
+ """
135
+ Args:
136
+ record_id (str):
137
+ body (UpdateAttachmentsBody):
138
+
139
+ Raises:
140
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
141
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
142
+
143
+ Returns:
144
+ Response[Union[Any, HttpValidationProblemDetails, list['RecordAttachment']]]
145
+ """
146
+
147
+ kwargs = _get_kwargs(
148
+ record_id=record_id,
149
+ body=body,
150
+ )
151
+
152
+ response = await client.get_async_httpx_client().request(**kwargs)
153
+
154
+ return _build_response(client=client, response=response)
155
+
156
+
157
+ async def asyncio(
158
+ record_id: str,
159
+ *,
160
+ client: Union[AuthenticatedClient, Client],
161
+ body: UpdateAttachmentsBody,
162
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, list["RecordAttachment"]]]:
163
+ """
164
+ Args:
165
+ record_id (str):
166
+ body (UpdateAttachmentsBody):
167
+
168
+ Raises:
169
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
170
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
171
+
172
+ Returns:
173
+ Union[Any, HttpValidationProblemDetails, list['RecordAttachment']]
174
+ """
175
+
176
+ return (
177
+ await asyncio_detailed(
178
+ record_id=record_id,
179
+ client=client,
180
+ body=body,
181
+ )
182
+ ).parsed
@@ -0,0 +1,179 @@
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.http_validation_problem_details import HttpValidationProblemDetails
9
+ from ...models.record import Record
10
+ from ...models.update_record_command import UpdateRecordCommand
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ record_id: str,
16
+ *,
17
+ body: UpdateRecordCommand,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/Records/{record_id}",
24
+ }
25
+
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(
35
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
36
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, Record]]:
37
+ if response.status_code == 200:
38
+ response_200 = Record.from_dict(response.json())
39
+
40
+ return response_200
41
+
42
+ if response.status_code == 400:
43
+ response_400 = HttpValidationProblemDetails.from_dict(response.json())
44
+
45
+ return response_400
46
+
47
+ if response.status_code == 404:
48
+ response_404 = cast(Any, None)
49
+ return response_404
50
+
51
+ if client.raise_on_unexpected_status:
52
+ raise errors.UnexpectedStatus(response.status_code, response.content)
53
+ else:
54
+ return None
55
+
56
+
57
+ def _build_response(
58
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
59
+ ) -> Response[Union[Any, HttpValidationProblemDetails, Record]]:
60
+ return Response(
61
+ status_code=HTTPStatus(response.status_code),
62
+ content=response.content,
63
+ headers=response.headers,
64
+ parsed=_parse_response(client=client, response=response),
65
+ )
66
+
67
+
68
+ def sync_detailed(
69
+ record_id: str,
70
+ *,
71
+ client: Union[AuthenticatedClient, Client],
72
+ body: UpdateRecordCommand,
73
+ ) -> Response[Union[Any, HttpValidationProblemDetails, Record]]:
74
+ """
75
+ Args:
76
+ record_id (str):
77
+ body (UpdateRecordCommand):
78
+
79
+ Raises:
80
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
81
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
82
+
83
+ Returns:
84
+ Response[Union[Any, HttpValidationProblemDetails, Record]]
85
+ """
86
+
87
+ kwargs = _get_kwargs(
88
+ record_id=record_id,
89
+ body=body,
90
+ )
91
+
92
+ response = client.get_httpx_client().request(
93
+ **kwargs,
94
+ )
95
+
96
+ return _build_response(client=client, response=response)
97
+
98
+
99
+ def sync(
100
+ record_id: str,
101
+ *,
102
+ client: Union[AuthenticatedClient, Client],
103
+ body: UpdateRecordCommand,
104
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, Record]]:
105
+ """
106
+ Args:
107
+ record_id (str):
108
+ body (UpdateRecordCommand):
109
+
110
+ Raises:
111
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
112
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
113
+
114
+ Returns:
115
+ Union[Any, HttpValidationProblemDetails, Record]
116
+ """
117
+
118
+ return sync_detailed(
119
+ record_id=record_id,
120
+ client=client,
121
+ body=body,
122
+ ).parsed
123
+
124
+
125
+ async def asyncio_detailed(
126
+ record_id: str,
127
+ *,
128
+ client: Union[AuthenticatedClient, Client],
129
+ body: UpdateRecordCommand,
130
+ ) -> Response[Union[Any, HttpValidationProblemDetails, Record]]:
131
+ """
132
+ Args:
133
+ record_id (str):
134
+ body (UpdateRecordCommand):
135
+
136
+ Raises:
137
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
138
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
139
+
140
+ Returns:
141
+ Response[Union[Any, HttpValidationProblemDetails, Record]]
142
+ """
143
+
144
+ kwargs = _get_kwargs(
145
+ record_id=record_id,
146
+ body=body,
147
+ )
148
+
149
+ response = await client.get_async_httpx_client().request(**kwargs)
150
+
151
+ return _build_response(client=client, response=response)
152
+
153
+
154
+ async def asyncio(
155
+ record_id: str,
156
+ *,
157
+ client: Union[AuthenticatedClient, Client],
158
+ body: UpdateRecordCommand,
159
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, Record]]:
160
+ """
161
+ Args:
162
+ record_id (str):
163
+ body (UpdateRecordCommand):
164
+
165
+ Raises:
166
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
167
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
168
+
169
+ Returns:
170
+ Union[Any, HttpValidationProblemDetails, Record]
171
+ """
172
+
173
+ return (
174
+ await asyncio_detailed(
175
+ record_id=record_id,
176
+ client=client,
177
+ body=body,
178
+ )
179
+ ).parsed
@@ -0,0 +1,187 @@
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.http_validation_problem_details import HttpValidationProblemDetails
9
+ from ...models.record_relation import RecordRelation
10
+ from ...models.record_relation_dto import RecordRelationDto
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ record_id: str,
16
+ *,
17
+ body: list["RecordRelationDto"],
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/Records/{record_id}/relations",
24
+ }
25
+
26
+ _kwargs["json"] = []
27
+ for body_item_data in body:
28
+ body_item = body_item_data.to_dict()
29
+ _kwargs["json"].append(body_item)
30
+
31
+ headers["Content-Type"] = "application/json"
32
+
33
+ _kwargs["headers"] = headers
34
+ return _kwargs
35
+
36
+
37
+ def _parse_response(
38
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
39
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, list["RecordRelation"]]]:
40
+ if response.status_code == 200:
41
+ response_200 = []
42
+ _response_200 = response.json()
43
+ for response_200_item_data in _response_200:
44
+ response_200_item = RecordRelation.from_dict(response_200_item_data)
45
+
46
+ response_200.append(response_200_item)
47
+
48
+ return response_200
49
+
50
+ if response.status_code == 400:
51
+ response_400 = HttpValidationProblemDetails.from_dict(response.json())
52
+
53
+ return response_400
54
+
55
+ if response.status_code == 404:
56
+ response_404 = cast(Any, None)
57
+ return response_404
58
+
59
+ if client.raise_on_unexpected_status:
60
+ raise errors.UnexpectedStatus(response.status_code, response.content)
61
+ else:
62
+ return None
63
+
64
+
65
+ def _build_response(
66
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
67
+ ) -> Response[Union[Any, HttpValidationProblemDetails, list["RecordRelation"]]]:
68
+ return Response(
69
+ status_code=HTTPStatus(response.status_code),
70
+ content=response.content,
71
+ headers=response.headers,
72
+ parsed=_parse_response(client=client, response=response),
73
+ )
74
+
75
+
76
+ def sync_detailed(
77
+ record_id: str,
78
+ *,
79
+ client: Union[AuthenticatedClient, Client],
80
+ body: list["RecordRelationDto"],
81
+ ) -> Response[Union[Any, HttpValidationProblemDetails, list["RecordRelation"]]]:
82
+ """
83
+ Args:
84
+ record_id (str):
85
+ body (list['RecordRelationDto']):
86
+
87
+ Raises:
88
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
89
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
90
+
91
+ Returns:
92
+ Response[Union[Any, HttpValidationProblemDetails, list['RecordRelation']]]
93
+ """
94
+
95
+ kwargs = _get_kwargs(
96
+ record_id=record_id,
97
+ body=body,
98
+ )
99
+
100
+ response = client.get_httpx_client().request(
101
+ **kwargs,
102
+ )
103
+
104
+ return _build_response(client=client, response=response)
105
+
106
+
107
+ def sync(
108
+ record_id: str,
109
+ *,
110
+ client: Union[AuthenticatedClient, Client],
111
+ body: list["RecordRelationDto"],
112
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, list["RecordRelation"]]]:
113
+ """
114
+ Args:
115
+ record_id (str):
116
+ body (list['RecordRelationDto']):
117
+
118
+ Raises:
119
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
120
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
121
+
122
+ Returns:
123
+ Union[Any, HttpValidationProblemDetails, list['RecordRelation']]
124
+ """
125
+
126
+ return sync_detailed(
127
+ record_id=record_id,
128
+ client=client,
129
+ body=body,
130
+ ).parsed
131
+
132
+
133
+ async def asyncio_detailed(
134
+ record_id: str,
135
+ *,
136
+ client: Union[AuthenticatedClient, Client],
137
+ body: list["RecordRelationDto"],
138
+ ) -> Response[Union[Any, HttpValidationProblemDetails, list["RecordRelation"]]]:
139
+ """
140
+ Args:
141
+ record_id (str):
142
+ body (list['RecordRelationDto']):
143
+
144
+ Raises:
145
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
146
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
147
+
148
+ Returns:
149
+ Response[Union[Any, HttpValidationProblemDetails, list['RecordRelation']]]
150
+ """
151
+
152
+ kwargs = _get_kwargs(
153
+ record_id=record_id,
154
+ body=body,
155
+ )
156
+
157
+ response = await client.get_async_httpx_client().request(**kwargs)
158
+
159
+ return _build_response(client=client, response=response)
160
+
161
+
162
+ async def asyncio(
163
+ record_id: str,
164
+ *,
165
+ client: Union[AuthenticatedClient, Client],
166
+ body: list["RecordRelationDto"],
167
+ ) -> Optional[Union[Any, HttpValidationProblemDetails, list["RecordRelation"]]]:
168
+ """
169
+ Args:
170
+ record_id (str):
171
+ body (list['RecordRelationDto']):
172
+
173
+ Raises:
174
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
175
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
176
+
177
+ Returns:
178
+ Union[Any, HttpValidationProblemDetails, list['RecordRelation']]
179
+ """
180
+
181
+ return (
182
+ await asyncio_detailed(
183
+ record_id=record_id,
184
+ client=client,
185
+ body=body,
186
+ )
187
+ ).parsed
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,102 @@
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 ...types import Response
9
+
10
+
11
+ def _get_kwargs(
12
+ user_id: str,
13
+ mini_id: int,
14
+ ) -> dict[str, Any]:
15
+ _kwargs: dict[str, Any] = {
16
+ "method": "delete",
17
+ "url": f"/api/Users/{user_id}/minis/{mini_id}",
18
+ }
19
+
20
+ return _kwargs
21
+
22
+
23
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
24
+ if response.status_code == 204:
25
+ return None
26
+
27
+ if response.status_code == 404:
28
+ return None
29
+
30
+ if client.raise_on_unexpected_status:
31
+ raise errors.UnexpectedStatus(response.status_code, response.content)
32
+ else:
33
+ return None
34
+
35
+
36
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
37
+ return Response(
38
+ status_code=HTTPStatus(response.status_code),
39
+ content=response.content,
40
+ headers=response.headers,
41
+ parsed=_parse_response(client=client, response=response),
42
+ )
43
+
44
+
45
+ def sync_detailed(
46
+ user_id: str,
47
+ mini_id: int,
48
+ *,
49
+ client: Union[AuthenticatedClient, Client],
50
+ ) -> Response[Any]:
51
+ """
52
+ Args:
53
+ user_id (str):
54
+ mini_id (int):
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[Any]
62
+ """
63
+
64
+ kwargs = _get_kwargs(
65
+ user_id=user_id,
66
+ mini_id=mini_id,
67
+ )
68
+
69
+ response = client.get_httpx_client().request(
70
+ **kwargs,
71
+ )
72
+
73
+ return _build_response(client=client, response=response)
74
+
75
+
76
+ async def asyncio_detailed(
77
+ user_id: str,
78
+ mini_id: int,
79
+ *,
80
+ client: Union[AuthenticatedClient, Client],
81
+ ) -> Response[Any]:
82
+ """
83
+ Args:
84
+ user_id (str):
85
+ mini_id (int):
86
+
87
+ Raises:
88
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
89
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
90
+
91
+ Returns:
92
+ Response[Any]
93
+ """
94
+
95
+ kwargs = _get_kwargs(
96
+ user_id=user_id,
97
+ mini_id=mini_id,
98
+ )
99
+
100
+ response = await client.get_async_httpx_client().request(**kwargs)
101
+
102
+ return _build_response(client=client, response=response)