crypticorn 2.0.1__py3-none-any.whl → 2.1.1__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.
@@ -17,12 +17,19 @@ from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import Field, StrictStr
20
- from typing import Optional
20
+ from typing import Any, List, Optional
21
21
  from typing_extensions import Annotated
22
22
  from crypticorn.auth.client.models.authorize_user200_response import (
23
23
  AuthorizeUser200Response,
24
24
  )
25
25
  from crypticorn.auth.client.models.authorize_user_request import AuthorizeUserRequest
26
+ from crypticorn.auth.client.models.create_api_key200_response import (
27
+ CreateApiKey200Response,
28
+ )
29
+ from crypticorn.auth.client.models.create_api_key_request import CreateApiKeyRequest
30
+ from crypticorn.auth.client.models.get_api_keys200_response_inner import (
31
+ GetApiKeys200ResponseInner,
32
+ )
26
33
  from crypticorn.auth.client.models.refresh_token_info200_response import (
27
34
  RefreshTokenInfo200Response,
28
35
  )
@@ -93,8 +100,752 @@ class AuthApi:
93
100
  :return: Returns the result object.
94
101
  """ # noqa: E501
95
102
 
96
- _param = self._authorize_user_serialize(
97
- authorize_user_request=authorize_user_request,
103
+ _param = self._authorize_user_serialize(
104
+ authorize_user_request=authorize_user_request,
105
+ _request_auth=_request_auth,
106
+ _content_type=_content_type,
107
+ _headers=_headers,
108
+ _host_index=_host_index,
109
+ )
110
+
111
+ _response_types_map: Dict[str, Optional[str]] = {
112
+ "200": "AuthorizeUser200Response",
113
+ }
114
+ response_data = await self.api_client.call_api(
115
+ *_param, _request_timeout=_request_timeout
116
+ )
117
+ await response_data.read()
118
+ return self.api_client.response_deserialize(
119
+ response_data=response_data,
120
+ response_types_map=_response_types_map,
121
+ ).data
122
+
123
+ @validate_call
124
+ async def authorize_user_with_http_info(
125
+ self,
126
+ authorize_user_request: AuthorizeUserRequest,
127
+ _request_timeout: Union[
128
+ None,
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Tuple[
131
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
132
+ ],
133
+ ] = None,
134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
135
+ _content_type: Optional[StrictStr] = None,
136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
138
+ ) -> ApiResponse[AuthorizeUser200Response]:
139
+ """Authorize a user
140
+
141
+ Authorize a user with email and password from the login page, uses a captcha to prevent bots.
142
+
143
+ :param authorize_user_request: (required)
144
+ :type authorize_user_request: AuthorizeUserRequest
145
+ :param _request_timeout: timeout setting for this request. If one
146
+ number provided, it will be total request
147
+ timeout. It can also be a pair (tuple) of
148
+ (connection, read) timeouts.
149
+ :type _request_timeout: int, tuple(int, int), optional
150
+ :param _request_auth: set to override the auth_settings for an a single
151
+ request; this effectively ignores the
152
+ authentication in the spec for a single request.
153
+ :type _request_auth: dict, optional
154
+ :param _content_type: force content-type for the request.
155
+ :type _content_type: str, Optional
156
+ :param _headers: set to override the headers for a single
157
+ request; this effectively ignores the headers
158
+ in the spec for a single request.
159
+ :type _headers: dict, optional
160
+ :param _host_index: set to override the host_index for a single
161
+ request; this effectively ignores the host_index
162
+ in the spec for a single request.
163
+ :type _host_index: int, optional
164
+ :return: Returns the result object.
165
+ """ # noqa: E501
166
+
167
+ _param = self._authorize_user_serialize(
168
+ authorize_user_request=authorize_user_request,
169
+ _request_auth=_request_auth,
170
+ _content_type=_content_type,
171
+ _headers=_headers,
172
+ _host_index=_host_index,
173
+ )
174
+
175
+ _response_types_map: Dict[str, Optional[str]] = {
176
+ "200": "AuthorizeUser200Response",
177
+ }
178
+ response_data = await self.api_client.call_api(
179
+ *_param, _request_timeout=_request_timeout
180
+ )
181
+ await response_data.read()
182
+ return self.api_client.response_deserialize(
183
+ response_data=response_data,
184
+ response_types_map=_response_types_map,
185
+ )
186
+
187
+ @validate_call
188
+ async def authorize_user_without_preload_content(
189
+ self,
190
+ authorize_user_request: AuthorizeUserRequest,
191
+ _request_timeout: Union[
192
+ None,
193
+ Annotated[StrictFloat, Field(gt=0)],
194
+ Tuple[
195
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
196
+ ],
197
+ ] = None,
198
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
199
+ _content_type: Optional[StrictStr] = None,
200
+ _headers: Optional[Dict[StrictStr, Any]] = None,
201
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
202
+ ) -> RESTResponseType:
203
+ """Authorize a user
204
+
205
+ Authorize a user with email and password from the login page, uses a captcha to prevent bots.
206
+
207
+ :param authorize_user_request: (required)
208
+ :type authorize_user_request: AuthorizeUserRequest
209
+ :param _request_timeout: timeout setting for this request. If one
210
+ number provided, it will be total request
211
+ timeout. It can also be a pair (tuple) of
212
+ (connection, read) timeouts.
213
+ :type _request_timeout: int, tuple(int, int), optional
214
+ :param _request_auth: set to override the auth_settings for an a single
215
+ request; this effectively ignores the
216
+ authentication in the spec for a single request.
217
+ :type _request_auth: dict, optional
218
+ :param _content_type: force content-type for the request.
219
+ :type _content_type: str, Optional
220
+ :param _headers: set to override the headers for a single
221
+ request; this effectively ignores the headers
222
+ in the spec for a single request.
223
+ :type _headers: dict, optional
224
+ :param _host_index: set to override the host_index for a single
225
+ request; this effectively ignores the host_index
226
+ in the spec for a single request.
227
+ :type _host_index: int, optional
228
+ :return: Returns the result object.
229
+ """ # noqa: E501
230
+
231
+ _param = self._authorize_user_serialize(
232
+ authorize_user_request=authorize_user_request,
233
+ _request_auth=_request_auth,
234
+ _content_type=_content_type,
235
+ _headers=_headers,
236
+ _host_index=_host_index,
237
+ )
238
+
239
+ _response_types_map: Dict[str, Optional[str]] = {
240
+ "200": "AuthorizeUser200Response",
241
+ }
242
+ response_data = await self.api_client.call_api(
243
+ *_param, _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+ def _authorize_user_serialize(
248
+ self,
249
+ authorize_user_request,
250
+ _request_auth,
251
+ _content_type,
252
+ _headers,
253
+ _host_index,
254
+ ) -> RequestSerialized:
255
+
256
+ _host = None
257
+
258
+ _collection_formats: Dict[str, str] = {}
259
+
260
+ _path_params: Dict[str, str] = {}
261
+ _query_params: List[Tuple[str, str]] = []
262
+ _header_params: Dict[str, Optional[str]] = _headers or {}
263
+ _form_params: List[Tuple[str, str]] = []
264
+ _files: Dict[
265
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
266
+ ] = {}
267
+ _body_params: Optional[bytes] = None
268
+
269
+ # process the path parameters
270
+ # process the query parameters
271
+ # process the header parameters
272
+ # process the form parameters
273
+ # process the body parameter
274
+ if authorize_user_request is not None:
275
+ _body_params = authorize_user_request
276
+
277
+ # set the HTTP header `Accept`
278
+ if "Accept" not in _header_params:
279
+ _header_params["Accept"] = self.api_client.select_header_accept(
280
+ ["application/json"]
281
+ )
282
+
283
+ # set the HTTP header `Content-Type`
284
+ if _content_type:
285
+ _header_params["Content-Type"] = _content_type
286
+ else:
287
+ _default_content_type = self.api_client.select_header_content_type(
288
+ ["application/json"]
289
+ )
290
+ if _default_content_type is not None:
291
+ _header_params["Content-Type"] = _default_content_type
292
+
293
+ # authentication setting
294
+ _auth_settings: List[str] = []
295
+
296
+ return self.api_client.param_serialize(
297
+ method="POST",
298
+ resource_path="/authorize",
299
+ path_params=_path_params,
300
+ query_params=_query_params,
301
+ header_params=_header_params,
302
+ body=_body_params,
303
+ post_params=_form_params,
304
+ files=_files,
305
+ auth_settings=_auth_settings,
306
+ collection_formats=_collection_formats,
307
+ _host=_host,
308
+ _request_auth=_request_auth,
309
+ )
310
+
311
+ @validate_call
312
+ async def create_api_key(
313
+ self,
314
+ create_api_key_request: CreateApiKeyRequest,
315
+ _request_timeout: Union[
316
+ None,
317
+ Annotated[StrictFloat, Field(gt=0)],
318
+ Tuple[
319
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
320
+ ],
321
+ ] = None,
322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
323
+ _content_type: Optional[StrictStr] = None,
324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
326
+ ) -> CreateApiKey200Response:
327
+ """Create API Key
328
+
329
+ Creates a new API key for the user.
330
+
331
+ :param create_api_key_request: (required)
332
+ :type create_api_key_request: CreateApiKeyRequest
333
+ :param _request_timeout: timeout setting for this request. If one
334
+ number provided, it will be total request
335
+ timeout. It can also be a pair (tuple) of
336
+ (connection, read) timeouts.
337
+ :type _request_timeout: int, tuple(int, int), optional
338
+ :param _request_auth: set to override the auth_settings for an a single
339
+ request; this effectively ignores the
340
+ authentication in the spec for a single request.
341
+ :type _request_auth: dict, optional
342
+ :param _content_type: force content-type for the request.
343
+ :type _content_type: str, Optional
344
+ :param _headers: set to override the headers for a single
345
+ request; this effectively ignores the headers
346
+ in the spec for a single request.
347
+ :type _headers: dict, optional
348
+ :param _host_index: set to override the host_index for a single
349
+ request; this effectively ignores the host_index
350
+ in the spec for a single request.
351
+ :type _host_index: int, optional
352
+ :return: Returns the result object.
353
+ """ # noqa: E501
354
+
355
+ _param = self._create_api_key_serialize(
356
+ create_api_key_request=create_api_key_request,
357
+ _request_auth=_request_auth,
358
+ _content_type=_content_type,
359
+ _headers=_headers,
360
+ _host_index=_host_index,
361
+ )
362
+
363
+ _response_types_map: Dict[str, Optional[str]] = {
364
+ "200": "CreateApiKey200Response",
365
+ }
366
+ response_data = await self.api_client.call_api(
367
+ *_param, _request_timeout=_request_timeout
368
+ )
369
+ await response_data.read()
370
+ return self.api_client.response_deserialize(
371
+ response_data=response_data,
372
+ response_types_map=_response_types_map,
373
+ ).data
374
+
375
+ @validate_call
376
+ async def create_api_key_with_http_info(
377
+ self,
378
+ create_api_key_request: CreateApiKeyRequest,
379
+ _request_timeout: Union[
380
+ None,
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Tuple[
383
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
384
+ ],
385
+ ] = None,
386
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
387
+ _content_type: Optional[StrictStr] = None,
388
+ _headers: Optional[Dict[StrictStr, Any]] = None,
389
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
390
+ ) -> ApiResponse[CreateApiKey200Response]:
391
+ """Create API Key
392
+
393
+ Creates a new API key for the user.
394
+
395
+ :param create_api_key_request: (required)
396
+ :type create_api_key_request: CreateApiKeyRequest
397
+ :param _request_timeout: timeout setting for this request. If one
398
+ number provided, it will be total request
399
+ timeout. It can also be a pair (tuple) of
400
+ (connection, read) timeouts.
401
+ :type _request_timeout: int, tuple(int, int), optional
402
+ :param _request_auth: set to override the auth_settings for an a single
403
+ request; this effectively ignores the
404
+ authentication in the spec for a single request.
405
+ :type _request_auth: dict, optional
406
+ :param _content_type: force content-type for the request.
407
+ :type _content_type: str, Optional
408
+ :param _headers: set to override the headers for a single
409
+ request; this effectively ignores the headers
410
+ in the spec for a single request.
411
+ :type _headers: dict, optional
412
+ :param _host_index: set to override the host_index for a single
413
+ request; this effectively ignores the host_index
414
+ in the spec for a single request.
415
+ :type _host_index: int, optional
416
+ :return: Returns the result object.
417
+ """ # noqa: E501
418
+
419
+ _param = self._create_api_key_serialize(
420
+ create_api_key_request=create_api_key_request,
421
+ _request_auth=_request_auth,
422
+ _content_type=_content_type,
423
+ _headers=_headers,
424
+ _host_index=_host_index,
425
+ )
426
+
427
+ _response_types_map: Dict[str, Optional[str]] = {
428
+ "200": "CreateApiKey200Response",
429
+ }
430
+ response_data = await self.api_client.call_api(
431
+ *_param, _request_timeout=_request_timeout
432
+ )
433
+ await 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
+ @validate_call
440
+ async def create_api_key_without_preload_content(
441
+ self,
442
+ create_api_key_request: CreateApiKeyRequest,
443
+ _request_timeout: Union[
444
+ None,
445
+ Annotated[StrictFloat, Field(gt=0)],
446
+ Tuple[
447
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
448
+ ],
449
+ ] = None,
450
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
451
+ _content_type: Optional[StrictStr] = None,
452
+ _headers: Optional[Dict[StrictStr, Any]] = None,
453
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
454
+ ) -> RESTResponseType:
455
+ """Create API Key
456
+
457
+ Creates a new API key for the user.
458
+
459
+ :param create_api_key_request: (required)
460
+ :type create_api_key_request: CreateApiKeyRequest
461
+ :param _request_timeout: timeout setting for this request. If one
462
+ number provided, it will be total request
463
+ timeout. It can also be a pair (tuple) of
464
+ (connection, read) timeouts.
465
+ :type _request_timeout: int, tuple(int, int), optional
466
+ :param _request_auth: set to override the auth_settings for an a single
467
+ request; this effectively ignores the
468
+ authentication in the spec for a single request.
469
+ :type _request_auth: dict, optional
470
+ :param _content_type: force content-type for the request.
471
+ :type _content_type: str, Optional
472
+ :param _headers: set to override the headers for a single
473
+ request; this effectively ignores the headers
474
+ in the spec for a single request.
475
+ :type _headers: dict, optional
476
+ :param _host_index: set to override the host_index for a single
477
+ request; this effectively ignores the host_index
478
+ in the spec for a single request.
479
+ :type _host_index: int, optional
480
+ :return: Returns the result object.
481
+ """ # noqa: E501
482
+
483
+ _param = self._create_api_key_serialize(
484
+ create_api_key_request=create_api_key_request,
485
+ _request_auth=_request_auth,
486
+ _content_type=_content_type,
487
+ _headers=_headers,
488
+ _host_index=_host_index,
489
+ )
490
+
491
+ _response_types_map: Dict[str, Optional[str]] = {
492
+ "200": "CreateApiKey200Response",
493
+ }
494
+ response_data = await self.api_client.call_api(
495
+ *_param, _request_timeout=_request_timeout
496
+ )
497
+ return response_data.response
498
+
499
+ def _create_api_key_serialize(
500
+ self,
501
+ create_api_key_request,
502
+ _request_auth,
503
+ _content_type,
504
+ _headers,
505
+ _host_index,
506
+ ) -> RequestSerialized:
507
+
508
+ _host = None
509
+
510
+ _collection_formats: Dict[str, str] = {}
511
+
512
+ _path_params: Dict[str, str] = {}
513
+ _query_params: List[Tuple[str, str]] = []
514
+ _header_params: Dict[str, Optional[str]] = _headers or {}
515
+ _form_params: List[Tuple[str, str]] = []
516
+ _files: Dict[
517
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
518
+ ] = {}
519
+ _body_params: Optional[bytes] = None
520
+
521
+ # process the path parameters
522
+ # process the query parameters
523
+ # process the header parameters
524
+ # process the form parameters
525
+ # process the body parameter
526
+ if create_api_key_request is not None:
527
+ _body_params = create_api_key_request
528
+
529
+ # set the HTTP header `Accept`
530
+ if "Accept" not in _header_params:
531
+ _header_params["Accept"] = self.api_client.select_header_accept(
532
+ ["application/json"]
533
+ )
534
+
535
+ # set the HTTP header `Content-Type`
536
+ if _content_type:
537
+ _header_params["Content-Type"] = _content_type
538
+ else:
539
+ _default_content_type = self.api_client.select_header_content_type(
540
+ ["application/json"]
541
+ )
542
+ if _default_content_type is not None:
543
+ _header_params["Content-Type"] = _default_content_type
544
+
545
+ # authentication setting
546
+ _auth_settings: List[str] = ["HTTPBearer"]
547
+
548
+ return self.api_client.param_serialize(
549
+ method="POST",
550
+ resource_path="/create-api-key",
551
+ path_params=_path_params,
552
+ query_params=_query_params,
553
+ header_params=_header_params,
554
+ body=_body_params,
555
+ post_params=_form_params,
556
+ files=_files,
557
+ auth_settings=_auth_settings,
558
+ collection_formats=_collection_formats,
559
+ _host=_host,
560
+ _request_auth=_request_auth,
561
+ )
562
+
563
+ @validate_call
564
+ async def delete_api_key(
565
+ self,
566
+ id: StrictStr,
567
+ _request_timeout: Union[
568
+ None,
569
+ Annotated[StrictFloat, Field(gt=0)],
570
+ Tuple[
571
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
572
+ ],
573
+ ] = None,
574
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
575
+ _content_type: Optional[StrictStr] = None,
576
+ _headers: Optional[Dict[StrictStr, Any]] = None,
577
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
578
+ ) -> object:
579
+ """Delete API Key
580
+
581
+ Deletes an API key for the user.
582
+
583
+ :param id: (required)
584
+ :type id: str
585
+ :param _request_timeout: timeout setting for this request. If one
586
+ number provided, it will be total request
587
+ timeout. It can also be a pair (tuple) of
588
+ (connection, read) timeouts.
589
+ :type _request_timeout: int, tuple(int, int), optional
590
+ :param _request_auth: set to override the auth_settings for an a single
591
+ request; this effectively ignores the
592
+ authentication in the spec for a single request.
593
+ :type _request_auth: dict, optional
594
+ :param _content_type: force content-type for the request.
595
+ :type _content_type: str, Optional
596
+ :param _headers: set to override the headers for a single
597
+ request; this effectively ignores the headers
598
+ in the spec for a single request.
599
+ :type _headers: dict, optional
600
+ :param _host_index: set to override the host_index for a single
601
+ request; this effectively ignores the host_index
602
+ in the spec for a single request.
603
+ :type _host_index: int, optional
604
+ :return: Returns the result object.
605
+ """ # noqa: E501
606
+
607
+ _param = self._delete_api_key_serialize(
608
+ id=id,
609
+ _request_auth=_request_auth,
610
+ _content_type=_content_type,
611
+ _headers=_headers,
612
+ _host_index=_host_index,
613
+ )
614
+
615
+ _response_types_map: Dict[str, Optional[str]] = {
616
+ "200": "object",
617
+ }
618
+ response_data = await self.api_client.call_api(
619
+ *_param, _request_timeout=_request_timeout
620
+ )
621
+ await response_data.read()
622
+ return self.api_client.response_deserialize(
623
+ response_data=response_data,
624
+ response_types_map=_response_types_map,
625
+ ).data
626
+
627
+ @validate_call
628
+ async def delete_api_key_with_http_info(
629
+ self,
630
+ id: StrictStr,
631
+ _request_timeout: Union[
632
+ None,
633
+ Annotated[StrictFloat, Field(gt=0)],
634
+ Tuple[
635
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
636
+ ],
637
+ ] = None,
638
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
639
+ _content_type: Optional[StrictStr] = None,
640
+ _headers: Optional[Dict[StrictStr, Any]] = None,
641
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
642
+ ) -> ApiResponse[object]:
643
+ """Delete API Key
644
+
645
+ Deletes an API key for the user.
646
+
647
+ :param id: (required)
648
+ :type id: str
649
+ :param _request_timeout: timeout setting for this request. If one
650
+ number provided, it will be total request
651
+ timeout. It can also be a pair (tuple) of
652
+ (connection, read) timeouts.
653
+ :type _request_timeout: int, tuple(int, int), optional
654
+ :param _request_auth: set to override the auth_settings for an a single
655
+ request; this effectively ignores the
656
+ authentication in the spec for a single request.
657
+ :type _request_auth: dict, optional
658
+ :param _content_type: force content-type for the request.
659
+ :type _content_type: str, Optional
660
+ :param _headers: set to override the headers for a single
661
+ request; this effectively ignores the headers
662
+ in the spec for a single request.
663
+ :type _headers: dict, optional
664
+ :param _host_index: set to override the host_index for a single
665
+ request; this effectively ignores the host_index
666
+ in the spec for a single request.
667
+ :type _host_index: int, optional
668
+ :return: Returns the result object.
669
+ """ # noqa: E501
670
+
671
+ _param = self._delete_api_key_serialize(
672
+ id=id,
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": "object",
681
+ }
682
+ response_data = await self.api_client.call_api(
683
+ *_param, _request_timeout=_request_timeout
684
+ )
685
+ await response_data.read()
686
+ return self.api_client.response_deserialize(
687
+ response_data=response_data,
688
+ response_types_map=_response_types_map,
689
+ )
690
+
691
+ @validate_call
692
+ async def delete_api_key_without_preload_content(
693
+ self,
694
+ id: StrictStr,
695
+ _request_timeout: Union[
696
+ None,
697
+ Annotated[StrictFloat, Field(gt=0)],
698
+ Tuple[
699
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
700
+ ],
701
+ ] = None,
702
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
703
+ _content_type: Optional[StrictStr] = None,
704
+ _headers: Optional[Dict[StrictStr, Any]] = None,
705
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
706
+ ) -> RESTResponseType:
707
+ """Delete API Key
708
+
709
+ Deletes an API key for the user.
710
+
711
+ :param id: (required)
712
+ :type id: str
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._delete_api_key_serialize(
736
+ id=id,
737
+ _request_auth=_request_auth,
738
+ _content_type=_content_type,
739
+ _headers=_headers,
740
+ _host_index=_host_index,
741
+ )
742
+
743
+ _response_types_map: Dict[str, Optional[str]] = {
744
+ "200": "object",
745
+ }
746
+ response_data = await self.api_client.call_api(
747
+ *_param, _request_timeout=_request_timeout
748
+ )
749
+ return response_data.response
750
+
751
+ def _delete_api_key_serialize(
752
+ self,
753
+ id,
754
+ _request_auth,
755
+ _content_type,
756
+ _headers,
757
+ _host_index,
758
+ ) -> RequestSerialized:
759
+
760
+ _host = None
761
+
762
+ _collection_formats: Dict[str, str] = {}
763
+
764
+ _path_params: Dict[str, str] = {}
765
+ _query_params: List[Tuple[str, str]] = []
766
+ _header_params: Dict[str, Optional[str]] = _headers or {}
767
+ _form_params: List[Tuple[str, str]] = []
768
+ _files: Dict[
769
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
770
+ ] = {}
771
+ _body_params: Optional[bytes] = None
772
+
773
+ # process the path parameters
774
+ # process the query parameters
775
+ if id is not None:
776
+
777
+ _query_params.append(("id", id))
778
+
779
+ # process the header parameters
780
+ # process the form parameters
781
+ # process the body parameter
782
+
783
+ # set the HTTP header `Accept`
784
+ if "Accept" not in _header_params:
785
+ _header_params["Accept"] = self.api_client.select_header_accept(
786
+ ["application/json"]
787
+ )
788
+
789
+ # authentication setting
790
+ _auth_settings: List[str] = ["HTTPBearer"]
791
+
792
+ return self.api_client.param_serialize(
793
+ method="DELETE",
794
+ resource_path="/delete-api-key",
795
+ path_params=_path_params,
796
+ query_params=_query_params,
797
+ header_params=_header_params,
798
+ body=_body_params,
799
+ post_params=_form_params,
800
+ files=_files,
801
+ auth_settings=_auth_settings,
802
+ collection_formats=_collection_formats,
803
+ _host=_host,
804
+ _request_auth=_request_auth,
805
+ )
806
+
807
+ @validate_call
808
+ async def get_api_keys(
809
+ self,
810
+ _request_timeout: Union[
811
+ None,
812
+ Annotated[StrictFloat, Field(gt=0)],
813
+ Tuple[
814
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
815
+ ],
816
+ ] = None,
817
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
818
+ _content_type: Optional[StrictStr] = None,
819
+ _headers: Optional[Dict[StrictStr, Any]] = None,
820
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
821
+ ) -> List[GetApiKeys200ResponseInner]:
822
+ """Get API Keys
823
+
824
+ Gets all API keys for the user.
825
+
826
+ :param _request_timeout: timeout setting for this request. If one
827
+ number provided, it will be total request
828
+ timeout. It can also be a pair (tuple) of
829
+ (connection, read) timeouts.
830
+ :type _request_timeout: int, tuple(int, int), optional
831
+ :param _request_auth: set to override the auth_settings for an a single
832
+ request; this effectively ignores the
833
+ authentication in the spec for a single request.
834
+ :type _request_auth: dict, optional
835
+ :param _content_type: force content-type for the request.
836
+ :type _content_type: str, Optional
837
+ :param _headers: set to override the headers for a single
838
+ request; this effectively ignores the headers
839
+ in the spec for a single request.
840
+ :type _headers: dict, optional
841
+ :param _host_index: set to override the host_index for a single
842
+ request; this effectively ignores the host_index
843
+ in the spec for a single request.
844
+ :type _host_index: int, optional
845
+ :return: Returns the result object.
846
+ """ # noqa: E501
847
+
848
+ _param = self._get_api_keys_serialize(
98
849
  _request_auth=_request_auth,
99
850
  _content_type=_content_type,
100
851
  _headers=_headers,
@@ -102,7 +853,7 @@ class AuthApi:
102
853
  )
