Showing
26 changed files
with
369 additions
and
1075 deletions
Too many changes to show.
To preserve performance only 26 of 26+ files are displayed.
kf_sdk/__init__.py
0 → 100644
1 | +# coding: utf-8 | |
2 | + | |
3 | +# flake8: noqa | |
4 | + | |
5 | +""" | |
6 | + Kappa-framework user microservices | |
7 | + | |
8 | + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |
9 | + | |
10 | + The version of the OpenAPI document: 0.1.0 | |
11 | + Generated by OpenAPI Generator (https://openapi-generator.tech) | |
12 | + | |
13 | + Do not edit the class manually. | |
14 | +""" # noqa: E501 | |
15 | + | |
16 | + | |
17 | +__version__ = "1.0.0" | |
18 | + | |
19 | +# import apis into sdk package | |
20 | +from kf_sdk.api.session_management_api import SessionManagementApi | |
21 | +from kf_sdk.api.dataset_management_api import DatasetManagementApi | |
22 | + | |
23 | +# import ApiClient | |
24 | +from kf_sdk.api_response import ApiResponse | |
25 | +from kf_sdk.api_client import ApiClient | |
26 | +from kf_sdk.configuration import Configuration | |
27 | +from kf_sdk.exceptions import OpenApiException | |
28 | +from kf_sdk.exceptions import ApiTypeError | |
29 | +from kf_sdk.exceptions import ApiValueError | |
30 | +from kf_sdk.exceptions import ApiKeyError | |
31 | +from kf_sdk.exceptions import ApiAttributeError | |
32 | +from kf_sdk.exceptions import ApiException | |
33 | + | |
34 | +# import models into sdk package | |
35 | +from kf_sdk.models.configuration_details import ConfigurationDetails | |
36 | +from kf_sdk.models.http_validation_error import HTTPValidationError | |
37 | +from kf_sdk.models.new_configuration import NewConfiguration | |
38 | +from kf_sdk.models.new_session import NewSession | |
39 | +from kf_sdk.models.organization_details import OrganizationDetails | |
40 | +from kf_sdk.models.user_details import UserDetails | |
41 | +from kf_sdk.models.user_type_details import UserTypeDetails | |
42 | +from kf_sdk.models.validation_error import ValidationError | |
43 | +from kf_sdk.models.dataset_details import DatasetDetails | |
44 | +from kf_sdk.models.dataset_versions import DatasetVersion | ... | ... |
kf_sdk/api/__init__.py
0 → 100644
kf_sdk/api/dataset_management_api.py
0 → 100644
This diff could not be displayed because it is too large.
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -18,12 +18,12 @@ from typing_extensions import Annotated |
18 | 18 | |
19 | 19 | from pydantic import StrictInt |
20 | 20 | from typing import Any |
21 | -from openapi_client.models.new_session import NewSession | |
22 | -from openapi_client.models.user_details import UserDetails | |
21 | +from kappa_users.models.new_session import NewSession | |
22 | +from kappa_users.models.user_details import UserDetails | |
23 | 23 | |
24 | -from openapi_client.api_client import ApiClient, RequestSerialized | |
25 | -from openapi_client.api_response import ApiResponse | |
26 | -from openapi_client.rest import RESTResponseType | |
24 | +from kappa_users.api_client import ApiClient, RequestSerialized | |
25 | +from kappa_users.api_response import ApiResponse | |
26 | +from kappa_users.rest import RESTResponseType | |
27 | 27 | |
28 | 28 | |
29 | 29 | class SessionManagementApi: |
... | ... | @@ -38,12 +38,9 @@ class SessionManagementApi: |
38 | 38 | api_client = ApiClient.get_default() |
39 | 39 | self.api_client = api_client |
40 | 40 | |
41 | - | |
42 | 41 | @validate_call |
43 | - def delete_session_session_logout_user_id_user_type_id_delete( | |
42 | + def new_anonymous_session_session_anonymous_token_post( | |
44 | 43 | self, |
45 | - user_id: StrictInt, | |
46 | - user_type_id: StrictInt, | |
47 | 44 | _request_timeout: Union[ |
48 | 45 | None, |
49 | 46 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -57,13 +54,9 @@ class SessionManagementApi: |
57 | 54 | _headers: Optional[Dict[StrictStr, Any]] = None, |
58 | 55 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
59 | 56 | ) -> object: |
60 | - """Delete Session | |
57 | + """New Anonymous Session | |
61 | 58 | |
62 | 59 | |
63 | - :param user_id: (required) | |
64 | - :type user_id: int | |
65 | - :param user_type_id: (required) | |
66 | - :type user_type_id: int | |
67 | 60 | :param _request_timeout: timeout setting for this request. If one |
68 | 61 | number provided, it will be total request |
69 | 62 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -86,9 +79,7 @@ class SessionManagementApi: |
86 | 79 | :return: Returns the result object. |
87 | 80 | """ # noqa: E501 |
88 | 81 | |
89 | - _param = self._delete_session_session_logout_user_id_user_type_id_delete_serialize( | |
90 | - user_id=user_id, | |
91 | - user_type_id=user_type_id, | |
82 | + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( | |
92 | 83 | _request_auth=_request_auth, |
93 | 84 | _content_type=_content_type, |
94 | 85 | _headers=_headers, |
... | ... | @@ -97,7 +88,6 @@ class SessionManagementApi: |
97 | 88 | |
98 | 89 | _response_types_map: Dict[str, Optional[str]] = { |
99 | 90 | '200': "object", |
100 | - '422': "HTTPValidationError", | |
101 | 91 | } |
102 | 92 | response_data = self.api_client.call_api( |
103 | 93 | *_param, |
... | ... | @@ -111,10 +101,8 @@ class SessionManagementApi: |
111 | 101 | |
112 | 102 | |
113 | 103 | @validate_call |
114 | - def delete_session_session_logout_user_id_user_type_id_delete_with_http_info( | |
104 | + def new_anonymous_session_session_anonymous_token_post_with_http_info( | |
115 | 105 | self, |
116 | - user_id: StrictInt, | |
117 | - user_type_id: StrictInt, | |
118 | 106 | _request_timeout: Union[ |
119 | 107 | None, |
120 | 108 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -128,13 +116,9 @@ class SessionManagementApi: |
128 | 116 | _headers: Optional[Dict[StrictStr, Any]] = None, |
129 | 117 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
130 | 118 | ) -> ApiResponse[object]: |
131 | - """Delete Session | |
119 | + """New Anonymous Session | |
132 | 120 | |
133 | 121 | |
134 | - :param user_id: (required) | |
135 | - :type user_id: int | |
136 | - :param user_type_id: (required) | |
137 | - :type user_type_id: int | |
138 | 122 | :param _request_timeout: timeout setting for this request. If one |
139 | 123 | number provided, it will be total request |
140 | 124 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -157,9 +141,7 @@ class SessionManagementApi: |
157 | 141 | :return: Returns the result object. |
158 | 142 | """ # noqa: E501 |
159 | 143 | |
160 | - _param = self._delete_session_session_logout_user_id_user_type_id_delete_serialize( | |
161 | - user_id=user_id, | |
162 | - user_type_id=user_type_id, | |
144 | + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( | |
163 | 145 | _request_auth=_request_auth, |
164 | 146 | _content_type=_content_type, |
165 | 147 | _headers=_headers, |
... | ... | @@ -168,7 +150,6 @@ class SessionManagementApi: |
168 | 150 | |
169 | 151 | _response_types_map: Dict[str, Optional[str]] = { |
170 | 152 | '200': "object", |
171 | - '422': "HTTPValidationError", | |
172 | 153 | } |
173 | 154 | response_data = self.api_client.call_api( |
174 | 155 | *_param, |
... | ... | @@ -182,10 +163,8 @@ class SessionManagementApi: |
182 | 163 | |
183 | 164 | |
184 | 165 | @validate_call |
185 | - def delete_session_session_logout_user_id_user_type_id_delete_without_preload_content( | |
166 | + def new_anonymous_session_session_anonymous_token_post_without_preload_content( | |
186 | 167 | self, |
187 | - user_id: StrictInt, | |
188 | - user_type_id: StrictInt, | |
189 | 168 | _request_timeout: Union[ |
190 | 169 | None, |
191 | 170 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -199,13 +178,9 @@ class SessionManagementApi: |
199 | 178 | _headers: Optional[Dict[StrictStr, Any]] = None, |
200 | 179 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
201 | 180 | ) -> RESTResponseType: |
202 | - """Delete Session | |
181 | + """New Anonymous Session | |
203 | 182 | |
204 | 183 | |
205 | - :param user_id: (required) | |
206 | - :type user_id: int | |
207 | - :param user_type_id: (required) | |
208 | - :type user_type_id: int | |
209 | 184 | :param _request_timeout: timeout setting for this request. If one |
210 | 185 | number provided, it will be total request |
211 | 186 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -228,9 +203,7 @@ class SessionManagementApi: |
228 | 203 | :return: Returns the result object. |
229 | 204 | """ # noqa: E501 |
230 | 205 | |
231 | - _param = self._delete_session_session_logout_user_id_user_type_id_delete_serialize( | |
232 | - user_id=user_id, | |
233 | - user_type_id=user_type_id, | |
206 | + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( | |
234 | 207 | _request_auth=_request_auth, |
235 | 208 | _content_type=_content_type, |
236 | 209 | _headers=_headers, |
... | ... | @@ -239,7 +212,6 @@ class SessionManagementApi: |
239 | 212 | |
240 | 213 | _response_types_map: Dict[str, Optional[str]] = { |
241 | 214 | '200': "object", |
242 | - '422': "HTTPValidationError", | |
243 | 215 | } |
244 | 216 | response_data = self.api_client.call_api( |
245 | 217 | *_param, |
... | ... | @@ -248,10 +220,8 @@ class SessionManagementApi: |
248 | 220 | return response_data.response |
249 | 221 | |
250 | 222 | |
251 | - def _delete_session_session_logout_user_id_user_type_id_delete_serialize( | |
223 | + def _new_anonymous_session_session_anonymous_token_post_serialize( | |
252 | 224 | self, |
253 | - user_id, | |
254 | - user_type_id, | |
255 | 225 | _request_auth, |
256 | 226 | _content_type, |
257 | 227 | _headers, |
... | ... | @@ -273,10 +243,6 @@ class SessionManagementApi: |
273 | 243 | _body_params: Optional[bytes] = None |
274 | 244 | |
275 | 245 | # process the path parameters |
276 | - if user_id is not None: | |
277 | - _path_params['user_id'] = user_id | |
278 | - if user_type_id is not None: | |
279 | - _path_params['user_type_id'] = user_type_id | |
280 | 246 | # process the query parameters |
281 | 247 | # process the header parameters |
282 | 248 | # process the form parameters |
... | ... | @@ -297,8 +263,8 @@ class SessionManagementApi: |
297 | 263 | ] |
298 | 264 | |
299 | 265 | return self.api_client.param_serialize( |
300 | - method='DELETE', | |
301 | - resource_path='/session/logout/{user_id}/{user_type_id}', | |
266 | + method='POST', | |
267 | + resource_path='/session/anonymous_token', | |
302 | 268 | path_params=_path_params, |
303 | 269 | query_params=_query_params, |
304 | 270 | header_params=_header_params, |
... | ... | @@ -315,7 +281,7 @@ class SessionManagementApi: |
315 | 281 | |
316 | 282 | |
317 | 283 | @validate_call |
318 | - def new_session_session_login_post( | |
284 | + def get_new_session( | |
319 | 285 | self, |
320 | 286 | new_session: NewSession, |
321 | 287 | _request_timeout: Union[ |
... | ... | @@ -358,7 +324,7 @@ class SessionManagementApi: |
358 | 324 | :return: Returns the result object. |
359 | 325 | """ # noqa: E501 |
360 | 326 | |
361 | - _param = self._new_session_session_login_post_serialize( | |
327 | + _param = self._get_new_session_serialize( | |
362 | 328 | new_session=new_session, |
363 | 329 | _request_auth=_request_auth, |
364 | 330 | _content_type=_content_type, |
... | ... | @@ -382,7 +348,7 @@ class SessionManagementApi: |
382 | 348 | |
383 | 349 | |
384 | 350 | @validate_call |
385 | - def new_session_session_login_post_with_http_info( | |
351 | + def get_new_session_with_http_info( | |
386 | 352 | self, |
387 | 353 | new_session: NewSession, |
388 | 354 | _request_timeout: Union[ |
... | ... | @@ -425,7 +391,7 @@ class SessionManagementApi: |
425 | 391 | :return: Returns the result object. |
426 | 392 | """ # noqa: E501 |
427 | 393 | |
428 | - _param = self._new_session_session_login_post_serialize( | |
394 | + _param = self._get_new_session_serialize( | |
429 | 395 | new_session=new_session, |
430 | 396 | _request_auth=_request_auth, |
431 | 397 | _content_type=_content_type, |
... | ... | @@ -449,7 +415,7 @@ class SessionManagementApi: |
449 | 415 | |
450 | 416 | |
451 | 417 | @validate_call |
452 | - def new_session_session_login_post_without_preload_content( | |
418 | + def get_new_session_without_preload_content( | |
453 | 419 | self, |
454 | 420 | new_session: NewSession, |
455 | 421 | _request_timeout: Union[ |
... | ... | @@ -492,7 +458,7 @@ class SessionManagementApi: |
492 | 458 | :return: Returns the result object. |
493 | 459 | """ # noqa: E501 |
494 | 460 | |
495 | - _param = self._new_session_session_login_post_serialize( | |
461 | + _param = self._get_new_session_serialize( | |
496 | 462 | new_session=new_session, |
497 | 463 | _request_auth=_request_auth, |
498 | 464 | _content_type=_content_type, |
... | ... | @@ -511,7 +477,7 @@ class SessionManagementApi: |
511 | 477 | return response_data.response |
512 | 478 | |
513 | 479 | |
514 | - def _new_session_session_login_post_serialize( | |
480 | + def _get_new_session_serialize( | |
515 | 481 | self, |
516 | 482 | new_session, |
517 | 483 | _request_auth, |
... | ... | @@ -571,7 +537,7 @@ class SessionManagementApi: |
571 | 537 | |
572 | 538 | return self.api_client.param_serialize( |
573 | 539 | method='POST', |
574 | - resource_path='/session/login', | |
540 | + resource_path='/session/new', | |
575 | 541 | path_params=_path_params, |
576 | 542 | query_params=_query_params, |
577 | 543 | header_params=_header_params, | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -26,11 +26,11 @@ from urllib.parse import quote |
26 | 26 | from typing import Tuple, Optional, List, Dict, Union |
27 | 27 | from pydantic import SecretStr |
28 | 28 | |
29 | -from openapi_client.configuration import Configuration | |
30 | -from openapi_client.api_response import ApiResponse, T as ApiResponseT | |
31 | -import openapi_client.models | |
32 | -from openapi_client import rest | |
33 | -from openapi_client.exceptions import ( | |
29 | +from kf_sdk.configuration import Configuration | |
30 | +from kf_sdk.api_response import ApiResponse, T as ApiResponseT | |
31 | +import kf_sdk.models | |
32 | +from kf_sdk import rest | |
33 | +from kf_sdk.exceptions import ( | |
34 | 34 | ApiValueError, |
35 | 35 | ApiException, |
36 | 36 | BadRequestException, |
... | ... | @@ -449,7 +449,7 @@ class ApiClient: |
449 | 449 | if klass in self.NATIVE_TYPES_MAPPING: |
450 | 450 | klass = self.NATIVE_TYPES_MAPPING[klass] |
451 | 451 | else: |
452 | - klass = getattr(openapi_client.models, klass) | |
452 | + klass = getattr(kappa_users.models, klass) | |
453 | 453 | |
454 | 454 | if klass in self.PRIMITIVE_TYPES: |
455 | 455 | return self.__deserialize_primitive(data, klass) | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -113,6 +113,7 @@ HTTPSignatureAuthSetting = TypedDict( |
113 | 113 | AuthSettings = TypedDict( |
114 | 114 | "AuthSettings", |
115 | 115 | { |
116 | + "HTTPBearer": BearerAuthSetting, | |
116 | 117 | }, |
117 | 118 | total=False, |
118 | 119 | ) |
... | ... | @@ -161,6 +162,7 @@ class Configuration: |
161 | 162 | in PEM format. |
162 | 163 | :param retries: Number of retries for API requests. |
163 | 164 | |
165 | + :Example: | |
164 | 166 | """ |
165 | 167 | |
166 | 168 | _default: ClassVar[Optional[Self]] = None |
... | ... | @@ -185,7 +187,7 @@ class Configuration: |
185 | 187 | ) -> None: |
186 | 188 | """Constructor |
187 | 189 | """ |
188 | - self._base_path = "http://localhost" if host is None else host | |
190 | + self._base_path = "http://localhost/user-micro-services/v1" if host is None else host | |
189 | 191 | """Default Base url |
190 | 192 | """ |
191 | 193 | self.server_index = 0 if server_index is None and host is None else server_index |
... | ... | @@ -228,7 +230,7 @@ class Configuration: |
228 | 230 | self.logger = {} |
229 | 231 | """Logging Settings |
230 | 232 | """ |
231 | - self.logger["package_logger"] = logging.getLogger("openapi_client") | |
233 | + self.logger["package_logger"] = logging.getLogger("kappa_users") | |
232 | 234 | self.logger["urllib3_logger"] = logging.getLogger("urllib3") |
233 | 235 | self.logger_format = '%(asctime)s %(levelname)s %(message)s' |
234 | 236 | """Log format |
... | ... | @@ -483,6 +485,13 @@ class Configuration: |
483 | 485 | :return: The Auth Settings information dict. |
484 | 486 | """ |
485 | 487 | auth: AuthSettings = {} |
488 | + if self.access_token is not None: | |
489 | + auth['HTTPBearer'] = { | |
490 | + 'type': 'bearer', | |
491 | + 'in': 'header', | |
492 | + 'key': 'Authorization', | |
493 | + 'value': 'Bearer ' + self.access_token | |
494 | + } | |
486 | 495 | return auth |
487 | 496 | |
488 | 497 | def to_debug_report(self) -> str: |
... | ... | @@ -504,7 +513,7 @@ class Configuration: |
504 | 513 | """ |
505 | 514 | return [ |
506 | 515 | { |
507 | - 'url': "", | |
516 | + 'url': "/user-micro-services/v1", | |
508 | 517 | 'description': "No description provided", |
509 | 518 | } |
510 | 519 | ] | ... | ... |
kf_sdk/models/__init__.py
0 → 100644
1 | +# coding: utf-8 | |
2 | + | |
3 | +# flake8: noqa | |
4 | +""" | |
5 | + Kappa-framework user microservices | |
6 | + | |
7 | + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |
8 | + | |
9 | + The version of the OpenAPI document: 0.1.0 | |
10 | + Generated by OpenAPI Generator (https://openapi-generator.tech) | |
11 | + | |
12 | + Do not edit the class manually. | |
13 | +""" # noqa: E501 | |
14 | + | |
15 | + | |
16 | +# import models into model package | |
17 | +from kf_sdk.models.configuration_details import ConfigurationDetails | |
18 | +from kf_sdk.models.new_configuration import NewConfiguration | |
19 | +from kf_sdk.models.new_session import NewSession | |
20 | +from kf_sdk.models.user_details import UserDetails | |
21 | +from kf_sdk.models.user_type_details import UserTypeDetails | |
22 | +from kf_sdk.models.organization_details import OrganizationDetails | |
23 | +from kf_sdk.models.validation_error import ValidationError | |
24 | +from kf_sdk.models.dataset_details import DatasetDetails | |
25 | +from kf_sdk.models.dataset_versions import DatasetVersion | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -17,19 +17,26 @@ import pprint |
17 | 17 | import re # noqa: F401 |
18 | 18 | import json |
19 | 19 | |
20 | -from pydantic import BaseModel, ConfigDict, Field, StrictStr | |
20 | +from datetime import datetime | |
21 | +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr | |
21 | 22 | from typing import Any, ClassVar, Dict, List |
22 | 23 | from typing import Optional, Set |
23 | 24 | from typing_extensions import Self |
24 | 25 | |
25 | -class ResetPassword(BaseModel): | |
26 | +class ConfigurationDetails(BaseModel): | |
26 | 27 | """ |
27 | - ResetPassword | |
28 | + ConfigurationDetails | |
28 | 29 | """ # noqa: E501 |
29 | - login_id: StrictStr = Field(alias="loginId") | |
30 | - otp: StrictStr | |
31 | - new_password: StrictStr = Field(alias="newPassword") | |
32 | - __properties: ClassVar[List[str]] = ["loginId", "otp", "newPassword"] | |
30 | + tag: StrictStr | |
31 | + info: StrictStr | |
32 | + config_id: StrictInt = Field(alias="configId") | |
33 | + config_interp: StrictStr = Field(alias="configInterp") | |
34 | + display_value: StrictStr = Field(alias="displayValue") | |
35 | + id: StrictInt | |
36 | + tag_status: StrictInt = Field(alias="tagStatus") | |
37 | + created_on: datetime = Field(alias="createdOn") | |
38 | + modified_on: datetime = Field(alias="modifiedOn") | |
39 | + __properties: ClassVar[List[str]] = ["tag", "info", "configId", "configInterp", "displayValue", "id", "tagStatus", "createdOn", "modifiedOn"] | |
33 | 40 | |
34 | 41 | model_config = ConfigDict( |
35 | 42 | populate_by_name=True, |
... | ... | @@ -49,7 +56,7 @@ class ResetPassword(BaseModel): |
49 | 56 | |
50 | 57 | @classmethod |
51 | 58 | def from_json(cls, json_str: str) -> Optional[Self]: |
52 | - """Create an instance of ResetPassword from a JSON string""" | |
59 | + """Create an instance of ConfigurationDetails from a JSON string""" | |
53 | 60 | return cls.from_dict(json.loads(json_str)) |
54 | 61 | |
55 | 62 | def to_dict(self) -> Dict[str, Any]: |
... | ... | @@ -74,7 +81,7 @@ class ResetPassword(BaseModel): |
74 | 81 | |
75 | 82 | @classmethod |
76 | 83 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: |
77 | - """Create an instance of ResetPassword from a dict""" | |
84 | + """Create an instance of ConfigurationDetails from a dict""" | |
78 | 85 | if obj is None: |
79 | 86 | return None |
80 | 87 | |
... | ... | @@ -82,9 +89,15 @@ class ResetPassword(BaseModel): |
82 | 89 | return cls.model_validate(obj) |
83 | 90 | |
84 | 91 | _obj = cls.model_validate({ |
85 | - "loginId": obj.get("loginId"), | |
86 | - "otp": obj.get("otp"), | |
87 | - "newPassword": obj.get("newPassword") | |
92 | + "tag": obj.get("tag"), | |
93 | + "info": obj.get("info"), | |
94 | + "configId": obj.get("configId"), | |
95 | + "configInterp": obj.get("configInterp"), | |
96 | + "displayValue": obj.get("displayValue"), | |
97 | + "id": obj.get("id"), | |
98 | + "tagStatus": obj.get("tagStatus"), | |
99 | + "createdOn": obj.get("createdOn"), | |
100 | + "modifiedOn": obj.get("modifiedOn") | |
88 | 101 | }) |
89 | 102 | return _obj |
90 | 103 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework data microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -27,18 +27,18 @@ class DatasetDetails(BaseModel): |
27 | 27 | """ |
28 | 28 | DatasetDetails |
29 | 29 | """ # noqa: E501 |
30 | - user_id: Optional[StrictInt] = Field(default=0, alias="userId") | |
31 | - dataset_name: StrictStr = Field(alias="datasetName") | |
32 | - dataset_type: Optional[StrictInt] = Field(default=None, alias="datasetType") | |
33 | - dataset_short_info: Optional[StrictStr] = Field(default=None, alias="datasetShortInfo") | |
34 | - dataset_tags: Optional[StrictStr] = Field(default=None, alias="datasetTags") | |
35 | 30 | dataset_id: StrictInt = Field(alias="datasetId") |
31 | + dataset_name: StrictStr = Field(alias="datasetName") | |
32 | + dataset_type: StrictInt = Field(alias="datasetType") | |
36 | 33 | dataset_type_interp: Optional[StrictStr] = Field(default=None, alias="datasetTypeInterp") |
34 | + dataset_short_info: StrictStr = Field(alias="datasetShortInfo") | |
37 | 35 | dataset_status: StrictInt = Field(alias="datasetStatus") |
38 | 36 | dataset_status_interp: Optional[StrictStr] = Field(default=None, alias="datasetStatusInterp") |
39 | - created_on: Optional[datetime] = Field(alias="createdOn") | |
40 | - modified_on: Optional[datetime] = Field(alias="modifiedOn") | |
41 | - __properties: ClassVar[List[str]] = ["userId", "datasetName", "datasetType", "datasetShortInfo", "datasetTags", "datasetId", "datasetTypeInterp", "datasetStatus", "datasetStatusInterp", "createdOn", "modifiedOn"] | |
37 | + dataset_tags: StrictStr = Field(alias="datasetTags") | |
38 | + created_on: datetime = Field(alias="createdOn") | |
39 | + modified_on: datetime = Field(alias="modifiedOn") | |
40 | + version_no: Optional[StrictStr] = Field(default=None, alias="versionNo") | |
41 | + __properties: ClassVar[List[str]] = ["datasetId", "datasetName", "datasetType", "datasetTypeInterp", "datasetShortInfo", "datasetStatus", "datasetStatusInterp", "datasetTags", "createdOn", "modifiedOn", "versionNo"] | |
42 | 42 | |
43 | 43 | model_config = ConfigDict( |
44 | 44 | populate_by_name=True, |
... | ... | @@ -79,21 +79,6 @@ class DatasetDetails(BaseModel): |
79 | 79 | exclude=excluded_fields, |
80 | 80 | exclude_none=True, |
81 | 81 | ) |
82 | - # set to None if dataset_type (nullable) is None | |
83 | - # and model_fields_set contains the field | |
84 | - if self.dataset_type is None and "dataset_type" in self.model_fields_set: | |
85 | - _dict['datasetType'] = None | |
86 | - | |
87 | - # set to None if dataset_short_info (nullable) is None | |
88 | - # and model_fields_set contains the field | |
89 | - if self.dataset_short_info is None and "dataset_short_info" in self.model_fields_set: | |
90 | - _dict['datasetShortInfo'] = None | |
91 | - | |
92 | - # set to None if dataset_tags (nullable) is None | |
93 | - # and model_fields_set contains the field | |
94 | - if self.dataset_tags is None and "dataset_tags" in self.model_fields_set: | |
95 | - _dict['datasetTags'] = None | |
96 | - | |
97 | 82 | # set to None if dataset_type_interp (nullable) is None |
98 | 83 | # and model_fields_set contains the field |
99 | 84 | if self.dataset_type_interp is None and "dataset_type_interp" in self.model_fields_set: |
... | ... | @@ -104,15 +89,10 @@ class DatasetDetails(BaseModel): |
104 | 89 | if self.dataset_status_interp is None and "dataset_status_interp" in self.model_fields_set: |
105 | 90 | _dict['datasetStatusInterp'] = None |
106 | 91 | |
107 | - # set to None if created_on (nullable) is None | |
92 | + # set to None if version_no (nullable) is None | |
108 | 93 | # and model_fields_set contains the field |
109 | - if self.created_on is None and "created_on" in self.model_fields_set: | |
110 | - _dict['createdOn'] = None | |
111 | - | |
112 | - # set to None if modified_on (nullable) is None | |
113 | - # and model_fields_set contains the field | |
114 | - if self.modified_on is None and "modified_on" in self.model_fields_set: | |
115 | - _dict['modifiedOn'] = None | |
94 | + if self.version_no is None and "version_no" in self.model_fields_set: | |
95 | + _dict['versionNo'] = None | |
116 | 96 | |
117 | 97 | return _dict |
118 | 98 | |
... | ... | @@ -126,17 +106,17 @@ class DatasetDetails(BaseModel): |
126 | 106 | return cls.model_validate(obj) |
127 | 107 | |
128 | 108 | _obj = cls.model_validate({ |
129 | - "userId": obj.get("userId") if obj.get("userId") is not None else 0, | |
109 | + "datasetId": obj.get("datasetId"), | |
130 | 110 | "datasetName": obj.get("datasetName"), |
131 | 111 | "datasetType": obj.get("datasetType"), |
132 | - "datasetShortInfo": obj.get("datasetShortInfo"), | |
133 | - "datasetTags": obj.get("datasetTags"), | |
134 | - "datasetId": obj.get("datasetId"), | |
135 | 112 | "datasetTypeInterp": obj.get("datasetTypeInterp"), |
113 | + "datasetShortInfo": obj.get("datasetShortInfo"), | |
136 | 114 | "datasetStatus": obj.get("datasetStatus"), |
137 | 115 | "datasetStatusInterp": obj.get("datasetStatusInterp"), |
116 | + "datasetTags": obj.get("datasetTags"), | |
138 | 117 | "createdOn": obj.get("createdOn"), |
139 | - "modifiedOn": obj.get("modifiedOn") | |
118 | + "modifiedOn": obj.get("modifiedOn"), | |
119 | + "versionNo": obj.get("versionNo") | |
140 | 120 | }) |
141 | 121 | return _obj |
142 | 122 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework data microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -23,19 +23,19 @@ from typing import Any, ClassVar, Dict, List, Optional |
23 | 23 | from typing import Optional, Set |
24 | 24 | from typing_extensions import Self |
25 | 25 | |
26 | -class NewDatasetEntity(BaseModel): | |
26 | +class DatasetVersion(BaseModel): | |
27 | 27 | """ |
28 | - NewDatasetEntity | |
28 | + DatasetVersion | |
29 | 29 | """ # noqa: E501 |
30 | - dataset_id: StrictInt = Field(alias="datasetId") | |
30 | + id: StrictInt | |
31 | 31 | user_id: StrictInt = Field(alias="userId") |
32 | - ds_entity_name: StrictStr = Field(alias="dsEntityName") | |
33 | - entity_source: Optional[StrictStr] = Field(default=None, alias="entitySource") | |
34 | - collected_on: datetime = Field(alias="collectedOn") | |
35 | - labeling_algo: Optional[StrictStr] = Field(default=None, alias="labelingAlgo") | |
36 | - ds_entity_info: Dict[str, Any] = Field(alias="dsEntityInfo") | |
37 | - location_id: StrictInt = Field(alias="locationId") | |
38 | - __properties: ClassVar[List[str]] = ["datasetId", "userId", "dsEntityName", "entitySource", "collectedOn", "labelingAlgo", "dsEntityInfo", "locationId"] | |
32 | + dataset_id: StrictInt = Field(alias="datasetId") | |
33 | + version_availability: Optional[StrictInt] = Field(default=1, alias="versionAvailability") | |
34 | + version_no: Optional[StrictStr] = Field(default=None, alias="versionNo") | |
35 | + version_remark: Optional[StrictStr] = Field(default=None, alias="versionRemark") | |
36 | + created_on: datetime = Field(alias="createdOn") | |
37 | + modified_on: datetime = Field(alias="modifiedOn") | |
38 | + __properties: ClassVar[List[str]] = ["id", "userId", "datasetId", "versionAvailability", "versionNo", "versionRemark", "createdOn", "modifiedOn"] | |
39 | 39 | |
40 | 40 | model_config = ConfigDict( |
41 | 41 | populate_by_name=True, |
... | ... | @@ -55,7 +55,7 @@ class NewDatasetEntity(BaseModel): |
55 | 55 | |
56 | 56 | @classmethod |
57 | 57 | def from_json(cls, json_str: str) -> Optional[Self]: |
58 | - """Create an instance of NewDatasetEntity from a JSON string""" | |
58 | + """Create an instance of DatasetVersion from a JSON string""" | |
59 | 59 | return cls.from_dict(json.loads(json_str)) |
60 | 60 | |
61 | 61 | def to_dict(self) -> Dict[str, Any]: |
... | ... | @@ -76,21 +76,21 @@ class NewDatasetEntity(BaseModel): |
76 | 76 | exclude=excluded_fields, |
77 | 77 | exclude_none=True, |
78 | 78 | ) |
79 | - # set to None if entity_source (nullable) is None | |
79 | + # set to None if version_no (nullable) is None | |
80 | 80 | # and model_fields_set contains the field |
81 | - if self.entity_source is None and "entity_source" in self.model_fields_set: | |
82 | - _dict['entitySource'] = None | |
81 | + if self.version_no is None and "version_no" in self.model_fields_set: | |
82 | + _dict['versionNo'] = None | |
83 | 83 | |
84 | - # set to None if labeling_algo (nullable) is None | |
84 | + # set to None if version_remark (nullable) is None | |
85 | 85 | # and model_fields_set contains the field |
86 | - if self.labeling_algo is None and "labeling_algo" in self.model_fields_set: | |
87 | - _dict['labelingAlgo'] = None | |
86 | + if self.version_remark is None and "version_remark" in self.model_fields_set: | |
87 | + _dict['versionRemark'] = None | |
88 | 88 | |
89 | 89 | return _dict |
90 | 90 | |
91 | 91 | @classmethod |
92 | 92 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: |
93 | - """Create an instance of NewDatasetEntity from a dict""" | |
93 | + """Create an instance of DatasetVersion from a dict""" | |
94 | 94 | if obj is None: |
95 | 95 | return None |
96 | 96 | |
... | ... | @@ -98,14 +98,14 @@ class NewDatasetEntity(BaseModel): |
98 | 98 | return cls.model_validate(obj) |
99 | 99 | |
100 | 100 | _obj = cls.model_validate({ |
101 | - "datasetId": obj.get("datasetId"), | |
101 | + "id": obj.get("id"), | |
102 | 102 | "userId": obj.get("userId"), |
103 | - "dsEntityName": obj.get("dsEntityName"), | |
104 | - "entitySource": obj.get("entitySource"), | |
105 | - "collectedOn": obj.get("collectedOn"), | |
106 | - "labelingAlgo": obj.get("labelingAlgo"), | |
107 | - "dsEntityInfo": obj.get("dsEntityInfo"), | |
108 | - "locationId": obj.get("locationId") | |
103 | + "datasetId": obj.get("datasetId"), | |
104 | + "versionAvailability": obj.get("versionAvailability") if obj.get("versionAvailability") is not None else 1, | |
105 | + "versionNo": obj.get("versionNo"), | |
106 | + "versionRemark": obj.get("versionRemark"), | |
107 | + "createdOn": obj.get("createdOn"), | |
108 | + "modifiedOn": obj.get("modifiedOn") | |
109 | 109 | }) |
110 | 110 | return _obj |
111 | 111 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -19,7 +19,7 @@ import json |
19 | 19 | |
20 | 20 | from pydantic import BaseModel, ConfigDict |
21 | 21 | from typing import Any, ClassVar, Dict, List, Optional |
22 | -from openapi_client.models.validation_error import ValidationError | |
22 | +from kf_sdk.models.validation_error import ValidationError | |
23 | 23 | from typing import Optional, Set |
24 | 24 | from typing_extensions import Self |
25 | 25 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -17,18 +17,21 @@ import pprint |
17 | 17 | import re # noqa: F401 |
18 | 18 | import json |
19 | 19 | |
20 | -from pydantic import BaseModel, ConfigDict, Field, StrictStr | |
20 | +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr | |
21 | 21 | from typing import Any, ClassVar, Dict, List |
22 | 22 | from typing import Optional, Set |
23 | 23 | from typing_extensions import Self |
24 | 24 | |
25 | -class DeleteDatasetEntities(BaseModel): | |
25 | +class NewConfiguration(BaseModel): | |
26 | 26 | """ |
27 | - DeleteDatasetEntities | |
27 | + NewConfiguration | |
28 | 28 | """ # noqa: E501 |
29 | - dataset_entity_ids: List[StrictStr] = Field(alias="datasetEntityIds") | |
30 | - remark: StrictStr | |
31 | - __properties: ClassVar[List[str]] = ["datasetEntityIds", "remark"] | |
29 | + tag: StrictStr | |
30 | + info: StrictStr | |
31 | + config_id: StrictInt | |
32 | + config_interp: StrictStr | |
33 | + display_value: StrictStr | |
34 | + __properties: ClassVar[List[str]] = ["tag", "info", "config_id", "config_interp", "display_value"] | |
32 | 35 | |
33 | 36 | model_config = ConfigDict( |
34 | 37 | populate_by_name=True, |
... | ... | @@ -48,7 +51,7 @@ class DeleteDatasetEntities(BaseModel): |
48 | 51 | |
49 | 52 | @classmethod |
50 | 53 | def from_json(cls, json_str: str) -> Optional[Self]: |
51 | - """Create an instance of DeleteDatasetEntities from a JSON string""" | |
54 | + """Create an instance of NewConfiguration from a JSON string""" | |
52 | 55 | return cls.from_dict(json.loads(json_str)) |
53 | 56 | |
54 | 57 | def to_dict(self) -> Dict[str, Any]: |
... | ... | @@ -73,7 +76,7 @@ class DeleteDatasetEntities(BaseModel): |
73 | 76 | |
74 | 77 | @classmethod |
75 | 78 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: |
76 | - """Create an instance of DeleteDatasetEntities from a dict""" | |
79 | + """Create an instance of NewConfiguration from a dict""" | |
77 | 80 | if obj is None: |
78 | 81 | return None |
79 | 82 | |
... | ... | @@ -81,8 +84,11 @@ class DeleteDatasetEntities(BaseModel): |
81 | 84 | return cls.model_validate(obj) |
82 | 85 | |
83 | 86 | _obj = cls.model_validate({ |
84 | - "datasetEntityIds": obj.get("datasetEntityIds"), | |
85 | - "remark": obj.get("remark") | |
87 | + "tag": obj.get("tag"), | |
88 | + "info": obj.get("info"), | |
89 | + "config_id": obj.get("config_id"), | |
90 | + "config_interp": obj.get("config_interp"), | |
91 | + "display_value": obj.get("display_value") | |
86 | 92 | }) |
87 | 93 | return _obj |
88 | 94 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -17,7 +17,7 @@ import pprint |
17 | 17 | import re # noqa: F401 |
18 | 18 | import json |
19 | 19 | |
20 | -from pydantic import BaseModel, ConfigDict, Field, StrictStr | |
20 | +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr | |
21 | 21 | from typing import Any, ClassVar, Dict, List, Optional |
22 | 22 | from typing import Optional, Set |
23 | 23 | from typing_extensions import Self |
... | ... | @@ -28,8 +28,12 @@ class NewSession(BaseModel): |
28 | 28 | """ # noqa: E501 |
29 | 29 | login_id: StrictStr = Field(alias="loginId") |
30 | 30 | passwd: StrictStr |
31 | + token: Optional[StrictStr] = None | |
31 | 32 | ip_address: Optional[StrictStr] = Field(default='127.0.0.1', alias="ipAddress") |
32 | - __properties: ClassVar[List[str]] = ["loginId", "passwd", "ipAddress"] | |
33 | + token_expiry_date: Optional[StrictStr] = Field(default=None, alias="tokenExpiryDate") | |
34 | + user_id: Optional[StrictInt] = Field(default=None, alias="userId") | |
35 | + user_type_id: Optional[StrictInt] = Field(default=None, alias="userTypeId") | |
36 | + __properties: ClassVar[List[str]] = ["loginId", "passwd", "token", "ipAddress", "tokenExpiryDate", "userId", "userTypeId"] | |
33 | 37 | |
34 | 38 | model_config = ConfigDict( |
35 | 39 | populate_by_name=True, |
... | ... | @@ -70,6 +74,16 @@ class NewSession(BaseModel): |
70 | 74 | exclude=excluded_fields, |
71 | 75 | exclude_none=True, |
72 | 76 | ) |
77 | + # set to None if user_id (nullable) is None | |
78 | + # and model_fields_set contains the field | |
79 | + if self.user_id is None and "user_id" in self.model_fields_set: | |
80 | + _dict['userId'] = None | |
81 | + | |
82 | + # set to None if user_type_id (nullable) is None | |
83 | + # and model_fields_set contains the field | |
84 | + if self.user_type_id is None and "user_type_id" in self.model_fields_set: | |
85 | + _dict['userTypeId'] = None | |
86 | + | |
73 | 87 | return _dict |
74 | 88 | |
75 | 89 | @classmethod |
... | ... | @@ -84,7 +98,11 @@ class NewSession(BaseModel): |
84 | 98 | _obj = cls.model_validate({ |
85 | 99 | "loginId": obj.get("loginId"), |
86 | 100 | "passwd": obj.get("passwd"), |
87 | - "ipAddress": obj.get("ipAddress") if obj.get("ipAddress") is not None else '127.0.0.1' | |
101 | + "token": obj.get("token"), | |
102 | + "ipAddress": obj.get("ipAddress") if obj.get("ipAddress") is not None else '127.0.0.1', | |
103 | + "tokenExpiryDate": obj.get("tokenExpiryDate"), | |
104 | + "userId": obj.get("userId"), | |
105 | + "userTypeId": obj.get("userTypeId") | |
88 | 106 | }) |
89 | 107 | return _obj |
90 | 108 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -17,17 +17,18 @@ import pprint |
17 | 17 | import re # noqa: F401 |
18 | 18 | import json |
19 | 19 | |
20 | -from pydantic import BaseModel, ConfigDict, Field, StrictStr | |
20 | +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr | |
21 | 21 | from typing import Any, ClassVar, Dict, List |
22 | 22 | from typing import Optional, Set |
23 | 23 | from typing_extensions import Self |
24 | 24 | |
25 | -class ForgotPassword(BaseModel): | |
25 | +class OrganizationDetails(BaseModel): | |
26 | 26 | """ |
27 | - ForgotPassword | |
27 | + OrganizationDetails | |
28 | 28 | """ # noqa: E501 |
29 | - login_id: StrictStr = Field(alias="loginId") | |
30 | - __properties: ClassVar[List[str]] = ["loginId"] | |
29 | + org_id: StrictInt = Field(alias="orgId") | |
30 | + org_name: StrictStr = Field(alias="orgName") | |
31 | + __properties: ClassVar[List[str]] = ["orgId", "orgName"] | |
31 | 32 | |
32 | 33 | model_config = ConfigDict( |
33 | 34 | populate_by_name=True, |
... | ... | @@ -47,7 +48,7 @@ class ForgotPassword(BaseModel): |
47 | 48 | |
48 | 49 | @classmethod |
49 | 50 | def from_json(cls, json_str: str) -> Optional[Self]: |
50 | - """Create an instance of ForgotPassword from a JSON string""" | |
51 | + """Create an instance of OrganizationDetails from a JSON string""" | |
51 | 52 | return cls.from_dict(json.loads(json_str)) |
52 | 53 | |
53 | 54 | def to_dict(self) -> Dict[str, Any]: |
... | ... | @@ -72,7 +73,7 @@ class ForgotPassword(BaseModel): |
72 | 73 | |
73 | 74 | @classmethod |
74 | 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: |
75 | - """Create an instance of ForgotPassword from a dict""" | |
76 | + """Create an instance of OrganizationDetails from a dict""" | |
76 | 77 | if obj is None: |
77 | 78 | return None |
78 | 79 | |
... | ... | @@ -80,7 +81,8 @@ class ForgotPassword(BaseModel): |
80 | 81 | return cls.model_validate(obj) |
81 | 82 | |
82 | 83 | _obj = cls.model_validate({ |
83 | - "loginId": obj.get("loginId") | |
84 | + "orgId": obj.get("orgId"), | |
85 | + "orgName": obj.get("orgName") | |
84 | 86 | }) |
85 | 87 | return _obj |
86 | 88 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -17,17 +17,16 @@ from typing import Any, Dict, List, Optional, Tuple, Union |
17 | 17 | from typing_extensions import Annotated |
18 | 18 | |
19 | 19 | from pydantic import StrictInt |
20 | -from typing import Any, List | |
21 | -from openapi_client.models.location_details import LocationDetails | |
22 | -from openapi_client.models.new_location import NewLocation | |
23 | -from openapi_client.models.update_location import UpdateLocation | |
20 | +from typing import Any | |
21 | +from kappa_users.models.new_session import NewSession | |
22 | +from kappa_users.models.user_details import UserDetails | |
24 | 23 | |
25 | -from openapi_client.api_client import ApiClient, RequestSerialized | |
26 | -from openapi_client.api_response import ApiResponse | |
27 | -from openapi_client.rest import RESTResponseType | |
24 | +from kappa_users.api_client import ApiClient, RequestSerialized | |
25 | +from kappa_users.api_response import ApiResponse | |
26 | +from kappa_users.rest import RESTResponseType | |
28 | 27 | |
29 | 28 | |
30 | -class LocationManagementApi: | |
29 | +class SessionManagementApi: | |
31 | 30 | """NOTE: This class is auto generated by OpenAPI Generator |
32 | 31 | Ref: https://openapi-generator.tech |
33 | 32 | |
... | ... | @@ -41,11 +40,10 @@ class LocationManagementApi: |
41 | 40 | |
42 | 41 | |
43 | 42 | @validate_call |
44 | - def delete_location_locations_user_id_user_type_id_location_id_delete( | |
43 | + def delete_session_session_user_id_user_type_id_delete( | |
45 | 44 | self, |
46 | 45 | user_id: StrictInt, |
47 | 46 | user_type_id: StrictInt, |
48 | - location_id: StrictInt, | |
49 | 47 | _request_timeout: Union[ |
50 | 48 | None, |
51 | 49 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -59,15 +57,13 @@ class LocationManagementApi: |
59 | 57 | _headers: Optional[Dict[StrictStr, Any]] = None, |
60 | 58 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
61 | 59 | ) -> object: |
62 | - """Delete Location | |
60 | + """Delete Session | |
63 | 61 | |
64 | 62 | |
65 | 63 | :param user_id: (required) |
66 | 64 | :type user_id: int |
67 | 65 | :param user_type_id: (required) |
68 | 66 | :type user_type_id: int |
69 | - :param location_id: (required) | |
70 | - :type location_id: int | |
71 | 67 | :param _request_timeout: timeout setting for this request. If one |
72 | 68 | number provided, it will be total request |
73 | 69 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -90,10 +86,9 @@ class LocationManagementApi: |
90 | 86 | :return: Returns the result object. |
91 | 87 | """ # noqa: E501 |
92 | 88 | |
93 | - _param = self._delete_location_locations_user_id_user_type_id_location_id_delete_serialize( | |
89 | + _param = self._delete_session_session_user_id_user_type_id_delete_serialize( | |
94 | 90 | user_id=user_id, |
95 | 91 | user_type_id=user_type_id, |
96 | - location_id=location_id, | |
97 | 92 | _request_auth=_request_auth, |
98 | 93 | _content_type=_content_type, |
99 | 94 | _headers=_headers, |
... | ... | @@ -116,11 +111,10 @@ class LocationManagementApi: |
116 | 111 | |
117 | 112 | |
118 | 113 | @validate_call |
119 | - def delete_location_locations_user_id_user_type_id_location_id_delete_with_http_info( | |
114 | + def delete_session_session_user_id_user_type_id_delete_with_http_info( | |
120 | 115 | self, |
121 | 116 | user_id: StrictInt, |
122 | 117 | user_type_id: StrictInt, |
123 | - location_id: StrictInt, | |
124 | 118 | _request_timeout: Union[ |
125 | 119 | None, |
126 | 120 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -134,15 +128,13 @@ class LocationManagementApi: |
134 | 128 | _headers: Optional[Dict[StrictStr, Any]] = None, |
135 | 129 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
136 | 130 | ) -> ApiResponse[object]: |
137 | - """Delete Location | |
131 | + """Delete Session | |
138 | 132 | |
139 | 133 | |
140 | 134 | :param user_id: (required) |
141 | 135 | :type user_id: int |
142 | 136 | :param user_type_id: (required) |
143 | 137 | :type user_type_id: int |
144 | - :param location_id: (required) | |
145 | - :type location_id: int | |
146 | 138 | :param _request_timeout: timeout setting for this request. If one |
147 | 139 | number provided, it will be total request |
148 | 140 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -165,10 +157,9 @@ class LocationManagementApi: |
165 | 157 | :return: Returns the result object. |
166 | 158 | """ # noqa: E501 |
167 | 159 | |
168 | - _param = self._delete_location_locations_user_id_user_type_id_location_id_delete_serialize( | |
160 | + _param = self._delete_session_session_user_id_user_type_id_delete_serialize( | |
169 | 161 | user_id=user_id, |
170 | 162 | user_type_id=user_type_id, |
171 | - location_id=location_id, | |
172 | 163 | _request_auth=_request_auth, |
173 | 164 | _content_type=_content_type, |
174 | 165 | _headers=_headers, |
... | ... | @@ -191,11 +182,10 @@ class LocationManagementApi: |
191 | 182 | |
192 | 183 | |
193 | 184 | @validate_call |
194 | - def delete_location_locations_user_id_user_type_id_location_id_delete_without_preload_content( | |
185 | + def delete_session_session_user_id_user_type_id_delete_without_preload_content( | |
195 | 186 | self, |
196 | 187 | user_id: StrictInt, |
197 | 188 | user_type_id: StrictInt, |
198 | - location_id: StrictInt, | |
199 | 189 | _request_timeout: Union[ |
200 | 190 | None, |
201 | 191 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -209,15 +199,13 @@ class LocationManagementApi: |
209 | 199 | _headers: Optional[Dict[StrictStr, Any]] = None, |
210 | 200 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
211 | 201 | ) -> RESTResponseType: |
212 | - """Delete Location | |
202 | + """Delete Session | |
213 | 203 | |
214 | 204 | |
215 | 205 | :param user_id: (required) |
216 | 206 | :type user_id: int |
217 | 207 | :param user_type_id: (required) |
218 | 208 | :type user_type_id: int |
219 | - :param location_id: (required) | |
220 | - :type location_id: int | |
221 | 209 | :param _request_timeout: timeout setting for this request. If one |
222 | 210 | number provided, it will be total request |
223 | 211 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -240,10 +228,9 @@ class LocationManagementApi: |
240 | 228 | :return: Returns the result object. |
241 | 229 | """ # noqa: E501 |
242 | 230 | |
243 | - _param = self._delete_location_locations_user_id_user_type_id_location_id_delete_serialize( | |
231 | + _param = self._delete_session_session_user_id_user_type_id_delete_serialize( | |
244 | 232 | user_id=user_id, |
245 | 233 | user_type_id=user_type_id, |
246 | - location_id=location_id, | |
247 | 234 | _request_auth=_request_auth, |
248 | 235 | _content_type=_content_type, |
249 | 236 | _headers=_headers, |
... | ... | @@ -261,11 +248,10 @@ class LocationManagementApi: |
261 | 248 | return response_data.response |
262 | 249 | |
263 | 250 | |
264 | - def _delete_location_locations_user_id_user_type_id_location_id_delete_serialize( | |
251 | + def _delete_session_session_user_id_user_type_id_delete_serialize( | |
265 | 252 | self, |
266 | 253 | user_id, |
267 | 254 | user_type_id, |
268 | - location_id, | |
269 | 255 | _request_auth, |
270 | 256 | _content_type, |
271 | 257 | _headers, |
... | ... | @@ -291,8 +277,6 @@ class LocationManagementApi: |
291 | 277 | _path_params['user_id'] = user_id |
292 | 278 | if user_type_id is not None: |
293 | 279 | _path_params['user_type_id'] = user_type_id |
294 | - if location_id is not None: | |
295 | - _path_params['location_id'] = location_id | |
296 | 280 | # process the query parameters |
297 | 281 | # process the header parameters |
298 | 282 | # process the form parameters |
... | ... | @@ -310,11 +294,12 @@ class LocationManagementApi: |
310 | 294 | |
311 | 295 | # authentication setting |
312 | 296 | _auth_settings: List[str] = [ |
297 | + 'HTTPBearer' | |
313 | 298 | ] |
314 | 299 | |
315 | 300 | return self.api_client.param_serialize( |
316 | 301 | method='DELETE', |
317 | - resource_path='/locations/{user_id}/{user_type_id}/{location_id}', | |
302 | + resource_path='/session/{user_id}/{user_type_id}', | |
318 | 303 | path_params=_path_params, |
319 | 304 | query_params=_query_params, |
320 | 305 | header_params=_header_params, |
... | ... | @@ -331,7 +316,7 @@ class LocationManagementApi: |
331 | 316 | |
332 | 317 | |
333 | 318 | @validate_call |
334 | - def get_user_locations_locations_user_id_user_type_id_get( | |
319 | + def get_refresh_token_session_refresh_token_user_id_user_type_id_post( | |
335 | 320 | self, |
336 | 321 | user_id: StrictInt, |
337 | 322 | user_type_id: StrictInt, |
... | ... | @@ -347,292 +332,14 @@ class LocationManagementApi: |
347 | 332 | _content_type: Optional[StrictStr] = None, |
348 | 333 | _headers: Optional[Dict[StrictStr, Any]] = None, |
349 | 334 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
350 | - ) -> List[LocationDetails]: | |
351 | - """Get User Locations | |
352 | - | |
353 | - | |
354 | - :param user_id: (required) | |
355 | - :type user_id: int | |
356 | - :param user_type_id: (required) | |
357 | - :type user_type_id: int | |
358 | - :param _request_timeout: timeout setting for this request. If one | |
359 | - number provided, it will be total request | |
360 | - timeout. It can also be a pair (tuple) of | |
361 | - (connection, read) timeouts. | |
362 | - :type _request_timeout: int, tuple(int, int), optional | |
363 | - :param _request_auth: set to override the auth_settings for an a single | |
364 | - request; this effectively ignores the | |
365 | - authentication in the spec for a single request. | |
366 | - :type _request_auth: dict, optional | |
367 | - :param _content_type: force content-type for the request. | |
368 | - :type _content_type: str, Optional | |
369 | - :param _headers: set to override the headers for a single | |
370 | - request; this effectively ignores the headers | |
371 | - in the spec for a single request. | |
372 | - :type _headers: dict, optional | |
373 | - :param _host_index: set to override the host_index for a single | |
374 | - request; this effectively ignores the host_index | |
375 | - in the spec for a single request. | |
376 | - :type _host_index: int, optional | |
377 | - :return: Returns the result object. | |
378 | - """ # noqa: E501 | |
379 | - | |
380 | - _param = self._get_user_locations_locations_user_id_user_type_id_get_serialize( | |
381 | - user_id=user_id, | |
382 | - user_type_id=user_type_id, | |
383 | - _request_auth=_request_auth, | |
384 | - _content_type=_content_type, | |
385 | - _headers=_headers, | |
386 | - _host_index=_host_index | |
387 | - ) | |
388 | - | |
389 | - _response_types_map: Dict[str, Optional[str]] = { | |
390 | - '200': "List[LocationDetails]", | |
391 | - '422': "HTTPValidationError", | |
392 | - } | |
393 | - response_data = self.api_client.call_api( | |
394 | - *_param, | |
395 | - _request_timeout=_request_timeout | |
396 | - ) | |
397 | - response_data.read() | |
398 | - return self.api_client.response_deserialize( | |
399 | - response_data=response_data, | |
400 | - response_types_map=_response_types_map, | |
401 | - ).data | |
402 | - | |
403 | - | |
404 | - @validate_call | |
405 | - def get_user_locations_locations_user_id_user_type_id_get_with_http_info( | |
406 | - self, | |
407 | - user_id: StrictInt, | |
408 | - user_type_id: StrictInt, | |
409 | - _request_timeout: Union[ | |
410 | - None, | |
411 | - Annotated[StrictFloat, Field(gt=0)], | |
412 | - Tuple[ | |
413 | - Annotated[StrictFloat, Field(gt=0)], | |
414 | - Annotated[StrictFloat, Field(gt=0)] | |
415 | - ] | |
416 | - ] = None, | |
417 | - _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
418 | - _content_type: Optional[StrictStr] = None, | |
419 | - _headers: Optional[Dict[StrictStr, Any]] = None, | |
420 | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
421 | - ) -> ApiResponse[List[LocationDetails]]: | |
422 | - """Get User Locations | |
423 | - | |
424 | - | |
425 | - :param user_id: (required) | |
426 | - :type user_id: int | |
427 | - :param user_type_id: (required) | |
428 | - :type user_type_id: int | |
429 | - :param _request_timeout: timeout setting for this request. If one | |
430 | - number provided, it will be total request | |
431 | - timeout. It can also be a pair (tuple) of | |
432 | - (connection, read) timeouts. | |
433 | - :type _request_timeout: int, tuple(int, int), optional | |
434 | - :param _request_auth: set to override the auth_settings for an a single | |
435 | - request; this effectively ignores the | |
436 | - authentication in the spec for a single request. | |
437 | - :type _request_auth: dict, optional | |
438 | - :param _content_type: force content-type for the request. | |
439 | - :type _content_type: str, Optional | |
440 | - :param _headers: set to override the headers for a single | |
441 | - request; this effectively ignores the headers | |
442 | - in the spec for a single request. | |
443 | - :type _headers: dict, optional | |
444 | - :param _host_index: set to override the host_index for a single | |
445 | - request; this effectively ignores the host_index | |
446 | - in the spec for a single request. | |
447 | - :type _host_index: int, optional | |
448 | - :return: Returns the result object. | |
449 | - """ # noqa: E501 | |
450 | - | |
451 | - _param = self._get_user_locations_locations_user_id_user_type_id_get_serialize( | |
452 | - user_id=user_id, | |
453 | - user_type_id=user_type_id, | |
454 | - _request_auth=_request_auth, | |
455 | - _content_type=_content_type, | |
456 | - _headers=_headers, | |
457 | - _host_index=_host_index | |
458 | - ) | |
459 | - | |
460 | - _response_types_map: Dict[str, Optional[str]] = { | |
461 | - '200': "List[LocationDetails]", | |
462 | - '422': "HTTPValidationError", | |
463 | - } | |
464 | - response_data = self.api_client.call_api( | |
465 | - *_param, | |
466 | - _request_timeout=_request_timeout | |
467 | - ) | |
468 | - response_data.read() | |
469 | - return self.api_client.response_deserialize( | |
470 | - response_data=response_data, | |
471 | - response_types_map=_response_types_map, | |
472 | - ) | |
473 | - | |
474 | - | |
475 | - @validate_call | |
476 | - def get_user_locations_locations_user_id_user_type_id_get_without_preload_content( | |
477 | - self, | |
478 | - user_id: StrictInt, | |
479 | - user_type_id: StrictInt, | |
480 | - _request_timeout: Union[ | |
481 | - None, | |
482 | - Annotated[StrictFloat, Field(gt=0)], | |
483 | - Tuple[ | |
484 | - Annotated[StrictFloat, Field(gt=0)], | |
485 | - Annotated[StrictFloat, Field(gt=0)] | |
486 | - ] | |
487 | - ] = None, | |
488 | - _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
489 | - _content_type: Optional[StrictStr] = None, | |
490 | - _headers: Optional[Dict[StrictStr, Any]] = None, | |
491 | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
492 | - ) -> RESTResponseType: | |
493 | - """Get User Locations | |
494 | - | |
495 | - | |
496 | - :param user_id: (required) | |
497 | - :type user_id: int | |
498 | - :param user_type_id: (required) | |
499 | - :type user_type_id: int | |
500 | - :param _request_timeout: timeout setting for this request. If one | |
501 | - number provided, it will be total request | |
502 | - timeout. It can also be a pair (tuple) of | |
503 | - (connection, read) timeouts. | |
504 | - :type _request_timeout: int, tuple(int, int), optional | |
505 | - :param _request_auth: set to override the auth_settings for an a single | |
506 | - request; this effectively ignores the | |
507 | - authentication in the spec for a single request. | |
508 | - :type _request_auth: dict, optional | |
509 | - :param _content_type: force content-type for the request. | |
510 | - :type _content_type: str, Optional | |
511 | - :param _headers: set to override the headers for a single | |
512 | - request; this effectively ignores the headers | |
513 | - in the spec for a single request. | |
514 | - :type _headers: dict, optional | |
515 | - :param _host_index: set to override the host_index for a single | |
516 | - request; this effectively ignores the host_index | |
517 | - in the spec for a single request. | |
518 | - :type _host_index: int, optional | |
519 | - :return: Returns the result object. | |
520 | - """ # noqa: E501 | |
521 | - | |
522 | - _param = self._get_user_locations_locations_user_id_user_type_id_get_serialize( | |
523 | - user_id=user_id, | |
524 | - user_type_id=user_type_id, | |
525 | - _request_auth=_request_auth, | |
526 | - _content_type=_content_type, | |
527 | - _headers=_headers, | |
528 | - _host_index=_host_index | |
529 | - ) | |
530 | - | |
531 | - _response_types_map: Dict[str, Optional[str]] = { | |
532 | - '200': "List[LocationDetails]", | |
533 | - '422': "HTTPValidationError", | |
534 | - } | |
535 | - response_data = self.api_client.call_api( | |
536 | - *_param, | |
537 | - _request_timeout=_request_timeout | |
538 | - ) | |
539 | - return response_data.response | |
540 | - | |
541 | - | |
542 | - def _get_user_locations_locations_user_id_user_type_id_get_serialize( | |
543 | - self, | |
544 | - user_id, | |
545 | - user_type_id, | |
546 | - _request_auth, | |
547 | - _content_type, | |
548 | - _headers, | |
549 | - _host_index, | |
550 | - ) -> RequestSerialized: | |
551 | - | |
552 | - _host = None | |
553 | - | |
554 | - _collection_formats: Dict[str, str] = { | |
555 | - } | |
556 | - | |
557 | - _path_params: Dict[str, str] = {} | |
558 | - _query_params: List[Tuple[str, str]] = [] | |
559 | - _header_params: Dict[str, Optional[str]] = _headers or {} | |
560 | - _form_params: List[Tuple[str, str]] = [] | |
561 | - _files: Dict[ | |
562 | - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
563 | - ] = {} | |
564 | - _body_params: Optional[bytes] = None | |
565 | - | |
566 | - # process the path parameters | |
567 | - if user_id is not None: | |
568 | - _path_params['user_id'] = user_id | |
569 | - if user_type_id is not None: | |
570 | - _path_params['user_type_id'] = user_type_id | |
571 | - # process the query parameters | |
572 | - # process the header parameters | |
573 | - # process the form parameters | |
574 | - # process the body parameter | |
575 | - | |
576 | - | |
577 | - # set the HTTP header `Accept` | |
578 | - if 'Accept' not in _header_params: | |
579 | - _header_params['Accept'] = self.api_client.select_header_accept( | |
580 | - [ | |
581 | - 'application/json' | |
582 | - ] | |
583 | - ) | |
584 | - | |
585 | - | |
586 | - # authentication setting | |
587 | - _auth_settings: List[str] = [ | |
588 | - ] | |
589 | - | |
590 | - return self.api_client.param_serialize( | |
591 | - method='GET', | |
592 | - resource_path='/locations/{user_id}/{user_type_id}', | |
593 | - path_params=_path_params, | |
594 | - query_params=_query_params, | |
595 | - header_params=_header_params, | |
596 | - body=_body_params, | |
597 | - post_params=_form_params, | |
598 | - files=_files, | |
599 | - auth_settings=_auth_settings, | |
600 | - collection_formats=_collection_formats, | |
601 | - _host=_host, | |
602 | - _request_auth=_request_auth | |
603 | - ) | |
604 | - | |
605 | - | |
606 | - | |
607 | - | |
608 | - @validate_call | |
609 | - def new_location_locations_user_id_user_type_id_post( | |
610 | - self, | |
611 | - user_id: StrictInt, | |
612 | - user_type_id: StrictInt, | |
613 | - new_location: NewLocation, | |
614 | - _request_timeout: Union[ | |
615 | - None, | |
616 | - Annotated[StrictFloat, Field(gt=0)], | |
617 | - Tuple[ | |
618 | - Annotated[StrictFloat, Field(gt=0)], | |
619 | - Annotated[StrictFloat, Field(gt=0)] | |
620 | - ] | |
621 | - ] = None, | |
622 | - _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
623 | - _content_type: Optional[StrictStr] = None, | |
624 | - _headers: Optional[Dict[StrictStr, Any]] = None, | |
625 | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
626 | 335 | ) -> object: |
627 | - """New Location | |
336 | + """Get Refresh Token | |
628 | 337 | |
629 | 338 | |
630 | 339 | :param user_id: (required) |
631 | 340 | :type user_id: int |
632 | 341 | :param user_type_id: (required) |
633 | 342 | :type user_type_id: int |
634 | - :param new_location: (required) | |
635 | - :type new_location: NewLocation | |
636 | 343 | :param _request_timeout: timeout setting for this request. If one |
637 | 344 | number provided, it will be total request |
638 | 345 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -655,10 +362,9 @@ class LocationManagementApi: |
655 | 362 | :return: Returns the result object. |
656 | 363 | """ # noqa: E501 |
657 | 364 | |
658 | - _param = self._new_location_locations_user_id_user_type_id_post_serialize( | |
365 | + _param = self._get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( | |
659 | 366 | user_id=user_id, |
660 | 367 | user_type_id=user_type_id, |
661 | - new_location=new_location, | |
662 | 368 | _request_auth=_request_auth, |
663 | 369 | _content_type=_content_type, |
664 | 370 | _headers=_headers, |
... | ... | @@ -681,11 +387,10 @@ class LocationManagementApi: |
681 | 387 | |
682 | 388 | |
683 | 389 | @validate_call |
684 | - def new_location_locations_user_id_user_type_id_post_with_http_info( | |
390 | + def get_refresh_token_session_refresh_token_user_id_user_type_id_post_with_http_info( | |
685 | 391 | self, |
686 | 392 | user_id: StrictInt, |
687 | 393 | user_type_id: StrictInt, |
688 | - new_location: NewLocation, | |
689 | 394 | _request_timeout: Union[ |
690 | 395 | None, |
691 | 396 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -699,15 +404,13 @@ class LocationManagementApi: |
699 | 404 | _headers: Optional[Dict[StrictStr, Any]] = None, |
700 | 405 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
701 | 406 | ) -> ApiResponse[object]: |
702 | - """New Location | |
407 | + """Get Refresh Token | |
703 | 408 | |
704 | 409 | |
705 | 410 | :param user_id: (required) |
706 | 411 | :type user_id: int |
707 | 412 | :param user_type_id: (required) |
708 | 413 | :type user_type_id: int |
709 | - :param new_location: (required) | |
710 | - :type new_location: NewLocation | |
711 | 414 | :param _request_timeout: timeout setting for this request. If one |
712 | 415 | number provided, it will be total request |
713 | 416 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -730,10 +433,9 @@ class LocationManagementApi: |
730 | 433 | :return: Returns the result object. |
731 | 434 | """ # noqa: E501 |
732 | 435 | |
733 | - _param = self._new_location_locations_user_id_user_type_id_post_serialize( | |
436 | + _param = self._get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( | |
734 | 437 | user_id=user_id, |
735 | 438 | user_type_id=user_type_id, |
736 | - new_location=new_location, | |
737 | 439 | _request_auth=_request_auth, |
738 | 440 | _content_type=_content_type, |
739 | 441 | _headers=_headers, |
... | ... | @@ -756,11 +458,10 @@ class LocationManagementApi: |
756 | 458 | |
757 | 459 | |
758 | 460 | @validate_call |
759 | - def new_location_locations_user_id_user_type_id_post_without_preload_content( | |
461 | + def get_refresh_token_session_refresh_token_user_id_user_type_id_post_without_preload_content( | |
760 | 462 | self, |
761 | 463 | user_id: StrictInt, |
762 | 464 | user_type_id: StrictInt, |
763 | - new_location: NewLocation, | |
764 | 465 | _request_timeout: Union[ |
765 | 466 | None, |
766 | 467 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -774,15 +475,13 @@ class LocationManagementApi: |
774 | 475 | _headers: Optional[Dict[StrictStr, Any]] = None, |
775 | 476 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
776 | 477 | ) -> RESTResponseType: |
777 | - """New Location | |
478 | + """Get Refresh Token | |
778 | 479 | |
779 | 480 | |
780 | 481 | :param user_id: (required) |
781 | 482 | :type user_id: int |
782 | 483 | :param user_type_id: (required) |
783 | 484 | :type user_type_id: int |
784 | - :param new_location: (required) | |
785 | - :type new_location: NewLocation | |
786 | 485 | :param _request_timeout: timeout setting for this request. If one |
787 | 486 | number provided, it will be total request |
788 | 487 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -805,10 +504,9 @@ class LocationManagementApi: |
805 | 504 | :return: Returns the result object. |
806 | 505 | """ # noqa: E501 |
807 | 506 | |
808 | - _param = self._new_location_locations_user_id_user_type_id_post_serialize( | |
507 | + _param = self._get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( | |
809 | 508 | user_id=user_id, |
810 | 509 | user_type_id=user_type_id, |
811 | - new_location=new_location, | |
812 | 510 | _request_auth=_request_auth, |
813 | 511 | _content_type=_content_type, |
814 | 512 | _headers=_headers, |
... | ... | @@ -826,11 +524,10 @@ class LocationManagementApi: |
826 | 524 | return response_data.response |
827 | 525 | |
828 | 526 | |
829 | - def _new_location_locations_user_id_user_type_id_post_serialize( | |
527 | + def _get_refresh_token_session_refresh_token_user_id_user_type_id_post_serialize( | |
830 | 528 | self, |
831 | 529 | user_id, |
832 | 530 | user_type_id, |
833 | - new_location, | |
834 | 531 | _request_auth, |
835 | 532 | _content_type, |
836 | 533 | _headers, |
... | ... | @@ -860,8 +557,6 @@ class LocationManagementApi: |
860 | 557 | # process the header parameters |
861 | 558 | # process the form parameters |
862 | 559 | # process the body parameter |
863 | - if new_location is not None: | |
864 | - _body_params = new_location | |
865 | 560 | |
866 | 561 | |
867 | 562 | # set the HTTP header `Accept` |
... | ... | @@ -872,27 +567,15 @@ class LocationManagementApi: |
872 | 567 | ] |
873 | 568 | ) |
874 | 569 | |
875 | - # set the HTTP header `Content-Type` | |
876 | - if _content_type: | |
877 | - _header_params['Content-Type'] = _content_type | |
878 | - else: | |
879 | - _default_content_type = ( | |
880 | - self.api_client.select_header_content_type( | |
881 | - [ | |
882 | - 'application/json' | |
883 | - ] | |
884 | - ) | |
885 | - ) | |
886 | - if _default_content_type is not None: | |
887 | - _header_params['Content-Type'] = _default_content_type | |
888 | 570 | |
889 | 571 | # authentication setting |
890 | 572 | _auth_settings: List[str] = [ |
573 | + 'HTTPBearer' | |
891 | 574 | ] |
892 | 575 | |
893 | 576 | return self.api_client.param_serialize( |
894 | 577 | method='POST', |
895 | - resource_path='/locations/{user_id}/{user_type_id}', | |
578 | + resource_path='/session/refresh_token/{user_id}/{user_type_id}', | |
896 | 579 | path_params=_path_params, |
897 | 580 | query_params=_query_params, |
898 | 581 | header_params=_header_params, |
... | ... | @@ -909,11 +592,8 @@ class LocationManagementApi: |
909 | 592 | |
910 | 593 | |
911 | 594 | @validate_call |
912 | - def recover_location_locations_user_id_user_type_id_location_id_put( | |
595 | + def new_anonymous_session_session_anonymous_token_post( | |
913 | 596 | self, |
914 | - user_id: StrictInt, | |
915 | - user_type_id: StrictInt, | |
916 | - location_id: StrictInt, | |
917 | 597 | _request_timeout: Union[ |
918 | 598 | None, |
919 | 599 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -927,15 +607,9 @@ class LocationManagementApi: |
927 | 607 | _headers: Optional[Dict[StrictStr, Any]] = None, |
928 | 608 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
929 | 609 | ) -> object: |
930 | - """Recover Location | |
610 | + """New Anonymous Session | |
931 | 611 | |
932 | 612 | |
933 | - :param user_id: (required) | |
934 | - :type user_id: int | |
935 | - :param user_type_id: (required) | |
936 | - :type user_type_id: int | |
937 | - :param location_id: (required) | |
938 | - :type location_id: int | |
939 | 613 | :param _request_timeout: timeout setting for this request. If one |
940 | 614 | number provided, it will be total request |
941 | 615 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -958,10 +632,7 @@ class LocationManagementApi: |
958 | 632 | :return: Returns the result object. |
959 | 633 | """ # noqa: E501 |
960 | 634 | |
961 | - _param = self._recover_location_locations_user_id_user_type_id_location_id_put_serialize( | |
962 | - user_id=user_id, | |
963 | - user_type_id=user_type_id, | |
964 | - location_id=location_id, | |
635 | + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( | |
965 | 636 | _request_auth=_request_auth, |
966 | 637 | _content_type=_content_type, |
967 | 638 | _headers=_headers, |
... | ... | @@ -970,7 +641,6 @@ class LocationManagementApi: |
970 | 641 | |
971 | 642 | _response_types_map: Dict[str, Optional[str]] = { |
972 | 643 | '200': "object", |
973 | - '422': "HTTPValidationError", | |
974 | 644 | } |
975 | 645 | response_data = self.api_client.call_api( |
976 | 646 | *_param, |
... | ... | @@ -984,11 +654,8 @@ class LocationManagementApi: |
984 | 654 | |
985 | 655 | |
986 | 656 | @validate_call |
987 | - def recover_location_locations_user_id_user_type_id_location_id_put_with_http_info( | |
657 | + def new_anonymous_session_session_anonymous_token_post_with_http_info( | |
988 | 658 | self, |
989 | - user_id: StrictInt, | |
990 | - user_type_id: StrictInt, | |
991 | - location_id: StrictInt, | |
992 | 659 | _request_timeout: Union[ |
993 | 660 | None, |
994 | 661 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -1002,15 +669,9 @@ class LocationManagementApi: |
1002 | 669 | _headers: Optional[Dict[StrictStr, Any]] = None, |
1003 | 670 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
1004 | 671 | ) -> ApiResponse[object]: |
1005 | - """Recover Location | |
672 | + """New Anonymous Session | |
1006 | 673 | |
1007 | 674 | |
1008 | - :param user_id: (required) | |
1009 | - :type user_id: int | |
1010 | - :param user_type_id: (required) | |
1011 | - :type user_type_id: int | |
1012 | - :param location_id: (required) | |
1013 | - :type location_id: int | |
1014 | 675 | :param _request_timeout: timeout setting for this request. If one |
1015 | 676 | number provided, it will be total request |
1016 | 677 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -1033,10 +694,7 @@ class LocationManagementApi: |
1033 | 694 | :return: Returns the result object. |
1034 | 695 | """ # noqa: E501 |
1035 | 696 | |
1036 | - _param = self._recover_location_locations_user_id_user_type_id_location_id_put_serialize( | |
1037 | - user_id=user_id, | |
1038 | - user_type_id=user_type_id, | |
1039 | - location_id=location_id, | |
697 | + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( | |
1040 | 698 | _request_auth=_request_auth, |
1041 | 699 | _content_type=_content_type, |
1042 | 700 | _headers=_headers, |
... | ... | @@ -1045,7 +703,6 @@ class LocationManagementApi: |
1045 | 703 | |
1046 | 704 | _response_types_map: Dict[str, Optional[str]] = { |
1047 | 705 | '200': "object", |
1048 | - '422': "HTTPValidationError", | |
1049 | 706 | } |
1050 | 707 | response_data = self.api_client.call_api( |
1051 | 708 | *_param, |
... | ... | @@ -1059,11 +716,8 @@ class LocationManagementApi: |
1059 | 716 | |
1060 | 717 | |
1061 | 718 | @validate_call |
1062 | - def recover_location_locations_user_id_user_type_id_location_id_put_without_preload_content( | |
719 | + def new_anonymous_session_session_anonymous_token_post_without_preload_content( | |
1063 | 720 | self, |
1064 | - user_id: StrictInt, | |
1065 | - user_type_id: StrictInt, | |
1066 | - location_id: StrictInt, | |
1067 | 721 | _request_timeout: Union[ |
1068 | 722 | None, |
1069 | 723 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -1077,15 +731,9 @@ class LocationManagementApi: |
1077 | 731 | _headers: Optional[Dict[StrictStr, Any]] = None, |
1078 | 732 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
1079 | 733 | ) -> RESTResponseType: |
1080 | - """Recover Location | |
734 | + """New Anonymous Session | |
1081 | 735 | |
1082 | 736 | |
1083 | - :param user_id: (required) | |
1084 | - :type user_id: int | |
1085 | - :param user_type_id: (required) | |
1086 | - :type user_type_id: int | |
1087 | - :param location_id: (required) | |
1088 | - :type location_id: int | |
1089 | 737 | :param _request_timeout: timeout setting for this request. If one |
1090 | 738 | number provided, it will be total request |
1091 | 739 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -1108,10 +756,7 @@ class LocationManagementApi: |
1108 | 756 | :return: Returns the result object. |
1109 | 757 | """ # noqa: E501 |
1110 | 758 | |
1111 | - _param = self._recover_location_locations_user_id_user_type_id_location_id_put_serialize( | |
1112 | - user_id=user_id, | |
1113 | - user_type_id=user_type_id, | |
1114 | - location_id=location_id, | |
759 | + _param = self._new_anonymous_session_session_anonymous_token_post_serialize( | |
1115 | 760 | _request_auth=_request_auth, |
1116 | 761 | _content_type=_content_type, |
1117 | 762 | _headers=_headers, |
... | ... | @@ -1120,7 +765,6 @@ class LocationManagementApi: |
1120 | 765 | |
1121 | 766 | _response_types_map: Dict[str, Optional[str]] = { |
1122 | 767 | '200': "object", |
1123 | - '422': "HTTPValidationError", | |
1124 | 768 | } |
1125 | 769 | response_data = self.api_client.call_api( |
1126 | 770 | *_param, |
... | ... | @@ -1129,11 +773,8 @@ class LocationManagementApi: |
1129 | 773 | return response_data.response |
1130 | 774 | |
1131 | 775 | |
1132 | - def _recover_location_locations_user_id_user_type_id_location_id_put_serialize( | |
776 | + def _new_anonymous_session_session_anonymous_token_post_serialize( | |
1133 | 777 | self, |
1134 | - user_id, | |
1135 | - user_type_id, | |
1136 | - location_id, | |
1137 | 778 | _request_auth, |
1138 | 779 | _content_type, |
1139 | 780 | _headers, |
... | ... | @@ -1155,12 +796,6 @@ class LocationManagementApi: |
1155 | 796 | _body_params: Optional[bytes] = None |
1156 | 797 | |
1157 | 798 | # process the path parameters |
1158 | - if user_id is not None: | |
1159 | - _path_params['user_id'] = user_id | |
1160 | - if user_type_id is not None: | |
1161 | - _path_params['user_type_id'] = user_type_id | |
1162 | - if location_id is not None: | |
1163 | - _path_params['location_id'] = location_id | |
1164 | 799 | # process the query parameters |
1165 | 800 | # process the header parameters |
1166 | 801 | # process the form parameters |
... | ... | @@ -1181,8 +816,8 @@ class LocationManagementApi: |
1181 | 816 | ] |
1182 | 817 | |
1183 | 818 | return self.api_client.param_serialize( |
1184 | - method='PUT', | |
1185 | - resource_path='/locations/{user_id}/{user_type_id}/{location_id}', | |
819 | + method='POST', | |
820 | + resource_path='/session/anonymous_token', | |
1186 | 821 | path_params=_path_params, |
1187 | 822 | query_params=_query_params, |
1188 | 823 | header_params=_header_params, |
... | ... | @@ -1199,11 +834,9 @@ class LocationManagementApi: |
1199 | 834 | |
1200 | 835 | |
1201 | 836 | @validate_call |
1202 | - def update_location_locations_user_id_user_type_id_put( | |
837 | + def new_session_session_new_post( | |
1203 | 838 | self, |
1204 | - user_id: StrictInt, | |
1205 | - user_type_id: StrictInt, | |
1206 | - update_location: UpdateLocation, | |
839 | + new_session: NewSession, | |
1207 | 840 | _request_timeout: Union[ |
1208 | 841 | None, |
1209 | 842 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -1216,16 +849,12 @@ class LocationManagementApi: |
1216 | 849 | _content_type: Optional[StrictStr] = None, |
1217 | 850 | _headers: Optional[Dict[StrictStr, Any]] = None, |
1218 | 851 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
1219 | - ) -> object: | |
1220 | - """Update Location | |
852 | + ) -> UserDetails: | |
853 | + """New Session | |
1221 | 854 | |
1222 | 855 | |
1223 | - :param user_id: (required) | |
1224 | - :type user_id: int | |
1225 | - :param user_type_id: (required) | |
1226 | - :type user_type_id: int | |
1227 | - :param update_location: (required) | |
1228 | - :type update_location: UpdateLocation | |
856 | + :param new_session: (required) | |
857 | + :type new_session: NewSession | |
1229 | 858 | :param _request_timeout: timeout setting for this request. If one |
1230 | 859 | number provided, it will be total request |
1231 | 860 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -1248,10 +877,8 @@ class LocationManagementApi: |
1248 | 877 | :return: Returns the result object. |
1249 | 878 | """ # noqa: E501 |
1250 | 879 | |
1251 | - _param = self._update_location_locations_user_id_user_type_id_put_serialize( | |
1252 | - user_id=user_id, | |
1253 | - user_type_id=user_type_id, | |
1254 | - update_location=update_location, | |
880 | + _param = self._new_session_session_new_post_serialize( | |
881 | + new_session=new_session, | |
1255 | 882 | _request_auth=_request_auth, |
1256 | 883 | _content_type=_content_type, |
1257 | 884 | _headers=_headers, |
... | ... | @@ -1259,7 +886,7 @@ class LocationManagementApi: |
1259 | 886 | ) |
1260 | 887 | |
1261 | 888 | _response_types_map: Dict[str, Optional[str]] = { |
1262 | - '200': "object", | |
889 | + '200': "UserDetails", | |
1263 | 890 | '422': "HTTPValidationError", |
1264 | 891 | } |
1265 | 892 | response_data = self.api_client.call_api( |
... | ... | @@ -1274,11 +901,9 @@ class LocationManagementApi: |
1274 | 901 | |
1275 | 902 | |
1276 | 903 | @validate_call |
1277 | - def update_location_locations_user_id_user_type_id_put_with_http_info( | |
904 | + def new_session_session_new_post_with_http_info( | |
1278 | 905 | self, |
1279 | - user_id: StrictInt, | |
1280 | - user_type_id: StrictInt, | |
1281 | - update_location: UpdateLocation, | |
906 | + new_session: NewSession, | |
1282 | 907 | _request_timeout: Union[ |
1283 | 908 | None, |
1284 | 909 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -1291,16 +916,12 @@ class LocationManagementApi: |
1291 | 916 | _content_type: Optional[StrictStr] = None, |
1292 | 917 | _headers: Optional[Dict[StrictStr, Any]] = None, |
1293 | 918 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
1294 | - ) -> ApiResponse[object]: | |
1295 | - """Update Location | |
919 | + ) -> ApiResponse[UserDetails]: | |
920 | + """New Session | |
1296 | 921 | |
1297 | 922 | |
1298 | - :param user_id: (required) | |
1299 | - :type user_id: int | |
1300 | - :param user_type_id: (required) | |
1301 | - :type user_type_id: int | |
1302 | - :param update_location: (required) | |
1303 | - :type update_location: UpdateLocation | |
923 | + :param new_session: (required) | |
924 | + :type new_session: NewSession | |
1304 | 925 | :param _request_timeout: timeout setting for this request. If one |
1305 | 926 | number provided, it will be total request |
1306 | 927 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -1323,10 +944,8 @@ class LocationManagementApi: |
1323 | 944 | :return: Returns the result object. |
1324 | 945 | """ # noqa: E501 |
1325 | 946 | |
1326 | - _param = self._update_location_locations_user_id_user_type_id_put_serialize( | |
1327 | - user_id=user_id, | |
1328 | - user_type_id=user_type_id, | |
1329 | - update_location=update_location, | |
947 | + _param = self._new_session_session_new_post_serialize( | |
948 | + new_session=new_session, | |
1330 | 949 | _request_auth=_request_auth, |
1331 | 950 | _content_type=_content_type, |
1332 | 951 | _headers=_headers, |
... | ... | @@ -1334,7 +953,7 @@ class LocationManagementApi: |
1334 | 953 | ) |
1335 | 954 | |
1336 | 955 | _response_types_map: Dict[str, Optional[str]] = { |
1337 | - '200': "object", | |
956 | + '200': "UserDetails", | |
1338 | 957 | '422': "HTTPValidationError", |
1339 | 958 | } |
1340 | 959 | response_data = self.api_client.call_api( |
... | ... | @@ -1349,11 +968,9 @@ class LocationManagementApi: |
1349 | 968 | |
1350 | 969 | |
1351 | 970 | @validate_call |
1352 | - def update_location_locations_user_id_user_type_id_put_without_preload_content( | |
971 | + def new_session_session_new_post_without_preload_content( | |
1353 | 972 | self, |
1354 | - user_id: StrictInt, | |
1355 | - user_type_id: StrictInt, | |
1356 | - update_location: UpdateLocation, | |
973 | + new_session: NewSession, | |
1357 | 974 | _request_timeout: Union[ |
1358 | 975 | None, |
1359 | 976 | Annotated[StrictFloat, Field(gt=0)], |
... | ... | @@ -1367,15 +984,11 @@ class LocationManagementApi: |
1367 | 984 | _headers: Optional[Dict[StrictStr, Any]] = None, |
1368 | 985 | _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
1369 | 986 | ) -> RESTResponseType: |
1370 | - """Update Location | |
987 | + """New Session | |
1371 | 988 | |
1372 | 989 | |
1373 | - :param user_id: (required) | |
1374 | - :type user_id: int | |
1375 | - :param user_type_id: (required) | |
1376 | - :type user_type_id: int | |
1377 | - :param update_location: (required) | |
1378 | - :type update_location: UpdateLocation | |
990 | + :param new_session: (required) | |
991 | + :type new_session: NewSession | |
1379 | 992 | :param _request_timeout: timeout setting for this request. If one |
1380 | 993 | number provided, it will be total request |
1381 | 994 | timeout. It can also be a pair (tuple) of |
... | ... | @@ -1398,10 +1011,8 @@ class LocationManagementApi: |
1398 | 1011 | :return: Returns the result object. |
1399 | 1012 | """ # noqa: E501 |
1400 | 1013 | |
1401 | - _param = self._update_location_locations_user_id_user_type_id_put_serialize( | |
1402 | - user_id=user_id, | |
1403 | - user_type_id=user_type_id, | |
1404 | - update_location=update_location, | |
1014 | + _param = self._new_session_session_new_post_serialize( | |
1015 | + new_session=new_session, | |
1405 | 1016 | _request_auth=_request_auth, |
1406 | 1017 | _content_type=_content_type, |
1407 | 1018 | _headers=_headers, |
... | ... | @@ -1409,7 +1020,7 @@ class LocationManagementApi: |
1409 | 1020 | ) |
1410 | 1021 | |
1411 | 1022 | _response_types_map: Dict[str, Optional[str]] = { |
1412 | - '200': "object", | |
1023 | + '200': "UserDetails", | |
1413 | 1024 | '422': "HTTPValidationError", |
1414 | 1025 | } |
1415 | 1026 | response_data = self.api_client.call_api( |
... | ... | @@ -1419,11 +1030,9 @@ class LocationManagementApi: |
1419 | 1030 | return response_data.response |
1420 | 1031 | |
1421 | 1032 | |
1422 | - def _update_location_locations_user_id_user_type_id_put_serialize( | |
1033 | + def _new_session_session_new_post_serialize( | |
1423 | 1034 | self, |
1424 | - user_id, | |
1425 | - user_type_id, | |
1426 | - update_location, | |
1035 | + new_session, | |
1427 | 1036 | _request_auth, |
1428 | 1037 | _content_type, |
1429 | 1038 | _headers, |
... | ... | @@ -1445,16 +1054,12 @@ class LocationManagementApi: |
1445 | 1054 | _body_params: Optional[bytes] = None |
1446 | 1055 | |
1447 | 1056 | # process the path parameters |
1448 | - if user_id is not None: | |
1449 | - _path_params['user_id'] = user_id | |
1450 | - if user_type_id is not None: | |
1451 | - _path_params['user_type_id'] = user_type_id | |
1452 | 1057 | # process the query parameters |
1453 | 1058 | # process the header parameters |
1454 | 1059 | # process the form parameters |
1455 | 1060 | # process the body parameter |
1456 | - if update_location is not None: | |
1457 | - _body_params = update_location | |
1061 | + if new_session is not None: | |
1062 | + _body_params = new_session | |
1458 | 1063 | |
1459 | 1064 | |
1460 | 1065 | # set the HTTP header `Accept` |
... | ... | @@ -1484,8 +1089,8 @@ class LocationManagementApi: |
1484 | 1089 | ] |
1485 | 1090 | |
1486 | 1091 | return self.api_client.param_serialize( |
1487 | - method='PUT', | |
1488 | - resource_path='/locations/{user_id}/{user_type_id}', | |
1092 | + method='POST', | |
1093 | + resource_path='/session/new', | |
1489 | 1094 | path_params=_path_params, |
1490 | 1095 | query_params=_query_params, |
1491 | 1096 | header_params=_header_params, | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -17,8 +17,11 @@ import pprint |
17 | 17 | import re # noqa: F401 |
18 | 18 | import json |
19 | 19 | |
20 | +from datetime import datetime | |
20 | 21 | from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr |
21 | 22 | from typing import Any, ClassVar, Dict, List, Optional |
23 | +from kf_sdk.models.organization_details import OrganizationDetails | |
24 | +from kf_sdk.models.user_type_details import UserTypeDetails | |
22 | 25 | from typing import Optional, Set |
23 | 26 | from typing_extensions import Self |
24 | 27 | |
... | ... | @@ -26,20 +29,20 @@ class UserDetails(BaseModel): |
26 | 29 | """ |
27 | 30 | UserDetails |
28 | 31 | """ # noqa: E501 |
29 | - user_name: Optional[StrictStr] = Field(alias="userName") | |
32 | + user_id: StrictInt = Field(alias="userId") | |
33 | + user_name: StrictStr = Field(alias="userName") | |
30 | 34 | first_name: StrictStr = Field(alias="firstName") |
31 | 35 | middle_name: Optional[StrictStr] = Field(alias="middleName") |
32 | 36 | last_name: StrictStr = Field(alias="lastName") |
33 | 37 | email: StrictStr |
34 | - user_type_id: Optional[StrictInt] = Field(alias="userTypeId") | |
38 | + user_type_id: StrictInt = Field(alias="userTypeId") | |
35 | 39 | org_id: StrictInt = Field(alias="orgId") |
36 | - user_id: StrictInt = Field(alias="userId") | |
37 | - user_type: Optional[StrictStr] = Field(default=None, alias="userType") | |
38 | - org_name: Optional[StrictStr] = Field(default=None, alias="orgName") | |
39 | - token: Optional[StrictStr] = None | |
40 | - token_expiry_at: Optional[StrictStr] = Field(default=None, alias="tokenExpiryAt") | |
40 | + user_type_details: Optional[UserTypeDetails] = Field(default=None, alias="userTypeDetails") | |
41 | + org_details: Optional[OrganizationDetails] = Field(default=None, alias="orgDetails") | |
41 | 42 | profile_pic: Optional[StrictStr] = Field(default=None, alias="profilePic") |
42 | - __properties: ClassVar[List[str]] = ["userName", "firstName", "middleName", "lastName", "email", "userTypeId", "orgId", "userId", "userType", "orgName", "token", "tokenExpiryAt", "profilePic"] | |
43 | + token: Optional[StrictStr] = None | |
44 | + token_expiry_date: Optional[datetime] = Field(default=None, alias="tokenExpiryDate") | |
45 | + __properties: ClassVar[List[str]] = ["userId", "userName", "firstName", "middleName", "lastName", "email", "userTypeId", "orgId", "userTypeDetails", "orgDetails", "profilePic", "token", "tokenExpiryDate"] | |
43 | 46 | |
44 | 47 | model_config = ConfigDict( |
45 | 48 | populate_by_name=True, |
... | ... | @@ -80,45 +83,41 @@ class UserDetails(BaseModel): |
80 | 83 | exclude=excluded_fields, |
81 | 84 | exclude_none=True, |
82 | 85 | ) |
83 | - # set to None if user_name (nullable) is None | |
84 | - # and model_fields_set contains the field | |
85 | - if self.user_name is None and "user_name" in self.model_fields_set: | |
86 | - _dict['userName'] = None | |
87 | - | |
86 | + # override the default output from pydantic by calling `to_dict()` of user_type_details | |
87 | + if self.user_type_details: | |
88 | + _dict['userTypeDetails'] = self.user_type_details.to_dict() | |
89 | + # override the default output from pydantic by calling `to_dict()` of org_details | |
90 | + if self.org_details: | |
91 | + _dict['orgDetails'] = self.org_details.to_dict() | |
88 | 92 | # set to None if middle_name (nullable) is None |
89 | 93 | # and model_fields_set contains the field |
90 | 94 | if self.middle_name is None and "middle_name" in self.model_fields_set: |
91 | 95 | _dict['middleName'] = None |
92 | 96 | |
93 | - # set to None if user_type_id (nullable) is None | |
97 | + # set to None if user_type_details (nullable) is None | |
94 | 98 | # and model_fields_set contains the field |
95 | - if self.user_type_id is None and "user_type_id" in self.model_fields_set: | |
96 | - _dict['userTypeId'] = None | |
99 | + if self.user_type_details is None and "user_type_details" in self.model_fields_set: | |
100 | + _dict['userTypeDetails'] = None | |
97 | 101 | |
98 | - # set to None if user_type (nullable) is None | |
102 | + # set to None if org_details (nullable) is None | |
99 | 103 | # and model_fields_set contains the field |
100 | - if self.user_type is None and "user_type" in self.model_fields_set: | |
101 | - _dict['userType'] = None | |
104 | + if self.org_details is None and "org_details" in self.model_fields_set: | |
105 | + _dict['orgDetails'] = None | |
102 | 106 | |
103 | - # set to None if org_name (nullable) is None | |
107 | + # set to None if profile_pic (nullable) is None | |
104 | 108 | # and model_fields_set contains the field |
105 | - if self.org_name is None and "org_name" in self.model_fields_set: | |
106 | - _dict['orgName'] = None | |
109 | + if self.profile_pic is None and "profile_pic" in self.model_fields_set: | |
110 | + _dict['profilePic'] = None | |
107 | 111 | |
108 | 112 | # set to None if token (nullable) is None |
109 | 113 | # and model_fields_set contains the field |
110 | 114 | if self.token is None and "token" in self.model_fields_set: |
111 | 115 | _dict['token'] = None |
112 | 116 | |
113 | - # set to None if token_expiry_at (nullable) is None | |
114 | - # and model_fields_set contains the field | |
115 | - if self.token_expiry_at is None and "token_expiry_at" in self.model_fields_set: | |
116 | - _dict['tokenExpiryAt'] = None | |
117 | - | |
118 | - # set to None if profile_pic (nullable) is None | |
117 | + # set to None if token_expiry_date (nullable) is None | |
119 | 118 | # and model_fields_set contains the field |
120 | - if self.profile_pic is None and "profile_pic" in self.model_fields_set: | |
121 | - _dict['profilePic'] = None | |
119 | + if self.token_expiry_date is None and "token_expiry_date" in self.model_fields_set: | |
120 | + _dict['tokenExpiryDate'] = None | |
122 | 121 | |
123 | 122 | return _dict |
124 | 123 | |
... | ... | @@ -132,6 +131,7 @@ class UserDetails(BaseModel): |
132 | 131 | return cls.model_validate(obj) |
133 | 132 | |
134 | 133 | _obj = cls.model_validate({ |
134 | + "userId": obj.get("userId"), | |
135 | 135 | "userName": obj.get("userName"), |
136 | 136 | "firstName": obj.get("firstName"), |
137 | 137 | "middleName": obj.get("middleName"), |
... | ... | @@ -139,12 +139,11 @@ class UserDetails(BaseModel): |
139 | 139 | "email": obj.get("email"), |
140 | 140 | "userTypeId": obj.get("userTypeId"), |
141 | 141 | "orgId": obj.get("orgId"), |
142 | - "userId": obj.get("userId"), | |
143 | - "userType": obj.get("userType"), | |
144 | - "orgName": obj.get("orgName"), | |
142 | + "userTypeDetails": UserTypeDetails.from_dict(obj["userTypeDetails"]) if obj.get("userTypeDetails") is not None else None, | |
143 | + "orgDetails": OrganizationDetails.from_dict(obj["orgDetails"]) if obj.get("orgDetails") is not None else None, | |
144 | + "profilePic": obj.get("profilePic"), | |
145 | 145 | "token": obj.get("token"), |
146 | - "tokenExpiryAt": obj.get("tokenExpiryAt"), | |
147 | - "profilePic": obj.get("profilePic") | |
146 | + "tokenExpiryDate": obj.get("tokenExpiryDate") | |
148 | 147 | }) |
149 | 148 | return _obj |
150 | 149 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -22,13 +22,13 @@ from typing import Any, ClassVar, Dict, List |
22 | 22 | from typing import Optional, Set |
23 | 23 | from typing_extensions import Self |
24 | 24 | |
25 | -class StudentDetails(BaseModel): | |
25 | +class UserTypeDetails(BaseModel): | |
26 | 26 | """ |
27 | - StudentDetails | |
27 | + UserTypeDetails | |
28 | 28 | """ # noqa: E501 |
29 | - student_id: StrictInt = Field(alias="studentId") | |
30 | - student_name: StrictStr = Field(alias="studentName") | |
31 | - __properties: ClassVar[List[str]] = ["studentId", "studentName"] | |
29 | + user_type_id: StrictInt = Field(alias="userTypeId") | |
30 | + user_type: StrictStr = Field(alias="userType") | |
31 | + __properties: ClassVar[List[str]] = ["userTypeId", "userType"] | |
32 | 32 | |
33 | 33 | model_config = ConfigDict( |
34 | 34 | populate_by_name=True, |
... | ... | @@ -48,7 +48,7 @@ class StudentDetails(BaseModel): |
48 | 48 | |
49 | 49 | @classmethod |
50 | 50 | def from_json(cls, json_str: str) -> Optional[Self]: |
51 | - """Create an instance of StudentDetails from a JSON string""" | |
51 | + """Create an instance of UserTypeDetails from a JSON string""" | |
52 | 52 | return cls.from_dict(json.loads(json_str)) |
53 | 53 | |
54 | 54 | def to_dict(self) -> Dict[str, Any]: |
... | ... | @@ -73,7 +73,7 @@ class StudentDetails(BaseModel): |
73 | 73 | |
74 | 74 | @classmethod |
75 | 75 | def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: |
76 | - """Create an instance of StudentDetails from a dict""" | |
76 | + """Create an instance of UserTypeDetails from a dict""" | |
77 | 77 | if obj is None: |
78 | 78 | return None |
79 | 79 | |
... | ... | @@ -81,8 +81,8 @@ class StudentDetails(BaseModel): |
81 | 81 | return cls.model_validate(obj) |
82 | 82 | |
83 | 83 | _obj = cls.model_validate({ |
84 | - "studentId": obj.get("studentId"), | |
85 | - "studentName": obj.get("studentName") | |
84 | + "userTypeId": obj.get("userTypeId"), | |
85 | + "userType": obj.get("userType") | |
86 | 86 | }) |
87 | 87 | return _obj |
88 | 88 | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -19,7 +19,7 @@ import json |
19 | 19 | |
20 | 20 | from pydantic import BaseModel, ConfigDict, StrictStr |
21 | 21 | from typing import Any, ClassVar, Dict, List |
22 | -from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner | |
22 | +from kappa_users.models.location_inner import LocationInner | |
23 | 23 | from typing import Optional, Set |
24 | 24 | from typing_extensions import Self |
25 | 25 | |
... | ... | @@ -27,7 +27,7 @@ class ValidationError(BaseModel): |
27 | 27 | """ |
28 | 28 | ValidationError |
29 | 29 | """ # noqa: E501 |
30 | - loc: List[ValidationErrorLocInner] | |
30 | + loc: List[LocationInner] | |
31 | 31 | msg: StrictStr |
32 | 32 | type: StrictStr |
33 | 33 | __properties: ClassVar[List[str]] = ["loc", "msg", "type"] |
... | ... | @@ -90,7 +90,7 @@ class ValidationError(BaseModel): |
90 | 90 | return cls.model_validate(obj) |
91 | 91 | |
92 | 92 | _obj = cls.model_validate({ |
93 | - "loc": [ValidationErrorLocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, | |
93 | + "loc": [LocationInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, | |
94 | 94 | "msg": obj.get("msg"), |
95 | 95 | "type": obj.get("type") |
96 | 96 | }) | ... | ... |
1 | 1 | # coding: utf-8 |
2 | 2 | |
3 | 3 | """ |
4 | - FastAPI | |
4 | + Kappa-framework user microservices | |
5 | 5 | |
6 | 6 | No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
7 | 7 | |
... | ... | @@ -19,7 +19,7 @@ import ssl |
19 | 19 | |
20 | 20 | import urllib3 |
21 | 21 | |
22 | -from openapi_client.exceptions import ApiException, ApiValueError | |
22 | +from kf_sdk.exceptions import ApiException, ApiValueError | |
23 | 23 | |
24 | 24 | SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} |
25 | 25 | RESTResponseType = urllib3.HTTPResponse | ... | ... |
openapi_client/__init__.py
deleted
100644 → 0
1 | -# coding: utf-8 | |
2 | - | |
3 | -# flake8: noqa | |
4 | - | |
5 | -""" | |
6 | - FastAPI | |
7 | - | |
8 | - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |
9 | - | |
10 | - The version of the OpenAPI document: 0.1.0 | |
11 | - Generated by OpenAPI Generator (https://openapi-generator.tech) | |
12 | - | |
13 | - Do not edit the class manually. | |
14 | -""" # noqa: E501 | |
15 | - | |
16 | - | |
17 | -__version__ = "1.0.0" | |
18 | - | |
19 | -# import apis into sdk package | |
20 | -from openapi_client.api.dashboard_data_api import DashboardDataApi | |
21 | -from openapi_client.api.dataset_management_api import DatasetManagementApi | |
22 | -from openapi_client.api.location_management_api import LocationManagementApi | |
23 | -from openapi_client.api.session_management_api import SessionManagementApi | |
24 | -from openapi_client.api.users_management_api import UsersManagementApi | |
25 | - | |
26 | -# import ApiClient | |
27 | -from openapi_client.api_response import ApiResponse | |
28 | -from openapi_client.api_client import ApiClient | |
29 | -from openapi_client.configuration import Configuration | |
30 | -from openapi_client.exceptions import OpenApiException | |
31 | -from openapi_client.exceptions import ApiTypeError | |
32 | -from openapi_client.exceptions import ApiValueError | |
33 | -from openapi_client.exceptions import ApiKeyError | |
34 | -from openapi_client.exceptions import ApiAttributeError | |
35 | -from openapi_client.exceptions import ApiException | |
36 | - | |
37 | -# import models into sdk package | |
38 | -from openapi_client.models.dataset_details import DatasetDetails | |
39 | -from openapi_client.models.dataset_entity_details import DatasetEntityDetails | |
40 | -from openapi_client.models.delete_dataset_entities import DeleteDatasetEntities | |
41 | -from openapi_client.models.entity_file_details import EntityFileDetails | |
42 | -from openapi_client.models.forgot_password import ForgotPassword | |
43 | -from openapi_client.models.http_validation_error import HTTPValidationError | |
44 | -from openapi_client.models.location_details import LocationDetails | |
45 | -from openapi_client.models.new_dataset import NewDataset | |
46 | -from openapi_client.models.new_dataset_entity import NewDatasetEntity | |
47 | -from openapi_client.models.new_location import NewLocation | |
48 | -from openapi_client.models.new_session import NewSession | |
49 | -from openapi_client.models.new_student import NewStudent | |
50 | -from openapi_client.models.reset_password import ResetPassword | |
51 | -from openapi_client.models.student_details import StudentDetails | |
52 | -from openapi_client.models.update_dataset_entity import UpdateDatasetEntity | |
53 | -from openapi_client.models.update_location import UpdateLocation | |
54 | -from openapi_client.models.update_user import UpdateUser | |
55 | -from openapi_client.models.user_details import UserDetails | |
56 | -from openapi_client.models.validation_error import ValidationError | |
57 | -from openapi_client.models.validation_error_loc_inner import ValidationErrorLocInner |
openapi_client/api/__init__.py
deleted
100644 → 0
1 | -# flake8: noqa | |
2 | - | |
3 | -# import apis into api package | |
4 | -from openapi_client.api.dashboard_data_api import DashboardDataApi | |
5 | -from openapi_client.api.dataset_management_api import DatasetManagementApi | |
6 | -from openapi_client.api.location_management_api import LocationManagementApi | |
7 | -from openapi_client.api.session_management_api import SessionManagementApi | |
8 | -from openapi_client.api.users_management_api import UsersManagementApi | |
9 | - |
1 | -# coding: utf-8 | |
2 | - | |
3 | -""" | |
4 | - FastAPI | |
5 | - | |
6 | - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |
7 | - | |
8 | - The version of the OpenAPI document: 0.1.0 | |
9 | - Generated by OpenAPI Generator (https://openapi-generator.tech) | |
10 | - | |
11 | - Do not edit the class manually. | |
12 | -""" # noqa: E501 | |
13 | - | |
14 | -import warnings | |
15 | -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt | |
16 | -from typing import Any, Dict, List, Optional, Tuple, Union | |
17 | -from typing_extensions import Annotated | |
18 | - | |
19 | -from pydantic import StrictInt | |
20 | -from typing import Any | |
21 | - | |
22 | -from openapi_client.api_client import ApiClient, RequestSerialized | |
23 | -from openapi_client.api_response import ApiResponse | |
24 | -from openapi_client.rest import RESTResponseType | |
25 | - | |
26 | - | |
27 | -class DashboardDataApi: | |
28 | - """NOTE: This class is auto generated by OpenAPI Generator | |
29 | - Ref: https://openapi-generator.tech | |
30 | - | |
31 | - Do not edit the class manually. | |
32 | - """ | |
33 | - | |
34 | - def __init__(self, api_client=None) -> None: | |
35 | - if api_client is None: | |
36 | - api_client = ApiClient.get_default() | |
37 | - self.api_client = api_client | |
38 | - | |
39 | - | |
40 | - @validate_call | |
41 | - def get_dashboard_data_dashboard_user_id_user_type_id_get( | |
42 | - self, | |
43 | - user_id: StrictInt, | |
44 | - user_type_id: StrictInt, | |
45 | - _request_timeout: Union[ | |
46 | - None, | |
47 | - Annotated[StrictFloat, Field(gt=0)], | |
48 | - Tuple[ | |
49 | - Annotated[StrictFloat, Field(gt=0)], | |
50 | - Annotated[StrictFloat, Field(gt=0)] | |
51 | - ] | |
52 | - ] = None, | |
53 | - _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
54 | - _content_type: Optional[StrictStr] = None, | |
55 | - _headers: Optional[Dict[StrictStr, Any]] = None, | |
56 | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
57 | - ) -> object: | |
58 | - """Get Dashboard Data | |
59 | - | |
60 | - | |
61 | - :param user_id: (required) | |
62 | - :type user_id: int | |
63 | - :param user_type_id: (required) | |
64 | - :type user_type_id: int | |
65 | - :param _request_timeout: timeout setting for this request. If one | |
66 | - number provided, it will be total request | |
67 | - timeout. It can also be a pair (tuple) of | |
68 | - (connection, read) timeouts. | |
69 | - :type _request_timeout: int, tuple(int, int), optional | |
70 | - :param _request_auth: set to override the auth_settings for an a single | |
71 | - request; this effectively ignores the | |
72 | - authentication in the spec for a single request. | |
73 | - :type _request_auth: dict, optional | |
74 | - :param _content_type: force content-type for the request. | |
75 | - :type _content_type: str, Optional | |
76 | - :param _headers: set to override the headers for a single | |
77 | - request; this effectively ignores the headers | |
78 | - in the spec for a single request. | |
79 | - :type _headers: dict, optional | |
80 | - :param _host_index: set to override the host_index for a single | |
81 | - request; this effectively ignores the host_index | |
82 | - in the spec for a single request. | |
83 | - :type _host_index: int, optional | |
84 | - :return: Returns the result object. | |
85 | - """ # noqa: E501 | |
86 | - | |
87 | - _param = self._get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( | |
88 | - user_id=user_id, | |
89 | - user_type_id=user_type_id, | |
90 | - _request_auth=_request_auth, | |
91 | - _content_type=_content_type, | |
92 | - _headers=_headers, | |
93 | - _host_index=_host_index | |
94 | - ) | |
95 | - | |
96 | - _response_types_map: Dict[str, Optional[str]] = { | |
97 | - '200': "object", | |
98 | - '422': "HTTPValidationError", | |
99 | - } | |
100 | - response_data = self.api_client.call_api( | |
101 | - *_param, | |
102 | - _request_timeout=_request_timeout | |
103 | - ) | |
104 | - response_data.read() | |
105 | - return self.api_client.response_deserialize( | |
106 | - response_data=response_data, | |
107 | - response_types_map=_response_types_map, | |
108 | - ).data | |
109 | - | |
110 | - | |
111 | - @validate_call | |
112 | - def get_dashboard_data_dashboard_user_id_user_type_id_get_with_http_info( | |
113 | - self, | |
114 | - user_id: StrictInt, | |
115 | - user_type_id: StrictInt, | |
116 | - _request_timeout: Union[ | |
117 | - None, | |
118 | - Annotated[StrictFloat, Field(gt=0)], | |
119 | - Tuple[ | |
120 | - Annotated[StrictFloat, Field(gt=0)], | |
121 | - Annotated[StrictFloat, Field(gt=0)] | |
122 | - ] | |
123 | - ] = None, | |
124 | - _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
125 | - _content_type: Optional[StrictStr] = None, | |
126 | - _headers: Optional[Dict[StrictStr, Any]] = None, | |
127 | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
128 | - ) -> ApiResponse[object]: | |
129 | - """Get Dashboard Data | |
130 | - | |
131 | - | |
132 | - :param user_id: (required) | |
133 | - :type user_id: int | |
134 | - :param user_type_id: (required) | |
135 | - :type user_type_id: int | |
136 | - :param _request_timeout: timeout setting for this request. If one | |
137 | - number provided, it will be total request | |
138 | - timeout. It can also be a pair (tuple) of | |
139 | - (connection, read) timeouts. | |
140 | - :type _request_timeout: int, tuple(int, int), optional | |
141 | - :param _request_auth: set to override the auth_settings for an a single | |
142 | - request; this effectively ignores the | |
143 | - authentication in the spec for a single request. | |
144 | - :type _request_auth: dict, optional | |
145 | - :param _content_type: force content-type for the request. | |
146 | - :type _content_type: str, Optional | |
147 | - :param _headers: set to override the headers for a single | |
148 | - request; this effectively ignores the headers | |
149 | - in the spec for a single request. | |
150 | - :type _headers: dict, optional | |
151 | - :param _host_index: set to override the host_index for a single | |
152 | - request; this effectively ignores the host_index | |
153 | - in the spec for a single request. | |
154 | - :type _host_index: int, optional | |
155 | - :return: Returns the result object. | |
156 | - """ # noqa: E501 | |
157 | - | |
158 | - _param = self._get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( | |
159 | - user_id=user_id, | |
160 | - user_type_id=user_type_id, | |
161 | - _request_auth=_request_auth, | |
162 | - _content_type=_content_type, | |
163 | - _headers=_headers, | |
164 | - _host_index=_host_index | |
165 | - ) | |
166 | - | |
167 | - _response_types_map: Dict[str, Optional[str]] = { | |
168 | - '200': "object", | |
169 | - '422': "HTTPValidationError", | |
170 | - } | |
171 | - response_data = self.api_client.call_api( | |
172 | - *_param, | |
173 | - _request_timeout=_request_timeout | |
174 | - ) | |
175 | - response_data.read() | |
176 | - return self.api_client.response_deserialize( | |
177 | - response_data=response_data, | |
178 | - response_types_map=_response_types_map, | |
179 | - ) | |
180 | - | |
181 | - | |
182 | - @validate_call | |
183 | - def get_dashboard_data_dashboard_user_id_user_type_id_get_without_preload_content( | |
184 | - self, | |
185 | - user_id: StrictInt, | |
186 | - user_type_id: StrictInt, | |
187 | - _request_timeout: Union[ | |
188 | - None, | |
189 | - Annotated[StrictFloat, Field(gt=0)], | |
190 | - Tuple[ | |
191 | - Annotated[StrictFloat, Field(gt=0)], | |
192 | - Annotated[StrictFloat, Field(gt=0)] | |
193 | - ] | |
194 | - ] = None, | |
195 | - _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
196 | - _content_type: Optional[StrictStr] = None, | |
197 | - _headers: Optional[Dict[StrictStr, Any]] = None, | |
198 | - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
199 | - ) -> RESTResponseType: | |
200 | - """Get Dashboard Data | |
201 | - | |
202 | - | |
203 | - :param user_id: (required) | |
204 | - :type user_id: int | |
205 | - :param user_type_id: (required) | |
206 | - :type user_type_id: int | |
207 | - :param _request_timeout: timeout setting for this request. If one | |
208 | - number provided, it will be total request | |
209 | - timeout. It can also be a pair (tuple) of | |
210 | - (connection, read) timeouts. | |
211 | - :type _request_timeout: int, tuple(int, int), optional | |
212 | - :param _request_auth: set to override the auth_settings for an a single | |
213 | - request; this effectively ignores the | |
214 | - authentication in the spec for a single request. | |
215 | - :type _request_auth: dict, optional | |
216 | - :param _content_type: force content-type for the request. | |
217 | - :type _content_type: str, Optional | |
218 | - :param _headers: set to override the headers for a single | |
219 | - request; this effectively ignores the headers | |
220 | - in the spec for a single request. | |
221 | - :type _headers: dict, optional | |
222 | - :param _host_index: set to override the host_index for a single | |
223 | - request; this effectively ignores the host_index | |
224 | - in the spec for a single request. | |
225 | - :type _host_index: int, optional | |
226 | - :return: Returns the result object. | |
227 | - """ # noqa: E501 | |
228 | - | |
229 | - _param = self._get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( | |
230 | - user_id=user_id, | |
231 | - user_type_id=user_type_id, | |
232 | - _request_auth=_request_auth, | |
233 | - _content_type=_content_type, | |
234 | - _headers=_headers, | |
235 | - _host_index=_host_index | |
236 | - ) | |
237 | - | |
238 | - _response_types_map: Dict[str, Optional[str]] = { | |
239 | - '200': "object", | |
240 | - '422': "HTTPValidationError", | |
241 | - } | |
242 | - response_data = self.api_client.call_api( | |
243 | - *_param, | |
244 | - _request_timeout=_request_timeout | |
245 | - ) | |
246 | - return response_data.response | |
247 | - | |
248 | - | |
249 | - def _get_dashboard_data_dashboard_user_id_user_type_id_get_serialize( | |
250 | - self, | |
251 | - user_id, | |
252 | - user_type_id, | |
253 | - _request_auth, | |
254 | - _content_type, | |
255 | - _headers, | |
256 | - _host_index, | |
257 | - ) -> RequestSerialized: | |
258 | - | |
259 | - _host = None | |
260 | - | |
261 | - _collection_formats: Dict[str, str] = { | |
262 | - } | |
263 | - | |
264 | - _path_params: Dict[str, str] = {} | |
265 | - _query_params: List[Tuple[str, str]] = [] | |
266 | - _header_params: Dict[str, Optional[str]] = _headers or {} | |
267 | - _form_params: List[Tuple[str, str]] = [] | |
268 | - _files: Dict[ | |
269 | - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
270 | - ] = {} | |
271 | - _body_params: Optional[bytes] = None | |
272 | - | |
273 | - # process the path parameters | |
274 | - if user_id is not None: | |
275 | - _path_params['user_id'] = user_id | |
276 | - if user_type_id is not None: | |
277 | - _path_params['user_type_id'] = user_type_id | |
278 | - # process the query parameters | |
279 | - # process the header parameters | |
280 | - # process the form parameters | |
281 | - # process the body parameter | |
282 | - | |
283 | - | |
284 | - # set the HTTP header `Accept` | |
285 | - if 'Accept' not in _header_params: | |
286 | - _header_params['Accept'] = self.api_client.select_header_accept( | |
287 | - [ | |
288 | - 'application/json' | |
289 | - ] | |
290 | - ) | |
291 | - | |
292 | - | |
293 | - # authentication setting | |
294 | - _auth_settings: List[str] = [ | |
295 | - ] | |
296 | - | |
297 | - return self.api_client.param_serialize( | |
298 | - method='GET', | |
299 | - resource_path='/dashboard/{user_id}/{user_type_id}', | |
300 | - path_params=_path_params, | |
301 | - query_params=_query_params, | |
302 | - header_params=_header_params, | |
303 | - body=_body_params, | |
304 | - post_params=_form_params, | |
305 | - files=_files, | |
306 | - auth_settings=_auth_settings, | |
307 | - collection_formats=_collection_formats, | |
308 | - _host=_host, | |
309 | - _request_auth=_request_auth | |
310 | - ) | |
311 | - | |
312 | - |
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment