neurograph-core 1.202509252137__py3-none-any.whl → 1.202510040107__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 (48) hide show
  1. neurograph/v1/__init__.py +63 -198
  2. neurograph/v1/api/__init__.py +4 -27
  3. neurograph/v1/api/admin_api.py +1123 -0
  4. neurograph/v1/api/client_api.py +263 -0
  5. neurograph/v1/api/dagster_api.py +2 -1
  6. neurograph/v1/api/knowledge_api.py +296 -0
  7. neurograph/v1/api/knowledge_extract_api.py +1 -1
  8. neurograph/v1/api/lookup_api.py +279 -27
  9. neurograph/v1/api/organization_api.py +128 -137
  10. neurograph/v1/api/persona_api.py +2 -1
  11. neurograph/v1/api/reporting_api.py +300 -0
  12. neurograph/v1/api/user_api.py +282 -0
  13. neurograph/v1/api_client.py +4 -4
  14. neurograph/v1/models/__init__.py +29 -170
  15. neurograph/v1/models/admin_permission_response.py +95 -0
  16. neurograph/v1/models/admin_set_permission_request.py +91 -0
  17. neurograph/v1/models/admin_upsert_user_request.py +91 -0
  18. neurograph/v1/models/admin_upsert_user_response.py +99 -0
  19. neurograph/v1/models/admin_user.py +97 -0
  20. neurograph/v1/models/admin_user_detail_response.py +121 -0
  21. neurograph/v1/models/admin_users_get_many_response.py +97 -0
  22. neurograph/v1/models/admin_users_org_response.py +97 -0
  23. neurograph/v1/models/db_account_organization_brand.py +109 -0
  24. neurograph/v1/models/db_my_client.py +99 -0
  25. neurograph/v1/models/db_my_org.py +121 -0
  26. neurograph/v1/models/db_user_client_role.py +93 -0
  27. neurograph/v1/models/db_user_in_db.py +127 -0
  28. neurograph/v1/models/db_user_org_role.py +93 -0
  29. neurograph/v1/models/db_user_role.py +91 -0
  30. neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +3 -1
  31. neurograph/v1/models/knowledge_enrichment_query.py +3 -1
  32. neurograph/v1/models/knowledge_product.py +103 -0
  33. neurograph/v1/models/knowledge_product_upsert_request.py +95 -0
  34. neurograph/v1/models/knowledge_product_upsert_response.py +99 -0
  35. neurograph/v1/models/lookup_env.py +89 -0
  36. neurograph/v1/models/{lookup_lookup_language_response.py → lookup_language_response.py} +4 -4
  37. neurograph/v1/models/lookup_lookup_environments_response.py +97 -0
  38. neurograph/v1/models/lookup_role.py +89 -0
  39. neurograph/v1/models/lookup_roles_response.py +97 -0
  40. neurograph/v1/models/{lookup_lookup_state_response.py → lookup_states_response.py} +4 -4
  41. neurograph/v1/models/me_my_profile_response.py +115 -0
  42. neurograph/v1/models/reporting_daily_metric.py +95 -0
  43. neurograph/v1/models/reporting_daily_metrics_response.py +97 -0
  44. neurograph/v1/models/reporting_query.py +91 -0
  45. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/METADATA +2 -3
  46. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/RECORD +48 -19
  47. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/WHEEL +0 -0
  48. {neurograph_core-1.202509252137.dist-info → neurograph_core-1.202510040107.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1123 @@
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_permission_response import AdminPermissionResponse
22
+ from neurograph.v1.models.admin_set_permission_request import AdminSetPermissionRequest
23
+ from neurograph.v1.models.admin_upsert_user_request import AdminUpsertUserRequest
24
+ from neurograph.v1.models.admin_upsert_user_response import AdminUpsertUserResponse
25
+ from neurograph.v1.models.admin_user_detail_response import AdminUserDetailResponse
26
+ from neurograph.v1.models.admin_users_get_many_response import AdminUsersGetManyResponse
27
+
28
+ from neurograph.v1.api_client import ApiClient, RequestSerialized
29
+ from neurograph.v1.api_response import ApiResponse
30
+ from neurograph.v1.rest import RESTResponseType
31
+
32
+
33
+ class AdminApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def api_v1_admin_users_get(
48
+ self,
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
+ ) -> AdminUsersGetManyResponse:
62
+ """Users Get Many
63
+
64
+
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._api_v1_admin_users_get_serialize(
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index
92
+ )
93
+
94
+ _response_types_map: Dict[str, Optional[str]] = {
95
+ '200': "AdminUsersGetManyResponse",
96
+ }
97
+ response_data = self.api_client.call_api(
98
+ *_param,
99
+ _request_timeout=_request_timeout
100
+ )
101
+ response_data.read()
102
+ return self.api_client.response_deserialize(
103
+ response_data=response_data,
104
+ response_types_map=_response_types_map,
105
+ ).data
106
+
107
+
108
+ @validate_call
109
+ def api_v1_admin_users_get_with_http_info(
110
+ self,
111
+ _request_timeout: Union[
112
+ None,
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Tuple[
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Annotated[StrictFloat, Field(gt=0)]
117
+ ]
118
+ ] = None,
119
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
120
+ _content_type: Optional[StrictStr] = None,
121
+ _headers: Optional[Dict[StrictStr, Any]] = None,
122
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
123
+ ) -> ApiResponse[AdminUsersGetManyResponse]:
124
+ """Users Get Many
125
+
126
+
127
+ :param _request_timeout: timeout setting for this request. If one
128
+ number provided, it will be total request
129
+ timeout. It can also be a pair (tuple) of
130
+ (connection, read) timeouts.
131
+ :type _request_timeout: int, tuple(int, int), optional
132
+ :param _request_auth: set to override the auth_settings for an a single
133
+ request; this effectively ignores the
134
+ authentication in the spec for a single request.
135
+ :type _request_auth: dict, optional
136
+ :param _content_type: force content-type for the request.
137
+ :type _content_type: str, Optional
138
+ :param _headers: set to override the headers for a single
139
+ request; this effectively ignores the headers
140
+ in the spec for a single request.
141
+ :type _headers: dict, optional
142
+ :param _host_index: set to override the host_index for a single
143
+ request; this effectively ignores the host_index
144
+ in the spec for a single request.
145
+ :type _host_index: int, optional
146
+ :return: Returns the result object.
147
+ """ # noqa: E501
148
+
149
+ _param = self._api_v1_admin_users_get_serialize(
150
+ _request_auth=_request_auth,
151
+ _content_type=_content_type,
152
+ _headers=_headers,
153
+ _host_index=_host_index
154
+ )
155
+
156
+ _response_types_map: Dict[str, Optional[str]] = {
157
+ '200': "AdminUsersGetManyResponse",
158
+ }
159
+ response_data = self.api_client.call_api(
160
+ *_param,
161
+ _request_timeout=_request_timeout
162
+ )
163
+ response_data.read()
164
+ return self.api_client.response_deserialize(
165
+ response_data=response_data,
166
+ response_types_map=_response_types_map,
167
+ )
168
+
169
+
170
+ @validate_call
171
+ def api_v1_admin_users_get_without_preload_content(
172
+ self,
173
+ _request_timeout: Union[
174
+ None,
175
+ Annotated[StrictFloat, Field(gt=0)],
176
+ Tuple[
177
+ Annotated[StrictFloat, Field(gt=0)],
178
+ Annotated[StrictFloat, Field(gt=0)]
179
+ ]
180
+ ] = None,
181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
182
+ _content_type: Optional[StrictStr] = None,
183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
185
+ ) -> RESTResponseType:
186
+ """Users Get Many
187
+
188
+
189
+ :param _request_timeout: timeout setting for this request. If one
190
+ number provided, it will be total request
191
+ timeout. It can also be a pair (tuple) of
192
+ (connection, read) timeouts.
193
+ :type _request_timeout: int, tuple(int, int), optional
194
+ :param _request_auth: set to override the auth_settings for an a single
195
+ request; this effectively ignores the
196
+ authentication in the spec for a single request.
197
+ :type _request_auth: dict, optional
198
+ :param _content_type: force content-type for the request.
199
+ :type _content_type: str, Optional
200
+ :param _headers: set to override the headers for a single
201
+ request; this effectively ignores the headers
202
+ in the spec for a single request.
203
+ :type _headers: dict, optional
204
+ :param _host_index: set to override the host_index for a single
205
+ request; this effectively ignores the host_index
206
+ in the spec for a single request.
207
+ :type _host_index: int, optional
208
+ :return: Returns the result object.
209
+ """ # noqa: E501
210
+
211
+ _param = self._api_v1_admin_users_get_serialize(
212
+ _request_auth=_request_auth,
213
+ _content_type=_content_type,
214
+ _headers=_headers,
215
+ _host_index=_host_index
216
+ )
217
+
218
+ _response_types_map: Dict[str, Optional[str]] = {
219
+ '200': "AdminUsersGetManyResponse",
220
+ }
221
+ response_data = self.api_client.call_api(
222
+ *_param,
223
+ _request_timeout=_request_timeout
224
+ )
225
+ return response_data.response
226
+
227
+
228
+ def _api_v1_admin_users_get_serialize(
229
+ self,
230
+ _request_auth,
231
+ _content_type,
232
+ _headers,
233
+ _host_index,
234
+ ) -> RequestSerialized:
235
+
236
+ _host = None
237
+
238
+ _collection_formats: Dict[str, str] = {
239
+ }
240
+
241
+ _path_params: Dict[str, str] = {}
242
+ _query_params: List[Tuple[str, str]] = []
243
+ _header_params: Dict[str, Optional[str]] = _headers or {}
244
+ _form_params: List[Tuple[str, str]] = []
245
+ _files: Dict[
246
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
247
+ ] = {}
248
+ _body_params: Optional[bytes] = None
249
+
250
+ # process the path parameters
251
+ # process the query parameters
252
+ # process the header parameters
253
+ # process the form parameters
254
+ # process the body parameter
255
+
256
+
257
+ # set the HTTP header `Accept`
258
+ if 'Accept' not in _header_params:
259
+ _header_params['Accept'] = self.api_client.select_header_accept(
260
+ [
261
+ 'application/json'
262
+ ]
263
+ )
264
+
265
+
266
+ # authentication setting
267
+ _auth_settings: List[str] = [
268
+ 'ApiKeyAuth'
269
+ ]
270
+
271
+ return self.api_client.param_serialize(
272
+ method='GET',
273
+ resource_path='/api/v1/admin/users/',
274
+ path_params=_path_params,
275
+ query_params=_query_params,
276
+ header_params=_header_params,
277
+ body=_body_params,
278
+ post_params=_form_params,
279
+ files=_files,
280
+ auth_settings=_auth_settings,
281
+ collection_formats=_collection_formats,
282
+ _host=_host,
283
+ _request_auth=_request_auth
284
+ )
285
+
286
+
287
+
288
+
289
+ @validate_call
290
+ def api_v1_admin_users_id_get(
291
+ self,
292
+ id: Annotated[StrictInt, Field(description="User's ID")],
293
+ _request_timeout: Union[
294
+ None,
295
+ Annotated[StrictFloat, Field(gt=0)],
296
+ Tuple[
297
+ Annotated[StrictFloat, Field(gt=0)],
298
+ Annotated[StrictFloat, Field(gt=0)]
299
+ ]
300
+ ] = None,
301
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
302
+ _content_type: Optional[StrictStr] = None,
303
+ _headers: Optional[Dict[StrictStr, Any]] = None,
304
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
305
+ ) -> AdminUserDetailResponse:
306
+ """Get User Detail
307
+
308
+
309
+ :param id: User's ID (required)
310
+ :type id: int
311
+ :param _request_timeout: timeout setting for this request. If one
312
+ number provided, it will be total request
313
+ timeout. It can also be a pair (tuple) of
314
+ (connection, read) timeouts.
315
+ :type _request_timeout: int, tuple(int, int), optional
316
+ :param _request_auth: set to override the auth_settings for an a single
317
+ request; this effectively ignores the
318
+ authentication in the spec for a single request.
319
+ :type _request_auth: dict, optional
320
+ :param _content_type: force content-type for the request.
321
+ :type _content_type: str, Optional
322
+ :param _headers: set to override the headers for a single
323
+ request; this effectively ignores the headers
324
+ in the spec for a single request.
325
+ :type _headers: dict, optional
326
+ :param _host_index: set to override the host_index for a single
327
+ request; this effectively ignores the host_index
328
+ in the spec for a single request.
329
+ :type _host_index: int, optional
330
+ :return: Returns the result object.
331
+ """ # noqa: E501
332
+
333
+ _param = self._api_v1_admin_users_id_get_serialize(
334
+ id=id,
335
+ _request_auth=_request_auth,
336
+ _content_type=_content_type,
337
+ _headers=_headers,
338
+ _host_index=_host_index
339
+ )
340
+
341
+ _response_types_map: Dict[str, Optional[str]] = {
342
+ '200': "AdminUserDetailResponse",
343
+ '400': "AdminUserDetailResponse",
344
+ }
345
+ response_data = self.api_client.call_api(
346
+ *_param,
347
+ _request_timeout=_request_timeout
348
+ )
349
+ response_data.read()
350
+ return self.api_client.response_deserialize(
351
+ response_data=response_data,
352
+ response_types_map=_response_types_map,
353
+ ).data
354
+
355
+
356
+ @validate_call
357
+ def api_v1_admin_users_id_get_with_http_info(
358
+ self,
359
+ id: Annotated[StrictInt, Field(description="User's ID")],
360
+ _request_timeout: Union[
361
+ None,
362
+ Annotated[StrictFloat, Field(gt=0)],
363
+ Tuple[
364
+ Annotated[StrictFloat, Field(gt=0)],
365
+ Annotated[StrictFloat, Field(gt=0)]
366
+ ]
367
+ ] = None,
368
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
369
+ _content_type: Optional[StrictStr] = None,
370
+ _headers: Optional[Dict[StrictStr, Any]] = None,
371
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
372
+ ) -> ApiResponse[AdminUserDetailResponse]:
373
+ """Get User Detail
374
+
375
+
376
+ :param id: User's ID (required)
377
+ :type id: int
378
+ :param _request_timeout: timeout setting for this request. If one
379
+ number provided, it will be total request
380
+ timeout. It can also be a pair (tuple) of
381
+ (connection, read) timeouts.
382
+ :type _request_timeout: int, tuple(int, int), optional
383
+ :param _request_auth: set to override the auth_settings for an a single
384
+ request; this effectively ignores the
385
+ authentication in the spec for a single request.
386
+ :type _request_auth: dict, optional
387
+ :param _content_type: force content-type for the request.
388
+ :type _content_type: str, Optional
389
+ :param _headers: set to override the headers for a single
390
+ request; this effectively ignores the headers
391
+ in the spec for a single request.
392
+ :type _headers: dict, optional
393
+ :param _host_index: set to override the host_index for a single
394
+ request; this effectively ignores the host_index
395
+ in the spec for a single request.
396
+ :type _host_index: int, optional
397
+ :return: Returns the result object.
398
+ """ # noqa: E501
399
+
400
+ _param = self._api_v1_admin_users_id_get_serialize(
401
+ id=id,
402
+ _request_auth=_request_auth,
403
+ _content_type=_content_type,
404
+ _headers=_headers,
405
+ _host_index=_host_index
406
+ )
407
+
408
+ _response_types_map: Dict[str, Optional[str]] = {
409
+ '200': "AdminUserDetailResponse",
410
+ '400': "AdminUserDetailResponse",
411
+ }
412
+ response_data = self.api_client.call_api(
413
+ *_param,
414
+ _request_timeout=_request_timeout
415
+ )
416
+ response_data.read()
417
+ return self.api_client.response_deserialize(
418
+ response_data=response_data,
419
+ response_types_map=_response_types_map,
420
+ )
421
+
422
+
423
+ @validate_call
424
+ def api_v1_admin_users_id_get_without_preload_content(
425
+ self,
426
+ id: Annotated[StrictInt, Field(description="User's ID")],
427
+ _request_timeout: Union[
428
+ None,
429
+ Annotated[StrictFloat, Field(gt=0)],
430
+ Tuple[
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Annotated[StrictFloat, Field(gt=0)]
433
+ ]
434
+ ] = None,
435
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
436
+ _content_type: Optional[StrictStr] = None,
437
+ _headers: Optional[Dict[StrictStr, Any]] = None,
438
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
439
+ ) -> RESTResponseType:
440
+ """Get User Detail
441
+
442
+
443
+ :param id: User's ID (required)
444
+ :type id: int
445
+ :param _request_timeout: timeout setting for this request. If one
446
+ number provided, it will be total request
447
+ timeout. It can also be a pair (tuple) of
448
+ (connection, read) timeouts.
449
+ :type _request_timeout: int, tuple(int, int), optional
450
+ :param _request_auth: set to override the auth_settings for an a single
451
+ request; this effectively ignores the
452
+ authentication in the spec for a single request.
453
+ :type _request_auth: dict, optional
454
+ :param _content_type: force content-type for the request.
455
+ :type _content_type: str, Optional
456
+ :param _headers: set to override the headers for a single
457
+ request; this effectively ignores the headers
458
+ in the spec for a single request.
459
+ :type _headers: dict, optional
460
+ :param _host_index: set to override the host_index for a single
461
+ request; this effectively ignores the host_index
462
+ in the spec for a single request.
463
+ :type _host_index: int, optional
464
+ :return: Returns the result object.
465
+ """ # noqa: E501
466
+
467
+ _param = self._api_v1_admin_users_id_get_serialize(
468
+ id=id,
469
+ _request_auth=_request_auth,
470
+ _content_type=_content_type,
471
+ _headers=_headers,
472
+ _host_index=_host_index
473
+ )
474
+
475
+ _response_types_map: Dict[str, Optional[str]] = {
476
+ '200': "AdminUserDetailResponse",
477
+ '400': "AdminUserDetailResponse",
478
+ }
479
+ response_data = self.api_client.call_api(
480
+ *_param,
481
+ _request_timeout=_request_timeout
482
+ )
483
+ return response_data.response
484
+
485
+
486
+ def _api_v1_admin_users_id_get_serialize(
487
+ self,
488
+ id,
489
+ _request_auth,
490
+ _content_type,
491
+ _headers,
492
+ _host_index,
493
+ ) -> RequestSerialized:
494
+
495
+ _host = None
496
+
497
+ _collection_formats: Dict[str, str] = {
498
+ }
499
+
500
+ _path_params: Dict[str, str] = {}
501
+ _query_params: List[Tuple[str, str]] = []
502
+ _header_params: Dict[str, Optional[str]] = _headers or {}
503
+ _form_params: List[Tuple[str, str]] = []
504
+ _files: Dict[
505
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
506
+ ] = {}
507
+ _body_params: Optional[bytes] = None
508
+
509
+ # process the path parameters
510
+ if id is not None:
511
+ _path_params['id'] = id
512
+ # process the query parameters
513
+ # process the header parameters
514
+ # process the form parameters
515
+ # process the body parameter
516
+
517
+
518
+ # set the HTTP header `Accept`
519
+ if 'Accept' not in _header_params:
520
+ _header_params['Accept'] = self.api_client.select_header_accept(
521
+ [
522
+ 'application/json'
523
+ ]
524
+ )
525
+
526
+
527
+ # authentication setting
528
+ _auth_settings: List[str] = [
529
+ 'ApiKeyAuth'
530
+ ]
531
+
532
+ return self.api_client.param_serialize(
533
+ method='GET',
534
+ resource_path='/api/v1/admin/users/{id}',
535
+ path_params=_path_params,
536
+ query_params=_query_params,
537
+ header_params=_header_params,
538
+ body=_body_params,
539
+ post_params=_form_params,
540
+ files=_files,
541
+ auth_settings=_auth_settings,
542
+ collection_formats=_collection_formats,
543
+ _host=_host,
544
+ _request_auth=_request_auth
545
+ )
546
+
547
+
548
+
549
+
550
+ @validate_call
551
+ def api_v1_admin_users_id_permisions_post(
552
+ self,
553
+ id: Annotated[StrictStr, Field(description="User ID")],
554
+ request: Annotated[AdminSetPermissionRequest, Field(description="Body")],
555
+ _request_timeout: Union[
556
+ None,
557
+ Annotated[StrictFloat, Field(gt=0)],
558
+ Tuple[
559
+ Annotated[StrictFloat, Field(gt=0)],
560
+ Annotated[StrictFloat, Field(gt=0)]
561
+ ]
562
+ ] = None,
563
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
564
+ _content_type: Optional[StrictStr] = None,
565
+ _headers: Optional[Dict[StrictStr, Any]] = None,
566
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
567
+ ) -> AdminPermissionResponse:
568
+ """Set User Permissions
569
+
570
+ Assign or update a user’s role in global, org, or client scope
571
+
572
+ :param id: User ID (required)
573
+ :type id: str
574
+ :param request: Body (required)
575
+ :type request: AdminSetPermissionRequest
576
+ :param _request_timeout: timeout setting for this request. If one
577
+ number provided, it will be total request
578
+ timeout. It can also be a pair (tuple) of
579
+ (connection, read) timeouts.
580
+ :type _request_timeout: int, tuple(int, int), optional
581
+ :param _request_auth: set to override the auth_settings for an a single
582
+ request; this effectively ignores the
583
+ authentication in the spec for a single request.
584
+ :type _request_auth: dict, optional
585
+ :param _content_type: force content-type for the request.
586
+ :type _content_type: str, Optional
587
+ :param _headers: set to override the headers for a single
588
+ request; this effectively ignores the headers
589
+ in the spec for a single request.
590
+ :type _headers: dict, optional
591
+ :param _host_index: set to override the host_index for a single
592
+ request; this effectively ignores the host_index
593
+ in the spec for a single request.
594
+ :type _host_index: int, optional
595
+ :return: Returns the result object.
596
+ """ # noqa: E501
597
+
598
+ _param = self._api_v1_admin_users_id_permisions_post_serialize(
599
+ id=id,
600
+ request=request,
601
+ _request_auth=_request_auth,
602
+ _content_type=_content_type,
603
+ _headers=_headers,
604
+ _host_index=_host_index
605
+ )
606
+
607
+ _response_types_map: Dict[str, Optional[str]] = {
608
+ '200': "AdminPermissionResponse",
609
+ '400': "AdminPermissionResponse",
610
+ }
611
+ response_data = self.api_client.call_api(
612
+ *_param,
613
+ _request_timeout=_request_timeout
614
+ )
615
+ response_data.read()
616
+ return self.api_client.response_deserialize(
617
+ response_data=response_data,
618
+ response_types_map=_response_types_map,
619
+ ).data
620
+
621
+
622
+ @validate_call
623
+ def api_v1_admin_users_id_permisions_post_with_http_info(
624
+ self,
625
+ id: Annotated[StrictStr, Field(description="User ID")],
626
+ request: Annotated[AdminSetPermissionRequest, Field(description="Body")],
627
+ _request_timeout: Union[
628
+ None,
629
+ Annotated[StrictFloat, Field(gt=0)],
630
+ Tuple[
631
+ Annotated[StrictFloat, Field(gt=0)],
632
+ Annotated[StrictFloat, Field(gt=0)]
633
+ ]
634
+ ] = None,
635
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
636
+ _content_type: Optional[StrictStr] = None,
637
+ _headers: Optional[Dict[StrictStr, Any]] = None,
638
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
639
+ ) -> ApiResponse[AdminPermissionResponse]:
640
+ """Set User Permissions
641
+
642
+ Assign or update a user’s role in global, org, or client scope
643
+
644
+ :param id: User ID (required)
645
+ :type id: str
646
+ :param request: Body (required)
647
+ :type request: AdminSetPermissionRequest
648
+ :param _request_timeout: timeout setting for this request. If one
649
+ number provided, it will be total request
650
+ timeout. It can also be a pair (tuple) of
651
+ (connection, read) timeouts.
652
+ :type _request_timeout: int, tuple(int, int), optional
653
+ :param _request_auth: set to override the auth_settings for an a single
654
+ request; this effectively ignores the
655
+ authentication in the spec for a single request.
656
+ :type _request_auth: dict, optional
657
+ :param _content_type: force content-type for the request.
658
+ :type _content_type: str, Optional
659
+ :param _headers: set to override the headers for a single
660
+ request; this effectively ignores the headers
661
+ in the spec for a single request.
662
+ :type _headers: dict, optional
663
+ :param _host_index: set to override the host_index for a single
664
+ request; this effectively ignores the host_index
665
+ in the spec for a single request.
666
+ :type _host_index: int, optional
667
+ :return: Returns the result object.
668
+ """ # noqa: E501
669
+
670
+ _param = self._api_v1_admin_users_id_permisions_post_serialize(
671
+ id=id,
672
+ request=request,
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': "AdminPermissionResponse",
681
+ '400': "AdminPermissionResponse",
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_admin_users_id_permisions_post_without_preload_content(
696
+ self,
697
+ id: Annotated[StrictStr, Field(description="User ID")],
698
+ request: Annotated[AdminSetPermissionRequest, Field(description="Body")],
699
+ _request_timeout: Union[
700
+ None,
701
+ Annotated[StrictFloat, Field(gt=0)],
702
+ Tuple[
703
+ Annotated[StrictFloat, Field(gt=0)],
704
+ Annotated[StrictFloat, Field(gt=0)]
705
+ ]
706
+ ] = None,
707
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
708
+ _content_type: Optional[StrictStr] = None,
709
+ _headers: Optional[Dict[StrictStr, Any]] = None,
710
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
711
+ ) -> RESTResponseType:
712
+ """Set User Permissions
713
+
714
+ Assign or update a user’s role in global, org, or client scope
715
+
716
+ :param id: User ID (required)
717
+ :type id: str
718
+ :param request: Body (required)
719
+ :type request: AdminSetPermissionRequest
720
+ :param _request_timeout: timeout setting for this request. If one
721
+ number provided, it will be total request
722
+ timeout. It can also be a pair (tuple) of
723
+ (connection, read) timeouts.
724
+ :type _request_timeout: int, tuple(int, int), optional
725
+ :param _request_auth: set to override the auth_settings for an a single
726
+ request; this effectively ignores the
727
+ authentication in the spec for a single request.
728
+ :type _request_auth: dict, optional
729
+ :param _content_type: force content-type for the request.
730
+ :type _content_type: str, Optional
731
+ :param _headers: set to override the headers for a single
732
+ request; this effectively ignores the headers
733
+ in the spec for a single request.
734
+ :type _headers: dict, optional
735
+ :param _host_index: set to override the host_index for a single
736
+ request; this effectively ignores the host_index
737
+ in the spec for a single request.
738
+ :type _host_index: int, optional
739
+ :return: Returns the result object.
740
+ """ # noqa: E501
741
+
742
+ _param = self._api_v1_admin_users_id_permisions_post_serialize(
743
+ id=id,
744
+ request=request,
745
+ _request_auth=_request_auth,
746
+ _content_type=_content_type,
747
+ _headers=_headers,
748
+ _host_index=_host_index
749
+ )
750
+
751
+ _response_types_map: Dict[str, Optional[str]] = {
752
+ '200': "AdminPermissionResponse",
753
+ '400': "AdminPermissionResponse",
754
+ }
755
+ response_data = self.api_client.call_api(
756
+ *_param,
757
+ _request_timeout=_request_timeout
758
+ )
759
+ return response_data.response
760
+
761
+
762
+ def _api_v1_admin_users_id_permisions_post_serialize(
763
+ self,
764
+ id,
765
+ request,
766
+ _request_auth,
767
+ _content_type,
768
+ _headers,
769
+ _host_index,
770
+ ) -> RequestSerialized:
771
+
772
+ _host = None
773
+
774
+ _collection_formats: Dict[str, str] = {
775
+ }
776
+
777
+ _path_params: Dict[str, str] = {}
778
+ _query_params: List[Tuple[str, str]] = []
779
+ _header_params: Dict[str, Optional[str]] = _headers or {}
780
+ _form_params: List[Tuple[str, str]] = []
781
+ _files: Dict[
782
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
783
+ ] = {}
784
+ _body_params: Optional[bytes] = None
785
+
786
+ # process the path parameters
787
+ if id is not None:
788
+ _path_params['id'] = id
789
+ # process the query parameters
790
+ # process the header parameters
791
+ # process the form parameters
792
+ # process the body parameter
793
+ if request is not None:
794
+ _body_params = request
795
+
796
+
797
+ # set the HTTP header `Accept`
798
+ if 'Accept' not in _header_params:
799
+ _header_params['Accept'] = self.api_client.select_header_accept(
800
+ [
801
+ 'application/json'
802
+ ]
803
+ )
804
+
805
+ # set the HTTP header `Content-Type`
806
+ if _content_type:
807
+ _header_params['Content-Type'] = _content_type
808
+ else:
809
+ _default_content_type = (
810
+ self.api_client.select_header_content_type(
811
+ [
812
+ 'application/json'
813
+ ]
814
+ )
815
+ )
816
+ if _default_content_type is not None:
817
+ _header_params['Content-Type'] = _default_content_type
818
+
819
+ # authentication setting
820
+ _auth_settings: List[str] = [
821
+ 'ApiKeyAuth'
822
+ ]
823
+
824
+ return self.api_client.param_serialize(
825
+ method='POST',
826
+ resource_path='/api/v1/admin/users/{id}/permisions',
827
+ path_params=_path_params,
828
+ query_params=_query_params,
829
+ header_params=_header_params,
830
+ body=_body_params,
831
+ post_params=_form_params,
832
+ files=_files,
833
+ auth_settings=_auth_settings,
834
+ collection_formats=_collection_formats,
835
+ _host=_host,
836
+ _request_auth=_request_auth
837
+ )
838
+
839
+
840
+
841
+
842
+ @validate_call
843
+ def api_v1_users_post(
844
+ self,
845
+ request: Annotated[AdminUpsertUserRequest, Field(description="Upsert user request payload")],
846
+ _request_timeout: Union[
847
+ None,
848
+ Annotated[StrictFloat, Field(gt=0)],
849
+ Tuple[
850
+ Annotated[StrictFloat, Field(gt=0)],
851
+ Annotated[StrictFloat, Field(gt=0)]
852
+ ]
853
+ ] = None,
854
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
855
+ _content_type: Optional[StrictStr] = None,
856
+ _headers: Optional[Dict[StrictStr, Any]] = None,
857
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
858
+ ) -> AdminUpsertUserResponse:
859
+ """Upsert a User
860
+
861
+ Create or update a user (imported from Firebase as source of truth).
862
+
863
+ :param request: Upsert user request payload (required)
864
+ :type request: AdminUpsertUserRequest
865
+ :param _request_timeout: timeout setting for this request. If one
866
+ number provided, it will be total request
867
+ timeout. It can also be a pair (tuple) of
868
+ (connection, read) timeouts.
869
+ :type _request_timeout: int, tuple(int, int), optional
870
+ :param _request_auth: set to override the auth_settings for an a single
871
+ request; this effectively ignores the
872
+ authentication in the spec for a single request.
873
+ :type _request_auth: dict, optional
874
+ :param _content_type: force content-type for the request.
875
+ :type _content_type: str, Optional
876
+ :param _headers: set to override the headers for a single
877
+ request; this effectively ignores the headers
878
+ in the spec for a single request.
879
+ :type _headers: dict, optional
880
+ :param _host_index: set to override the host_index for a single
881
+ request; this effectively ignores the host_index
882
+ in the spec for a single request.
883
+ :type _host_index: int, optional
884
+ :return: Returns the result object.
885
+ """ # noqa: E501
886
+
887
+ _param = self._api_v1_users_post_serialize(
888
+ request=request,
889
+ _request_auth=_request_auth,
890
+ _content_type=_content_type,
891
+ _headers=_headers,
892
+ _host_index=_host_index
893
+ )
894
+
895
+ _response_types_map: Dict[str, Optional[str]] = {
896
+ '200': "AdminUpsertUserResponse",
897
+ '400': "AdminUpsertUserResponse",
898
+ '409': "AdminUpsertUserResponse",
899
+ '500': "AdminUpsertUserResponse",
900
+ }
901
+ response_data = self.api_client.call_api(
902
+ *_param,
903
+ _request_timeout=_request_timeout
904
+ )
905
+ response_data.read()
906
+ return self.api_client.response_deserialize(
907
+ response_data=response_data,
908
+ response_types_map=_response_types_map,
909
+ ).data
910
+
911
+
912
+ @validate_call
913
+ def api_v1_users_post_with_http_info(
914
+ self,
915
+ request: Annotated[AdminUpsertUserRequest, Field(description="Upsert user request payload")],
916
+ _request_timeout: Union[
917
+ None,
918
+ Annotated[StrictFloat, Field(gt=0)],
919
+ Tuple[
920
+ Annotated[StrictFloat, Field(gt=0)],
921
+ Annotated[StrictFloat, Field(gt=0)]
922
+ ]
923
+ ] = None,
924
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
925
+ _content_type: Optional[StrictStr] = None,
926
+ _headers: Optional[Dict[StrictStr, Any]] = None,
927
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
928
+ ) -> ApiResponse[AdminUpsertUserResponse]:
929
+ """Upsert a User
930
+
931
+ Create or update a user (imported from Firebase as source of truth).
932
+
933
+ :param request: Upsert user request payload (required)
934
+ :type request: AdminUpsertUserRequest
935
+ :param _request_timeout: timeout setting for this request. If one
936
+ number provided, it will be total request
937
+ timeout. It can also be a pair (tuple) of
938
+ (connection, read) timeouts.
939
+ :type _request_timeout: int, tuple(int, int), optional
940
+ :param _request_auth: set to override the auth_settings for an a single
941
+ request; this effectively ignores the
942
+ authentication in the spec for a single request.
943
+ :type _request_auth: dict, optional
944
+ :param _content_type: force content-type for the request.
945
+ :type _content_type: str, Optional
946
+ :param _headers: set to override the headers for a single
947
+ request; this effectively ignores the headers
948
+ in the spec for a single request.
949
+ :type _headers: dict, optional
950
+ :param _host_index: set to override the host_index for a single
951
+ request; this effectively ignores the host_index
952
+ in the spec for a single request.
953
+ :type _host_index: int, optional
954
+ :return: Returns the result object.
955
+ """ # noqa: E501
956
+
957
+ _param = self._api_v1_users_post_serialize(
958
+ request=request,
959
+ _request_auth=_request_auth,
960
+ _content_type=_content_type,
961
+ _headers=_headers,
962
+ _host_index=_host_index
963
+ )
964
+
965
+ _response_types_map: Dict[str, Optional[str]] = {
966
+ '200': "AdminUpsertUserResponse",
967
+ '400': "AdminUpsertUserResponse",
968
+ '409': "AdminUpsertUserResponse",
969
+ '500': "AdminUpsertUserResponse",
970
+ }
971
+ response_data = self.api_client.call_api(
972
+ *_param,
973
+ _request_timeout=_request_timeout
974
+ )
975
+ response_data.read()
976
+ return self.api_client.response_deserialize(
977
+ response_data=response_data,
978
+ response_types_map=_response_types_map,
979
+ )
980
+
981
+
982
+ @validate_call
983
+ def api_v1_users_post_without_preload_content(
984
+ self,
985
+ request: Annotated[AdminUpsertUserRequest, Field(description="Upsert user request payload")],
986
+ _request_timeout: Union[
987
+ None,
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Tuple[
990
+ Annotated[StrictFloat, Field(gt=0)],
991
+ Annotated[StrictFloat, Field(gt=0)]
992
+ ]
993
+ ] = None,
994
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
995
+ _content_type: Optional[StrictStr] = None,
996
+ _headers: Optional[Dict[StrictStr, Any]] = None,
997
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
998
+ ) -> RESTResponseType:
999
+ """Upsert a User
1000
+
1001
+ Create or update a user (imported from Firebase as source of truth).
1002
+
1003
+ :param request: Upsert user request payload (required)
1004
+ :type request: AdminUpsertUserRequest
1005
+ :param _request_timeout: timeout setting for this request. If one
1006
+ number provided, it will be total request
1007
+ timeout. It can also be a pair (tuple) of
1008
+ (connection, read) timeouts.
1009
+ :type _request_timeout: int, tuple(int, int), optional
1010
+ :param _request_auth: set to override the auth_settings for an a single
1011
+ request; this effectively ignores the
1012
+ authentication in the spec for a single request.
1013
+ :type _request_auth: dict, optional
1014
+ :param _content_type: force content-type for the request.
1015
+ :type _content_type: str, Optional
1016
+ :param _headers: set to override the headers for a single
1017
+ request; this effectively ignores the headers
1018
+ in the spec for a single request.
1019
+ :type _headers: dict, optional
1020
+ :param _host_index: set to override the host_index for a single
1021
+ request; this effectively ignores the host_index
1022
+ in the spec for a single request.
1023
+ :type _host_index: int, optional
1024
+ :return: Returns the result object.
1025
+ """ # noqa: E501
1026
+
1027
+ _param = self._api_v1_users_post_serialize(
1028
+ request=request,
1029
+ _request_auth=_request_auth,
1030
+ _content_type=_content_type,
1031
+ _headers=_headers,
1032
+ _host_index=_host_index
1033
+ )
1034
+
1035
+ _response_types_map: Dict[str, Optional[str]] = {
1036
+ '200': "AdminUpsertUserResponse",
1037
+ '400': "AdminUpsertUserResponse",
1038
+ '409': "AdminUpsertUserResponse",
1039
+ '500': "AdminUpsertUserResponse",
1040
+ }
1041
+ response_data = self.api_client.call_api(
1042
+ *_param,
1043
+ _request_timeout=_request_timeout
1044
+ )
1045
+ return response_data.response
1046
+
1047
+
1048
+ def _api_v1_users_post_serialize(
1049
+ self,
1050
+ request,
1051
+ _request_auth,
1052
+ _content_type,
1053
+ _headers,
1054
+ _host_index,
1055
+ ) -> RequestSerialized:
1056
+
1057
+ _host = None
1058
+
1059
+ _collection_formats: Dict[str, str] = {
1060
+ }
1061
+
1062
+ _path_params: Dict[str, str] = {}
1063
+ _query_params: List[Tuple[str, str]] = []
1064
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1065
+ _form_params: List[Tuple[str, str]] = []
1066
+ _files: Dict[
1067
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1068
+ ] = {}
1069
+ _body_params: Optional[bytes] = None
1070
+
1071
+ # process the path parameters
1072
+ # process the query parameters
1073
+ # process the header parameters
1074
+ # process the form parameters
1075
+ # process the body parameter
1076
+ if request is not None:
1077
+ _body_params = request
1078
+
1079
+
1080
+ # set the HTTP header `Accept`
1081
+ if 'Accept' not in _header_params:
1082
+ _header_params['Accept'] = self.api_client.select_header_accept(
1083
+ [
1084
+ 'application/json'
1085
+ ]
1086
+ )
1087
+
1088
+ # set the HTTP header `Content-Type`
1089
+ if _content_type:
1090
+ _header_params['Content-Type'] = _content_type
1091
+ else:
1092
+ _default_content_type = (
1093
+ self.api_client.select_header_content_type(
1094
+ [
1095
+ 'application/json'
1096
+ ]
1097
+ )
1098
+ )
1099
+ if _default_content_type is not None:
1100
+ _header_params['Content-Type'] = _default_content_type
1101
+
1102
+ # authentication setting
1103
+ _auth_settings: List[str] = [
1104
+ 'TokenAuth',
1105
+ 'ApiKeyAuth'
1106
+ ]
1107
+
1108
+ return self.api_client.param_serialize(
1109
+ method='POST',
1110
+ resource_path='/api/v1/users',
1111
+ path_params=_path_params,
1112
+ query_params=_query_params,
1113
+ header_params=_header_params,
1114
+ body=_body_params,
1115
+ post_params=_form_params,
1116
+ files=_files,
1117
+ auth_settings=_auth_settings,
1118
+ collection_formats=_collection_formats,
1119
+ _host=_host,
1120
+ _request_auth=_request_auth
1121
+ )
1122
+
1123
+