103
854
 
104
855
  _response_types_map: Dict[str, Optional[str]] = {
105
- "200": "AuthorizeUser200Response",
856
+ "200": "List[GetApiKeys200ResponseInner]",
106
857
  }
107
858
  response_data = await self.api_client.call_api(
108
859
  *_param, _request_timeout=_request_timeout
@@ -114,9 +865,8 @@ class AuthApi:
114
865
  ).data
115
866
 
116
867
  @validate_call
117
- async def authorize_user_with_http_info(
868
+ async def get_api_keys_with_http_info(
118
869
  self,
119
- authorize_user_request: AuthorizeUserRequest,
120
870
  _request_timeout: Union[
121
871
  None,
122
872
  Annotated[StrictFloat, Field(gt=0)],
@@ -128,13 +878,11 @@ class AuthApi:
128
878
  _content_type: Optional[StrictStr] = None,
129
879
  _headers: Optional[Dict[StrictStr, Any]] = None,
130
880
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
- ) -> ApiResponse[AuthorizeUser200Response]:
132
- """Authorize a user
881
+ ) -> ApiResponse[List[GetApiKeys200ResponseInner]]:
882
+ """Get API Keys
133
883
 
134
- Authorize a user with email and password from the login page, uses a captcha to prevent bots.
884
+ Gets all API keys for the user.
135
885
 
136
- :param authorize_user_request: (required)
137
- :type authorize_user_request: AuthorizeUserRequest
138
886
  :param _request_timeout: timeout setting for this request. If one
139
887
  number provided, it will be total request
140
888
  timeout. It can also be a pair (tuple) of
@@ -157,8 +905,7 @@ class AuthApi:
157
905
  :return: Returns the result object.
158
906
  """ # noqa: E501
159
907
 
160
- _param = self._authorize_user_serialize(
161
- authorize_user_request=authorize_user_request,
908
+ _param = self._get_api_keys_serialize(
162
909
  _request_auth=_request_auth,
163
910
  _content_type=_content_type,
164
911
  _headers=_headers,
@@ -166,7 +913,7 @@ class AuthApi:
166
913
  )
167
914
 
168
915
  _response_types_map: Dict[str, Optional[str]] = {
169
- "200": "AuthorizeUser200Response",
916
+ "200": "List[GetApiKeys200ResponseInner]",
170
917
  }
171
918
  response_data = await self.api_client.call_api(
172
919
  *_param, _request_timeout=_request_timeout
@@ -178,9 +925,8 @@ class AuthApi:
178
925
  )
179
926
 
180
927
  @validate_call
181
- async def authorize_user_without_preload_content(
928
+ async def get_api_keys_without_preload_content(
182
929
  self,
183
- authorize_user_request: AuthorizeUserRequest,
184
930
  _request_timeout: Union[
185
931
  None,
186
932
  Annotated[StrictFloat, Field(gt=0)],
@@ -193,12 +939,10 @@ class AuthApi:
193
939
  _headers: Optional[Dict[StrictStr, Any]] = None,
194
940
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
941
  ) -> RESTResponseType:
196
- """Authorize a user
942
+ """Get API Keys
197
943
 
198
- Authorize a user with email and password from the login page, uses a captcha to prevent bots.
944
+ Gets all API keys for the user.
199
945
 
200
- :param authorize_user_request: (required)
201
- :type authorize_user_request: AuthorizeUserRequest
202
946
  :param _request_timeout: timeout setting for this request. If one
203
947
  number provided, it will be total request
204
948
  timeout. It can also be a pair (tuple) of
@@ -221,8 +965,7 @@ class AuthApi:
221
965
  :return: Returns the result object.
222
966
  """ # noqa: E501
223
967
 
224
- _param = self._authorize_user_serialize(
225
- authorize_user_request=authorize_user_request,
968
+ _param = self._get_api_keys_serialize(
226
969
  _request_auth=_request_auth,
227
970
  _content_type=_content_type,
228
971
  _headers=_headers,
@@ -230,16 +973,15 @@ class AuthApi:
230
973
  )
231
974
 
232
975
  _response_types_map: Dict[str, Optional[str]] = {
233
- "200": "AuthorizeUser200Response",
976
+ "200": "List[GetApiKeys200ResponseInner]",
234
977
  }
235
978
  response_data = await self.api_client.call_api(
236
979
  *_param, _request_timeout=_request_timeout
237
980
  )
238
981
  return response_data.response
239
982
 
240
- def _authorize_user_serialize(
983
+ def _get_api_keys_serialize(
241
984
  self,
242
- authorize_user_request,
243
985
  _request_auth,
244
986
  _content_type,
245
987
  _headers,
@@ -264,8 +1006,6 @@ class AuthApi:
264
1006
  # process the header parameters
265
1007
  # process the form parameters
266
1008
  # process the body parameter
267
- if authorize_user_request is not None:
268
- _body_params = authorize_user_request
269
1009
 
270
1010
  # set the HTTP header `Accept`
271
1011
  if "Accept" not in _header_params:
@@ -273,22 +1013,12 @@ class AuthApi:
273
1013
  ["application/json"]
274
1014
  )
275
1015
 
276
- # set the HTTP header `Content-Type`
277
- if _content_type:
278
- _header_params["Content-Type"] = _content_type
279
- else:
280
- _default_content_type = self.api_client.select_header_content_type(
281
- ["application/json"]
282
- )
283
- if _default_content_type is not None:
284
- _header_params["Content-Type"] = _default_content_type
285
-
286
1016
  # authentication setting
287
- _auth_settings: List[str] = []
1017
+ _auth_settings: List[str] = ["HTTPBearer"]
288
1018
 
289
1019
  return self.api_client.param_serialize(
290
- method="POST",
291
- resource_path="/authorize",
1020
+ method="GET",
1021
+ resource_path="/get-api-keys",
292
1022
  path_params=_path_params,
293
1023
  query_params=_query_params,
294
1024
  header_params=_header_params,
@@ -1876,9 +2606,9 @@ class AuthApi:
1876
2606
  _headers: Optional[Dict[StrictStr, Any]] = None,
1877
2607
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1878
2608
  ) -> Verify200Response:
1879
- """Verify
2609
+ """Verify Bearer Token
1880
2610
 
1881
- Verifies the user is authenticated.
2611
+ Verifies the bearer token is valid.
1882
2612
 
1883
2613
  :param _request_timeout: timeout setting for this request. If one
1884
2614
  number provided, it will be total request
@@ -1936,9 +2666,9 @@ class AuthApi:
1936
2666
  _headers: Optional[Dict[StrictStr, Any]] = None,
1937
2667
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1938
2668
  ) -> ApiResponse[Verify200Response]:
1939
- """Verify
2669
+ """Verify Bearer Token
1940
2670
 
1941
- Verifies the user is authenticated.
2671
+ Verifies the bearer token is valid.
1942
2672
 
1943
2673
  :param _request_timeout: timeout setting for this request. If one
1944
2674
  number provided, it will be total request
@@ -1996,9 +2726,9 @@ class AuthApi:
1996
2726
  _headers: Optional[Dict[StrictStr, Any]] = None,
1997
2727
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1998
2728
  ) -> RESTResponseType:
1999
- """Verify
2729
+ """Verify Bearer Token
2000
2730
 
2001
- Verifies the user is authenticated.
2731
+ Verifies the bearer token is valid.
2002
2732
 
2003
2733
  :param _request_timeout: timeout setting for this request. If one
2004
2734
  number provided, it will be total request
@@ -2087,3 +2817,247 @@ class AuthApi:
2087
2817
  _host=_host,
2088
2818
  _request_auth=_request_auth,
2089
2819
  )
2820
+
2821
+ @validate_call
2822
+ async def verify_api_key(
2823
+ self,
2824
+ api_key: StrictStr,
2825
+ _request_timeout: Union[
2826
+ None,
2827
+ Annotated[StrictFloat, Field(gt=0)],
2828
+ Tuple[
2829
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2830
+ ],
2831
+ ] = None,
2832
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2833
+ _content_type: Optional[StrictStr] = None,
2834
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2835
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2836
+ ) -> Verify200Response:
2837
+ """Verify API Key
2838
+
2839
+ Verifies the API key is valid.
2840
+
2841
+ :param api_key: (required)
2842
+ :type api_key: str
2843
+ :param _request_timeout: timeout setting for this request. If one
2844
+ number provided, it will be total request
2845
+ timeout. It can also be a pair (tuple) of
2846
+ (connection, read) timeouts.
2847
+ :type _request_timeout: int, tuple(int, int), optional
2848
+ :param _request_auth: set to override the auth_settings for an a single
2849
+ request; this effectively ignores the
2850
+ authentication in the spec for a single request.
2851
+ :type _request_auth: dict, optional
2852
+ :param _content_type: force content-type for the request.
2853
+ :type _content_type: str, Optional
2854
+ :param _headers: set to override the headers for a single
2855
+ request; this effectively ignores the headers
2856
+ in the spec for a single request.
2857
+ :type _headers: dict, optional
2858
+ :param _host_index: set to override the host_index for a single
2859
+ request; this effectively ignores the host_index
2860
+ in the spec for a single request.
2861
+ :type _host_index: int, optional
2862
+ :return: Returns the result object.
2863
+ """ # noqa: E501
2864
+
2865
+ _param = self._verify_api_key_serialize(
2866
+ api_key=api_key,
2867
+ _request_auth=_request_auth,
2868
+ _content_type=_content_type,
2869
+ _headers=_headers,
2870
+ _host_index=_host_index,
2871
+ )
2872
+
2873
+ _response_types_map: Dict[str, Optional[str]] = {
2874
+ "200": "Verify200Response",
2875
+ }
2876
+ response_data = await self.api_client.call_api(
2877
+ *_param, _request_timeout=_request_timeout
2878
+ )
2879
+ await response_data.read()
2880
+ return self.api_client.response_deserialize(
2881
+ response_data=response_data,
2882
+ response_types_map=_response_types_map,
2883
+ ).data
2884
+
2885
+ @validate_call
2886
+ async def verify_api_key_with_http_info(
2887
+ self,
2888
+ api_key: StrictStr,
2889
+ _request_timeout: Union[
2890
+ None,
2891
+ Annotated[StrictFloat, Field(gt=0)],
2892
+ Tuple[
2893
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2894
+ ],
2895
+ ] = None,
2896
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2897
+ _content_type: Optional[StrictStr] = None,
2898
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2899
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2900
+ ) -> ApiResponse[Verify200Response]:
2901
+ """Verify API Key
2902
+
2903
+ Verifies the API key is valid.
2904
+
2905
+ :param api_key: (required)
2906
+ :type api_key: str
2907
+ :param _request_timeout: timeout setting for this request. If one
2908
+ number provided, it will be total request
2909
+ timeout. It can also be a pair (tuple) of
2910
+ (connection, read) timeouts.
2911
+ :type _request_timeout: int, tuple(int, int), optional
2912
+ :param _request_auth: set to override the auth_settings for an a single
2913
+ request; this effectively ignores the
2914
+ authentication in the spec for a single request.
2915
+ :type _request_auth: dict, optional
2916
+ :param _content_type: force content-type for the request.
2917
+ :type _content_type: str, Optional
2918
+ :param _headers: set to override the headers for a single
2919
+ request; this effectively ignores the headers
2920
+ in the spec for a single request.
2921
+ :type _headers: dict, optional
2922
+ :param _host_index: set to override the host_index for a single
2923
+ request; this effectively ignores the host_index
2924
+ in the spec for a single request.
2925
+ :type _host_index: int, optional
2926
+ :return: Returns the result object.
2927
+ """ # noqa: E501
2928
+
2929
+ _param = self._verify_api_key_serialize(
2930
+ api_key=api_key,
2931
+ _request_auth=_request_auth,
2932
+ _content_type=_content_type,
2933
+ _headers=_headers,
2934
+ _host_index=_host_index,
2935
+ )
2936
+
2937
+ _response_types_map: Dict[str, Optional[str]] = {
2938
+ "200": "Verify200Response",
2939
+ }
2940
+ response_data = await self.api_client.call_api(
2941
+ *_param, _request_timeout=_request_timeout
2942
+ )
2943
+ await response_data.read()
2944
+ return self.api_client.response_deserialize(
2945
+ response_data=response_data,
2946
+ response_types_map=_response_types_map,
2947
+ )
2948
+
2949
+ @validate_call
2950
+ async def verify_api_key_without_preload_content(
2951
+ self,
2952
+ api_key: StrictStr,
2953
+ _request_timeout: Union[
2954
+ None,
2955
+ Annotated[StrictFloat, Field(gt=0)],
2956
+ Tuple[
2957
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2958
+ ],
2959
+ ] = None,
2960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2961
+ _content_type: Optional[StrictStr] = None,
2962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2964
+ ) -> RESTResponseType:
2965
+ """Verify API Key
2966
+
2967
+ Verifies the API key is valid.
2968
+
2969
+ :param api_key: (required)
2970
+ :type api_key: str
2971
+ :param _request_timeout: timeout setting for this request. If one
2972
+ number provided, it will be total request
2973
+ timeout. It can also be a pair (tuple) of
2974
+ (connection, read) timeouts.
2975
+ :type _request_timeout: int, tuple(int, int), optional
2976
+ :param _request_auth: set to override the auth_settings for an a single
2977
+ request; this effectively ignores the
2978
+ authentication in the spec for a single request.
2979
+ :type _request_auth: dict, optional
2980
+ :param _content_type: force content-type for the request.
2981
+ :type _content_type: str, Optional
2982
+ :param _headers: set to override the headers for a single
2983
+ request; this effectively ignores the headers
2984
+ in the spec for a single request.
2985
+ :type _headers: dict, optional
2986
+ :param _host_index: set to override the host_index for a single
2987
+ request; this effectively ignores the host_index
2988
+ in the spec for a single request.
2989
+ :type _host_index: int, optional
2990
+ :return: Returns the result object.
2991
+ """ # noqa: E501
2992
+
2993
+ _param = self._verify_api_key_serialize(
2994
+ api_key=api_key,
2995
+ _request_auth=_request_auth,
2996
+ _content_type=_content_type,
2997
+ _headers=_headers,
2998
+ _host_index=_host_index,
2999
+ )
3000
+
3001
+ _response_types_map: Dict[str, Optional[str]] = {
3002
+ "200": "Verify200Response",
3003
+ }
3004
+ response_data = await self.api_client.call_api(
3005
+ *_param, _request_timeout=_request_timeout
3006
+ )
3007
+ return response_data.response
3008
+
3009
+ def _verify_api_key_serialize(
3010
+ self,
3011
+ api_key,
3012
+ _request_auth,
3013
+ _content_type,
3014
+ _headers,
3015
+ _host_index,
3016
+ ) -> RequestSerialized:
3017
+
3018
+ _host = None
3019
+
3020
+ _collection_formats: Dict[str, str] = {}
3021
+
3022
+ _path_params: Dict[str, str] = {}
3023
+ _query_params: List[Tuple[str, str]] = []
3024
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3025
+ _form_params: List[Tuple[str, str]] = []
3026
+ _files: Dict[
3027
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3028
+ ] = {}
3029
+ _body_params: Optional[bytes] = None
3030
+
3031
+ # process the path parameters
3032
+ # process the query parameters
3033
+ if api_key is not None:
3034
+
3035
+ _query_params.append(("apiKey", api_key))
3036
+
3037
+ # process the header parameters
3038
+ # process the form parameters
3039
+ # process the body parameter
3040
+
3041
+ # set the HTTP header `Accept`
3042
+ if "Accept" not in _header_params:
3043
+ _header_params["Accept"] = self.api_client.select_header_accept(
3044
+ ["application/json"]
3045
+ )
3046
+
3047
+ # authentication setting
3048
+ _auth_settings: List[str] = []
3049
+
3050
+ return self.api_client.param_serialize(
3051
+ method="GET",
3052
+ resource_path="/verify-api-key",
3053
+ path_params=_path_params,
3054
+ query_params=_query_params,
3055
+ header_params=_header_params,
3056
+ body=_body_params,
3057
+ post_params=_form_params,
3058
+ files=_files,
3059
+ auth_settings=_auth_settings,
3060
+ collection_formats=_collection_formats,
3061
+ _host=_host,
3062
+ _request_auth=_request_auth,
3063
+ )