minikai 0.1.2__py3-none-any.whl → 0.1.3__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 -1
- 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 +87 -41
- 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/json_node.py +49 -24
- minikai/models/json_node_options.py +26 -7
- 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 +134 -55
- 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 +113 -54
- 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 +87 -42
- 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.3.dist-info}/METADATA +1 -1
- minikai-0.1.3.dist-info/RECORD +91 -0
- minikai-0.1.2.dist-info/RECORD +0 -88
- {minikai-0.1.2.dist-info → minikai-0.1.3.dist-info}/WHEEL +0 -0
|
@@ -3,36 +3,45 @@ from typing import Any, Optional, Union, cast
|
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
|
-
from ... import errors
|
|
7
6
|
from ...client import AuthenticatedClient, Client
|
|
7
|
+
from ...types import Response, UNSET
|
|
8
|
+
from ... import errors
|
|
9
|
+
|
|
8
10
|
from ...models.http_validation_problem_details import HttpValidationProblemDetails
|
|
9
11
|
from ...models.update_group_command import UpdateGroupCommand
|
|
10
|
-
from
|
|
12
|
+
from typing import cast
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
|
|
13
16
|
def _get_kwargs(
|
|
14
17
|
group_id: str,
|
|
15
18
|
*,
|
|
16
19
|
body: UpdateGroupCommand,
|
|
20
|
+
|
|
17
21
|
) -> dict[str, Any]:
|
|
18
22
|
headers: dict[str, Any] = {}
|
|
19
23
|
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
20
29
|
_kwargs: dict[str, Any] = {
|
|
21
30
|
"method": "put",
|
|
22
|
-
"url":
|
|
31
|
+
"url": "/api/Groups/{group_id}".format(group_id=group_id,),
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
_kwargs["json"] = body.to_dict()
|
|
26
35
|
|
|
36
|
+
|
|
27
37
|
headers["Content-Type"] = "application/json"
|
|
28
38
|
|
|
29
39
|
_kwargs["headers"] = headers
|
|
30
40
|
return _kwargs
|
|
31
41
|
|
|
32
42
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
) -> Optional[Union[Any, HttpValidationProblemDetails]]:
|
|
43
|
+
|
|
44
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[Any, HttpValidationProblemDetails]]:
|
|
36
45
|
if response.status_code == 204:
|
|
37
46
|
response_204 = cast(Any, None)
|
|
38
47
|
return response_204
|
|
@@ -40,6 +49,8 @@ def _parse_response(
|
|
|
40
49
|
if response.status_code == 400:
|
|
41
50
|
response_400 = HttpValidationProblemDetails.from_dict(response.json())
|
|
42
51
|
|
|
52
|
+
|
|
53
|
+
|
|
43
54
|
return response_400
|
|
44
55
|
|
|
45
56
|
if response.status_code == 404:
|
|
@@ -52,9 +63,7 @@ def _parse_response(
|
|
|
52
63
|
return None
|
|
53
64
|
|
|
54
65
|
|
|
55
|
-
def _build_response(
|
|
56
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
57
|
-
) -> Response[Union[Any, HttpValidationProblemDetails]]:
|
|
66
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[Any, HttpValidationProblemDetails]]:
|
|
58
67
|
return Response(
|
|
59
68
|
status_code=HTTPStatus(response.status_code),
|
|
60
69
|
content=response.content,
|
|
@@ -68,8 +77,9 @@ def sync_detailed(
|
|
|
68
77
|
*,
|
|
69
78
|
client: Union[AuthenticatedClient, Client],
|
|
70
79
|
body: UpdateGroupCommand,
|
|
80
|
+
|
|
71
81
|
) -> Response[Union[Any, HttpValidationProblemDetails]]:
|
|
72
|
-
"""
|
|
82
|
+
"""
|
|
73
83
|
Args:
|
|
74
84
|
group_id (str):
|
|
75
85
|
body (UpdateGroupCommand):
|
|
@@ -80,11 +90,13 @@ def sync_detailed(
|
|
|
80
90
|
|
|
81
91
|
Returns:
|
|
82
92
|
Response[Union[Any, HttpValidationProblemDetails]]
|
|
83
|
-
|
|
93
|
+
"""
|
|
94
|
+
|
|
84
95
|
|
|
85
96
|
kwargs = _get_kwargs(
|
|
86
97
|
group_id=group_id,
|
|
87
|
-
|
|
98
|
+
body=body,
|
|
99
|
+
|
|
88
100
|
)
|
|
89
101
|
|
|
90
102
|
response = client.get_httpx_client().request(
|
|
@@ -93,14 +105,14 @@ def sync_detailed(
|
|
|
93
105
|
|
|
94
106
|
return _build_response(client=client, response=response)
|
|
95
107
|
|
|
96
|
-
|
|
97
108
|
def sync(
|
|
98
109
|
group_id: str,
|
|
99
110
|
*,
|
|
100
111
|
client: Union[AuthenticatedClient, Client],
|
|
101
112
|
body: UpdateGroupCommand,
|
|
113
|
+
|
|
102
114
|
) -> Optional[Union[Any, HttpValidationProblemDetails]]:
|
|
103
|
-
"""
|
|
115
|
+
"""
|
|
104
116
|
Args:
|
|
105
117
|
group_id (str):
|
|
106
118
|
body (UpdateGroupCommand):
|
|
@@ -111,22 +123,24 @@ def sync(
|
|
|
111
123
|
|
|
112
124
|
Returns:
|
|
113
125
|
Union[Any, HttpValidationProblemDetails]
|
|
114
|
-
|
|
126
|
+
"""
|
|
127
|
+
|
|
115
128
|
|
|
116
129
|
return sync_detailed(
|
|
117
130
|
group_id=group_id,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
).parsed
|
|
131
|
+
client=client,
|
|
132
|
+
body=body,
|
|
121
133
|
|
|
134
|
+
).parsed
|
|
122
135
|
|
|
123
136
|
async def asyncio_detailed(
|
|
124
137
|
group_id: str,
|
|
125
138
|
*,
|
|
126
139
|
client: Union[AuthenticatedClient, Client],
|
|
127
140
|
body: UpdateGroupCommand,
|
|
141
|
+
|
|
128
142
|
) -> Response[Union[Any, HttpValidationProblemDetails]]:
|
|
129
|
-
"""
|
|
143
|
+
"""
|
|
130
144
|
Args:
|
|
131
145
|
group_id (str):
|
|
132
146
|
body (UpdateGroupCommand):
|
|
@@ -137,25 +151,29 @@ async def asyncio_detailed(
|
|
|
137
151
|
|
|
138
152
|
Returns:
|
|
139
153
|
Response[Union[Any, HttpValidationProblemDetails]]
|
|
140
|
-
|
|
154
|
+
"""
|
|
155
|
+
|
|
141
156
|
|
|
142
157
|
kwargs = _get_kwargs(
|
|
143
158
|
group_id=group_id,
|
|
144
|
-
|
|
159
|
+
body=body,
|
|
160
|
+
|
|
145
161
|
)
|
|
146
162
|
|
|
147
|
-
response = await client.get_async_httpx_client().request(
|
|
163
|
+
response = await client.get_async_httpx_client().request(
|
|
164
|
+
**kwargs
|
|
165
|
+
)
|
|
148
166
|
|
|
149
167
|
return _build_response(client=client, response=response)
|
|
150
168
|
|
|
151
|
-
|
|
152
169
|
async def asyncio(
|
|
153
170
|
group_id: str,
|
|
154
171
|
*,
|
|
155
172
|
client: Union[AuthenticatedClient, Client],
|
|
156
173
|
body: UpdateGroupCommand,
|
|
174
|
+
|
|
157
175
|
) -> Optional[Union[Any, HttpValidationProblemDetails]]:
|
|
158
|
-
"""
|
|
176
|
+
"""
|
|
159
177
|
Args:
|
|
160
178
|
group_id (str):
|
|
161
179
|
body (UpdateGroupCommand):
|
|
@@ -166,12 +184,12 @@ async def asyncio(
|
|
|
166
184
|
|
|
167
185
|
Returns:
|
|
168
186
|
Union[Any, HttpValidationProblemDetails]
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
).parsed
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
return (await asyncio_detailed(
|
|
191
|
+
group_id=group_id,
|
|
192
|
+
client=client,
|
|
193
|
+
body=body,
|
|
194
|
+
|
|
195
|
+
)).parsed
|
minikai/api/minis/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"""Contains endpoint functions for accessing the API"""
|
|
1
|
+
""" Contains endpoint functions for accessing the API """
|
minikai/api/minis/create_mini.py
CHANGED
|
@@ -3,19 +3,28 @@ from typing import Any, Optional, Union, cast
|
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
|
-
from ... import errors
|
|
7
6
|
from ...client import AuthenticatedClient, Client
|
|
7
|
+
from ...types import Response, UNSET
|
|
8
|
+
from ... import errors
|
|
9
|
+
|
|
8
10
|
from ...models.create_mini_command import CreateMiniCommand
|
|
9
11
|
from ...models.http_validation_problem_details import HttpValidationProblemDetails
|
|
10
|
-
from
|
|
12
|
+
from typing import cast
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
|
|
13
16
|
def _get_kwargs(
|
|
14
17
|
*,
|
|
15
18
|
body: CreateMiniCommand,
|
|
19
|
+
|
|
16
20
|
) -> dict[str, Any]:
|
|
17
21
|
headers: dict[str, Any] = {}
|
|
18
22
|
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
19
28
|
_kwargs: dict[str, Any] = {
|
|
20
29
|
"method": "post",
|
|
21
30
|
"url": "/api/Minis",
|
|
@@ -23,15 +32,15 @@ def _get_kwargs(
|
|
|
23
32
|
|
|
24
33
|
_kwargs["json"] = body.to_dict()
|
|
25
34
|
|
|
35
|
+
|
|
26
36
|
headers["Content-Type"] = "application/json"
|
|
27
37
|
|
|
28
38
|
_kwargs["headers"] = headers
|
|
29
39
|
return _kwargs
|
|
30
40
|
|
|
31
41
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
) -> Optional[Union[HttpValidationProblemDetails, int]]:
|
|
42
|
+
|
|
43
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[HttpValidationProblemDetails, int]]:
|
|
35
44
|
if response.status_code == 201:
|
|
36
45
|
response_201 = cast(int, response.json())
|
|
37
46
|
return response_201
|
|
@@ -39,6 +48,8 @@ def _parse_response(
|
|
|
39
48
|
if response.status_code == 400:
|
|
40
49
|
response_400 = HttpValidationProblemDetails.from_dict(response.json())
|
|
41
50
|
|
|
51
|
+
|
|
52
|
+
|
|
42
53
|
return response_400
|
|
43
54
|
|
|
44
55
|
if client.raise_on_unexpected_status:
|
|
@@ -47,9 +58,7 @@ def _parse_response(
|
|
|
47
58
|
return None
|
|
48
59
|
|
|
49
60
|
|
|
50
|
-
def _build_response(
|
|
51
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
52
|
-
) -> Response[Union[HttpValidationProblemDetails, int]]:
|
|
61
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[HttpValidationProblemDetails, int]]:
|
|
53
62
|
return Response(
|
|
54
63
|
status_code=HTTPStatus(response.status_code),
|
|
55
64
|
content=response.content,
|
|
@@ -62,8 +71,9 @@ def sync_detailed(
|
|
|
62
71
|
*,
|
|
63
72
|
client: Union[AuthenticatedClient, Client],
|
|
64
73
|
body: CreateMiniCommand,
|
|
74
|
+
|
|
65
75
|
) -> Response[Union[HttpValidationProblemDetails, int]]:
|
|
66
|
-
"""
|
|
76
|
+
"""
|
|
67
77
|
Args:
|
|
68
78
|
body (CreateMiniCommand):
|
|
69
79
|
|
|
@@ -73,10 +83,12 @@ def sync_detailed(
|
|
|
73
83
|
|
|
74
84
|
Returns:
|
|
75
85
|
Response[Union[HttpValidationProblemDetails, int]]
|
|
76
|
-
|
|
86
|
+
"""
|
|
87
|
+
|
|
77
88
|
|
|
78
89
|
kwargs = _get_kwargs(
|
|
79
90
|
body=body,
|
|
91
|
+
|
|
80
92
|
)
|
|
81
93
|
|
|
82
94
|
response = client.get_httpx_client().request(
|
|
@@ -85,13 +97,13 @@ def sync_detailed(
|
|
|
85
97
|
|
|
86
98
|
return _build_response(client=client, response=response)
|
|
87
99
|
|
|
88
|
-
|
|
89
100
|
def sync(
|
|
90
101
|
*,
|
|
91
102
|
client: Union[AuthenticatedClient, Client],
|
|
92
103
|
body: CreateMiniCommand,
|
|
104
|
+
|
|
93
105
|
) -> Optional[Union[HttpValidationProblemDetails, int]]:
|
|
94
|
-
"""
|
|
106
|
+
"""
|
|
95
107
|
Args:
|
|
96
108
|
body (CreateMiniCommand):
|
|
97
109
|
|
|
@@ -101,20 +113,22 @@ def sync(
|
|
|
101
113
|
|
|
102
114
|
Returns:
|
|
103
115
|
Union[HttpValidationProblemDetails, int]
|
|
104
|
-
|
|
116
|
+
"""
|
|
117
|
+
|
|
105
118
|
|
|
106
119
|
return sync_detailed(
|
|
107
120
|
client=client,
|
|
108
|
-
|
|
109
|
-
).parsed
|
|
121
|
+
body=body,
|
|
110
122
|
|
|
123
|
+
).parsed
|
|
111
124
|
|
|
112
125
|
async def asyncio_detailed(
|
|
113
126
|
*,
|
|
114
127
|
client: Union[AuthenticatedClient, Client],
|
|
115
128
|
body: CreateMiniCommand,
|
|
129
|
+
|
|
116
130
|
) -> Response[Union[HttpValidationProblemDetails, int]]:
|
|
117
|
-
"""
|
|
131
|
+
"""
|
|
118
132
|
Args:
|
|
119
133
|
body (CreateMiniCommand):
|
|
120
134
|
|
|
@@ -124,23 +138,27 @@ async def asyncio_detailed(
|
|
|
124
138
|
|
|
125
139
|
Returns:
|
|
126
140
|
Response[Union[HttpValidationProblemDetails, int]]
|
|
127
|
-
|
|
141
|
+
"""
|
|
142
|
+
|
|
128
143
|
|
|
129
144
|
kwargs = _get_kwargs(
|
|
130
145
|
body=body,
|
|
146
|
+
|
|
131
147
|
)
|
|
132
148
|
|
|
133
|
-
response = await client.get_async_httpx_client().request(
|
|
149
|
+
response = await client.get_async_httpx_client().request(
|
|
150
|
+
**kwargs
|
|
151
|
+
)
|
|
134
152
|
|
|
135
153
|
return _build_response(client=client, response=response)
|
|
136
154
|
|
|
137
|
-
|
|
138
155
|
async def asyncio(
|
|
139
156
|
*,
|
|
140
157
|
client: Union[AuthenticatedClient, Client],
|
|
141
158
|
body: CreateMiniCommand,
|
|
159
|
+
|
|
142
160
|
) -> Optional[Union[HttpValidationProblemDetails, int]]:
|
|
143
|
-
"""
|
|
161
|
+
"""
|
|
144
162
|
Args:
|
|
145
163
|
body (CreateMiniCommand):
|
|
146
164
|
|
|
@@ -150,11 +168,11 @@ async def asyncio(
|
|
|
150
168
|
|
|
151
169
|
Returns:
|
|
152
170
|
Union[HttpValidationProblemDetails, int]
|
|
153
|
-
|
|
171
|
+
"""
|
|
154
172
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
).parsed
|
|
173
|
+
|
|
174
|
+
return (await asyncio_detailed(
|
|
175
|
+
client=client,
|
|
176
|
+
body=body,
|
|
177
|
+
|
|
178
|
+
)).parsed
|
minikai/api/minis/delete_mini.py
CHANGED
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Optional, Union
|
|
2
|
+
from typing import Any, Optional, Union, cast
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
|
-
from ... import errors
|
|
7
6
|
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...types import Response
|
|
7
|
+
from ...types import Response, UNSET
|
|
8
|
+
from ... import errors
|
|
9
|
+
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def _get_kwargs(
|
|
12
14
|
id: int,
|
|
15
|
+
|
|
13
16
|
) -> dict[str, Any]:
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
14
23
|
_kwargs: dict[str, Any] = {
|
|
15
24
|
"method": "delete",
|
|
16
|
-
"url":
|
|
25
|
+
"url": "/api/Minis/{id}".format(id=id,),
|
|
17
26
|
}
|
|
18
27
|
|
|
28
|
+
|
|
19
29
|
return _kwargs
|
|
20
30
|
|
|
21
31
|
|
|
32
|
+
|
|
22
33
|
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
23
34
|
if response.status_code == 204:
|
|
24
35
|
return None
|
|
@@ -45,8 +56,9 @@ def sync_detailed(
|
|
|
45
56
|
id: int,
|
|
46
57
|
*,
|
|
47
58
|
client: Union[AuthenticatedClient, Client],
|
|
59
|
+
|
|
48
60
|
) -> Response[Any]:
|
|
49
|
-
"""
|
|
61
|
+
"""
|
|
50
62
|
Args:
|
|
51
63
|
id (int):
|
|
52
64
|
|
|
@@ -56,10 +68,12 @@ def sync_detailed(
|
|
|
56
68
|
|
|
57
69
|
Returns:
|
|
58
70
|
Response[Any]
|
|
59
|
-
|
|
71
|
+
"""
|
|
72
|
+
|
|
60
73
|
|
|
61
74
|
kwargs = _get_kwargs(
|
|
62
75
|
id=id,
|
|
76
|
+
|
|
63
77
|
)
|
|
64
78
|
|
|
65
79
|
response = client.get_httpx_client().request(
|
|
@@ -73,8 +87,9 @@ async def asyncio_detailed(
|
|
|
73
87
|
id: int,
|
|
74
88
|
*,
|
|
75
89
|
client: Union[AuthenticatedClient, Client],
|
|
90
|
+
|
|
76
91
|
) -> Response[Any]:
|
|
77
|
-
"""
|
|
92
|
+
"""
|
|
78
93
|
Args:
|
|
79
94
|
id (int):
|
|
80
95
|
|
|
@@ -84,12 +99,17 @@ async def asyncio_detailed(
|
|
|
84
99
|
|
|
85
100
|
Returns:
|
|
86
101
|
Response[Any]
|
|
87
|
-
|
|
102
|
+
"""
|
|
103
|
+
|
|
88
104
|
|
|
89
105
|
kwargs = _get_kwargs(
|
|
90
106
|
id=id,
|
|
107
|
+
|
|
91
108
|
)
|
|
92
109
|
|
|
93
|
-
response = await client.get_async_httpx_client().request(
|
|
110
|
+
response = await client.get_async_httpx_client().request(
|
|
111
|
+
**kwargs
|
|
112
|
+
)
|
|
94
113
|
|
|
95
114
|
return _build_response(client=client, response=response)
|
|
115
|
+
|
|
@@ -3,30 +3,42 @@ from typing import Any, Optional, Union, cast
|
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
|
|
6
|
-
from ... import errors
|
|
7
6
|
from ...client import AuthenticatedClient, Client
|
|
7
|
+
from ...types import Response, UNSET
|
|
8
|
+
from ... import errors
|
|
9
|
+
|
|
8
10
|
from ...models.slim_mini_dto import SlimMiniDto
|
|
9
|
-
from
|
|
11
|
+
from typing import cast
|
|
12
|
+
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
def _get_kwargs(
|
|
13
16
|
external_source: str,
|
|
14
17
|
external_id: str,
|
|
18
|
+
|
|
15
19
|
) -> dict[str, Any]:
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
16
26
|
_kwargs: dict[str, Any] = {
|
|
17
27
|
"method": "get",
|
|
18
|
-
"url":
|
|
28
|
+
"url": "/api/Minis/{external_source}/{external_id}".format(external_source=external_source,external_id=external_id,),
|
|
19
29
|
}
|
|
20
30
|
|
|
31
|
+
|
|
21
32
|
return _kwargs
|
|
22
33
|
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
) -> Optional[Union[Any, SlimMiniDto]]:
|
|
35
|
+
|
|
36
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Union[Any, SlimMiniDto]]:
|
|
27
37
|
if response.status_code == 200:
|
|
28
38
|
response_200 = SlimMiniDto.from_dict(response.json())
|
|
29
39
|
|
|
40
|
+
|
|
41
|
+
|
|
30
42
|
return response_200
|
|
31
43
|
|
|
32
44
|
if response.status_code == 404:
|
|
@@ -39,9 +51,7 @@ def _parse_response(
|
|
|
39
51
|
return None
|
|
40
52
|
|
|
41
53
|
|
|
42
|
-
def _build_response(
|
|
43
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
-
) -> Response[Union[Any, SlimMiniDto]]:
|
|
54
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Union[Any, SlimMiniDto]]:
|
|
45
55
|
return Response(
|
|
46
56
|
status_code=HTTPStatus(response.status_code),
|
|
47
57
|
content=response.content,
|
|
@@ -55,8 +65,9 @@ def sync_detailed(
|
|
|
55
65
|
external_id: str,
|
|
56
66
|
*,
|
|
57
67
|
client: Union[AuthenticatedClient, Client],
|
|
68
|
+
|
|
58
69
|
) -> Response[Union[Any, SlimMiniDto]]:
|
|
59
|
-
"""
|
|
70
|
+
"""
|
|
60
71
|
Args:
|
|
61
72
|
external_source (str):
|
|
62
73
|
external_id (str):
|
|
@@ -67,11 +78,13 @@ def sync_detailed(
|
|
|
67
78
|
|
|
68
79
|
Returns:
|
|
69
80
|
Response[Union[Any, SlimMiniDto]]
|
|
70
|
-
|
|
81
|
+
"""
|
|
82
|
+
|
|
71
83
|
|
|
72
84
|
kwargs = _get_kwargs(
|
|
73
85
|
external_source=external_source,
|
|
74
|
-
|
|
86
|
+
external_id=external_id,
|
|
87
|
+
|
|
75
88
|
)
|
|
76
89
|
|
|
77
90
|
response = client.get_httpx_client().request(
|
|
@@ -80,14 +93,14 @@ def sync_detailed(
|
|
|
80
93
|
|
|
81
94
|
return _build_response(client=client, response=response)
|
|
82
95
|
|
|
83
|
-
|
|
84
96
|
def sync(
|
|
85
97
|
external_source: str,
|
|
86
98
|
external_id: str,
|
|
87
99
|
*,
|
|
88
100
|
client: Union[AuthenticatedClient, Client],
|
|
101
|
+
|
|
89
102
|
) -> Optional[Union[Any, SlimMiniDto]]:
|
|
90
|
-
"""
|
|
103
|
+
"""
|
|
91
104
|
Args:
|
|
92
105
|
external_source (str):
|
|
93
106
|
external_id (str):
|
|
@@ -98,22 +111,24 @@ def sync(
|
|
|
98
111
|
|
|
99
112
|
Returns:
|
|
100
113
|
Union[Any, SlimMiniDto]
|
|
101
|
-
|
|
114
|
+
"""
|
|
115
|
+
|
|
102
116
|
|
|
103
117
|
return sync_detailed(
|
|
104
118
|
external_source=external_source,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
).parsed
|
|
119
|
+
external_id=external_id,
|
|
120
|
+
client=client,
|
|
108
121
|
|
|
122
|
+
).parsed
|
|
109
123
|
|
|
110
124
|
async def asyncio_detailed(
|
|
111
125
|
external_source: str,
|
|
112
126
|
external_id: str,
|
|
113
127
|
*,
|
|
114
128
|
client: Union[AuthenticatedClient, Client],
|
|
129
|
+
|
|
115
130
|
) -> Response[Union[Any, SlimMiniDto]]:
|
|
116
|
-
"""
|
|
131
|
+
"""
|
|
117
132
|
Args:
|
|
118
133
|
external_source (str):
|
|
119
134
|
external_id (str):
|
|
@@ -124,25 +139,29 @@ async def asyncio_detailed(
|
|
|
124
139
|
|
|
125
140
|
Returns:
|
|
126
141
|
Response[Union[Any, SlimMiniDto]]
|
|
127
|
-
|
|
142
|
+
"""
|
|
143
|
+
|
|
128
144
|
|
|
129
145
|
kwargs = _get_kwargs(
|
|
130
146
|
external_source=external_source,
|
|
131
|
-
|
|
147
|
+
external_id=external_id,
|
|
148
|
+
|
|
132
149
|
)
|
|
133
150
|
|
|
134
|
-
response = await client.get_async_httpx_client().request(
|
|
151
|
+
response = await client.get_async_httpx_client().request(
|
|
152
|
+
**kwargs
|
|
153
|
+
)
|
|
135
154
|
|
|
136
155
|
return _build_response(client=client, response=response)
|
|
137
156
|
|
|
138
|
-
|
|
139
157
|
async def asyncio(
|
|
140
158
|
external_source: str,
|
|
141
159
|
external_id: str,
|
|
142
160
|
*,
|
|
143
161
|
client: Union[AuthenticatedClient, Client],
|
|
162
|
+
|
|
144
163
|
) -> Optional[Union[Any, SlimMiniDto]]:
|
|
145
|
-
"""
|
|
164
|
+
"""
|
|
146
165
|
Args:
|
|
147
166
|
external_source (str):
|
|
148
167
|
external_id (str):
|
|
@@ -153,12 +172,12 @@ async def asyncio(
|
|
|
153
172
|
|
|
154
173
|
Returns:
|
|
155
174
|
Union[Any, SlimMiniDto]
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
).parsed
|
|
175
|
+
"""
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
return (await asyncio_detailed(
|
|
179
|
+
external_source=external_source,
|
|
180
|
+
external_id=external_id,
|
|
181
|
+
client=client,
|
|
182
|
+
|
|
183
|
+
)).parsed
|