neurograph-core 1.202509242146__py3-none-any.whl → 1.202509282026__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. neurograph/v1/__init__.py +72 -6
  2. neurograph/v1/api/__init__.py +4 -0
  3. neurograph/v1/api/admin_api.py +575 -0
  4. neurograph/v1/api/dagster_api.py +2 -1
  5. neurograph/v1/api/knowledge_api.py +3 -6
  6. neurograph/v1/api/lookup_api.py +277 -27
  7. neurograph/v1/api/organization_api.py +1 -537
  8. neurograph/v1/api/persona_api.py +29 -16
  9. neurograph/v1/api/user_api.py +1356 -0
  10. neurograph/v1/models/__init__.py +44 -4
  11. neurograph/v1/models/admin_permission_response.py +95 -0
  12. neurograph/v1/models/admin_set_permission_request.py +91 -0
  13. neurograph/v1/models/admin_upsert_user_request.py +91 -0
  14. neurograph/v1/models/admin_upsert_user_response.py +99 -0
  15. neurograph/v1/models/admin_user.py +97 -0
  16. neurograph/v1/models/admin_user_detail_response.py +121 -0
  17. neurograph/v1/models/admin_users_get_many_response.py +97 -0
  18. neurograph/v1/models/admin_users_org_response.py +97 -0
  19. neurograph/v1/models/db_account_organization_brand.py +109 -0
  20. neurograph/v1/models/db_lookup_environment.py +95 -0
  21. neurograph/v1/models/db_my_client.py +99 -0
  22. neurograph/v1/models/db_my_org.py +121 -0
  23. neurograph/v1/models/db_user_client_role.py +93 -0
  24. neurograph/v1/models/db_user_in_db.py +127 -0
  25. neurograph/v1/models/db_user_org_role.py +93 -0
  26. neurograph/v1/models/db_user_role.py +91 -0
  27. neurograph/v1/models/{lookup_lookup_language_response.py → lookup_language_response.py} +4 -4
  28. neurograph/v1/models/lookup_lookup_environments_response.py +97 -0
  29. neurograph/v1/models/lookup_role.py +89 -0
  30. neurograph/v1/models/lookup_roles_response.py +97 -0
  31. neurograph/v1/models/{lookup_lookup_state_response.py → lookup_states_response.py} +4 -4
  32. neurograph/v1/models/me_my_profile_response.py +115 -0
  33. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/METADATA +1 -1
  34. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/RECORD +36 -14
  35. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/WHEEL +0 -0
  36. {neurograph_core-1.202509242146.dist-info → neurograph_core-1.202509282026.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1356 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Neurograph Core
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 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 Field, StrictInt, StrictStr
20
+ from typing_extensions import Annotated
21
+ from neurograph.v1.models.admin_upsert_user_request import AdminUpsertUserRequest
22
+ from neurograph.v1.models.admin_upsert_user_response import AdminUpsertUserResponse
23
+ from neurograph.v1.models.admin_user_detail_response import AdminUserDetailResponse
24
+ from neurograph.v1.models.admin_users_org_response import AdminUsersOrgResponse
25
+ from neurograph.v1.models.me_my_profile_response import MeMyProfileResponse
26
+
27
+ from neurograph.v1.api_client import ApiClient, RequestSerialized
28
+ from neurograph.v1.api_response import ApiResponse
29
+ from neurograph.v1.rest import RESTResponseType
30
+
31
+
32
+ class UserApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ def api_v1_admin_users_id_get(
47
+ self,
48
+ id: Annotated[StrictInt, Field(description="User's ID")],
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> AdminUserDetailResponse:
62
+ """Get User Detail
63
+
64
+
65
+ :param id: User's ID (required)
66
+ :type id: int
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._api_v1_admin_users_id_get_serialize(
90
+ id=id,
91
+ _request_auth=_request_auth,
92
+ _content_type=_content_type,
93
+ _headers=_headers,
94
+ _host_index=_host_index
95
+ )
96
+
97
+ _response_types_map: Dict[str, Optional[str]] = {
98
+ '200': "AdminUserDetailResponse",
99
+ '400': "AdminUserDetailResponse",
100
+ }
101
+ response_data = self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ def api_v1_admin_users_id_get_with_http_info(
114
+ self,
115
+ id: Annotated[StrictInt, Field(description="User's ID")],
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[AdminUserDetailResponse]:
129
+ """Get User Detail
130
+
131
+
132
+ :param id: User's ID (required)
133
+ :type id: int
134
+ :param _request_timeout: timeout setting for this request. If one
135
+ number provided, it will be total request
136
+ timeout. It can also be a pair (tuple) of
137
+ (connection, read) timeouts.
138
+ :type _request_timeout: int, tuple(int, int), optional
139
+ :param _request_auth: set to override the auth_settings for an a single
140
+ request; this effectively ignores the
141
+ authentication in the spec for a single request.
142
+ :type _request_auth: dict, optional
143
+ :param _content_type: force content-type for the request.
144
+ :type _content_type: str, Optional
145
+ :param _headers: set to override the headers for a single
146
+ request; this effectively ignores the headers
147
+ in the spec for a single request.
148
+ :type _headers: dict, optional
149
+ :param _host_index: set to override the host_index for a single
150
+ request; this effectively ignores the host_index
151
+ in the spec for a single request.
152
+ :type _host_index: int, optional
153
+ :return: Returns the result object.
154
+ """ # noqa: E501
155
+
156
+ _param = self._api_v1_admin_users_id_get_serialize(
157
+ id=id,
158
+ _request_auth=_request_auth,
159
+ _content_type=_content_type,
160
+ _headers=_headers,
161
+ _host_index=_host_index
162
+ )
163
+
164
+ _response_types_map: Dict[str, Optional[str]] = {
165
+ '200': "AdminUserDetailResponse",
166
+ '400': "AdminUserDetailResponse",
167
+ }
168
+ response_data = self.api_client.call_api(
169
+ *_param,
170
+ _request_timeout=_request_timeout
171
+ )
172
+ response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+
179
+ @validate_call
180
+ def api_v1_admin_users_id_get_without_preload_content(
181
+ self,
182
+ id: Annotated[StrictInt, Field(description="User's ID")],
183
+ _request_timeout: Union[
184
+ None,
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Tuple[
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Annotated[StrictFloat, Field(gt=0)]
189
+ ]
190
+ ] = None,
191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
192
+ _content_type: Optional[StrictStr] = None,
193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
+ ) -> RESTResponseType:
196
+ """Get User Detail
197
+
198
+
199
+ :param id: User's ID (required)
200
+ :type id: int
201
+ :param _request_timeout: timeout setting for this request. If one
202
+ number provided, it will be total request
203
+ timeout. It can also be a pair (tuple) of
204
+ (connection, read) timeouts.
205
+ :type _request_timeout: int, tuple(int, int), optional
206
+ :param _request_auth: set to override the auth_settings for an a single
207
+ request; this effectively ignores the
208
+ authentication in the spec for a single request.
209
+ :type _request_auth: dict, optional
210
+ :param _content_type: force content-type for the request.
211
+ :type _content_type: str, Optional
212
+ :param _headers: set to override the headers for a single
213
+ request; this effectively ignores the headers
214
+ in the spec for a single request.
215
+ :type _headers: dict, optional
216
+ :param _host_index: set to override the host_index for a single
217
+ request; this effectively ignores the host_index
218
+ in the spec for a single request.
219
+ :type _host_index: int, optional
220
+ :return: Returns the result object.
221
+ """ # noqa: E501
222
+
223
+ _param = self._api_v1_admin_users_id_get_serialize(
224
+ id=id,
225
+ _request_auth=_request_auth,
226
+ _content_type=_content_type,
227
+ _headers=_headers,
228
+ _host_index=_host_index
229
+ )
230
+
231
+ _response_types_map: Dict[str, Optional[str]] = {
232
+ '200': "AdminUserDetailResponse",
233
+ '400': "AdminUserDetailResponse",
234
+ }
235
+ response_data = self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _api_v1_admin_users_id_get_serialize(
243
+ self,
244
+ id,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[
261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
262
+ ] = {}
263
+ _body_params: Optional[bytes] = None
264
+
265
+ # process the path parameters
266
+ if id is not None:
267
+ _path_params['id'] = id
268
+ # process the query parameters
269
+ # process the header parameters
270
+ # process the form parameters
271
+ # process the body parameter
272
+
273
+
274
+ # set the HTTP header `Accept`
275
+ if 'Accept' not in _header_params:
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ [
278
+ 'application/json'
279
+ ]
280
+ )
281
+
282
+
283
+ # authentication setting
284
+ _auth_settings: List[str] = [
285
+ 'ApiKeyAuth'
286
+ ]
287
+
288
+ return self.api_client.param_serialize(
289
+ method='GET',
290
+ resource_path='/api/v1/admin/users/{id}',
291
+ path_params=_path_params,
292
+ query_params=_query_params,
293
+ header_params=_header_params,
294
+ body=_body_params,
295
+ post_params=_form_params,
296
+ files=_files,
297
+ auth_settings=_auth_settings,
298
+ collection_formats=_collection_formats,
299
+ _host=_host,
300
+ _request_auth=_request_auth
301
+ )
302
+
303
+
304
+
305
+
306
+ @validate_call
307
+ def api_v1_clients_client_id_users_get(
308
+ self,
309
+ client_id: Annotated[StrictStr, Field(description="Client ID (cli_*)")],
310
+ _request_timeout: Union[
311
+ None,
312
+ Annotated[StrictFloat, Field(gt=0)],
313
+ Tuple[
314
+ Annotated[StrictFloat, Field(gt=0)],
315
+ Annotated[StrictFloat, Field(gt=0)]
316
+ ]
317
+ ] = None,
318
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
319
+ _content_type: Optional[StrictStr] = None,
320
+ _headers: Optional[Dict[StrictStr, Any]] = None,
321
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
322
+ ) -> AdminUsersOrgResponse:
323
+ """Users by Client
324
+
325
+
326
+ :param client_id: Client ID (cli_*) (required)
327
+ :type client_id: str
328
+ :param _request_timeout: timeout setting for this request. If one
329
+ number provided, it will be total request
330
+ timeout. It can also be a pair (tuple) of
331
+ (connection, read) timeouts.
332
+ :type _request_timeout: int, tuple(int, int), optional
333
+ :param _request_auth: set to override the auth_settings for an a single
334
+ request; this effectively ignores the
335
+ authentication in the spec for a single request.
336
+ :type _request_auth: dict, optional
337
+ :param _content_type: force content-type for the request.
338
+ :type _content_type: str, Optional
339
+ :param _headers: set to override the headers for a single
340
+ request; this effectively ignores the headers
341
+ in the spec for a single request.
342
+ :type _headers: dict, optional
343
+ :param _host_index: set to override the host_index for a single
344
+ request; this effectively ignores the host_index
345
+ in the spec for a single request.
346
+ :type _host_index: int, optional
347
+ :return: Returns the result object.
348
+ """ # noqa: E501
349
+
350
+ _param = self._api_v1_clients_client_id_users_get_serialize(
351
+ client_id=client_id,
352
+ _request_auth=_request_auth,
353
+ _content_type=_content_type,
354
+ _headers=_headers,
355
+ _host_index=_host_index
356
+ )
357
+
358
+ _response_types_map: Dict[str, Optional[str]] = {
359
+ '200': "AdminUsersOrgResponse",
360
+ '503': "AdminUsersOrgResponse",
361
+ }
362
+ response_data = self.api_client.call_api(
363
+ *_param,
364
+ _request_timeout=_request_timeout
365
+ )
366
+ response_data.read()
367
+ return self.api_client.response_deserialize(
368
+ response_data=response_data,
369
+ response_types_map=_response_types_map,
370
+ ).data
371
+
372
+
373
+ @validate_call
374
+ def api_v1_clients_client_id_users_get_with_http_info(
375
+ self,
376
+ client_id: Annotated[StrictStr, Field(description="Client ID (cli_*)")],
377
+ _request_timeout: Union[
378
+ None,
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Tuple[
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Annotated[StrictFloat, Field(gt=0)]
383
+ ]
384
+ ] = None,
385
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
386
+ _content_type: Optional[StrictStr] = None,
387
+ _headers: Optional[Dict[StrictStr, Any]] = None,
388
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
389
+ ) -> ApiResponse[AdminUsersOrgResponse]:
390
+ """Users by Client
391
+
392
+
393
+ :param client_id: Client ID (cli_*) (required)
394
+ :type client_id: str
395
+ :param _request_timeout: timeout setting for this request. If one
396
+ number provided, it will be total request
397
+ timeout. It can also be a pair (tuple) of
398
+ (connection, read) timeouts.
399
+ :type _request_timeout: int, tuple(int, int), optional
400
+ :param _request_auth: set to override the auth_settings for an a single
401
+ request; this effectively ignores the
402
+ authentication in the spec for a single request.
403
+ :type _request_auth: dict, optional
404
+ :param _content_type: force content-type for the request.
405
+ :type _content_type: str, Optional
406
+ :param _headers: set to override the headers for a single
407
+ request; this effectively ignores the headers
408
+ in the spec for a single request.
409
+ :type _headers: dict, optional
410
+ :param _host_index: set to override the host_index for a single
411
+ request; this effectively ignores the host_index
412
+ in the spec for a single request.
413
+ :type _host_index: int, optional
414
+ :return: Returns the result object.
415
+ """ # noqa: E501
416
+
417
+ _param = self._api_v1_clients_client_id_users_get_serialize(
418
+ client_id=client_id,
419
+ _request_auth=_request_auth,
420
+ _content_type=_content_type,
421
+ _headers=_headers,
422
+ _host_index=_host_index
423
+ )
424
+
425
+ _response_types_map: Dict[str, Optional[str]] = {
426
+ '200': "AdminUsersOrgResponse",
427
+ '503': "AdminUsersOrgResponse",
428
+ }
429
+ response_data = self.api_client.call_api(
430
+ *_param,
431
+ _request_timeout=_request_timeout
432
+ )
433
+ response_data.read()
434
+ return self.api_client.response_deserialize(
435
+ response_data=response_data,
436
+ response_types_map=_response_types_map,
437
+ )
438
+
439
+
440
+ @validate_call
441
+ def api_v1_clients_client_id_users_get_without_preload_content(
442
+ self,
443
+ client_id: Annotated[StrictStr, Field(description="Client ID (cli_*)")],
444
+ _request_timeout: Union[
445
+ None,
446
+ Annotated[StrictFloat, Field(gt=0)],
447
+ Tuple[
448
+ Annotated[StrictFloat, Field(gt=0)],
449
+ Annotated[StrictFloat, Field(gt=0)]
450
+ ]
451
+ ] = None,
452
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
453
+ _content_type: Optional[StrictStr] = None,
454
+ _headers: Optional[Dict[StrictStr, Any]] = None,
455
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
456
+ ) -> RESTResponseType:
457
+ """Users by Client
458
+
459
+
460
+ :param client_id: Client ID (cli_*) (required)
461
+ :type client_id: str
462
+ :param _request_timeout: timeout setting for this request. If one
463
+ number provided, it will be total request
464
+ timeout. It can also be a pair (tuple) of
465
+ (connection, read) timeouts.
466
+ :type _request_timeout: int, tuple(int, int), optional
467
+ :param _request_auth: set to override the auth_settings for an a single
468
+ request; this effectively ignores the
469
+ authentication in the spec for a single request.
470
+ :type _request_auth: dict, optional
471
+ :param _content_type: force content-type for the request.
472
+ :type _content_type: str, Optional
473
+ :param _headers: set to override the headers for a single
474
+ request; this effectively ignores the headers
475
+ in the spec for a single request.
476
+ :type _headers: dict, optional
477
+ :param _host_index: set to override the host_index for a single
478
+ request; this effectively ignores the host_index
479
+ in the spec for a single request.
480
+ :type _host_index: int, optional
481
+ :return: Returns the result object.
482
+ """ # noqa: E501
483
+
484
+ _param = self._api_v1_clients_client_id_users_get_serialize(
485
+ client_id=client_id,
486
+ _request_auth=_request_auth,
487
+ _content_type=_content_type,
488
+ _headers=_headers,
489
+ _host_index=_host_index
490
+ )
491
+
492
+ _response_types_map: Dict[str, Optional[str]] = {
493
+ '200': "AdminUsersOrgResponse",
494
+ '503': "AdminUsersOrgResponse",
495
+ }
496
+ response_data = self.api_client.call_api(
497
+ *_param,
498
+ _request_timeout=_request_timeout
499
+ )
500
+ return response_data.response
501
+
502
+
503
+ def _api_v1_clients_client_id_users_get_serialize(
504
+ self,
505
+ client_id,
506
+ _request_auth,
507
+ _content_type,
508
+ _headers,
509
+ _host_index,
510
+ ) -> RequestSerialized:
511
+
512
+ _host = None
513
+
514
+ _collection_formats: Dict[str, str] = {
515
+ }
516
+
517
+ _path_params: Dict[str, str] = {}
518
+ _query_params: List[Tuple[str, str]] = []
519
+ _header_params: Dict[str, Optional[str]] = _headers or {}
520
+ _form_params: List[Tuple[str, str]] = []
521
+ _files: Dict[
522
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
523
+ ] = {}
524
+ _body_params: Optional[bytes] = None
525
+
526
+ # process the path parameters
527
+ if client_id is not None:
528
+ _path_params['client_id'] = client_id
529
+ # process the query parameters
530
+ # process the header parameters
531
+ # process the form parameters
532
+ # process the body parameter
533
+
534
+
535
+ # set the HTTP header `Accept`
536
+ if 'Accept' not in _header_params:
537
+ _header_params['Accept'] = self.api_client.select_header_accept(
538
+ [
539
+ 'application/json'
540
+ ]
541
+ )
542
+
543
+
544
+ # authentication setting
545
+ _auth_settings: List[str] = [
546
+ 'TokenAuth',
547
+ 'ApiKeyAuth'
548
+ ]
549
+
550
+ return self.api_client.param_serialize(
551
+ method='GET',
552
+ resource_path='/api/v1/clients/{client_id}/users/',
553
+ path_params=_path_params,
554
+ query_params=_query_params,
555
+ header_params=_header_params,
556
+ body=_body_params,
557
+ post_params=_form_params,
558
+ files=_files,
559
+ auth_settings=_auth_settings,
560
+ collection_formats=_collection_formats,
561
+ _host=_host,
562
+ _request_auth=_request_auth
563
+ )
564
+
565
+
566
+
567
+
568
+ @validate_call
569
+ def api_v1_me_get(
570
+ self,
571
+ _request_timeout: Union[
572
+ None,
573
+ Annotated[StrictFloat, Field(gt=0)],
574
+ Tuple[
575
+ Annotated[StrictFloat, Field(gt=0)],
576
+ Annotated[StrictFloat, Field(gt=0)]
577
+ ]
578
+ ] = None,
579
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
580
+ _content_type: Optional[StrictStr] = None,
581
+ _headers: Optional[Dict[StrictStr, Any]] = None,
582
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
583
+ ) -> MeMyProfileResponse:
584
+ """Get my profile
585
+
586
+
587
+ :param _request_timeout: timeout setting for this request. If one
588
+ number provided, it will be total request
589
+ timeout. It can also be a pair (tuple) of
590
+ (connection, read) timeouts.
591
+ :type _request_timeout: int, tuple(int, int), optional
592
+ :param _request_auth: set to override the auth_settings for an a single
593
+ request; this effectively ignores the
594
+ authentication in the spec for a single request.
595
+ :type _request_auth: dict, optional
596
+ :param _content_type: force content-type for the request.
597
+ :type _content_type: str, Optional
598
+ :param _headers: set to override the headers for a single
599
+ request; this effectively ignores the headers
600
+ in the spec for a single request.
601
+ :type _headers: dict, optional
602
+ :param _host_index: set to override the host_index for a single
603
+ request; this effectively ignores the host_index
604
+ in the spec for a single request.
605
+ :type _host_index: int, optional
606
+ :return: Returns the result object.
607
+ """ # noqa: E501
608
+
609
+ _param = self._api_v1_me_get_serialize(
610
+ _request_auth=_request_auth,
611
+ _content_type=_content_type,
612
+ _headers=_headers,
613
+ _host_index=_host_index
614
+ )
615
+
616
+ _response_types_map: Dict[str, Optional[str]] = {
617
+ '200': "MeMyProfileResponse",
618
+ '400': "MeMyProfileResponse",
619
+ }
620
+ response_data = self.api_client.call_api(
621
+ *_param,
622
+ _request_timeout=_request_timeout
623
+ )
624
+ response_data.read()
625
+ return self.api_client.response_deserialize(
626
+ response_data=response_data,
627
+ response_types_map=_response_types_map,
628
+ ).data
629
+
630
+
631
+ @validate_call
632
+ def api_v1_me_get_with_http_info(
633
+ self,
634
+ _request_timeout: Union[
635
+ None,
636
+ Annotated[StrictFloat, Field(gt=0)],
637
+ Tuple[
638
+ Annotated[StrictFloat, Field(gt=0)],
639
+ Annotated[StrictFloat, Field(gt=0)]
640
+ ]
641
+ ] = None,
642
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
643
+ _content_type: Optional[StrictStr] = None,
644
+ _headers: Optional[Dict[StrictStr, Any]] = None,
645
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
646
+ ) -> ApiResponse[MeMyProfileResponse]:
647
+ """Get my profile
648
+
649
+
650
+ :param _request_timeout: timeout setting for this request. If one
651
+ number provided, it will be total request
652
+ timeout. It can also be a pair (tuple) of
653
+ (connection, read) timeouts.
654
+ :type _request_timeout: int, tuple(int, int), optional
655
+ :param _request_auth: set to override the auth_settings for an a single
656
+ request; this effectively ignores the
657
+ authentication in the spec for a single request.
658
+ :type _request_auth: dict, optional
659
+ :param _content_type: force content-type for the request.
660
+ :type _content_type: str, Optional
661
+ :param _headers: set to override the headers for a single
662
+ request; this effectively ignores the headers
663
+ in the spec for a single request.
664
+ :type _headers: dict, optional
665
+ :param _host_index: set to override the host_index for a single
666
+ request; this effectively ignores the host_index
667
+ in the spec for a single request.
668
+ :type _host_index: int, optional
669
+ :return: Returns the result object.
670
+ """ # noqa: E501
671
+
672
+ _param = self._api_v1_me_get_serialize(
673
+ _request_auth=_request_auth,
674
+ _content_type=_content_type,
675
+ _headers=_headers,
676
+ _host_index=_host_index
677
+ )
678
+
679
+ _response_types_map: Dict[str, Optional[str]] = {
680
+ '200': "MeMyProfileResponse",
681
+ '400': "MeMyProfileResponse",
682
+ }
683
+ response_data = self.api_client.call_api(
684
+ *_param,
685
+ _request_timeout=_request_timeout
686
+ )
687
+ response_data.read()
688
+ return self.api_client.response_deserialize(
689
+ response_data=response_data,
690
+ response_types_map=_response_types_map,
691
+ )
692
+
693
+
694
+ @validate_call
695
+ def api_v1_me_get_without_preload_content(
696
+ self,
697
+ _request_timeout: Union[
698
+ None,
699
+ Annotated[StrictFloat, Field(gt=0)],
700
+ Tuple[
701
+ Annotated[StrictFloat, Field(gt=0)],
702
+ Annotated[StrictFloat, Field(gt=0)]
703
+ ]
704
+ ] = None,
705
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
706
+ _content_type: Optional[StrictStr] = None,
707
+ _headers: Optional[Dict[StrictStr, Any]] = None,
708
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
709
+ ) -> RESTResponseType:
710
+ """Get my profile
711
+
712
+
713
+ :param _request_timeout: timeout setting for this request. If one
714
+ number provided, it will be total request
715
+ timeout. It can also be a pair (tuple) of
716
+ (connection, read) timeouts.
717
+ :type _request_timeout: int, tuple(int, int), optional
718
+ :param _request_auth: set to override the auth_settings for an a single
719
+ request; this effectively ignores the
720
+ authentication in the spec for a single request.
721
+ :type _request_auth: dict, optional
722
+ :param _content_type: force content-type for the request.
723
+ :type _content_type: str, Optional
724
+ :param _headers: set to override the headers for a single
725
+ request; this effectively ignores the headers
726
+ in the spec for a single request.
727
+ :type _headers: dict, optional
728
+ :param _host_index: set to override the host_index for a single
729
+ request; this effectively ignores the host_index
730
+ in the spec for a single request.
731
+ :type _host_index: int, optional
732
+ :return: Returns the result object.
733
+ """ # noqa: E501
734
+
735
+ _param = self._api_v1_me_get_serialize(
736
+ _request_auth=_request_auth,
737
+ _content_type=_content_type,
738
+ _headers=_headers,
739
+ _host_index=_host_index
740
+ )
741
+
742
+ _response_types_map: Dict[str, Optional[str]] = {
743
+ '200': "MeMyProfileResponse",
744
+ '400': "MeMyProfileResponse",
745
+ }
746
+ response_data = self.api_client.call_api(
747
+ *_param,
748
+ _request_timeout=_request_timeout
749
+ )
750
+ return response_data.response
751
+
752
+
753
+ def _api_v1_me_get_serialize(
754
+ self,
755
+ _request_auth,
756
+ _content_type,
757
+ _headers,
758
+ _host_index,
759
+ ) -> RequestSerialized:
760
+
761
+ _host = None
762
+
763
+ _collection_formats: Dict[str, str] = {
764
+ }
765
+
766
+ _path_params: Dict[str, str] = {}
767
+ _query_params: List[Tuple[str, str]] = []
768
+ _header_params: Dict[str, Optional[str]] = _headers or {}
769
+ _form_params: List[Tuple[str, str]] = []
770
+ _files: Dict[
771
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
772
+ ] = {}
773
+ _body_params: Optional[bytes] = None
774
+
775
+ # process the path parameters
776
+ # process the query parameters
777
+ # process the header parameters
778
+ # process the form parameters
779
+ # process the body parameter
780
+
781
+
782
+ # set the HTTP header `Accept`
783
+ if 'Accept' not in _header_params:
784
+ _header_params['Accept'] = self.api_client.select_header_accept(
785
+ [
786
+ 'application/json'
787
+ ]
788
+ )
789
+
790
+
791
+ # authentication setting
792
+ _auth_settings: List[str] = [
793
+ 'ApiKeyAuth'
794
+ ]
795
+
796
+ return self.api_client.param_serialize(
797
+ method='GET',
798
+ resource_path='/api/v1/me/',
799
+ path_params=_path_params,
800
+ query_params=_query_params,
801
+ header_params=_header_params,
802
+ body=_body_params,
803
+ post_params=_form_params,
804
+ files=_files,
805
+ auth_settings=_auth_settings,
806
+ collection_formats=_collection_formats,
807
+ _host=_host,
808
+ _request_auth=_request_auth
809
+ )
810
+
811
+
812
+
813
+
814
+ @validate_call
815
+ def api_v1_organizations_org_id_users_get(
816
+ self,
817
+ org_id: Annotated[StrictStr, Field(description="Organization ID")],
818
+ _request_timeout: Union[
819
+ None,
820
+ Annotated[StrictFloat, Field(gt=0)],
821
+ Tuple[
822
+ Annotated[StrictFloat, Field(gt=0)],
823
+ Annotated[StrictFloat, Field(gt=0)]
824
+ ]
825
+ ] = None,
826
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
827
+ _content_type: Optional[StrictStr] = None,
828
+ _headers: Optional[Dict[StrictStr, Any]] = None,
829
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
830
+ ) -> AdminUsersOrgResponse:
831
+ """Users by Organization
832
+
833
+
834
+ :param org_id: Organization ID (required)
835
+ :type org_id: str
836
+ :param _request_timeout: timeout setting for this request. If one
837
+ number provided, it will be total request
838
+ timeout. It can also be a pair (tuple) of
839
+ (connection, read) timeouts.
840
+ :type _request_timeout: int, tuple(int, int), optional
841
+ :param _request_auth: set to override the auth_settings for an a single
842
+ request; this effectively ignores the
843
+ authentication in the spec for a single request.
844
+ :type _request_auth: dict, optional
845
+ :param _content_type: force content-type for the request.
846
+ :type _content_type: str, Optional
847
+ :param _headers: set to override the headers for a single
848
+ request; this effectively ignores the headers
849
+ in the spec for a single request.
850
+ :type _headers: dict, optional
851
+ :param _host_index: set to override the host_index for a single
852
+ request; this effectively ignores the host_index
853
+ in the spec for a single request.
854
+ :type _host_index: int, optional
855
+ :return: Returns the result object.
856
+ """ # noqa: E501
857
+
858
+ _param = self._api_v1_organizations_org_id_users_get_serialize(
859
+ org_id=org_id,
860
+ _request_auth=_request_auth,
861
+ _content_type=_content_type,
862
+ _headers=_headers,
863
+ _host_index=_host_index
864
+ )
865
+
866
+ _response_types_map: Dict[str, Optional[str]] = {
867
+ '200': "AdminUsersOrgResponse",
868
+ '503': "AdminUsersOrgResponse",
869
+ }
870
+ response_data = self.api_client.call_api(
871
+ *_param,
872
+ _request_timeout=_request_timeout
873
+ )
874
+ response_data.read()
875
+ return self.api_client.response_deserialize(
876
+ response_data=response_data,
877
+ response_types_map=_response_types_map,
878
+ ).data
879
+
880
+
881
+ @validate_call
882
+ def api_v1_organizations_org_id_users_get_with_http_info(
883
+ self,
884
+ org_id: Annotated[StrictStr, Field(description="Organization ID")],
885
+ _request_timeout: Union[
886
+ None,
887
+ Annotated[StrictFloat, Field(gt=0)],
888
+ Tuple[
889
+ Annotated[StrictFloat, Field(gt=0)],
890
+ Annotated[StrictFloat, Field(gt=0)]
891
+ ]
892
+ ] = None,
893
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
894
+ _content_type: Optional[StrictStr] = None,
895
+ _headers: Optional[Dict[StrictStr, Any]] = None,
896
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
897
+ ) -> ApiResponse[AdminUsersOrgResponse]:
898
+ """Users by Organization
899
+
900
+
901
+ :param org_id: Organization ID (required)
902
+ :type org_id: str
903
+ :param _request_timeout: timeout setting for this request. If one
904
+ number provided, it will be total request
905
+ timeout. It can also be a pair (tuple) of
906
+ (connection, read) timeouts.
907
+ :type _request_timeout: int, tuple(int, int), optional
908
+ :param _request_auth: set to override the auth_settings for an a single
909
+ request; this effectively ignores the
910
+ authentication in the spec for a single request.
911
+ :type _request_auth: dict, optional
912
+ :param _content_type: force content-type for the request.
913
+ :type _content_type: str, Optional
914
+ :param _headers: set to override the headers for a single
915
+ request; this effectively ignores the headers
916
+ in the spec for a single request.
917
+ :type _headers: dict, optional
918
+ :param _host_index: set to override the host_index for a single
919
+ request; this effectively ignores the host_index
920
+ in the spec for a single request.
921
+ :type _host_index: int, optional
922
+ :return: Returns the result object.
923
+ """ # noqa: E501
924
+
925
+ _param = self._api_v1_organizations_org_id_users_get_serialize(
926
+ org_id=org_id,
927
+ _request_auth=_request_auth,
928
+ _content_type=_content_type,
929
+ _headers=_headers,
930
+ _host_index=_host_index
931
+ )
932
+
933
+ _response_types_map: Dict[str, Optional[str]] = {
934
+ '200': "AdminUsersOrgResponse",
935
+ '503': "AdminUsersOrgResponse",
936
+ }
937
+ response_data = self.api_client.call_api(
938
+ *_param,
939
+ _request_timeout=_request_timeout
940
+ )
941
+ response_data.read()
942
+ return self.api_client.response_deserialize(
943
+ response_data=response_data,
944
+ response_types_map=_response_types_map,
945
+ )
946
+
947
+
948
+ @validate_call
949
+ def api_v1_organizations_org_id_users_get_without_preload_content(
950
+ self,
951
+ org_id: Annotated[StrictStr, Field(description="Organization ID")],
952
+ _request_timeout: Union[
953
+ None,
954
+ Annotated[StrictFloat, Field(gt=0)],
955
+ Tuple[
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Annotated[StrictFloat, Field(gt=0)]
958
+ ]
959
+ ] = None,
960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
961
+ _content_type: Optional[StrictStr] = None,
962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
964
+ ) -> RESTResponseType:
965
+ """Users by Organization
966
+
967
+
968
+ :param org_id: Organization ID (required)
969
+ :type org_id: str
970
+ :param _request_timeout: timeout setting for this request. If one
971
+ number provided, it will be total request
972
+ timeout. It can also be a pair (tuple) of
973
+ (connection, read) timeouts.
974
+ :type _request_timeout: int, tuple(int, int), optional
975
+ :param _request_auth: set to override the auth_settings for an a single
976
+ request; this effectively ignores the
977
+ authentication in the spec for a single request.
978
+ :type _request_auth: dict, optional
979
+ :param _content_type: force content-type for the request.
980
+ :type _content_type: str, Optional
981
+ :param _headers: set to override the headers for a single
982
+ request; this effectively ignores the headers
983
+ in the spec for a single request.
984
+ :type _headers: dict, optional
985
+ :param _host_index: set to override the host_index for a single
986
+ request; this effectively ignores the host_index
987
+ in the spec for a single request.
988
+ :type _host_index: int, optional
989
+ :return: Returns the result object.
990
+ """ # noqa: E501
991
+
992
+ _param = self._api_v1_organizations_org_id_users_get_serialize(
993
+ org_id=org_id,
994
+ _request_auth=_request_auth,
995
+ _content_type=_content_type,
996
+ _headers=_headers,
997
+ _host_index=_host_index
998
+ )
999
+
1000
+ _response_types_map: Dict[str, Optional[str]] = {
1001
+ '200': "AdminUsersOrgResponse",
1002
+ '503': "AdminUsersOrgResponse",
1003
+ }
1004
+ response_data = self.api_client.call_api(
1005
+ *_param,
1006
+ _request_timeout=_request_timeout
1007
+ )
1008
+ return response_data.response
1009
+
1010
+
1011
+ def _api_v1_organizations_org_id_users_get_serialize(
1012
+ self,
1013
+ org_id,
1014
+ _request_auth,
1015
+ _content_type,
1016
+ _headers,
1017
+ _host_index,
1018
+ ) -> RequestSerialized:
1019
+
1020
+ _host = None
1021
+
1022
+ _collection_formats: Dict[str, str] = {
1023
+ }
1024
+
1025
+ _path_params: Dict[str, str] = {}
1026
+ _query_params: List[Tuple[str, str]] = []
1027
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1028
+ _form_params: List[Tuple[str, str]] = []
1029
+ _files: Dict[
1030
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1031
+ ] = {}
1032
+ _body_params: Optional[bytes] = None
1033
+
1034
+ # process the path parameters
1035
+ if org_id is not None:
1036
+ _path_params['org_id'] = org_id
1037
+ # process the query parameters
1038
+ # process the header parameters
1039
+ # process the form parameters
1040
+ # process the body parameter
1041
+
1042
+
1043
+ # set the HTTP header `Accept`
1044
+ if 'Accept' not in _header_params:
1045
+ _header_params['Accept'] = self.api_client.select_header_accept(
1046
+ [
1047
+ 'application/json'
1048
+ ]
1049
+ )
1050
+
1051
+
1052
+ # authentication setting
1053
+ _auth_settings: List[str] = [
1054
+ 'ApiKeyAuth'
1055
+ ]
1056
+
1057
+ return self.api_client.param_serialize(
1058
+ method='GET',
1059
+ resource_path='/api/v1/organizations/{org_id}/users/',
1060
+ path_params=_path_params,
1061
+ query_params=_query_params,
1062
+ header_params=_header_params,
1063
+ body=_body_params,
1064
+ post_params=_form_params,
1065
+ files=_files,
1066
+ auth_settings=_auth_settings,
1067
+ collection_formats=_collection_formats,
1068
+ _host=_host,
1069
+ _request_auth=_request_auth
1070
+ )
1071
+
1072
+
1073
+
1074
+
1075
+ @validate_call
1076
+ def api_v1_users_post(
1077
+ self,
1078
+ request: Annotated[AdminUpsertUserRequest, Field(description="Upsert user request payload")],
1079
+ _request_timeout: Union[
1080
+ None,
1081
+ Annotated[StrictFloat, Field(gt=0)],
1082
+ Tuple[
1083
+ Annotated[StrictFloat, Field(gt=0)],
1084
+ Annotated[StrictFloat, Field(gt=0)]
1085
+ ]
1086
+ ] = None,
1087
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1088
+ _content_type: Optional[StrictStr] = None,
1089
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1090
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1091
+ ) -> AdminUpsertUserResponse:
1092
+ """Upsert a User
1093
+
1094
+ Create or update a user (imported from Firebase as source of truth).
1095
+
1096
+ :param request: Upsert user request payload (required)
1097
+ :type request: AdminUpsertUserRequest
1098
+ :param _request_timeout: timeout setting for this request. If one
1099
+ number provided, it will be total request
1100
+ timeout. It can also be a pair (tuple) of
1101
+ (connection, read) timeouts.
1102
+ :type _request_timeout: int, tuple(int, int), optional
1103
+ :param _request_auth: set to override the auth_settings for an a single
1104
+ request; this effectively ignores the
1105
+ authentication in the spec for a single request.
1106
+ :type _request_auth: dict, optional
1107
+ :param _content_type: force content-type for the request.
1108
+ :type _content_type: str, Optional
1109
+ :param _headers: set to override the headers for a single
1110
+ request; this effectively ignores the headers
1111
+ in the spec for a single request.
1112
+ :type _headers: dict, optional
1113
+ :param _host_index: set to override the host_index for a single
1114
+ request; this effectively ignores the host_index
1115
+ in the spec for a single request.
1116
+ :type _host_index: int, optional
1117
+ :return: Returns the result object.
1118
+ """ # noqa: E501
1119
+
1120
+ _param = self._api_v1_users_post_serialize(
1121
+ request=request,
1122
+ _request_auth=_request_auth,
1123
+ _content_type=_content_type,
1124
+ _headers=_headers,
1125
+ _host_index=_host_index
1126
+ )
1127
+
1128
+ _response_types_map: Dict[str, Optional[str]] = {
1129
+ '200': "AdminUpsertUserResponse",
1130
+ '400': "AdminUpsertUserResponse",
1131
+ '409': "AdminUpsertUserResponse",
1132
+ '500': "AdminUpsertUserResponse",
1133
+ }
1134
+ response_data = self.api_client.call_api(
1135
+ *_param,
1136
+ _request_timeout=_request_timeout
1137
+ )
1138
+ response_data.read()
1139
+ return self.api_client.response_deserialize(
1140
+ response_data=response_data,
1141
+ response_types_map=_response_types_map,
1142
+ ).data
1143
+
1144
+
1145
+ @validate_call
1146
+ def api_v1_users_post_with_http_info(
1147
+ self,
1148
+ request: Annotated[AdminUpsertUserRequest, Field(description="Upsert user request payload")],
1149
+ _request_timeout: Union[
1150
+ None,
1151
+ Annotated[StrictFloat, Field(gt=0)],
1152
+ Tuple[
1153
+ Annotated[StrictFloat, Field(gt=0)],
1154
+ Annotated[StrictFloat, Field(gt=0)]
1155
+ ]
1156
+ ] = None,
1157
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1158
+ _content_type: Optional[StrictStr] = None,
1159
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1160
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1161
+ ) -> ApiResponse[AdminUpsertUserResponse]:
1162
+ """Upsert a User
1163
+
1164
+ Create or update a user (imported from Firebase as source of truth).
1165
+
1166
+ :param request: Upsert user request payload (required)
1167
+ :type request: AdminUpsertUserRequest
1168
+ :param _request_timeout: timeout setting for this request. If one
1169
+ number provided, it will be total request
1170
+ timeout. It can also be a pair (tuple) of
1171
+ (connection, read) timeouts.
1172
+ :type _request_timeout: int, tuple(int, int), optional
1173
+ :param _request_auth: set to override the auth_settings for an a single
1174
+ request; this effectively ignores the
1175
+ authentication in the spec for a single request.
1176
+ :type _request_auth: dict, optional
1177
+ :param _content_type: force content-type for the request.
1178
+ :type _content_type: str, Optional
1179
+ :param _headers: set to override the headers for a single
1180
+ request; this effectively ignores the headers
1181
+ in the spec for a single request.
1182
+ :type _headers: dict, optional
1183
+ :param _host_index: set to override the host_index for a single
1184
+ request; this effectively ignores the host_index
1185
+ in the spec for a single request.
1186
+ :type _host_index: int, optional
1187
+ :return: Returns the result object.
1188
+ """ # noqa: E501
1189
+
1190
+ _param = self._api_v1_users_post_serialize(
1191
+ request=request,
1192
+ _request_auth=_request_auth,
1193
+ _content_type=_content_type,
1194
+ _headers=_headers,
1195
+ _host_index=_host_index
1196
+ )
1197
+
1198
+ _response_types_map: Dict[str, Optional[str]] = {
1199
+ '200': "AdminUpsertUserResponse",
1200
+ '400': "AdminUpsertUserResponse",
1201
+ '409': "AdminUpsertUserResponse",
1202
+ '500': "AdminUpsertUserResponse",
1203
+ }
1204
+ response_data = self.api_client.call_api(
1205
+ *_param,
1206
+ _request_timeout=_request_timeout
1207
+ )
1208
+ response_data.read()
1209
+ return self.api_client.response_deserialize(
1210
+ response_data=response_data,
1211
+ response_types_map=_response_types_map,
1212
+ )
1213
+
1214
+
1215
+ @validate_call
1216
+ def api_v1_users_post_without_preload_content(
1217
+ self,
1218
+ request: Annotated[AdminUpsertUserRequest, Field(description="Upsert user request payload")],
1219
+ _request_timeout: Union[
1220
+ None,
1221
+ Annotated[StrictFloat, Field(gt=0)],
1222
+ Tuple[
1223
+ Annotated[StrictFloat, Field(gt=0)],
1224
+ Annotated[StrictFloat, Field(gt=0)]
1225
+ ]
1226
+ ] = None,
1227
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1228
+ _content_type: Optional[StrictStr] = None,
1229
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1230
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1231
+ ) -> RESTResponseType:
1232
+ """Upsert a User
1233
+
1234
+ Create or update a user (imported from Firebase as source of truth).
1235
+
1236
+ :param request: Upsert user request payload (required)
1237
+ :type request: AdminUpsertUserRequest
1238
+ :param _request_timeout: timeout setting for this request. If one
1239
+ number provided, it will be total request
1240
+ timeout. It can also be a pair (tuple) of
1241
+ (connection, read) timeouts.
1242
+ :type _request_timeout: int, tuple(int, int), optional
1243
+ :param _request_auth: set to override the auth_settings for an a single
1244
+ request; this effectively ignores the
1245
+ authentication in the spec for a single request.
1246
+ :type _request_auth: dict, optional
1247
+ :param _content_type: force content-type for the request.
1248
+ :type _content_type: str, Optional
1249
+ :param _headers: set to override the headers for a single
1250
+ request; this effectively ignores the headers
1251
+ in the spec for a single request.
1252
+ :type _headers: dict, optional
1253
+ :param _host_index: set to override the host_index for a single
1254
+ request; this effectively ignores the host_index
1255
+ in the spec for a single request.
1256
+ :type _host_index: int, optional
1257
+ :return: Returns the result object.
1258
+ """ # noqa: E501
1259
+
1260
+ _param = self._api_v1_users_post_serialize(
1261
+ request=request,
1262
+ _request_auth=_request_auth,
1263
+ _content_type=_content_type,
1264
+ _headers=_headers,
1265
+ _host_index=_host_index
1266
+ )
1267
+
1268
+ _response_types_map: Dict[str, Optional[str]] = {
1269
+ '200': "AdminUpsertUserResponse",
1270
+ '400': "AdminUpsertUserResponse",
1271
+ '409': "AdminUpsertUserResponse",
1272
+ '500': "AdminUpsertUserResponse",
1273
+ }
1274
+ response_data = self.api_client.call_api(
1275
+ *_param,
1276
+ _request_timeout=_request_timeout
1277
+ )
1278
+ return response_data.response
1279
+
1280
+
1281
+ def _api_v1_users_post_serialize(
1282
+ self,
1283
+ request,
1284
+ _request_auth,
1285
+ _content_type,
1286
+ _headers,
1287
+ _host_index,
1288
+ ) -> RequestSerialized:
1289
+
1290
+ _host = None
1291
+
1292
+ _collection_formats: Dict[str, str] = {
1293
+ }
1294
+
1295
+ _path_params: Dict[str, str] = {}
1296
+ _query_params: List[Tuple[str, str]] = []
1297
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1298
+ _form_params: List[Tuple[str, str]] = []
1299
+ _files: Dict[
1300
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1301
+ ] = {}
1302
+ _body_params: Optional[bytes] = None
1303
+
1304
+ # process the path parameters
1305
+ # process the query parameters
1306
+ # process the header parameters
1307
+ # process the form parameters
1308
+ # process the body parameter
1309
+ if request is not None:
1310
+ _body_params = request
1311
+
1312
+
1313
+ # set the HTTP header `Accept`
1314
+ if 'Accept' not in _header_params:
1315
+ _header_params['Accept'] = self.api_client.select_header_accept(
1316
+ [
1317
+ 'application/json'
1318
+ ]
1319
+ )
1320
+
1321
+ # set the HTTP header `Content-Type`
1322
+ if _content_type:
1323
+ _header_params['Content-Type'] = _content_type
1324
+ else:
1325
+ _default_content_type = (
1326
+ self.api_client.select_header_content_type(
1327
+ [
1328
+ 'application/json'
1329
+ ]
1330
+ )
1331
+ )
1332
+ if _default_content_type is not None:
1333
+ _header_params['Content-Type'] = _default_content_type
1334
+
1335
+ # authentication setting
1336
+ _auth_settings: List[str] = [
1337
+ 'TokenAuth',
1338
+ 'ApiKeyAuth'
1339
+ ]
1340
+
1341
+ return self.api_client.param_serialize(
1342
+ method='POST',
1343
+ resource_path='/api/v1/users',
1344
+ path_params=_path_params,
1345
+ query_params=_query_params,
1346
+ header_params=_header_params,
1347
+ body=_body_params,
1348
+ post_params=_form_params,
1349
+ files=_files,
1350
+ auth_settings=_auth_settings,
1351
+ collection_formats=_collection_formats,
1352
+ _host=_host,
1353
+ _request_auth=_request_auth
1354
+ )
1355
+
1356
+