immich 1.2.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.
Files changed (387) hide show
  1. immich/.openapi-generator/FILES +372 -0
  2. immich/.openapi-generator/VERSION +1 -0
  3. immich/.openapi-generator-ignore +48 -0
  4. immich/__init__.py +3 -0
  5. immich/client/__init__.py +1162 -0
  6. immich/client/api/__init__.py +39 -0
  7. immich/client/api/activities_api.py +1092 -0
  8. immich/client/api/albums_api.py +3228 -0
  9. immich/client/api/api_keys_api.py +1484 -0
  10. immich/client/api/assets_api.py +5834 -0
  11. immich/client/api/authentication_admin_api.py +254 -0
  12. immich/client/api/authentication_api.py +3881 -0
  13. immich/client/api/deprecated_api.py +2199 -0
  14. immich/client/api/download_api.py +603 -0
  15. immich/client/api/duplicates_api.py +743 -0
  16. immich/client/api/faces_api.py +1053 -0
  17. immich/client/api/jobs_api.py +783 -0
  18. immich/client/api/libraries_api.py +2004 -0
  19. immich/client/api/maintenance_admin_api.py +533 -0
  20. immich/client/api/map_api.py +640 -0
  21. immich/client/api/memories_api.py +2250 -0
  22. immich/client/api/notifications_admin_api.py +808 -0
  23. immich/client/api/notifications_api.py +1564 -0
  24. immich/client/api/partners_api.py +1278 -0
  25. immich/client/api/people_api.py +2905 -0
  26. immich/client/api/plugins_api.py +730 -0
  27. immich/client/api/queues_api.py +1292 -0
  28. immich/client/api/search_api.py +3198 -0
  29. immich/client/api/server_api.py +3466 -0
  30. immich/client/api/sessions_api.py +1472 -0
  31. immich/client/api/shared_links_api.py +2177 -0
  32. immich/client/api/stacks_api.py +1769 -0
  33. immich/client/api/sync_api.py +1512 -0
  34. immich/client/api/system_config_api.py +967 -0
  35. immich/client/api/system_metadata_api.py +964 -0
  36. immich/client/api/tags_api.py +2296 -0
  37. immich/client/api/timeline_api.py +1193 -0
  38. immich/client/api/trash_api.py +739 -0
  39. immich/client/api/users_admin_api.py +2607 -0
  40. immich/client/api/users_api.py +3577 -0
  41. immich/client/api/views_api.py +503 -0
  42. immich/client/api/workflows_api.py +1257 -0
  43. immich/client/api_client.py +756 -0
  44. immich/client/api_response.py +20 -0
  45. immich/client/configuration.py +638 -0
  46. immich/client/exceptions.py +222 -0
  47. immich/client/models/__init__.py +424 -0
  48. immich/client/models/activity_create_dto.py +94 -0
  49. immich/client/models/activity_response_dto.py +121 -0
  50. immich/client/models/activity_statistics_response_dto.py +85 -0
  51. immich/client/models/add_users_dto.py +101 -0
  52. immich/client/models/admin_onboarding_update_dto.py +82 -0
  53. immich/client/models/album_response_dto.py +199 -0
  54. immich/client/models/album_statistics_response_dto.py +90 -0
  55. immich/client/models/album_user_add_dto.py +87 -0
  56. immich/client/models/album_user_create_dto.py +87 -0
  57. immich/client/models/album_user_response_dto.py +95 -0
  58. immich/client/models/album_user_role.py +34 -0
  59. immich/client/models/albums_add_assets_dto.py +86 -0
  60. immich/client/models/albums_add_assets_response_dto.py +86 -0
  61. immich/client/models/albums_response.py +83 -0
  62. immich/client/models/albums_update.py +85 -0
  63. immich/client/models/api_key_create_dto.py +87 -0
  64. immich/client/models/api_key_create_response_dto.py +94 -0
  65. immich/client/models/api_key_response_dto.py +102 -0
  66. immich/client/models/api_key_update_dto.py +87 -0
  67. immich/client/models/asset_bulk_delete_dto.py +84 -0
  68. immich/client/models/asset_bulk_update_dto.py +143 -0
  69. immich/client/models/asset_bulk_upload_check_dto.py +98 -0
  70. immich/client/models/asset_bulk_upload_check_item.py +85 -0
  71. immich/client/models/asset_bulk_upload_check_response_dto.py +101 -0
  72. immich/client/models/asset_bulk_upload_check_result.py +126 -0
  73. immich/client/models/asset_copy_dto.py +113 -0
  74. immich/client/models/asset_delta_sync_dto.py +87 -0
  75. immich/client/models/asset_delta_sync_response_dto.py +102 -0
  76. immich/client/models/asset_face_create_dto.py +110 -0
  77. immich/client/models/asset_face_delete_dto.py +82 -0
  78. immich/client/models/asset_face_response_dto.py +125 -0
  79. immich/client/models/asset_face_update_dto.py +96 -0
  80. immich/client/models/asset_face_update_item.py +86 -0
  81. immich/client/models/asset_face_without_person_response_dto.py +111 -0
  82. immich/client/models/asset_full_sync_dto.py +95 -0
  83. immich/client/models/asset_ids_dto.py +83 -0
  84. immich/client/models/asset_ids_response_dto.py +109 -0
  85. immich/client/models/asset_job_name.py +36 -0
  86. immich/client/models/asset_jobs_dto.py +87 -0
  87. immich/client/models/asset_media_response_dto.py +84 -0
  88. immich/client/models/asset_media_size.py +35 -0
  89. immich/client/models/asset_media_status.py +35 -0
  90. immich/client/models/asset_metadata_key.py +33 -0
  91. immich/client/models/asset_metadata_response_dto.py +92 -0
  92. immich/client/models/asset_metadata_upsert_dto.py +101 -0
  93. immich/client/models/asset_metadata_upsert_item_dto.py +84 -0
  94. immich/client/models/asset_ocr_response_dto.py +145 -0
  95. immich/client/models/asset_order.py +34 -0
  96. immich/client/models/asset_response_dto.py +291 -0
  97. immich/client/models/asset_stack_response_dto.py +90 -0
  98. immich/client/models/asset_stats_response_dto.py +90 -0
  99. immich/client/models/asset_type_enum.py +36 -0
  100. immich/client/models/asset_visibility.py +36 -0
  101. immich/client/models/audio_codec.py +36 -0
  102. immich/client/models/auth_status_response_dto.py +100 -0
  103. immich/client/models/avatar_update.py +83 -0
  104. immich/client/models/bulk_id_error_reason.py +36 -0
  105. immich/client/models/bulk_id_response_dto.py +102 -0
  106. immich/client/models/bulk_ids_dto.py +83 -0
  107. immich/client/models/cast_response.py +88 -0
  108. immich/client/models/cast_update.py +82 -0
  109. immich/client/models/change_password_dto.py +101 -0
  110. immich/client/models/check_existing_assets_dto.py +91 -0
  111. immich/client/models/check_existing_assets_response_dto.py +82 -0
  112. immich/client/models/clip_config.py +85 -0
  113. immich/client/models/colorspace.py +34 -0
  114. immich/client/models/contributor_count_response_dto.py +85 -0
  115. immich/client/models/cq_mode.py +35 -0
  116. immich/client/models/create_album_dto.py +112 -0
  117. immich/client/models/create_library_dto.py +103 -0
  118. immich/client/models/create_profile_image_response_dto.py +95 -0
  119. immich/client/models/database_backup_config.py +94 -0
  120. immich/client/models/download_archive_info.py +85 -0
  121. immich/client/models/download_info_dto.py +96 -0
  122. immich/client/models/download_response.py +90 -0
  123. immich/client/models/download_response_dto.py +100 -0
  124. immich/client/models/download_update.py +93 -0
  125. immich/client/models/duplicate_detection_config.py +89 -0
  126. immich/client/models/duplicate_response_dto.py +98 -0
  127. immich/client/models/email_notifications_response.py +90 -0
  128. immich/client/models/email_notifications_update.py +90 -0
  129. immich/client/models/exif_response_dto.py +284 -0
  130. immich/client/models/face_dto.py +83 -0
  131. immich/client/models/facial_recognition_config.py +107 -0
  132. immich/client/models/folders_response.py +92 -0
  133. immich/client/models/folders_update.py +85 -0
  134. immich/client/models/image_format.py +34 -0
  135. immich/client/models/job_create_dto.py +83 -0
  136. immich/client/models/job_name.py +87 -0
  137. immich/client/models/job_settings_dto.py +83 -0
  138. immich/client/models/library_response_dto.py +118 -0
  139. immich/client/models/library_stats_response_dto.py +92 -0
  140. immich/client/models/license_key_dto.py +98 -0
  141. immich/client/models/license_response_dto.py +101 -0
  142. immich/client/models/log_level.py +38 -0
  143. immich/client/models/login_credential_dto.py +85 -0
  144. immich/client/models/login_response_dto.py +109 -0
  145. immich/client/models/logout_response_dto.py +85 -0
  146. immich/client/models/machine_learning_availability_checks_dto.py +90 -0
  147. immich/client/models/maintenance_action.py +34 -0
  148. immich/client/models/maintenance_auth_dto.py +82 -0
  149. immich/client/models/maintenance_login_dto.py +82 -0
  150. immich/client/models/manual_job_name.py +38 -0
  151. immich/client/models/map_marker_response_dto.py +111 -0
  152. immich/client/models/map_reverse_geocode_response_dto.py +105 -0
  153. immich/client/models/memories_response.py +92 -0
  154. immich/client/models/memories_update.py +86 -0
  155. immich/client/models/memory_create_dto.py +112 -0
  156. immich/client/models/memory_response_dto.py +142 -0
  157. immich/client/models/memory_search_order.py +35 -0
  158. immich/client/models/memory_statistics_response_dto.py +82 -0
  159. immich/client/models/memory_type.py +33 -0
  160. immich/client/models/memory_update_dto.py +91 -0
  161. immich/client/models/merge_person_dto.py +83 -0
  162. immich/client/models/metadata_search_dto.py +277 -0
  163. immich/client/models/notification_create_dto.py +120 -0
  164. immich/client/models/notification_delete_all_dto.py +83 -0
  165. immich/client/models/notification_dto.py +112 -0
  166. immich/client/models/notification_level.py +36 -0
  167. immich/client/models/notification_type.py +38 -0
  168. immich/client/models/notification_update_all_dto.py +90 -0
  169. immich/client/models/notification_update_dto.py +88 -0
  170. immich/client/models/o_auth_authorize_response_dto.py +82 -0
  171. immich/client/models/o_auth_callback_dto.py +90 -0
  172. immich/client/models/o_auth_config_dto.py +90 -0
  173. immich/client/models/o_auth_token_endpoint_auth_method.py +34 -0
  174. immich/client/models/ocr_config.py +109 -0
  175. immich/client/models/on_this_day_dto.py +86 -0
  176. immich/client/models/onboarding_dto.py +82 -0
  177. immich/client/models/onboarding_response_dto.py +82 -0
  178. immich/client/models/partner_create_dto.py +83 -0
  179. immich/client/models/partner_direction.py +34 -0
  180. immich/client/models/partner_response_dto.py +108 -0
  181. immich/client/models/partner_update_dto.py +82 -0
  182. immich/client/models/people_response.py +92 -0
  183. immich/client/models/people_response_dto.py +104 -0
  184. immich/client/models/people_update.py +85 -0
  185. immich/client/models/people_update_dto.py +96 -0
  186. immich/client/models/people_update_item.py +128 -0
  187. immich/client/models/permission.py +177 -0
  188. immich/client/models/person_create_dto.py +117 -0
  189. immich/client/models/person_response_dto.py +115 -0
  190. immich/client/models/person_statistics_response_dto.py +82 -0
  191. immich/client/models/person_update_dto.py +125 -0
  192. immich/client/models/person_with_faces_response_dto.py +133 -0
  193. immich/client/models/pin_code_change_dto.py +90 -0
  194. immich/client/models/pin_code_reset_dto.py +85 -0
  195. immich/client/models/pin_code_setup_dto.py +82 -0
  196. immich/client/models/places_response_dto.py +100 -0
  197. immich/client/models/plugin_action_response_dto.py +112 -0
  198. immich/client/models/plugin_context_type.py +35 -0
  199. immich/client/models/plugin_filter_response_dto.py +112 -0
  200. immich/client/models/plugin_response_dto.py +139 -0
  201. immich/client/models/plugin_trigger_response_dto.py +87 -0
  202. immich/client/models/plugin_trigger_type.py +34 -0
  203. immich/client/models/purchase_response.py +88 -0
  204. immich/client/models/purchase_update.py +92 -0
  205. immich/client/models/queue_command.py +37 -0
  206. immich/client/models/queue_command_dto.py +86 -0
  207. immich/client/models/queue_delete_dto.py +85 -0
  208. immich/client/models/queue_job_response_dto.py +93 -0
  209. immich/client/models/queue_job_status.py +38 -0
  210. immich/client/models/queue_name.py +49 -0
  211. immich/client/models/queue_response_dto.py +97 -0
  212. immich/client/models/queue_response_legacy_dto.py +100 -0
  213. immich/client/models/queue_statistics_dto.py +103 -0
  214. immich/client/models/queue_status_legacy_dto.py +85 -0
  215. immich/client/models/queue_update_dto.py +82 -0
  216. immich/client/models/queues_response_legacy_dto.py +242 -0
  217. immich/client/models/random_search_dto.py +234 -0
  218. immich/client/models/ratings_response.py +84 -0
  219. immich/client/models/ratings_update.py +82 -0
  220. immich/client/models/reaction_level.py +34 -0
  221. immich/client/models/reaction_type.py +34 -0
  222. immich/client/models/reverse_geocoding_state_response_dto.py +101 -0
  223. immich/client/models/search_album_response_dto.py +114 -0
  224. immich/client/models/search_asset_response_dto.py +127 -0
  225. immich/client/models/search_explore_item.py +94 -0
  226. immich/client/models/search_explore_response_dto.py +98 -0
  227. immich/client/models/search_facet_count_response_dto.py +85 -0
  228. immich/client/models/search_facet_response_dto.py +103 -0
  229. immich/client/models/search_response_dto.py +100 -0
  230. immich/client/models/search_statistics_response_dto.py +82 -0
  231. immich/client/models/search_suggestion_type.py +38 -0
  232. immich/client/models/server_about_response_dto.py +156 -0
  233. immich/client/models/server_apk_links_dto.py +97 -0
  234. immich/client/models/server_config_dto.py +118 -0
  235. immich/client/models/server_features_dto.py +130 -0
  236. immich/client/models/server_media_types_response_dto.py +90 -0
  237. immich/client/models/server_ping_response.py +87 -0
  238. immich/client/models/server_stats_response_dto.py +119 -0
  239. immich/client/models/server_storage_response_dto.py +108 -0
  240. immich/client/models/server_theme_dto.py +82 -0
  241. immich/client/models/server_version_history_response_dto.py +91 -0
  242. immich/client/models/server_version_response_dto.py +90 -0
  243. immich/client/models/session_create_dto.py +96 -0
  244. immich/client/models/session_create_response_dto.py +120 -0
  245. immich/client/models/session_response_dto.py +117 -0
  246. immich/client/models/session_unlock_dto.py +85 -0
  247. immich/client/models/session_update_dto.py +84 -0
  248. immich/client/models/set_maintenance_mode_dto.py +83 -0
  249. immich/client/models/shared_link_create_dto.py +142 -0
  250. immich/client/models/shared_link_edit_dto.py +134 -0
  251. immich/client/models/shared_link_response_dto.py +173 -0
  252. immich/client/models/shared_link_type.py +34 -0
  253. immich/client/models/shared_links_response.py +92 -0
  254. immich/client/models/shared_links_update.py +85 -0
  255. immich/client/models/sign_up_dto.py +90 -0
  256. immich/client/models/smart_search_dto.py +245 -0
  257. immich/client/models/source_type.py +35 -0
  258. immich/client/models/stack_create_dto.py +86 -0
  259. immich/client/models/stack_response_dto.py +100 -0
  260. immich/client/models/stack_update_dto.py +83 -0
  261. immich/client/models/statistics_search_dto.py +217 -0
  262. immich/client/models/sync_ack_delete_dto.py +83 -0
  263. immich/client/models/sync_ack_dto.py +84 -0
  264. immich/client/models/sync_ack_set_dto.py +83 -0
  265. immich/client/models/sync_album_delete_v1.py +82 -0
  266. immich/client/models/sync_album_to_asset_delete_v1.py +85 -0
  267. immich/client/models/sync_album_to_asset_v1.py +85 -0
  268. immich/client/models/sync_album_user_delete_v1.py +85 -0
  269. immich/client/models/sync_album_user_v1.py +91 -0
  270. immich/client/models/sync_album_v1.py +122 -0
  271. immich/client/models/sync_asset_delete_v1.py +82 -0
  272. immich/client/models/sync_asset_exif_v1.py +296 -0
  273. immich/client/models/sync_asset_face_delete_v1.py +82 -0
  274. immich/client/models/sync_asset_face_v1.py +120 -0
  275. immich/client/models/sync_asset_metadata_delete_v1.py +86 -0
  276. immich/client/models/sync_asset_metadata_v1.py +91 -0
  277. immich/client/models/sync_asset_v1.py +187 -0
  278. immich/client/models/sync_auth_user_v1.py +154 -0
  279. immich/client/models/sync_entity_type.py +79 -0
  280. immich/client/models/sync_memory_asset_delete_v1.py +85 -0
  281. immich/client/models/sync_memory_asset_v1.py +85 -0
  282. immich/client/models/sync_memory_delete_v1.py +82 -0
  283. immich/client/models/sync_memory_v1.py +143 -0
  284. immich/client/models/sync_partner_delete_v1.py +88 -0
  285. immich/client/models/sync_partner_v1.py +90 -0
  286. immich/client/models/sync_person_delete_v1.py +82 -0
  287. immich/client/models/sync_person_v1.py +131 -0
  288. immich/client/models/sync_request_type.py +52 -0
  289. immich/client/models/sync_stack_delete_v1.py +82 -0
  290. immich/client/models/sync_stack_v1.py +101 -0
  291. immich/client/models/sync_stream_dto.py +86 -0
  292. immich/client/models/sync_user_delete_v1.py +82 -0
  293. immich/client/models/sync_user_metadata_delete_v1.py +84 -0
  294. immich/client/models/sync_user_metadata_v1.py +91 -0
  295. immich/client/models/sync_user_v1.py +118 -0
  296. immich/client/models/system_config_backups_dto.py +92 -0
  297. immich/client/models/system_config_dto.py +302 -0
  298. immich/client/models/system_config_f_fmpeg_dto.py +156 -0
  299. immich/client/models/system_config_faces_dto.py +82 -0
  300. immich/client/models/system_config_generated_fullsize_image_dto.py +92 -0
  301. immich/client/models/system_config_generated_image_dto.py +92 -0
  302. immich/client/models/system_config_image_dto.py +124 -0
  303. immich/client/models/system_config_job_dto.py +194 -0
  304. immich/client/models/system_config_library_dto.py +104 -0
  305. immich/client/models/system_config_library_scan_dto.py +85 -0
  306. immich/client/models/system_config_library_watch_dto.py +82 -0
  307. immich/client/models/system_config_logging_dto.py +86 -0
  308. immich/client/models/system_config_machine_learning_dto.py +147 -0
  309. immich/client/models/system_config_map_dto.py +90 -0
  310. immich/client/models/system_config_metadata_dto.py +92 -0
  311. immich/client/models/system_config_new_version_check_dto.py +82 -0
  312. immich/client/models/system_config_nightly_tasks_dto.py +103 -0
  313. immich/client/models/system_config_notifications_dto.py +92 -0
  314. immich/client/models/system_config_o_auth_dto.py +155 -0
  315. immich/client/models/system_config_password_login_dto.py +82 -0
  316. immich/client/models/system_config_reverse_geocoding_dto.py +82 -0
  317. immich/client/models/system_config_server_dto.py +94 -0
  318. immich/client/models/system_config_smtp_dto.py +100 -0
  319. immich/client/models/system_config_smtp_transport_dto.py +107 -0
  320. immich/client/models/system_config_storage_template_dto.py +94 -0
  321. immich/client/models/system_config_template_emails_dto.py +94 -0
  322. immich/client/models/system_config_template_storage_option_dto.py +109 -0
  323. immich/client/models/system_config_templates_dto.py +94 -0
  324. immich/client/models/system_config_theme_dto.py +82 -0
  325. immich/client/models/system_config_trash_dto.py +86 -0
  326. immich/client/models/system_config_user_dto.py +83 -0
  327. immich/client/models/tag_bulk_assets_dto.py +86 -0
  328. immich/client/models/tag_bulk_assets_response_dto.py +82 -0
  329. immich/client/models/tag_create_dto.py +111 -0
  330. immich/client/models/tag_response_dto.py +107 -0
  331. immich/client/models/tag_update_dto.py +87 -0
  332. immich/client/models/tag_upsert_dto.py +82 -0
  333. immich/client/models/tags_response.py +92 -0
  334. immich/client/models/tags_update.py +85 -0
  335. immich/client/models/template_dto.py +82 -0
  336. immich/client/models/template_response_dto.py +83 -0
  337. immich/client/models/test_email_response_dto.py +82 -0
  338. immich/client/models/time_bucket_asset_response_dto.py +195 -0
  339. immich/client/models/time_buckets_response_dto.py +88 -0
  340. immich/client/models/tone_mapping.py +36 -0
  341. immich/client/models/transcode_hw_accel.py +37 -0
  342. immich/client/models/transcode_policy.py +37 -0
  343. immich/client/models/trash_response_dto.py +82 -0
  344. immich/client/models/update_album_dto.py +106 -0
  345. immich/client/models/update_album_user_dto.py +83 -0
  346. immich/client/models/update_asset_dto.py +135 -0
  347. immich/client/models/update_library_dto.py +95 -0
  348. immich/client/models/usage_by_user_dto.py +117 -0
  349. immich/client/models/user_admin_create_dto.py +136 -0
  350. immich/client/models/user_admin_delete_dto.py +82 -0
  351. immich/client/models/user_admin_response_dto.py +176 -0
  352. immich/client/models/user_admin_update_dto.py +141 -0
  353. immich/client/models/user_avatar_color.py +42 -0
  354. immich/client/models/user_license.py +91 -0
  355. immich/client/models/user_metadata_key.py +35 -0
  356. immich/client/models/user_preferences_response_dto.py +186 -0
  357. immich/client/models/user_preferences_update_dto.py +197 -0
  358. immich/client/models/user_response_dto.py +105 -0
  359. immich/client/models/user_status.py +35 -0
  360. immich/client/models/user_update_me_dto.py +98 -0
  361. immich/client/models/validate_access_token_response_dto.py +82 -0
  362. immich/client/models/validate_library_dto.py +93 -0
  363. immich/client/models/validate_library_import_path_response_dto.py +92 -0
  364. immich/client/models/validate_library_response_dto.py +103 -0
  365. immich/client/models/version_check_state_response_dto.py +98 -0
  366. immich/client/models/video_codec.py +36 -0
  367. immich/client/models/video_container.py +36 -0
  368. immich/client/models/workflow_action_item_dto.py +89 -0
  369. immich/client/models/workflow_action_response_dto.py +105 -0
  370. immich/client/models/workflow_create_dto.py +128 -0
  371. immich/client/models/workflow_filter_item_dto.py +89 -0
  372. immich/client/models/workflow_filter_response_dto.py +105 -0
  373. immich/client/models/workflow_response_dto.py +144 -0
  374. immich/client/models/workflow_update_dto.py +128 -0
  375. immich/client/py.typed +0 -0
  376. immich/client/rest.py +199 -0
  377. immich/client_wrapper/__init__.py +15 -0
  378. immich/client_wrapper/assets_api_wrapped.py +87 -0
  379. immich/client_wrapper/download_api_wrapped.py +111 -0
  380. immich/client_wrapper/users_api_wrapped.py +41 -0
  381. immich/py.typed +0 -0
  382. immich/sdk.py +365 -0
  383. immich/utils.py +100 -0
  384. immich-1.2.1.dist-info/METADATA +166 -0
  385. immich-1.2.1.dist-info/RECORD +387 -0
  386. immich-1.2.1.dist-info/WHEEL +4 -0
  387. immich-1.2.1.dist-info/licenses/LICENSE +9 -0
@@ -0,0 +1,3881 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Immich
5
+
6
+ Immich API
7
+
8
+ The version of the OpenAPI document: 2.4.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from immich.client.models.auth_status_response_dto import AuthStatusResponseDto
19
+ from immich.client.models.change_password_dto import ChangePasswordDto
20
+ from immich.client.models.login_credential_dto import LoginCredentialDto
21
+ from immich.client.models.login_response_dto import LoginResponseDto
22
+ from immich.client.models.logout_response_dto import LogoutResponseDto
23
+ from immich.client.models.o_auth_authorize_response_dto import OAuthAuthorizeResponseDto
24
+ from immich.client.models.o_auth_callback_dto import OAuthCallbackDto
25
+ from immich.client.models.o_auth_config_dto import OAuthConfigDto
26
+ from immich.client.models.pin_code_change_dto import PinCodeChangeDto
27
+ from immich.client.models.pin_code_reset_dto import PinCodeResetDto
28
+ from immich.client.models.pin_code_setup_dto import PinCodeSetupDto
29
+ from immich.client.models.session_unlock_dto import SessionUnlockDto
30
+ from immich.client.models.sign_up_dto import SignUpDto
31
+ from immich.client.models.user_admin_response_dto import UserAdminResponseDto
32
+ from immich.client.models.validate_access_token_response_dto import (
33
+ ValidateAccessTokenResponseDto,
34
+ )
35
+
36
+ from immich.client.api_client import ApiClient, RequestSerialized
37
+ from immich.client.api_response import ApiResponse
38
+ from immich.client.rest import RESTResponseType
39
+
40
+
41
+ class AuthenticationApi:
42
+ """NOTE: This class is auto generated by OpenAPI Generator
43
+ Ref: https://openapi-generator.tech
44
+
45
+ Do not edit the class manually.
46
+ """
47
+
48
+ def __init__(self, api_client=None) -> None:
49
+ if api_client is None:
50
+ api_client = ApiClient.get_default()
51
+ self.api_client = api_client
52
+
53
+ @validate_call
54
+ async def change_password(
55
+ self,
56
+ change_password_dto: ChangePasswordDto,
57
+ _request_timeout: Union[
58
+ None,
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Tuple[
61
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
62
+ ],
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> UserAdminResponseDto:
69
+ """Change password
70
+
71
+ Change the password of the current user.
72
+
73
+ :param change_password_dto: (required)
74
+ :type change_password_dto: ChangePasswordDto
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._change_password_serialize(
98
+ change_password_dto=change_password_dto,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index,
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ "200": "UserAdminResponseDto",
107
+ }
108
+ response_data = await self.api_client.call_api(
109
+ *_param, _request_timeout=_request_timeout
110
+ )
111
+ await response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+ @validate_call
118
+ async def change_password_with_http_info(
119
+ self,
120
+ change_password_dto: ChangePasswordDto,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
126
+ ],
127
+ ] = None,
128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
+ _content_type: Optional[StrictStr] = None,
130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
+ ) -> ApiResponse[UserAdminResponseDto]:
133
+ """Change password
134
+
135
+ Change the password of the current user.
136
+
137
+ :param change_password_dto: (required)
138
+ :type change_password_dto: ChangePasswordDto
139
+ :param _request_timeout: timeout setting for this request. If one
140
+ number provided, it will be total request
141
+ timeout. It can also be a pair (tuple) of
142
+ (connection, read) timeouts.
143
+ :type _request_timeout: int, tuple(int, int), optional
144
+ :param _request_auth: set to override the auth_settings for an a single
145
+ request; this effectively ignores the
146
+ authentication in the spec for a single request.
147
+ :type _request_auth: dict, optional
148
+ :param _content_type: force content-type for the request.
149
+ :type _content_type: str, Optional
150
+ :param _headers: set to override the headers for a single
151
+ request; this effectively ignores the headers
152
+ in the spec for a single request.
153
+ :type _headers: dict, optional
154
+ :param _host_index: set to override the host_index for a single
155
+ request; this effectively ignores the host_index
156
+ in the spec for a single request.
157
+ :type _host_index: int, optional
158
+ :return: Returns the result object.
159
+ """ # noqa: E501
160
+
161
+ _param = self._change_password_serialize(
162
+ change_password_dto=change_password_dto,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index,
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ "200": "UserAdminResponseDto",
171
+ }
172
+ response_data = await self.api_client.call_api(
173
+ *_param, _request_timeout=_request_timeout
174
+ )
175
+ await response_data.read()
176
+ return self.api_client.response_deserialize(
177
+ response_data=response_data,
178
+ response_types_map=_response_types_map,
179
+ )
180
+
181
+ @validate_call
182
+ async def change_password_without_preload_content(
183
+ self,
184
+ change_password_dto: ChangePasswordDto,
185
+ _request_timeout: Union[
186
+ None,
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Tuple[
189
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
190
+ ],
191
+ ] = None,
192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
193
+ _content_type: Optional[StrictStr] = None,
194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
196
+ ) -> RESTResponseType:
197
+ """Change password
198
+
199
+ Change the password of the current user.
200
+
201
+ :param change_password_dto: (required)
202
+ :type change_password_dto: ChangePasswordDto
203
+ :param _request_timeout: timeout setting for this request. If one
204
+ number provided, it will be total request
205
+ timeout. It can also be a pair (tuple) of
206
+ (connection, read) timeouts.
207
+ :type _request_timeout: int, tuple(int, int), optional
208
+ :param _request_auth: set to override the auth_settings for an a single
209
+ request; this effectively ignores the
210
+ authentication in the spec for a single request.
211
+ :type _request_auth: dict, optional
212
+ :param _content_type: force content-type for the request.
213
+ :type _content_type: str, Optional
214
+ :param _headers: set to override the headers for a single
215
+ request; this effectively ignores the headers
216
+ in the spec for a single request.
217
+ :type _headers: dict, optional
218
+ :param _host_index: set to override the host_index for a single
219
+ request; this effectively ignores the host_index
220
+ in the spec for a single request.
221
+ :type _host_index: int, optional
222
+ :return: Returns the result object.
223
+ """ # noqa: E501
224
+
225
+ _param = self._change_password_serialize(
226
+ change_password_dto=change_password_dto,
227
+ _request_auth=_request_auth,
228
+ _content_type=_content_type,
229
+ _headers=_headers,
230
+ _host_index=_host_index,
231
+ )
232
+
233
+ _response_types_map: Dict[str, Optional[str]] = {
234
+ "200": "UserAdminResponseDto",
235
+ }
236
+ response_data = await self.api_client.call_api(
237
+ *_param, _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+ def _change_password_serialize(
242
+ self,
243
+ change_password_dto,
244
+ _request_auth,
245
+ _content_type,
246
+ _headers,
247
+ _host_index,
248
+ ) -> RequestSerialized:
249
+ _host = None
250
+
251
+ _collection_formats: Dict[str, str] = {}
252
+
253
+ _path_params: Dict[str, str] = {}
254
+ _query_params: List[Tuple[str, str]] = []
255
+ _header_params: Dict[str, Optional[str]] = _headers or {}
256
+ _form_params: List[Tuple[str, str]] = []
257
+ _files: Dict[
258
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
259
+ ] = {}
260
+ _body_params: Optional[bytes] = None
261
+
262
+ # process the path parameters
263
+ # process the query parameters
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+ if change_password_dto is not None:
268
+ _body_params = change_password_dto
269
+
270
+ # set the HTTP header `Accept`
271
+ if "Accept" not in _header_params:
272
+ _header_params["Accept"] = self.api_client.select_header_accept(
273
+ ["application/json"]
274
+ )
275
+
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
+ # authentication setting
287
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
288
+
289
+ return self.api_client.param_serialize(
290
+ method="POST",
291
+ resource_path="/auth/change-password",
292
+ path_params=_path_params,
293
+ query_params=_query_params,
294
+ header_params=_header_params,
295
+ body=_body_params,
296
+ post_params=_form_params,
297
+ files=_files,
298
+ auth_settings=_auth_settings,
299
+ collection_formats=_collection_formats,
300
+ _host=_host,
301
+ _request_auth=_request_auth,
302
+ )
303
+
304
+ @validate_call
305
+ async def change_pin_code(
306
+ self,
307
+ pin_code_change_dto: PinCodeChangeDto,
308
+ _request_timeout: Union[
309
+ None,
310
+ Annotated[StrictFloat, Field(gt=0)],
311
+ Tuple[
312
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
313
+ ],
314
+ ] = None,
315
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
316
+ _content_type: Optional[StrictStr] = None,
317
+ _headers: Optional[Dict[StrictStr, Any]] = None,
318
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
319
+ ) -> None:
320
+ """Change pin code
321
+
322
+ Change the pin code for the current user.
323
+
324
+ :param pin_code_change_dto: (required)
325
+ :type pin_code_change_dto: PinCodeChangeDto
326
+ :param _request_timeout: timeout setting for this request. If one
327
+ number provided, it will be total request
328
+ timeout. It can also be a pair (tuple) of
329
+ (connection, read) timeouts.
330
+ :type _request_timeout: int, tuple(int, int), optional
331
+ :param _request_auth: set to override the auth_settings for an a single
332
+ request; this effectively ignores the
333
+ authentication in the spec for a single request.
334
+ :type _request_auth: dict, optional
335
+ :param _content_type: force content-type for the request.
336
+ :type _content_type: str, Optional
337
+ :param _headers: set to override the headers for a single
338
+ request; this effectively ignores the headers
339
+ in the spec for a single request.
340
+ :type _headers: dict, optional
341
+ :param _host_index: set to override the host_index for a single
342
+ request; this effectively ignores the host_index
343
+ in the spec for a single request.
344
+ :type _host_index: int, optional
345
+ :return: Returns the result object.
346
+ """ # noqa: E501
347
+
348
+ _param = self._change_pin_code_serialize(
349
+ pin_code_change_dto=pin_code_change_dto,
350
+ _request_auth=_request_auth,
351
+ _content_type=_content_type,
352
+ _headers=_headers,
353
+ _host_index=_host_index,
354
+ )
355
+
356
+ _response_types_map: Dict[str, Optional[str]] = {
357
+ "204": None,
358
+ }
359
+ response_data = await self.api_client.call_api(
360
+ *_param, _request_timeout=_request_timeout
361
+ )
362
+ await response_data.read()
363
+ return self.api_client.response_deserialize(
364
+ response_data=response_data,
365
+ response_types_map=_response_types_map,
366
+ ).data
367
+
368
+ @validate_call
369
+ async def change_pin_code_with_http_info(
370
+ self,
371
+ pin_code_change_dto: PinCodeChangeDto,
372
+ _request_timeout: Union[
373
+ None,
374
+ Annotated[StrictFloat, Field(gt=0)],
375
+ Tuple[
376
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
377
+ ],
378
+ ] = None,
379
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
380
+ _content_type: Optional[StrictStr] = None,
381
+ _headers: Optional[Dict[StrictStr, Any]] = None,
382
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
383
+ ) -> ApiResponse[None]:
384
+ """Change pin code
385
+
386
+ Change the pin code for the current user.
387
+
388
+ :param pin_code_change_dto: (required)
389
+ :type pin_code_change_dto: PinCodeChangeDto
390
+ :param _request_timeout: timeout setting for this request. If one
391
+ number provided, it will be total request
392
+ timeout. It can also be a pair (tuple) of
393
+ (connection, read) timeouts.
394
+ :type _request_timeout: int, tuple(int, int), optional
395
+ :param _request_auth: set to override the auth_settings for an a single
396
+ request; this effectively ignores the
397
+ authentication in the spec for a single request.
398
+ :type _request_auth: dict, optional
399
+ :param _content_type: force content-type for the request.
400
+ :type _content_type: str, Optional
401
+ :param _headers: set to override the headers for a single
402
+ request; this effectively ignores the headers
403
+ in the spec for a single request.
404
+ :type _headers: dict, optional
405
+ :param _host_index: set to override the host_index for a single
406
+ request; this effectively ignores the host_index
407
+ in the spec for a single request.
408
+ :type _host_index: int, optional
409
+ :return: Returns the result object.
410
+ """ # noqa: E501
411
+
412
+ _param = self._change_pin_code_serialize(
413
+ pin_code_change_dto=pin_code_change_dto,
414
+ _request_auth=_request_auth,
415
+ _content_type=_content_type,
416
+ _headers=_headers,
417
+ _host_index=_host_index,
418
+ )
419
+
420
+ _response_types_map: Dict[str, Optional[str]] = {
421
+ "204": None,
422
+ }
423
+ response_data = await self.api_client.call_api(
424
+ *_param, _request_timeout=_request_timeout
425
+ )
426
+ await response_data.read()
427
+ return self.api_client.response_deserialize(
428
+ response_data=response_data,
429
+ response_types_map=_response_types_map,
430
+ )
431
+
432
+ @validate_call
433
+ async def change_pin_code_without_preload_content(
434
+ self,
435
+ pin_code_change_dto: PinCodeChangeDto,
436
+ _request_timeout: Union[
437
+ None,
438
+ Annotated[StrictFloat, Field(gt=0)],
439
+ Tuple[
440
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
441
+ ],
442
+ ] = None,
443
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
444
+ _content_type: Optional[StrictStr] = None,
445
+ _headers: Optional[Dict[StrictStr, Any]] = None,
446
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
447
+ ) -> RESTResponseType:
448
+ """Change pin code
449
+
450
+ Change the pin code for the current user.
451
+
452
+ :param pin_code_change_dto: (required)
453
+ :type pin_code_change_dto: PinCodeChangeDto
454
+ :param _request_timeout: timeout setting for this request. If one
455
+ number provided, it will be total request
456
+ timeout. It can also be a pair (tuple) of
457
+ (connection, read) timeouts.
458
+ :type _request_timeout: int, tuple(int, int), optional
459
+ :param _request_auth: set to override the auth_settings for an a single
460
+ request; this effectively ignores the
461
+ authentication in the spec for a single request.
462
+ :type _request_auth: dict, optional
463
+ :param _content_type: force content-type for the request.
464
+ :type _content_type: str, Optional
465
+ :param _headers: set to override the headers for a single
466
+ request; this effectively ignores the headers
467
+ in the spec for a single request.
468
+ :type _headers: dict, optional
469
+ :param _host_index: set to override the host_index for a single
470
+ request; this effectively ignores the host_index
471
+ in the spec for a single request.
472
+ :type _host_index: int, optional
473
+ :return: Returns the result object.
474
+ """ # noqa: E501
475
+
476
+ _param = self._change_pin_code_serialize(
477
+ pin_code_change_dto=pin_code_change_dto,
478
+ _request_auth=_request_auth,
479
+ _content_type=_content_type,
480
+ _headers=_headers,
481
+ _host_index=_host_index,
482
+ )
483
+
484
+ _response_types_map: Dict[str, Optional[str]] = {
485
+ "204": None,
486
+ }
487
+ response_data = await self.api_client.call_api(
488
+ *_param, _request_timeout=_request_timeout
489
+ )
490
+ return response_data.response
491
+
492
+ def _change_pin_code_serialize(
493
+ self,
494
+ pin_code_change_dto,
495
+ _request_auth,
496
+ _content_type,
497
+ _headers,
498
+ _host_index,
499
+ ) -> RequestSerialized:
500
+ _host = None
501
+
502
+ _collection_formats: Dict[str, str] = {}
503
+
504
+ _path_params: Dict[str, str] = {}
505
+ _query_params: List[Tuple[str, str]] = []
506
+ _header_params: Dict[str, Optional[str]] = _headers or {}
507
+ _form_params: List[Tuple[str, str]] = []
508
+ _files: Dict[
509
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
510
+ ] = {}
511
+ _body_params: Optional[bytes] = None
512
+
513
+ # process the path parameters
514
+ # process the query parameters
515
+ # process the header parameters
516
+ # process the form parameters
517
+ # process the body parameter
518
+ if pin_code_change_dto is not None:
519
+ _body_params = pin_code_change_dto
520
+
521
+ # set the HTTP header `Content-Type`
522
+ if _content_type:
523
+ _header_params["Content-Type"] = _content_type
524
+ else:
525
+ _default_content_type = self.api_client.select_header_content_type(
526
+ ["application/json"]
527
+ )
528
+ if _default_content_type is not None:
529
+ _header_params["Content-Type"] = _default_content_type
530
+
531
+ # authentication setting
532
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
533
+
534
+ return self.api_client.param_serialize(
535
+ method="PUT",
536
+ resource_path="/auth/pin-code",
537
+ path_params=_path_params,
538
+ query_params=_query_params,
539
+ header_params=_header_params,
540
+ body=_body_params,
541
+ post_params=_form_params,
542
+ files=_files,
543
+ auth_settings=_auth_settings,
544
+ collection_formats=_collection_formats,
545
+ _host=_host,
546
+ _request_auth=_request_auth,
547
+ )
548
+
549
+ @validate_call
550
+ async def finish_o_auth(
551
+ self,
552
+ o_auth_callback_dto: OAuthCallbackDto,
553
+ _request_timeout: Union[
554
+ None,
555
+ Annotated[StrictFloat, Field(gt=0)],
556
+ Tuple[
557
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
558
+ ],
559
+ ] = None,
560
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
561
+ _content_type: Optional[StrictStr] = None,
562
+ _headers: Optional[Dict[StrictStr, Any]] = None,
563
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
564
+ ) -> LoginResponseDto:
565
+ """Finish OAuth
566
+
567
+ Complete the OAuth authorization process by exchanging the authorization code for a session token.
568
+
569
+ :param o_auth_callback_dto: (required)
570
+ :type o_auth_callback_dto: OAuthCallbackDto
571
+ :param _request_timeout: timeout setting for this request. If one
572
+ number provided, it will be total request
573
+ timeout. It can also be a pair (tuple) of
574
+ (connection, read) timeouts.
575
+ :type _request_timeout: int, tuple(int, int), optional
576
+ :param _request_auth: set to override the auth_settings for an a single
577
+ request; this effectively ignores the
578
+ authentication in the spec for a single request.
579
+ :type _request_auth: dict, optional
580
+ :param _content_type: force content-type for the request.
581
+ :type _content_type: str, Optional
582
+ :param _headers: set to override the headers for a single
583
+ request; this effectively ignores the headers
584
+ in the spec for a single request.
585
+ :type _headers: dict, optional
586
+ :param _host_index: set to override the host_index for a single
587
+ request; this effectively ignores the host_index
588
+ in the spec for a single request.
589
+ :type _host_index: int, optional
590
+ :return: Returns the result object.
591
+ """ # noqa: E501
592
+
593
+ _param = self._finish_o_auth_serialize(
594
+ o_auth_callback_dto=o_auth_callback_dto,
595
+ _request_auth=_request_auth,
596
+ _content_type=_content_type,
597
+ _headers=_headers,
598
+ _host_index=_host_index,
599
+ )
600
+
601
+ _response_types_map: Dict[str, Optional[str]] = {
602
+ "201": "LoginResponseDto",
603
+ }
604
+ response_data = await self.api_client.call_api(
605
+ *_param, _request_timeout=_request_timeout
606
+ )
607
+ await response_data.read()
608
+ return self.api_client.response_deserialize(
609
+ response_data=response_data,
610
+ response_types_map=_response_types_map,
611
+ ).data
612
+
613
+ @validate_call
614
+ async def finish_o_auth_with_http_info(
615
+ self,
616
+ o_auth_callback_dto: OAuthCallbackDto,
617
+ _request_timeout: Union[
618
+ None,
619
+ Annotated[StrictFloat, Field(gt=0)],
620
+ Tuple[
621
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
622
+ ],
623
+ ] = None,
624
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
625
+ _content_type: Optional[StrictStr] = None,
626
+ _headers: Optional[Dict[StrictStr, Any]] = None,
627
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
628
+ ) -> ApiResponse[LoginResponseDto]:
629
+ """Finish OAuth
630
+
631
+ Complete the OAuth authorization process by exchanging the authorization code for a session token.
632
+
633
+ :param o_auth_callback_dto: (required)
634
+ :type o_auth_callback_dto: OAuthCallbackDto
635
+ :param _request_timeout: timeout setting for this request. If one
636
+ number provided, it will be total request
637
+ timeout. It can also be a pair (tuple) of
638
+ (connection, read) timeouts.
639
+ :type _request_timeout: int, tuple(int, int), optional
640
+ :param _request_auth: set to override the auth_settings for an a single
641
+ request; this effectively ignores the
642
+ authentication in the spec for a single request.
643
+ :type _request_auth: dict, optional
644
+ :param _content_type: force content-type for the request.
645
+ :type _content_type: str, Optional
646
+ :param _headers: set to override the headers for a single
647
+ request; this effectively ignores the headers
648
+ in the spec for a single request.
649
+ :type _headers: dict, optional
650
+ :param _host_index: set to override the host_index for a single
651
+ request; this effectively ignores the host_index
652
+ in the spec for a single request.
653
+ :type _host_index: int, optional
654
+ :return: Returns the result object.
655
+ """ # noqa: E501
656
+
657
+ _param = self._finish_o_auth_serialize(
658
+ o_auth_callback_dto=o_auth_callback_dto,
659
+ _request_auth=_request_auth,
660
+ _content_type=_content_type,
661
+ _headers=_headers,
662
+ _host_index=_host_index,
663
+ )
664
+
665
+ _response_types_map: Dict[str, Optional[str]] = {
666
+ "201": "LoginResponseDto",
667
+ }
668
+ response_data = await self.api_client.call_api(
669
+ *_param, _request_timeout=_request_timeout
670
+ )
671
+ await response_data.read()
672
+ return self.api_client.response_deserialize(
673
+ response_data=response_data,
674
+ response_types_map=_response_types_map,
675
+ )
676
+
677
+ @validate_call
678
+ async def finish_o_auth_without_preload_content(
679
+ self,
680
+ o_auth_callback_dto: OAuthCallbackDto,
681
+ _request_timeout: Union[
682
+ None,
683
+ Annotated[StrictFloat, Field(gt=0)],
684
+ Tuple[
685
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
686
+ ],
687
+ ] = None,
688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
+ _content_type: Optional[StrictStr] = None,
690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
+ ) -> RESTResponseType:
693
+ """Finish OAuth
694
+
695
+ Complete the OAuth authorization process by exchanging the authorization code for a session token.
696
+
697
+ :param o_auth_callback_dto: (required)
698
+ :type o_auth_callback_dto: OAuthCallbackDto
699
+ :param _request_timeout: timeout setting for this request. If one
700
+ number provided, it will be total request
701
+ timeout. It can also be a pair (tuple) of
702
+ (connection, read) timeouts.
703
+ :type _request_timeout: int, tuple(int, int), optional
704
+ :param _request_auth: set to override the auth_settings for an a single
705
+ request; this effectively ignores the
706
+ authentication in the spec for a single request.
707
+ :type _request_auth: dict, optional
708
+ :param _content_type: force content-type for the request.
709
+ :type _content_type: str, Optional
710
+ :param _headers: set to override the headers for a single
711
+ request; this effectively ignores the headers
712
+ in the spec for a single request.
713
+ :type _headers: dict, optional
714
+ :param _host_index: set to override the host_index for a single
715
+ request; this effectively ignores the host_index
716
+ in the spec for a single request.
717
+ :type _host_index: int, optional
718
+ :return: Returns the result object.
719
+ """ # noqa: E501
720
+
721
+ _param = self._finish_o_auth_serialize(
722
+ o_auth_callback_dto=o_auth_callback_dto,
723
+ _request_auth=_request_auth,
724
+ _content_type=_content_type,
725
+ _headers=_headers,
726
+ _host_index=_host_index,
727
+ )
728
+
729
+ _response_types_map: Dict[str, Optional[str]] = {
730
+ "201": "LoginResponseDto",
731
+ }
732
+ response_data = await self.api_client.call_api(
733
+ *_param, _request_timeout=_request_timeout
734
+ )
735
+ return response_data.response
736
+
737
+ def _finish_o_auth_serialize(
738
+ self,
739
+ o_auth_callback_dto,
740
+ _request_auth,
741
+ _content_type,
742
+ _headers,
743
+ _host_index,
744
+ ) -> RequestSerialized:
745
+ _host = None
746
+
747
+ _collection_formats: Dict[str, str] = {}
748
+
749
+ _path_params: Dict[str, str] = {}
750
+ _query_params: List[Tuple[str, str]] = []
751
+ _header_params: Dict[str, Optional[str]] = _headers or {}
752
+ _form_params: List[Tuple[str, str]] = []
753
+ _files: Dict[
754
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
755
+ ] = {}
756
+ _body_params: Optional[bytes] = None
757
+
758
+ # process the path parameters
759
+ # process the query parameters
760
+ # process the header parameters
761
+ # process the form parameters
762
+ # process the body parameter
763
+ if o_auth_callback_dto is not None:
764
+ _body_params = o_auth_callback_dto
765
+
766
+ # set the HTTP header `Accept`
767
+ if "Accept" not in _header_params:
768
+ _header_params["Accept"] = self.api_client.select_header_accept(
769
+ ["application/json"]
770
+ )
771
+
772
+ # set the HTTP header `Content-Type`
773
+ if _content_type:
774
+ _header_params["Content-Type"] = _content_type
775
+ else:
776
+ _default_content_type = self.api_client.select_header_content_type(
777
+ ["application/json"]
778
+ )
779
+ if _default_content_type is not None:
780
+ _header_params["Content-Type"] = _default_content_type
781
+
782
+ # authentication setting
783
+ _auth_settings: List[str] = []
784
+
785
+ return self.api_client.param_serialize(
786
+ method="POST",
787
+ resource_path="/oauth/callback",
788
+ path_params=_path_params,
789
+ query_params=_query_params,
790
+ header_params=_header_params,
791
+ body=_body_params,
792
+ post_params=_form_params,
793
+ files=_files,
794
+ auth_settings=_auth_settings,
795
+ collection_formats=_collection_formats,
796
+ _host=_host,
797
+ _request_auth=_request_auth,
798
+ )
799
+
800
+ @validate_call
801
+ async def get_auth_status(
802
+ self,
803
+ _request_timeout: Union[
804
+ None,
805
+ Annotated[StrictFloat, Field(gt=0)],
806
+ Tuple[
807
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
808
+ ],
809
+ ] = None,
810
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
811
+ _content_type: Optional[StrictStr] = None,
812
+ _headers: Optional[Dict[StrictStr, Any]] = None,
813
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
814
+ ) -> AuthStatusResponseDto:
815
+ """Retrieve auth status
816
+
817
+ Get information about the current session, including whether the user has a password, and if the session can access locked assets.
818
+
819
+ :param _request_timeout: timeout setting for this request. If one
820
+ number provided, it will be total request
821
+ timeout. It can also be a pair (tuple) of
822
+ (connection, read) timeouts.
823
+ :type _request_timeout: int, tuple(int, int), optional
824
+ :param _request_auth: set to override the auth_settings for an a single
825
+ request; this effectively ignores the
826
+ authentication in the spec for a single request.
827
+ :type _request_auth: dict, optional
828
+ :param _content_type: force content-type for the request.
829
+ :type _content_type: str, Optional
830
+ :param _headers: set to override the headers for a single
831
+ request; this effectively ignores the headers
832
+ in the spec for a single request.
833
+ :type _headers: dict, optional
834
+ :param _host_index: set to override the host_index for a single
835
+ request; this effectively ignores the host_index
836
+ in the spec for a single request.
837
+ :type _host_index: int, optional
838
+ :return: Returns the result object.
839
+ """ # noqa: E501
840
+
841
+ _param = self._get_auth_status_serialize(
842
+ _request_auth=_request_auth,
843
+ _content_type=_content_type,
844
+ _headers=_headers,
845
+ _host_index=_host_index,
846
+ )
847
+
848
+ _response_types_map: Dict[str, Optional[str]] = {
849
+ "200": "AuthStatusResponseDto",
850
+ }
851
+ response_data = await self.api_client.call_api(
852
+ *_param, _request_timeout=_request_timeout
853
+ )
854
+ await response_data.read()
855
+ return self.api_client.response_deserialize(
856
+ response_data=response_data,
857
+ response_types_map=_response_types_map,
858
+ ).data
859
+
860
+ @validate_call
861
+ async def get_auth_status_with_http_info(
862
+ self,
863
+ _request_timeout: Union[
864
+ None,
865
+ Annotated[StrictFloat, Field(gt=0)],
866
+ Tuple[
867
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
868
+ ],
869
+ ] = None,
870
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
871
+ _content_type: Optional[StrictStr] = None,
872
+ _headers: Optional[Dict[StrictStr, Any]] = None,
873
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
874
+ ) -> ApiResponse[AuthStatusResponseDto]:
875
+ """Retrieve auth status
876
+
877
+ Get information about the current session, including whether the user has a password, and if the session can access locked assets.
878
+
879
+ :param _request_timeout: timeout setting for this request. If one
880
+ number provided, it will be total request
881
+ timeout. It can also be a pair (tuple) of
882
+ (connection, read) timeouts.
883
+ :type _request_timeout: int, tuple(int, int), optional
884
+ :param _request_auth: set to override the auth_settings for an a single
885
+ request; this effectively ignores the
886
+ authentication in the spec for a single request.
887
+ :type _request_auth: dict, optional
888
+ :param _content_type: force content-type for the request.
889
+ :type _content_type: str, Optional
890
+ :param _headers: set to override the headers for a single
891
+ request; this effectively ignores the headers
892
+ in the spec for a single request.
893
+ :type _headers: dict, optional
894
+ :param _host_index: set to override the host_index for a single
895
+ request; this effectively ignores the host_index
896
+ in the spec for a single request.
897
+ :type _host_index: int, optional
898
+ :return: Returns the result object.
899
+ """ # noqa: E501
900
+
901
+ _param = self._get_auth_status_serialize(
902
+ _request_auth=_request_auth,
903
+ _content_type=_content_type,
904
+ _headers=_headers,
905
+ _host_index=_host_index,
906
+ )
907
+
908
+ _response_types_map: Dict[str, Optional[str]] = {
909
+ "200": "AuthStatusResponseDto",
910
+ }
911
+ response_data = await self.api_client.call_api(
912
+ *_param, _request_timeout=_request_timeout
913
+ )
914
+ await response_data.read()
915
+ return self.api_client.response_deserialize(
916
+ response_data=response_data,
917
+ response_types_map=_response_types_map,
918
+ )
919
+
920
+ @validate_call
921
+ async def get_auth_status_without_preload_content(
922
+ self,
923
+ _request_timeout: Union[
924
+ None,
925
+ Annotated[StrictFloat, Field(gt=0)],
926
+ Tuple[
927
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
928
+ ],
929
+ ] = None,
930
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
931
+ _content_type: Optional[StrictStr] = None,
932
+ _headers: Optional[Dict[StrictStr, Any]] = None,
933
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
934
+ ) -> RESTResponseType:
935
+ """Retrieve auth status
936
+
937
+ Get information about the current session, including whether the user has a password, and if the session can access locked assets.
938
+
939
+ :param _request_timeout: timeout setting for this request. If one
940
+ number provided, it will be total request
941
+ timeout. It can also be a pair (tuple) of
942
+ (connection, read) timeouts.
943
+ :type _request_timeout: int, tuple(int, int), optional
944
+ :param _request_auth: set to override the auth_settings for an a single
945
+ request; this effectively ignores the
946
+ authentication in the spec for a single request.
947
+ :type _request_auth: dict, optional
948
+ :param _content_type: force content-type for the request.
949
+ :type _content_type: str, Optional
950
+ :param _headers: set to override the headers for a single
951
+ request; this effectively ignores the headers
952
+ in the spec for a single request.
953
+ :type _headers: dict, optional
954
+ :param _host_index: set to override the host_index for a single
955
+ request; this effectively ignores the host_index
956
+ in the spec for a single request.
957
+ :type _host_index: int, optional
958
+ :return: Returns the result object.
959
+ """ # noqa: E501
960
+
961
+ _param = self._get_auth_status_serialize(
962
+ _request_auth=_request_auth,
963
+ _content_type=_content_type,
964
+ _headers=_headers,
965
+ _host_index=_host_index,
966
+ )
967
+
968
+ _response_types_map: Dict[str, Optional[str]] = {
969
+ "200": "AuthStatusResponseDto",
970
+ }
971
+ response_data = await self.api_client.call_api(
972
+ *_param, _request_timeout=_request_timeout
973
+ )
974
+ return response_data.response
975
+
976
+ def _get_auth_status_serialize(
977
+ self,
978
+ _request_auth,
979
+ _content_type,
980
+ _headers,
981
+ _host_index,
982
+ ) -> RequestSerialized:
983
+ _host = None
984
+
985
+ _collection_formats: Dict[str, str] = {}
986
+
987
+ _path_params: Dict[str, str] = {}
988
+ _query_params: List[Tuple[str, str]] = []
989
+ _header_params: Dict[str, Optional[str]] = _headers or {}
990
+ _form_params: List[Tuple[str, str]] = []
991
+ _files: Dict[
992
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
993
+ ] = {}
994
+ _body_params: Optional[bytes] = None
995
+
996
+ # process the path parameters
997
+ # process the query parameters
998
+ # process the header parameters
999
+ # process the form parameters
1000
+ # process the body parameter
1001
+
1002
+ # set the HTTP header `Accept`
1003
+ if "Accept" not in _header_params:
1004
+ _header_params["Accept"] = self.api_client.select_header_accept(
1005
+ ["application/json"]
1006
+ )
1007
+
1008
+ # authentication setting
1009
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1010
+
1011
+ return self.api_client.param_serialize(
1012
+ method="GET",
1013
+ resource_path="/auth/status",
1014
+ path_params=_path_params,
1015
+ query_params=_query_params,
1016
+ header_params=_header_params,
1017
+ body=_body_params,
1018
+ post_params=_form_params,
1019
+ files=_files,
1020
+ auth_settings=_auth_settings,
1021
+ collection_formats=_collection_formats,
1022
+ _host=_host,
1023
+ _request_auth=_request_auth,
1024
+ )
1025
+
1026
+ @validate_call
1027
+ async def link_o_auth_account(
1028
+ self,
1029
+ o_auth_callback_dto: OAuthCallbackDto,
1030
+ _request_timeout: Union[
1031
+ None,
1032
+ Annotated[StrictFloat, Field(gt=0)],
1033
+ Tuple[
1034
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1035
+ ],
1036
+ ] = None,
1037
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1038
+ _content_type: Optional[StrictStr] = None,
1039
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1040
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1041
+ ) -> UserAdminResponseDto:
1042
+ """Link OAuth account
1043
+
1044
+ Link an OAuth account to the authenticated user.
1045
+
1046
+ :param o_auth_callback_dto: (required)
1047
+ :type o_auth_callback_dto: OAuthCallbackDto
1048
+ :param _request_timeout: timeout setting for this request. If one
1049
+ number provided, it will be total request
1050
+ timeout. It can also be a pair (tuple) of
1051
+ (connection, read) timeouts.
1052
+ :type _request_timeout: int, tuple(int, int), optional
1053
+ :param _request_auth: set to override the auth_settings for an a single
1054
+ request; this effectively ignores the
1055
+ authentication in the spec for a single request.
1056
+ :type _request_auth: dict, optional
1057
+ :param _content_type: force content-type for the request.
1058
+ :type _content_type: str, Optional
1059
+ :param _headers: set to override the headers for a single
1060
+ request; this effectively ignores the headers
1061
+ in the spec for a single request.
1062
+ :type _headers: dict, optional
1063
+ :param _host_index: set to override the host_index for a single
1064
+ request; this effectively ignores the host_index
1065
+ in the spec for a single request.
1066
+ :type _host_index: int, optional
1067
+ :return: Returns the result object.
1068
+ """ # noqa: E501
1069
+
1070
+ _param = self._link_o_auth_account_serialize(
1071
+ o_auth_callback_dto=o_auth_callback_dto,
1072
+ _request_auth=_request_auth,
1073
+ _content_type=_content_type,
1074
+ _headers=_headers,
1075
+ _host_index=_host_index,
1076
+ )
1077
+
1078
+ _response_types_map: Dict[str, Optional[str]] = {
1079
+ "200": "UserAdminResponseDto",
1080
+ }
1081
+ response_data = await self.api_client.call_api(
1082
+ *_param, _request_timeout=_request_timeout
1083
+ )
1084
+ await response_data.read()
1085
+ return self.api_client.response_deserialize(
1086
+ response_data=response_data,
1087
+ response_types_map=_response_types_map,
1088
+ ).data
1089
+
1090
+ @validate_call
1091
+ async def link_o_auth_account_with_http_info(
1092
+ self,
1093
+ o_auth_callback_dto: OAuthCallbackDto,
1094
+ _request_timeout: Union[
1095
+ None,
1096
+ Annotated[StrictFloat, Field(gt=0)],
1097
+ Tuple[
1098
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1099
+ ],
1100
+ ] = None,
1101
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1102
+ _content_type: Optional[StrictStr] = None,
1103
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1104
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1105
+ ) -> ApiResponse[UserAdminResponseDto]:
1106
+ """Link OAuth account
1107
+
1108
+ Link an OAuth account to the authenticated user.
1109
+
1110
+ :param o_auth_callback_dto: (required)
1111
+ :type o_auth_callback_dto: OAuthCallbackDto
1112
+ :param _request_timeout: timeout setting for this request. If one
1113
+ number provided, it will be total request
1114
+ timeout. It can also be a pair (tuple) of
1115
+ (connection, read) timeouts.
1116
+ :type _request_timeout: int, tuple(int, int), optional
1117
+ :param _request_auth: set to override the auth_settings for an a single
1118
+ request; this effectively ignores the
1119
+ authentication in the spec for a single request.
1120
+ :type _request_auth: dict, optional
1121
+ :param _content_type: force content-type for the request.
1122
+ :type _content_type: str, Optional
1123
+ :param _headers: set to override the headers for a single
1124
+ request; this effectively ignores the headers
1125
+ in the spec for a single request.
1126
+ :type _headers: dict, optional
1127
+ :param _host_index: set to override the host_index for a single
1128
+ request; this effectively ignores the host_index
1129
+ in the spec for a single request.
1130
+ :type _host_index: int, optional
1131
+ :return: Returns the result object.
1132
+ """ # noqa: E501
1133
+
1134
+ _param = self._link_o_auth_account_serialize(
1135
+ o_auth_callback_dto=o_auth_callback_dto,
1136
+ _request_auth=_request_auth,
1137
+ _content_type=_content_type,
1138
+ _headers=_headers,
1139
+ _host_index=_host_index,
1140
+ )
1141
+
1142
+ _response_types_map: Dict[str, Optional[str]] = {
1143
+ "200": "UserAdminResponseDto",
1144
+ }
1145
+ response_data = await self.api_client.call_api(
1146
+ *_param, _request_timeout=_request_timeout
1147
+ )
1148
+ await response_data.read()
1149
+ return self.api_client.response_deserialize(
1150
+ response_data=response_data,
1151
+ response_types_map=_response_types_map,
1152
+ )
1153
+
1154
+ @validate_call
1155
+ async def link_o_auth_account_without_preload_content(
1156
+ self,
1157
+ o_auth_callback_dto: OAuthCallbackDto,
1158
+ _request_timeout: Union[
1159
+ None,
1160
+ Annotated[StrictFloat, Field(gt=0)],
1161
+ Tuple[
1162
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1163
+ ],
1164
+ ] = None,
1165
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1166
+ _content_type: Optional[StrictStr] = None,
1167
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1168
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1169
+ ) -> RESTResponseType:
1170
+ """Link OAuth account
1171
+
1172
+ Link an OAuth account to the authenticated user.
1173
+
1174
+ :param o_auth_callback_dto: (required)
1175
+ :type o_auth_callback_dto: OAuthCallbackDto
1176
+ :param _request_timeout: timeout setting for this request. If one
1177
+ number provided, it will be total request
1178
+ timeout. It can also be a pair (tuple) of
1179
+ (connection, read) timeouts.
1180
+ :type _request_timeout: int, tuple(int, int), optional
1181
+ :param _request_auth: set to override the auth_settings for an a single
1182
+ request; this effectively ignores the
1183
+ authentication in the spec for a single request.
1184
+ :type _request_auth: dict, optional
1185
+ :param _content_type: force content-type for the request.
1186
+ :type _content_type: str, Optional
1187
+ :param _headers: set to override the headers for a single
1188
+ request; this effectively ignores the headers
1189
+ in the spec for a single request.
1190
+ :type _headers: dict, optional
1191
+ :param _host_index: set to override the host_index for a single
1192
+ request; this effectively ignores the host_index
1193
+ in the spec for a single request.
1194
+ :type _host_index: int, optional
1195
+ :return: Returns the result object.
1196
+ """ # noqa: E501
1197
+
1198
+ _param = self._link_o_auth_account_serialize(
1199
+ o_auth_callback_dto=o_auth_callback_dto,
1200
+ _request_auth=_request_auth,
1201
+ _content_type=_content_type,
1202
+ _headers=_headers,
1203
+ _host_index=_host_index,
1204
+ )
1205
+
1206
+ _response_types_map: Dict[str, Optional[str]] = {
1207
+ "200": "UserAdminResponseDto",
1208
+ }
1209
+ response_data = await self.api_client.call_api(
1210
+ *_param, _request_timeout=_request_timeout
1211
+ )
1212
+ return response_data.response
1213
+
1214
+ def _link_o_auth_account_serialize(
1215
+ self,
1216
+ o_auth_callback_dto,
1217
+ _request_auth,
1218
+ _content_type,
1219
+ _headers,
1220
+ _host_index,
1221
+ ) -> RequestSerialized:
1222
+ _host = None
1223
+
1224
+ _collection_formats: Dict[str, str] = {}
1225
+
1226
+ _path_params: Dict[str, str] = {}
1227
+ _query_params: List[Tuple[str, str]] = []
1228
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1229
+ _form_params: List[Tuple[str, str]] = []
1230
+ _files: Dict[
1231
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1232
+ ] = {}
1233
+ _body_params: Optional[bytes] = None
1234
+
1235
+ # process the path parameters
1236
+ # process the query parameters
1237
+ # process the header parameters
1238
+ # process the form parameters
1239
+ # process the body parameter
1240
+ if o_auth_callback_dto is not None:
1241
+ _body_params = o_auth_callback_dto
1242
+
1243
+ # set the HTTP header `Accept`
1244
+ if "Accept" not in _header_params:
1245
+ _header_params["Accept"] = self.api_client.select_header_accept(
1246
+ ["application/json"]
1247
+ )
1248
+
1249
+ # set the HTTP header `Content-Type`
1250
+ if _content_type:
1251
+ _header_params["Content-Type"] = _content_type
1252
+ else:
1253
+ _default_content_type = self.api_client.select_header_content_type(
1254
+ ["application/json"]
1255
+ )
1256
+ if _default_content_type is not None:
1257
+ _header_params["Content-Type"] = _default_content_type
1258
+
1259
+ # authentication setting
1260
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1261
+
1262
+ return self.api_client.param_serialize(
1263
+ method="POST",
1264
+ resource_path="/oauth/link",
1265
+ path_params=_path_params,
1266
+ query_params=_query_params,
1267
+ header_params=_header_params,
1268
+ body=_body_params,
1269
+ post_params=_form_params,
1270
+ files=_files,
1271
+ auth_settings=_auth_settings,
1272
+ collection_formats=_collection_formats,
1273
+ _host=_host,
1274
+ _request_auth=_request_auth,
1275
+ )
1276
+
1277
+ @validate_call
1278
+ async def lock_auth_session(
1279
+ self,
1280
+ _request_timeout: Union[
1281
+ None,
1282
+ Annotated[StrictFloat, Field(gt=0)],
1283
+ Tuple[
1284
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1285
+ ],
1286
+ ] = None,
1287
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1288
+ _content_type: Optional[StrictStr] = None,
1289
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1290
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1291
+ ) -> None:
1292
+ """Lock auth session
1293
+
1294
+ Remove elevated access to locked assets from the current session.
1295
+
1296
+ :param _request_timeout: timeout setting for this request. If one
1297
+ number provided, it will be total request
1298
+ timeout. It can also be a pair (tuple) of
1299
+ (connection, read) timeouts.
1300
+ :type _request_timeout: int, tuple(int, int), optional
1301
+ :param _request_auth: set to override the auth_settings for an a single
1302
+ request; this effectively ignores the
1303
+ authentication in the spec for a single request.
1304
+ :type _request_auth: dict, optional
1305
+ :param _content_type: force content-type for the request.
1306
+ :type _content_type: str, Optional
1307
+ :param _headers: set to override the headers for a single
1308
+ request; this effectively ignores the headers
1309
+ in the spec for a single request.
1310
+ :type _headers: dict, optional
1311
+ :param _host_index: set to override the host_index for a single
1312
+ request; this effectively ignores the host_index
1313
+ in the spec for a single request.
1314
+ :type _host_index: int, optional
1315
+ :return: Returns the result object.
1316
+ """ # noqa: E501
1317
+
1318
+ _param = self._lock_auth_session_serialize(
1319
+ _request_auth=_request_auth,
1320
+ _content_type=_content_type,
1321
+ _headers=_headers,
1322
+ _host_index=_host_index,
1323
+ )
1324
+
1325
+ _response_types_map: Dict[str, Optional[str]] = {
1326
+ "204": None,
1327
+ }
1328
+ response_data = await self.api_client.call_api(
1329
+ *_param, _request_timeout=_request_timeout
1330
+ )
1331
+ await response_data.read()
1332
+ return self.api_client.response_deserialize(
1333
+ response_data=response_data,
1334
+ response_types_map=_response_types_map,
1335
+ ).data
1336
+
1337
+ @validate_call
1338
+ async def lock_auth_session_with_http_info(
1339
+ self,
1340
+ _request_timeout: Union[
1341
+ None,
1342
+ Annotated[StrictFloat, Field(gt=0)],
1343
+ Tuple[
1344
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1345
+ ],
1346
+ ] = None,
1347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1348
+ _content_type: Optional[StrictStr] = None,
1349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1351
+ ) -> ApiResponse[None]:
1352
+ """Lock auth session
1353
+
1354
+ Remove elevated access to locked assets from the current session.
1355
+
1356
+ :param _request_timeout: timeout setting for this request. If one
1357
+ number provided, it will be total request
1358
+ timeout. It can also be a pair (tuple) of
1359
+ (connection, read) timeouts.
1360
+ :type _request_timeout: int, tuple(int, int), optional
1361
+ :param _request_auth: set to override the auth_settings for an a single
1362
+ request; this effectively ignores the
1363
+ authentication in the spec for a single request.
1364
+ :type _request_auth: dict, optional
1365
+ :param _content_type: force content-type for the request.
1366
+ :type _content_type: str, Optional
1367
+ :param _headers: set to override the headers for a single
1368
+ request; this effectively ignores the headers
1369
+ in the spec for a single request.
1370
+ :type _headers: dict, optional
1371
+ :param _host_index: set to override the host_index for a single
1372
+ request; this effectively ignores the host_index
1373
+ in the spec for a single request.
1374
+ :type _host_index: int, optional
1375
+ :return: Returns the result object.
1376
+ """ # noqa: E501
1377
+
1378
+ _param = self._lock_auth_session_serialize(
1379
+ _request_auth=_request_auth,
1380
+ _content_type=_content_type,
1381
+ _headers=_headers,
1382
+ _host_index=_host_index,
1383
+ )
1384
+
1385
+ _response_types_map: Dict[str, Optional[str]] = {
1386
+ "204": None,
1387
+ }
1388
+ response_data = await self.api_client.call_api(
1389
+ *_param, _request_timeout=_request_timeout
1390
+ )
1391
+ await response_data.read()
1392
+ return self.api_client.response_deserialize(
1393
+ response_data=response_data,
1394
+ response_types_map=_response_types_map,
1395
+ )
1396
+
1397
+ @validate_call
1398
+ async def lock_auth_session_without_preload_content(
1399
+ self,
1400
+ _request_timeout: Union[
1401
+ None,
1402
+ Annotated[StrictFloat, Field(gt=0)],
1403
+ Tuple[
1404
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1405
+ ],
1406
+ ] = None,
1407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1408
+ _content_type: Optional[StrictStr] = None,
1409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1411
+ ) -> RESTResponseType:
1412
+ """Lock auth session
1413
+
1414
+ Remove elevated access to locked assets from the current session.
1415
+
1416
+ :param _request_timeout: timeout setting for this request. If one
1417
+ number provided, it will be total request
1418
+ timeout. It can also be a pair (tuple) of
1419
+ (connection, read) timeouts.
1420
+ :type _request_timeout: int, tuple(int, int), optional
1421
+ :param _request_auth: set to override the auth_settings for an a single
1422
+ request; this effectively ignores the
1423
+ authentication in the spec for a single request.
1424
+ :type _request_auth: dict, optional
1425
+ :param _content_type: force content-type for the request.
1426
+ :type _content_type: str, Optional
1427
+ :param _headers: set to override the headers for a single
1428
+ request; this effectively ignores the headers
1429
+ in the spec for a single request.
1430
+ :type _headers: dict, optional
1431
+ :param _host_index: set to override the host_index for a single
1432
+ request; this effectively ignores the host_index
1433
+ in the spec for a single request.
1434
+ :type _host_index: int, optional
1435
+ :return: Returns the result object.
1436
+ """ # noqa: E501
1437
+
1438
+ _param = self._lock_auth_session_serialize(
1439
+ _request_auth=_request_auth,
1440
+ _content_type=_content_type,
1441
+ _headers=_headers,
1442
+ _host_index=_host_index,
1443
+ )
1444
+
1445
+ _response_types_map: Dict[str, Optional[str]] = {
1446
+ "204": None,
1447
+ }
1448
+ response_data = await self.api_client.call_api(
1449
+ *_param, _request_timeout=_request_timeout
1450
+ )
1451
+ return response_data.response
1452
+
1453
+ def _lock_auth_session_serialize(
1454
+ self,
1455
+ _request_auth,
1456
+ _content_type,
1457
+ _headers,
1458
+ _host_index,
1459
+ ) -> RequestSerialized:
1460
+ _host = None
1461
+
1462
+ _collection_formats: Dict[str, str] = {}
1463
+
1464
+ _path_params: Dict[str, str] = {}
1465
+ _query_params: List[Tuple[str, str]] = []
1466
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1467
+ _form_params: List[Tuple[str, str]] = []
1468
+ _files: Dict[
1469
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1470
+ ] = {}
1471
+ _body_params: Optional[bytes] = None
1472
+
1473
+ # process the path parameters
1474
+ # process the query parameters
1475
+ # process the header parameters
1476
+ # process the form parameters
1477
+ # process the body parameter
1478
+
1479
+ # authentication setting
1480
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1481
+
1482
+ return self.api_client.param_serialize(
1483
+ method="POST",
1484
+ resource_path="/auth/session/lock",
1485
+ path_params=_path_params,
1486
+ query_params=_query_params,
1487
+ header_params=_header_params,
1488
+ body=_body_params,
1489
+ post_params=_form_params,
1490
+ files=_files,
1491
+ auth_settings=_auth_settings,
1492
+ collection_formats=_collection_formats,
1493
+ _host=_host,
1494
+ _request_auth=_request_auth,
1495
+ )
1496
+
1497
+ @validate_call
1498
+ async def login(
1499
+ self,
1500
+ login_credential_dto: LoginCredentialDto,
1501
+ _request_timeout: Union[
1502
+ None,
1503
+ Annotated[StrictFloat, Field(gt=0)],
1504
+ Tuple[
1505
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1506
+ ],
1507
+ ] = None,
1508
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1509
+ _content_type: Optional[StrictStr] = None,
1510
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1511
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1512
+ ) -> LoginResponseDto:
1513
+ """Login
1514
+
1515
+ Login with username and password and receive a session token.
1516
+
1517
+ :param login_credential_dto: (required)
1518
+ :type login_credential_dto: LoginCredentialDto
1519
+ :param _request_timeout: timeout setting for this request. If one
1520
+ number provided, it will be total request
1521
+ timeout. It can also be a pair (tuple) of
1522
+ (connection, read) timeouts.
1523
+ :type _request_timeout: int, tuple(int, int), optional
1524
+ :param _request_auth: set to override the auth_settings for an a single
1525
+ request; this effectively ignores the
1526
+ authentication in the spec for a single request.
1527
+ :type _request_auth: dict, optional
1528
+ :param _content_type: force content-type for the request.
1529
+ :type _content_type: str, Optional
1530
+ :param _headers: set to override the headers for a single
1531
+ request; this effectively ignores the headers
1532
+ in the spec for a single request.
1533
+ :type _headers: dict, optional
1534
+ :param _host_index: set to override the host_index for a single
1535
+ request; this effectively ignores the host_index
1536
+ in the spec for a single request.
1537
+ :type _host_index: int, optional
1538
+ :return: Returns the result object.
1539
+ """ # noqa: E501
1540
+
1541
+ _param = self._login_serialize(
1542
+ login_credential_dto=login_credential_dto,
1543
+ _request_auth=_request_auth,
1544
+ _content_type=_content_type,
1545
+ _headers=_headers,
1546
+ _host_index=_host_index,
1547
+ )
1548
+
1549
+ _response_types_map: Dict[str, Optional[str]] = {
1550
+ "201": "LoginResponseDto",
1551
+ }
1552
+ response_data = await self.api_client.call_api(
1553
+ *_param, _request_timeout=_request_timeout
1554
+ )
1555
+ await response_data.read()
1556
+ return self.api_client.response_deserialize(
1557
+ response_data=response_data,
1558
+ response_types_map=_response_types_map,
1559
+ ).data
1560
+
1561
+ @validate_call
1562
+ async def login_with_http_info(
1563
+ self,
1564
+ login_credential_dto: LoginCredentialDto,
1565
+ _request_timeout: Union[
1566
+ None,
1567
+ Annotated[StrictFloat, Field(gt=0)],
1568
+ Tuple[
1569
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1570
+ ],
1571
+ ] = None,
1572
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1573
+ _content_type: Optional[StrictStr] = None,
1574
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1575
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1576
+ ) -> ApiResponse[LoginResponseDto]:
1577
+ """Login
1578
+
1579
+ Login with username and password and receive a session token.
1580
+
1581
+ :param login_credential_dto: (required)
1582
+ :type login_credential_dto: LoginCredentialDto
1583
+ :param _request_timeout: timeout setting for this request. If one
1584
+ number provided, it will be total request
1585
+ timeout. It can also be a pair (tuple) of
1586
+ (connection, read) timeouts.
1587
+ :type _request_timeout: int, tuple(int, int), optional
1588
+ :param _request_auth: set to override the auth_settings for an a single
1589
+ request; this effectively ignores the
1590
+ authentication in the spec for a single request.
1591
+ :type _request_auth: dict, optional
1592
+ :param _content_type: force content-type for the request.
1593
+ :type _content_type: str, Optional
1594
+ :param _headers: set to override the headers for a single
1595
+ request; this effectively ignores the headers
1596
+ in the spec for a single request.
1597
+ :type _headers: dict, optional
1598
+ :param _host_index: set to override the host_index for a single
1599
+ request; this effectively ignores the host_index
1600
+ in the spec for a single request.
1601
+ :type _host_index: int, optional
1602
+ :return: Returns the result object.
1603
+ """ # noqa: E501
1604
+
1605
+ _param = self._login_serialize(
1606
+ login_credential_dto=login_credential_dto,
1607
+ _request_auth=_request_auth,
1608
+ _content_type=_content_type,
1609
+ _headers=_headers,
1610
+ _host_index=_host_index,
1611
+ )
1612
+
1613
+ _response_types_map: Dict[str, Optional[str]] = {
1614
+ "201": "LoginResponseDto",
1615
+ }
1616
+ response_data = await self.api_client.call_api(
1617
+ *_param, _request_timeout=_request_timeout
1618
+ )
1619
+ await response_data.read()
1620
+ return self.api_client.response_deserialize(
1621
+ response_data=response_data,
1622
+ response_types_map=_response_types_map,
1623
+ )
1624
+
1625
+ @validate_call
1626
+ async def login_without_preload_content(
1627
+ self,
1628
+ login_credential_dto: LoginCredentialDto,
1629
+ _request_timeout: Union[
1630
+ None,
1631
+ Annotated[StrictFloat, Field(gt=0)],
1632
+ Tuple[
1633
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1634
+ ],
1635
+ ] = None,
1636
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1637
+ _content_type: Optional[StrictStr] = None,
1638
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1639
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1640
+ ) -> RESTResponseType:
1641
+ """Login
1642
+
1643
+ Login with username and password and receive a session token.
1644
+
1645
+ :param login_credential_dto: (required)
1646
+ :type login_credential_dto: LoginCredentialDto
1647
+ :param _request_timeout: timeout setting for this request. If one
1648
+ number provided, it will be total request
1649
+ timeout. It can also be a pair (tuple) of
1650
+ (connection, read) timeouts.
1651
+ :type _request_timeout: int, tuple(int, int), optional
1652
+ :param _request_auth: set to override the auth_settings for an a single
1653
+ request; this effectively ignores the
1654
+ authentication in the spec for a single request.
1655
+ :type _request_auth: dict, optional
1656
+ :param _content_type: force content-type for the request.
1657
+ :type _content_type: str, Optional
1658
+ :param _headers: set to override the headers for a single
1659
+ request; this effectively ignores the headers
1660
+ in the spec for a single request.
1661
+ :type _headers: dict, optional
1662
+ :param _host_index: set to override the host_index for a single
1663
+ request; this effectively ignores the host_index
1664
+ in the spec for a single request.
1665
+ :type _host_index: int, optional
1666
+ :return: Returns the result object.
1667
+ """ # noqa: E501
1668
+
1669
+ _param = self._login_serialize(
1670
+ login_credential_dto=login_credential_dto,
1671
+ _request_auth=_request_auth,
1672
+ _content_type=_content_type,
1673
+ _headers=_headers,
1674
+ _host_index=_host_index,
1675
+ )
1676
+
1677
+ _response_types_map: Dict[str, Optional[str]] = {
1678
+ "201": "LoginResponseDto",
1679
+ }
1680
+ response_data = await self.api_client.call_api(
1681
+ *_param, _request_timeout=_request_timeout
1682
+ )
1683
+ return response_data.response
1684
+
1685
+ def _login_serialize(
1686
+ self,
1687
+ login_credential_dto,
1688
+ _request_auth,
1689
+ _content_type,
1690
+ _headers,
1691
+ _host_index,
1692
+ ) -> RequestSerialized:
1693
+ _host = None
1694
+
1695
+ _collection_formats: Dict[str, str] = {}
1696
+
1697
+ _path_params: Dict[str, str] = {}
1698
+ _query_params: List[Tuple[str, str]] = []
1699
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1700
+ _form_params: List[Tuple[str, str]] = []
1701
+ _files: Dict[
1702
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1703
+ ] = {}
1704
+ _body_params: Optional[bytes] = None
1705
+
1706
+ # process the path parameters
1707
+ # process the query parameters
1708
+ # process the header parameters
1709
+ # process the form parameters
1710
+ # process the body parameter
1711
+ if login_credential_dto is not None:
1712
+ _body_params = login_credential_dto
1713
+
1714
+ # set the HTTP header `Accept`
1715
+ if "Accept" not in _header_params:
1716
+ _header_params["Accept"] = self.api_client.select_header_accept(
1717
+ ["application/json"]
1718
+ )
1719
+
1720
+ # set the HTTP header `Content-Type`
1721
+ if _content_type:
1722
+ _header_params["Content-Type"] = _content_type
1723
+ else:
1724
+ _default_content_type = self.api_client.select_header_content_type(
1725
+ ["application/json"]
1726
+ )
1727
+ if _default_content_type is not None:
1728
+ _header_params["Content-Type"] = _default_content_type
1729
+
1730
+ # authentication setting
1731
+ _auth_settings: List[str] = []
1732
+
1733
+ return self.api_client.param_serialize(
1734
+ method="POST",
1735
+ resource_path="/auth/login",
1736
+ path_params=_path_params,
1737
+ query_params=_query_params,
1738
+ header_params=_header_params,
1739
+ body=_body_params,
1740
+ post_params=_form_params,
1741
+ files=_files,
1742
+ auth_settings=_auth_settings,
1743
+ collection_formats=_collection_formats,
1744
+ _host=_host,
1745
+ _request_auth=_request_auth,
1746
+ )
1747
+
1748
+ @validate_call
1749
+ async def logout(
1750
+ self,
1751
+ _request_timeout: Union[
1752
+ None,
1753
+ Annotated[StrictFloat, Field(gt=0)],
1754
+ Tuple[
1755
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1756
+ ],
1757
+ ] = None,
1758
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1759
+ _content_type: Optional[StrictStr] = None,
1760
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1761
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1762
+ ) -> LogoutResponseDto:
1763
+ """Logout
1764
+
1765
+ Logout the current user and invalidate the session token.
1766
+
1767
+ :param _request_timeout: timeout setting for this request. If one
1768
+ number provided, it will be total request
1769
+ timeout. It can also be a pair (tuple) of
1770
+ (connection, read) timeouts.
1771
+ :type _request_timeout: int, tuple(int, int), optional
1772
+ :param _request_auth: set to override the auth_settings for an a single
1773
+ request; this effectively ignores the
1774
+ authentication in the spec for a single request.
1775
+ :type _request_auth: dict, optional
1776
+ :param _content_type: force content-type for the request.
1777
+ :type _content_type: str, Optional
1778
+ :param _headers: set to override the headers for a single
1779
+ request; this effectively ignores the headers
1780
+ in the spec for a single request.
1781
+ :type _headers: dict, optional
1782
+ :param _host_index: set to override the host_index for a single
1783
+ request; this effectively ignores the host_index
1784
+ in the spec for a single request.
1785
+ :type _host_index: int, optional
1786
+ :return: Returns the result object.
1787
+ """ # noqa: E501
1788
+
1789
+ _param = self._logout_serialize(
1790
+ _request_auth=_request_auth,
1791
+ _content_type=_content_type,
1792
+ _headers=_headers,
1793
+ _host_index=_host_index,
1794
+ )
1795
+
1796
+ _response_types_map: Dict[str, Optional[str]] = {
1797
+ "200": "LogoutResponseDto",
1798
+ }
1799
+ response_data = await self.api_client.call_api(
1800
+ *_param, _request_timeout=_request_timeout
1801
+ )
1802
+ await response_data.read()
1803
+ return self.api_client.response_deserialize(
1804
+ response_data=response_data,
1805
+ response_types_map=_response_types_map,
1806
+ ).data
1807
+
1808
+ @validate_call
1809
+ async def logout_with_http_info(
1810
+ self,
1811
+ _request_timeout: Union[
1812
+ None,
1813
+ Annotated[StrictFloat, Field(gt=0)],
1814
+ Tuple[
1815
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1816
+ ],
1817
+ ] = None,
1818
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1819
+ _content_type: Optional[StrictStr] = None,
1820
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1821
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1822
+ ) -> ApiResponse[LogoutResponseDto]:
1823
+ """Logout
1824
+
1825
+ Logout the current user and invalidate the session token.
1826
+
1827
+ :param _request_timeout: timeout setting for this request. If one
1828
+ number provided, it will be total request
1829
+ timeout. It can also be a pair (tuple) of
1830
+ (connection, read) timeouts.
1831
+ :type _request_timeout: int, tuple(int, int), optional
1832
+ :param _request_auth: set to override the auth_settings for an a single
1833
+ request; this effectively ignores the
1834
+ authentication in the spec for a single request.
1835
+ :type _request_auth: dict, optional
1836
+ :param _content_type: force content-type for the request.
1837
+ :type _content_type: str, Optional
1838
+ :param _headers: set to override the headers for a single
1839
+ request; this effectively ignores the headers
1840
+ in the spec for a single request.
1841
+ :type _headers: dict, optional
1842
+ :param _host_index: set to override the host_index for a single
1843
+ request; this effectively ignores the host_index
1844
+ in the spec for a single request.
1845
+ :type _host_index: int, optional
1846
+ :return: Returns the result object.
1847
+ """ # noqa: E501
1848
+
1849
+ _param = self._logout_serialize(
1850
+ _request_auth=_request_auth,
1851
+ _content_type=_content_type,
1852
+ _headers=_headers,
1853
+ _host_index=_host_index,
1854
+ )
1855
+
1856
+ _response_types_map: Dict[str, Optional[str]] = {
1857
+ "200": "LogoutResponseDto",
1858
+ }
1859
+ response_data = await self.api_client.call_api(
1860
+ *_param, _request_timeout=_request_timeout
1861
+ )
1862
+ await response_data.read()
1863
+ return self.api_client.response_deserialize(
1864
+ response_data=response_data,
1865
+ response_types_map=_response_types_map,
1866
+ )
1867
+
1868
+ @validate_call
1869
+ async def logout_without_preload_content(
1870
+ self,
1871
+ _request_timeout: Union[
1872
+ None,
1873
+ Annotated[StrictFloat, Field(gt=0)],
1874
+ Tuple[
1875
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1876
+ ],
1877
+ ] = None,
1878
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1879
+ _content_type: Optional[StrictStr] = None,
1880
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1881
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1882
+ ) -> RESTResponseType:
1883
+ """Logout
1884
+
1885
+ Logout the current user and invalidate the session token.
1886
+
1887
+ :param _request_timeout: timeout setting for this request. If one
1888
+ number provided, it will be total request
1889
+ timeout. It can also be a pair (tuple) of
1890
+ (connection, read) timeouts.
1891
+ :type _request_timeout: int, tuple(int, int), optional
1892
+ :param _request_auth: set to override the auth_settings for an a single
1893
+ request; this effectively ignores the
1894
+ authentication in the spec for a single request.
1895
+ :type _request_auth: dict, optional
1896
+ :param _content_type: force content-type for the request.
1897
+ :type _content_type: str, Optional
1898
+ :param _headers: set to override the headers for a single
1899
+ request; this effectively ignores the headers
1900
+ in the spec for a single request.
1901
+ :type _headers: dict, optional
1902
+ :param _host_index: set to override the host_index for a single
1903
+ request; this effectively ignores the host_index
1904
+ in the spec for a single request.
1905
+ :type _host_index: int, optional
1906
+ :return: Returns the result object.
1907
+ """ # noqa: E501
1908
+
1909
+ _param = self._logout_serialize(
1910
+ _request_auth=_request_auth,
1911
+ _content_type=_content_type,
1912
+ _headers=_headers,
1913
+ _host_index=_host_index,
1914
+ )
1915
+
1916
+ _response_types_map: Dict[str, Optional[str]] = {
1917
+ "200": "LogoutResponseDto",
1918
+ }
1919
+ response_data = await self.api_client.call_api(
1920
+ *_param, _request_timeout=_request_timeout
1921
+ )
1922
+ return response_data.response
1923
+
1924
+ def _logout_serialize(
1925
+ self,
1926
+ _request_auth,
1927
+ _content_type,
1928
+ _headers,
1929
+ _host_index,
1930
+ ) -> RequestSerialized:
1931
+ _host = None
1932
+
1933
+ _collection_formats: Dict[str, str] = {}
1934
+
1935
+ _path_params: Dict[str, str] = {}
1936
+ _query_params: List[Tuple[str, str]] = []
1937
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1938
+ _form_params: List[Tuple[str, str]] = []
1939
+ _files: Dict[
1940
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1941
+ ] = {}
1942
+ _body_params: Optional[bytes] = None
1943
+
1944
+ # process the path parameters
1945
+ # process the query parameters
1946
+ # process the header parameters
1947
+ # process the form parameters
1948
+ # process the body parameter
1949
+
1950
+ # set the HTTP header `Accept`
1951
+ if "Accept" not in _header_params:
1952
+ _header_params["Accept"] = self.api_client.select_header_accept(
1953
+ ["application/json"]
1954
+ )
1955
+
1956
+ # authentication setting
1957
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1958
+
1959
+ return self.api_client.param_serialize(
1960
+ method="POST",
1961
+ resource_path="/auth/logout",
1962
+ path_params=_path_params,
1963
+ query_params=_query_params,
1964
+ header_params=_header_params,
1965
+ body=_body_params,
1966
+ post_params=_form_params,
1967
+ files=_files,
1968
+ auth_settings=_auth_settings,
1969
+ collection_formats=_collection_formats,
1970
+ _host=_host,
1971
+ _request_auth=_request_auth,
1972
+ )
1973
+
1974
+ @validate_call
1975
+ async def redirect_o_auth_to_mobile(
1976
+ self,
1977
+ _request_timeout: Union[
1978
+ None,
1979
+ Annotated[StrictFloat, Field(gt=0)],
1980
+ Tuple[
1981
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1982
+ ],
1983
+ ] = None,
1984
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1985
+ _content_type: Optional[StrictStr] = None,
1986
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1987
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1988
+ ) -> None:
1989
+ """Redirect OAuth to mobile
1990
+
1991
+ Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.
1992
+
1993
+ :param _request_timeout: timeout setting for this request. If one
1994
+ number provided, it will be total request
1995
+ timeout. It can also be a pair (tuple) of
1996
+ (connection, read) timeouts.
1997
+ :type _request_timeout: int, tuple(int, int), optional
1998
+ :param _request_auth: set to override the auth_settings for an a single
1999
+ request; this effectively ignores the
2000
+ authentication in the spec for a single request.
2001
+ :type _request_auth: dict, optional
2002
+ :param _content_type: force content-type for the request.
2003
+ :type _content_type: str, Optional
2004
+ :param _headers: set to override the headers for a single
2005
+ request; this effectively ignores the headers
2006
+ in the spec for a single request.
2007
+ :type _headers: dict, optional
2008
+ :param _host_index: set to override the host_index for a single
2009
+ request; this effectively ignores the host_index
2010
+ in the spec for a single request.
2011
+ :type _host_index: int, optional
2012
+ :return: Returns the result object.
2013
+ """ # noqa: E501
2014
+
2015
+ _param = self._redirect_o_auth_to_mobile_serialize(
2016
+ _request_auth=_request_auth,
2017
+ _content_type=_content_type,
2018
+ _headers=_headers,
2019
+ _host_index=_host_index,
2020
+ )
2021
+
2022
+ _response_types_map: Dict[str, Optional[str]] = {
2023
+ "200": None,
2024
+ }
2025
+ response_data = await self.api_client.call_api(
2026
+ *_param, _request_timeout=_request_timeout
2027
+ )
2028
+ await response_data.read()
2029
+ return self.api_client.response_deserialize(
2030
+ response_data=response_data,
2031
+ response_types_map=_response_types_map,
2032
+ ).data
2033
+
2034
+ @validate_call
2035
+ async def redirect_o_auth_to_mobile_with_http_info(
2036
+ self,
2037
+ _request_timeout: Union[
2038
+ None,
2039
+ Annotated[StrictFloat, Field(gt=0)],
2040
+ Tuple[
2041
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2042
+ ],
2043
+ ] = None,
2044
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2045
+ _content_type: Optional[StrictStr] = None,
2046
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2047
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2048
+ ) -> ApiResponse[None]:
2049
+ """Redirect OAuth to mobile
2050
+
2051
+ Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.
2052
+
2053
+ :param _request_timeout: timeout setting for this request. If one
2054
+ number provided, it will be total request
2055
+ timeout. It can also be a pair (tuple) of
2056
+ (connection, read) timeouts.
2057
+ :type _request_timeout: int, tuple(int, int), optional
2058
+ :param _request_auth: set to override the auth_settings for an a single
2059
+ request; this effectively ignores the
2060
+ authentication in the spec for a single request.
2061
+ :type _request_auth: dict, optional
2062
+ :param _content_type: force content-type for the request.
2063
+ :type _content_type: str, Optional
2064
+ :param _headers: set to override the headers for a single
2065
+ request; this effectively ignores the headers
2066
+ in the spec for a single request.
2067
+ :type _headers: dict, optional
2068
+ :param _host_index: set to override the host_index for a single
2069
+ request; this effectively ignores the host_index
2070
+ in the spec for a single request.
2071
+ :type _host_index: int, optional
2072
+ :return: Returns the result object.
2073
+ """ # noqa: E501
2074
+
2075
+ _param = self._redirect_o_auth_to_mobile_serialize(
2076
+ _request_auth=_request_auth,
2077
+ _content_type=_content_type,
2078
+ _headers=_headers,
2079
+ _host_index=_host_index,
2080
+ )
2081
+
2082
+ _response_types_map: Dict[str, Optional[str]] = {
2083
+ "200": None,
2084
+ }
2085
+ response_data = await self.api_client.call_api(
2086
+ *_param, _request_timeout=_request_timeout
2087
+ )
2088
+ await response_data.read()
2089
+ return self.api_client.response_deserialize(
2090
+ response_data=response_data,
2091
+ response_types_map=_response_types_map,
2092
+ )
2093
+
2094
+ @validate_call
2095
+ async def redirect_o_auth_to_mobile_without_preload_content(
2096
+ self,
2097
+ _request_timeout: Union[
2098
+ None,
2099
+ Annotated[StrictFloat, Field(gt=0)],
2100
+ Tuple[
2101
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2102
+ ],
2103
+ ] = None,
2104
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2105
+ _content_type: Optional[StrictStr] = None,
2106
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2107
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2108
+ ) -> RESTResponseType:
2109
+ """Redirect OAuth to mobile
2110
+
2111
+ Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.
2112
+
2113
+ :param _request_timeout: timeout setting for this request. If one
2114
+ number provided, it will be total request
2115
+ timeout. It can also be a pair (tuple) of
2116
+ (connection, read) timeouts.
2117
+ :type _request_timeout: int, tuple(int, int), optional
2118
+ :param _request_auth: set to override the auth_settings for an a single
2119
+ request; this effectively ignores the
2120
+ authentication in the spec for a single request.
2121
+ :type _request_auth: dict, optional
2122
+ :param _content_type: force content-type for the request.
2123
+ :type _content_type: str, Optional
2124
+ :param _headers: set to override the headers for a single
2125
+ request; this effectively ignores the headers
2126
+ in the spec for a single request.
2127
+ :type _headers: dict, optional
2128
+ :param _host_index: set to override the host_index for a single
2129
+ request; this effectively ignores the host_index
2130
+ in the spec for a single request.
2131
+ :type _host_index: int, optional
2132
+ :return: Returns the result object.
2133
+ """ # noqa: E501
2134
+
2135
+ _param = self._redirect_o_auth_to_mobile_serialize(
2136
+ _request_auth=_request_auth,
2137
+ _content_type=_content_type,
2138
+ _headers=_headers,
2139
+ _host_index=_host_index,
2140
+ )
2141
+
2142
+ _response_types_map: Dict[str, Optional[str]] = {
2143
+ "200": None,
2144
+ }
2145
+ response_data = await self.api_client.call_api(
2146
+ *_param, _request_timeout=_request_timeout
2147
+ )
2148
+ return response_data.response
2149
+
2150
+ def _redirect_o_auth_to_mobile_serialize(
2151
+ self,
2152
+ _request_auth,
2153
+ _content_type,
2154
+ _headers,
2155
+ _host_index,
2156
+ ) -> RequestSerialized:
2157
+ _host = None
2158
+
2159
+ _collection_formats: Dict[str, str] = {}
2160
+
2161
+ _path_params: Dict[str, str] = {}
2162
+ _query_params: List[Tuple[str, str]] = []
2163
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2164
+ _form_params: List[Tuple[str, str]] = []
2165
+ _files: Dict[
2166
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2167
+ ] = {}
2168
+ _body_params: Optional[bytes] = None
2169
+
2170
+ # process the path parameters
2171
+ # process the query parameters
2172
+ # process the header parameters
2173
+ # process the form parameters
2174
+ # process the body parameter
2175
+
2176
+ # authentication setting
2177
+ _auth_settings: List[str] = []
2178
+
2179
+ return self.api_client.param_serialize(
2180
+ method="GET",
2181
+ resource_path="/oauth/mobile-redirect",
2182
+ path_params=_path_params,
2183
+ query_params=_query_params,
2184
+ header_params=_header_params,
2185
+ body=_body_params,
2186
+ post_params=_form_params,
2187
+ files=_files,
2188
+ auth_settings=_auth_settings,
2189
+ collection_formats=_collection_formats,
2190
+ _host=_host,
2191
+ _request_auth=_request_auth,
2192
+ )
2193
+
2194
+ @validate_call
2195
+ async def reset_pin_code(
2196
+ self,
2197
+ pin_code_reset_dto: PinCodeResetDto,
2198
+ _request_timeout: Union[
2199
+ None,
2200
+ Annotated[StrictFloat, Field(gt=0)],
2201
+ Tuple[
2202
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2203
+ ],
2204
+ ] = None,
2205
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2206
+ _content_type: Optional[StrictStr] = None,
2207
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2208
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2209
+ ) -> None:
2210
+ """Reset pin code
2211
+
2212
+ Reset the pin code for the current user by providing the account password
2213
+
2214
+ :param pin_code_reset_dto: (required)
2215
+ :type pin_code_reset_dto: PinCodeResetDto
2216
+ :param _request_timeout: timeout setting for this request. If one
2217
+ number provided, it will be total request
2218
+ timeout. It can also be a pair (tuple) of
2219
+ (connection, read) timeouts.
2220
+ :type _request_timeout: int, tuple(int, int), optional
2221
+ :param _request_auth: set to override the auth_settings for an a single
2222
+ request; this effectively ignores the
2223
+ authentication in the spec for a single request.
2224
+ :type _request_auth: dict, optional
2225
+ :param _content_type: force content-type for the request.
2226
+ :type _content_type: str, Optional
2227
+ :param _headers: set to override the headers for a single
2228
+ request; this effectively ignores the headers
2229
+ in the spec for a single request.
2230
+ :type _headers: dict, optional
2231
+ :param _host_index: set to override the host_index for a single
2232
+ request; this effectively ignores the host_index
2233
+ in the spec for a single request.
2234
+ :type _host_index: int, optional
2235
+ :return: Returns the result object.
2236
+ """ # noqa: E501
2237
+
2238
+ _param = self._reset_pin_code_serialize(
2239
+ pin_code_reset_dto=pin_code_reset_dto,
2240
+ _request_auth=_request_auth,
2241
+ _content_type=_content_type,
2242
+ _headers=_headers,
2243
+ _host_index=_host_index,
2244
+ )
2245
+
2246
+ _response_types_map: Dict[str, Optional[str]] = {
2247
+ "204": None,
2248
+ }
2249
+ response_data = await self.api_client.call_api(
2250
+ *_param, _request_timeout=_request_timeout
2251
+ )
2252
+ await response_data.read()
2253
+ return self.api_client.response_deserialize(
2254
+ response_data=response_data,
2255
+ response_types_map=_response_types_map,
2256
+ ).data
2257
+
2258
+ @validate_call
2259
+ async def reset_pin_code_with_http_info(
2260
+ self,
2261
+ pin_code_reset_dto: PinCodeResetDto,
2262
+ _request_timeout: Union[
2263
+ None,
2264
+ Annotated[StrictFloat, Field(gt=0)],
2265
+ Tuple[
2266
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2267
+ ],
2268
+ ] = None,
2269
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2270
+ _content_type: Optional[StrictStr] = None,
2271
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2272
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2273
+ ) -> ApiResponse[None]:
2274
+ """Reset pin code
2275
+
2276
+ Reset the pin code for the current user by providing the account password
2277
+
2278
+ :param pin_code_reset_dto: (required)
2279
+ :type pin_code_reset_dto: PinCodeResetDto
2280
+ :param _request_timeout: timeout setting for this request. If one
2281
+ number provided, it will be total request
2282
+ timeout. It can also be a pair (tuple) of
2283
+ (connection, read) timeouts.
2284
+ :type _request_timeout: int, tuple(int, int), optional
2285
+ :param _request_auth: set to override the auth_settings for an a single
2286
+ request; this effectively ignores the
2287
+ authentication in the spec for a single request.
2288
+ :type _request_auth: dict, optional
2289
+ :param _content_type: force content-type for the request.
2290
+ :type _content_type: str, Optional
2291
+ :param _headers: set to override the headers for a single
2292
+ request; this effectively ignores the headers
2293
+ in the spec for a single request.
2294
+ :type _headers: dict, optional
2295
+ :param _host_index: set to override the host_index for a single
2296
+ request; this effectively ignores the host_index
2297
+ in the spec for a single request.
2298
+ :type _host_index: int, optional
2299
+ :return: Returns the result object.
2300
+ """ # noqa: E501
2301
+
2302
+ _param = self._reset_pin_code_serialize(
2303
+ pin_code_reset_dto=pin_code_reset_dto,
2304
+ _request_auth=_request_auth,
2305
+ _content_type=_content_type,
2306
+ _headers=_headers,
2307
+ _host_index=_host_index,
2308
+ )
2309
+
2310
+ _response_types_map: Dict[str, Optional[str]] = {
2311
+ "204": None,
2312
+ }
2313
+ response_data = await self.api_client.call_api(
2314
+ *_param, _request_timeout=_request_timeout
2315
+ )
2316
+ await response_data.read()
2317
+ return self.api_client.response_deserialize(
2318
+ response_data=response_data,
2319
+ response_types_map=_response_types_map,
2320
+ )
2321
+
2322
+ @validate_call
2323
+ async def reset_pin_code_without_preload_content(
2324
+ self,
2325
+ pin_code_reset_dto: PinCodeResetDto,
2326
+ _request_timeout: Union[
2327
+ None,
2328
+ Annotated[StrictFloat, Field(gt=0)],
2329
+ Tuple[
2330
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2331
+ ],
2332
+ ] = None,
2333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2334
+ _content_type: Optional[StrictStr] = None,
2335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2337
+ ) -> RESTResponseType:
2338
+ """Reset pin code
2339
+
2340
+ Reset the pin code for the current user by providing the account password
2341
+
2342
+ :param pin_code_reset_dto: (required)
2343
+ :type pin_code_reset_dto: PinCodeResetDto
2344
+ :param _request_timeout: timeout setting for this request. If one
2345
+ number provided, it will be total request
2346
+ timeout. It can also be a pair (tuple) of
2347
+ (connection, read) timeouts.
2348
+ :type _request_timeout: int, tuple(int, int), optional
2349
+ :param _request_auth: set to override the auth_settings for an a single
2350
+ request; this effectively ignores the
2351
+ authentication in the spec for a single request.
2352
+ :type _request_auth: dict, optional
2353
+ :param _content_type: force content-type for the request.
2354
+ :type _content_type: str, Optional
2355
+ :param _headers: set to override the headers for a single
2356
+ request; this effectively ignores the headers
2357
+ in the spec for a single request.
2358
+ :type _headers: dict, optional
2359
+ :param _host_index: set to override the host_index for a single
2360
+ request; this effectively ignores the host_index
2361
+ in the spec for a single request.
2362
+ :type _host_index: int, optional
2363
+ :return: Returns the result object.
2364
+ """ # noqa: E501
2365
+
2366
+ _param = self._reset_pin_code_serialize(
2367
+ pin_code_reset_dto=pin_code_reset_dto,
2368
+ _request_auth=_request_auth,
2369
+ _content_type=_content_type,
2370
+ _headers=_headers,
2371
+ _host_index=_host_index,
2372
+ )
2373
+
2374
+ _response_types_map: Dict[str, Optional[str]] = {
2375
+ "204": None,
2376
+ }
2377
+ response_data = await self.api_client.call_api(
2378
+ *_param, _request_timeout=_request_timeout
2379
+ )
2380
+ return response_data.response
2381
+
2382
+ def _reset_pin_code_serialize(
2383
+ self,
2384
+ pin_code_reset_dto,
2385
+ _request_auth,
2386
+ _content_type,
2387
+ _headers,
2388
+ _host_index,
2389
+ ) -> RequestSerialized:
2390
+ _host = None
2391
+
2392
+ _collection_formats: Dict[str, str] = {}
2393
+
2394
+ _path_params: Dict[str, str] = {}
2395
+ _query_params: List[Tuple[str, str]] = []
2396
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2397
+ _form_params: List[Tuple[str, str]] = []
2398
+ _files: Dict[
2399
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2400
+ ] = {}
2401
+ _body_params: Optional[bytes] = None
2402
+
2403
+ # process the path parameters
2404
+ # process the query parameters
2405
+ # process the header parameters
2406
+ # process the form parameters
2407
+ # process the body parameter
2408
+ if pin_code_reset_dto is not None:
2409
+ _body_params = pin_code_reset_dto
2410
+
2411
+ # set the HTTP header `Content-Type`
2412
+ if _content_type:
2413
+ _header_params["Content-Type"] = _content_type
2414
+ else:
2415
+ _default_content_type = self.api_client.select_header_content_type(
2416
+ ["application/json"]
2417
+ )
2418
+ if _default_content_type is not None:
2419
+ _header_params["Content-Type"] = _default_content_type
2420
+
2421
+ # authentication setting
2422
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2423
+
2424
+ return self.api_client.param_serialize(
2425
+ method="DELETE",
2426
+ resource_path="/auth/pin-code",
2427
+ path_params=_path_params,
2428
+ query_params=_query_params,
2429
+ header_params=_header_params,
2430
+ body=_body_params,
2431
+ post_params=_form_params,
2432
+ files=_files,
2433
+ auth_settings=_auth_settings,
2434
+ collection_formats=_collection_formats,
2435
+ _host=_host,
2436
+ _request_auth=_request_auth,
2437
+ )
2438
+
2439
+ @validate_call
2440
+ async def setup_pin_code(
2441
+ self,
2442
+ pin_code_setup_dto: PinCodeSetupDto,
2443
+ _request_timeout: Union[
2444
+ None,
2445
+ Annotated[StrictFloat, Field(gt=0)],
2446
+ Tuple[
2447
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2448
+ ],
2449
+ ] = None,
2450
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2451
+ _content_type: Optional[StrictStr] = None,
2452
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2453
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2454
+ ) -> None:
2455
+ """Setup pin code
2456
+
2457
+ Setup a new pin code for the current user.
2458
+
2459
+ :param pin_code_setup_dto: (required)
2460
+ :type pin_code_setup_dto: PinCodeSetupDto
2461
+ :param _request_timeout: timeout setting for this request. If one
2462
+ number provided, it will be total request
2463
+ timeout. It can also be a pair (tuple) of
2464
+ (connection, read) timeouts.
2465
+ :type _request_timeout: int, tuple(int, int), optional
2466
+ :param _request_auth: set to override the auth_settings for an a single
2467
+ request; this effectively ignores the
2468
+ authentication in the spec for a single request.
2469
+ :type _request_auth: dict, optional
2470
+ :param _content_type: force content-type for the request.
2471
+ :type _content_type: str, Optional
2472
+ :param _headers: set to override the headers for a single
2473
+ request; this effectively ignores the headers
2474
+ in the spec for a single request.
2475
+ :type _headers: dict, optional
2476
+ :param _host_index: set to override the host_index for a single
2477
+ request; this effectively ignores the host_index
2478
+ in the spec for a single request.
2479
+ :type _host_index: int, optional
2480
+ :return: Returns the result object.
2481
+ """ # noqa: E501
2482
+
2483
+ _param = self._setup_pin_code_serialize(
2484
+ pin_code_setup_dto=pin_code_setup_dto,
2485
+ _request_auth=_request_auth,
2486
+ _content_type=_content_type,
2487
+ _headers=_headers,
2488
+ _host_index=_host_index,
2489
+ )
2490
+
2491
+ _response_types_map: Dict[str, Optional[str]] = {
2492
+ "204": None,
2493
+ }
2494
+ response_data = await self.api_client.call_api(
2495
+ *_param, _request_timeout=_request_timeout
2496
+ )
2497
+ await response_data.read()
2498
+ return self.api_client.response_deserialize(
2499
+ response_data=response_data,
2500
+ response_types_map=_response_types_map,
2501
+ ).data
2502
+
2503
+ @validate_call
2504
+ async def setup_pin_code_with_http_info(
2505
+ self,
2506
+ pin_code_setup_dto: PinCodeSetupDto,
2507
+ _request_timeout: Union[
2508
+ None,
2509
+ Annotated[StrictFloat, Field(gt=0)],
2510
+ Tuple[
2511
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2512
+ ],
2513
+ ] = None,
2514
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2515
+ _content_type: Optional[StrictStr] = None,
2516
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2517
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2518
+ ) -> ApiResponse[None]:
2519
+ """Setup pin code
2520
+
2521
+ Setup a new pin code for the current user.
2522
+
2523
+ :param pin_code_setup_dto: (required)
2524
+ :type pin_code_setup_dto: PinCodeSetupDto
2525
+ :param _request_timeout: timeout setting for this request. If one
2526
+ number provided, it will be total request
2527
+ timeout. It can also be a pair (tuple) of
2528
+ (connection, read) timeouts.
2529
+ :type _request_timeout: int, tuple(int, int), optional
2530
+ :param _request_auth: set to override the auth_settings for an a single
2531
+ request; this effectively ignores the
2532
+ authentication in the spec for a single request.
2533
+ :type _request_auth: dict, optional
2534
+ :param _content_type: force content-type for the request.
2535
+ :type _content_type: str, Optional
2536
+ :param _headers: set to override the headers for a single
2537
+ request; this effectively ignores the headers
2538
+ in the spec for a single request.
2539
+ :type _headers: dict, optional
2540
+ :param _host_index: set to override the host_index for a single
2541
+ request; this effectively ignores the host_index
2542
+ in the spec for a single request.
2543
+ :type _host_index: int, optional
2544
+ :return: Returns the result object.
2545
+ """ # noqa: E501
2546
+
2547
+ _param = self._setup_pin_code_serialize(
2548
+ pin_code_setup_dto=pin_code_setup_dto,
2549
+ _request_auth=_request_auth,
2550
+ _content_type=_content_type,
2551
+ _headers=_headers,
2552
+ _host_index=_host_index,
2553
+ )
2554
+
2555
+ _response_types_map: Dict[str, Optional[str]] = {
2556
+ "204": None,
2557
+ }
2558
+ response_data = await self.api_client.call_api(
2559
+ *_param, _request_timeout=_request_timeout
2560
+ )
2561
+ await response_data.read()
2562
+ return self.api_client.response_deserialize(
2563
+ response_data=response_data,
2564
+ response_types_map=_response_types_map,
2565
+ )
2566
+
2567
+ @validate_call
2568
+ async def setup_pin_code_without_preload_content(
2569
+ self,
2570
+ pin_code_setup_dto: PinCodeSetupDto,
2571
+ _request_timeout: Union[
2572
+ None,
2573
+ Annotated[StrictFloat, Field(gt=0)],
2574
+ Tuple[
2575
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2576
+ ],
2577
+ ] = None,
2578
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2579
+ _content_type: Optional[StrictStr] = None,
2580
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2581
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2582
+ ) -> RESTResponseType:
2583
+ """Setup pin code
2584
+
2585
+ Setup a new pin code for the current user.
2586
+
2587
+ :param pin_code_setup_dto: (required)
2588
+ :type pin_code_setup_dto: PinCodeSetupDto
2589
+ :param _request_timeout: timeout setting for this request. If one
2590
+ number provided, it will be total request
2591
+ timeout. It can also be a pair (tuple) of
2592
+ (connection, read) timeouts.
2593
+ :type _request_timeout: int, tuple(int, int), optional
2594
+ :param _request_auth: set to override the auth_settings for an a single
2595
+ request; this effectively ignores the
2596
+ authentication in the spec for a single request.
2597
+ :type _request_auth: dict, optional
2598
+ :param _content_type: force content-type for the request.
2599
+ :type _content_type: str, Optional
2600
+ :param _headers: set to override the headers for a single
2601
+ request; this effectively ignores the headers
2602
+ in the spec for a single request.
2603
+ :type _headers: dict, optional
2604
+ :param _host_index: set to override the host_index for a single
2605
+ request; this effectively ignores the host_index
2606
+ in the spec for a single request.
2607
+ :type _host_index: int, optional
2608
+ :return: Returns the result object.
2609
+ """ # noqa: E501
2610
+
2611
+ _param = self._setup_pin_code_serialize(
2612
+ pin_code_setup_dto=pin_code_setup_dto,
2613
+ _request_auth=_request_auth,
2614
+ _content_type=_content_type,
2615
+ _headers=_headers,
2616
+ _host_index=_host_index,
2617
+ )
2618
+
2619
+ _response_types_map: Dict[str, Optional[str]] = {
2620
+ "204": None,
2621
+ }
2622
+ response_data = await self.api_client.call_api(
2623
+ *_param, _request_timeout=_request_timeout
2624
+ )
2625
+ return response_data.response
2626
+
2627
+ def _setup_pin_code_serialize(
2628
+ self,
2629
+ pin_code_setup_dto,
2630
+ _request_auth,
2631
+ _content_type,
2632
+ _headers,
2633
+ _host_index,
2634
+ ) -> RequestSerialized:
2635
+ _host = None
2636
+
2637
+ _collection_formats: Dict[str, str] = {}
2638
+
2639
+ _path_params: Dict[str, str] = {}
2640
+ _query_params: List[Tuple[str, str]] = []
2641
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2642
+ _form_params: List[Tuple[str, str]] = []
2643
+ _files: Dict[
2644
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2645
+ ] = {}
2646
+ _body_params: Optional[bytes] = None
2647
+
2648
+ # process the path parameters
2649
+ # process the query parameters
2650
+ # process the header parameters
2651
+ # process the form parameters
2652
+ # process the body parameter
2653
+ if pin_code_setup_dto is not None:
2654
+ _body_params = pin_code_setup_dto
2655
+
2656
+ # set the HTTP header `Content-Type`
2657
+ if _content_type:
2658
+ _header_params["Content-Type"] = _content_type
2659
+ else:
2660
+ _default_content_type = self.api_client.select_header_content_type(
2661
+ ["application/json"]
2662
+ )
2663
+ if _default_content_type is not None:
2664
+ _header_params["Content-Type"] = _default_content_type
2665
+
2666
+ # authentication setting
2667
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2668
+
2669
+ return self.api_client.param_serialize(
2670
+ method="POST",
2671
+ resource_path="/auth/pin-code",
2672
+ path_params=_path_params,
2673
+ query_params=_query_params,
2674
+ header_params=_header_params,
2675
+ body=_body_params,
2676
+ post_params=_form_params,
2677
+ files=_files,
2678
+ auth_settings=_auth_settings,
2679
+ collection_formats=_collection_formats,
2680
+ _host=_host,
2681
+ _request_auth=_request_auth,
2682
+ )
2683
+
2684
+ @validate_call
2685
+ async def sign_up_admin(
2686
+ self,
2687
+ sign_up_dto: SignUpDto,
2688
+ _request_timeout: Union[
2689
+ None,
2690
+ Annotated[StrictFloat, Field(gt=0)],
2691
+ Tuple[
2692
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2693
+ ],
2694
+ ] = None,
2695
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2696
+ _content_type: Optional[StrictStr] = None,
2697
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2698
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2699
+ ) -> UserAdminResponseDto:
2700
+ """Register admin
2701
+
2702
+ Create the first admin user in the system.
2703
+
2704
+ :param sign_up_dto: (required)
2705
+ :type sign_up_dto: SignUpDto
2706
+ :param _request_timeout: timeout setting for this request. If one
2707
+ number provided, it will be total request
2708
+ timeout. It can also be a pair (tuple) of
2709
+ (connection, read) timeouts.
2710
+ :type _request_timeout: int, tuple(int, int), optional
2711
+ :param _request_auth: set to override the auth_settings for an a single
2712
+ request; this effectively ignores the
2713
+ authentication in the spec for a single request.
2714
+ :type _request_auth: dict, optional
2715
+ :param _content_type: force content-type for the request.
2716
+ :type _content_type: str, Optional
2717
+ :param _headers: set to override the headers for a single
2718
+ request; this effectively ignores the headers
2719
+ in the spec for a single request.
2720
+ :type _headers: dict, optional
2721
+ :param _host_index: set to override the host_index for a single
2722
+ request; this effectively ignores the host_index
2723
+ in the spec for a single request.
2724
+ :type _host_index: int, optional
2725
+ :return: Returns the result object.
2726
+ """ # noqa: E501
2727
+
2728
+ _param = self._sign_up_admin_serialize(
2729
+ sign_up_dto=sign_up_dto,
2730
+ _request_auth=_request_auth,
2731
+ _content_type=_content_type,
2732
+ _headers=_headers,
2733
+ _host_index=_host_index,
2734
+ )
2735
+
2736
+ _response_types_map: Dict[str, Optional[str]] = {
2737
+ "201": "UserAdminResponseDto",
2738
+ }
2739
+ response_data = await self.api_client.call_api(
2740
+ *_param, _request_timeout=_request_timeout
2741
+ )
2742
+ await response_data.read()
2743
+ return self.api_client.response_deserialize(
2744
+ response_data=response_data,
2745
+ response_types_map=_response_types_map,
2746
+ ).data
2747
+
2748
+ @validate_call
2749
+ async def sign_up_admin_with_http_info(
2750
+ self,
2751
+ sign_up_dto: SignUpDto,
2752
+ _request_timeout: Union[
2753
+ None,
2754
+ Annotated[StrictFloat, Field(gt=0)],
2755
+ Tuple[
2756
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2757
+ ],
2758
+ ] = None,
2759
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2760
+ _content_type: Optional[StrictStr] = None,
2761
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2762
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2763
+ ) -> ApiResponse[UserAdminResponseDto]:
2764
+ """Register admin
2765
+
2766
+ Create the first admin user in the system.
2767
+
2768
+ :param sign_up_dto: (required)
2769
+ :type sign_up_dto: SignUpDto
2770
+ :param _request_timeout: timeout setting for this request. If one
2771
+ number provided, it will be total request
2772
+ timeout. It can also be a pair (tuple) of
2773
+ (connection, read) timeouts.
2774
+ :type _request_timeout: int, tuple(int, int), optional
2775
+ :param _request_auth: set to override the auth_settings for an a single
2776
+ request; this effectively ignores the
2777
+ authentication in the spec for a single request.
2778
+ :type _request_auth: dict, optional
2779
+ :param _content_type: force content-type for the request.
2780
+ :type _content_type: str, Optional
2781
+ :param _headers: set to override the headers for a single
2782
+ request; this effectively ignores the headers
2783
+ in the spec for a single request.
2784
+ :type _headers: dict, optional
2785
+ :param _host_index: set to override the host_index for a single
2786
+ request; this effectively ignores the host_index
2787
+ in the spec for a single request.
2788
+ :type _host_index: int, optional
2789
+ :return: Returns the result object.
2790
+ """ # noqa: E501
2791
+
2792
+ _param = self._sign_up_admin_serialize(
2793
+ sign_up_dto=sign_up_dto,
2794
+ _request_auth=_request_auth,
2795
+ _content_type=_content_type,
2796
+ _headers=_headers,
2797
+ _host_index=_host_index,
2798
+ )
2799
+
2800
+ _response_types_map: Dict[str, Optional[str]] = {
2801
+ "201": "UserAdminResponseDto",
2802
+ }
2803
+ response_data = await self.api_client.call_api(
2804
+ *_param, _request_timeout=_request_timeout
2805
+ )
2806
+ await response_data.read()
2807
+ return self.api_client.response_deserialize(
2808
+ response_data=response_data,
2809
+ response_types_map=_response_types_map,
2810
+ )
2811
+
2812
+ @validate_call
2813
+ async def sign_up_admin_without_preload_content(
2814
+ self,
2815
+ sign_up_dto: SignUpDto,
2816
+ _request_timeout: Union[
2817
+ None,
2818
+ Annotated[StrictFloat, Field(gt=0)],
2819
+ Tuple[
2820
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2821
+ ],
2822
+ ] = None,
2823
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2824
+ _content_type: Optional[StrictStr] = None,
2825
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2826
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2827
+ ) -> RESTResponseType:
2828
+ """Register admin
2829
+
2830
+ Create the first admin user in the system.
2831
+
2832
+ :param sign_up_dto: (required)
2833
+ :type sign_up_dto: SignUpDto
2834
+ :param _request_timeout: timeout setting for this request. If one
2835
+ number provided, it will be total request
2836
+ timeout. It can also be a pair (tuple) of
2837
+ (connection, read) timeouts.
2838
+ :type _request_timeout: int, tuple(int, int), optional
2839
+ :param _request_auth: set to override the auth_settings for an a single
2840
+ request; this effectively ignores the
2841
+ authentication in the spec for a single request.
2842
+ :type _request_auth: dict, optional
2843
+ :param _content_type: force content-type for the request.
2844
+ :type _content_type: str, Optional
2845
+ :param _headers: set to override the headers for a single
2846
+ request; this effectively ignores the headers
2847
+ in the spec for a single request.
2848
+ :type _headers: dict, optional
2849
+ :param _host_index: set to override the host_index for a single
2850
+ request; this effectively ignores the host_index
2851
+ in the spec for a single request.
2852
+ :type _host_index: int, optional
2853
+ :return: Returns the result object.
2854
+ """ # noqa: E501
2855
+
2856
+ _param = self._sign_up_admin_serialize(
2857
+ sign_up_dto=sign_up_dto,
2858
+ _request_auth=_request_auth,
2859
+ _content_type=_content_type,
2860
+ _headers=_headers,
2861
+ _host_index=_host_index,
2862
+ )
2863
+
2864
+ _response_types_map: Dict[str, Optional[str]] = {
2865
+ "201": "UserAdminResponseDto",
2866
+ }
2867
+ response_data = await self.api_client.call_api(
2868
+ *_param, _request_timeout=_request_timeout
2869
+ )
2870
+ return response_data.response
2871
+
2872
+ def _sign_up_admin_serialize(
2873
+ self,
2874
+ sign_up_dto,
2875
+ _request_auth,
2876
+ _content_type,
2877
+ _headers,
2878
+ _host_index,
2879
+ ) -> RequestSerialized:
2880
+ _host = None
2881
+
2882
+ _collection_formats: Dict[str, str] = {}
2883
+
2884
+ _path_params: Dict[str, str] = {}
2885
+ _query_params: List[Tuple[str, str]] = []
2886
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2887
+ _form_params: List[Tuple[str, str]] = []
2888
+ _files: Dict[
2889
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2890
+ ] = {}
2891
+ _body_params: Optional[bytes] = None
2892
+
2893
+ # process the path parameters
2894
+ # process the query parameters
2895
+ # process the header parameters
2896
+ # process the form parameters
2897
+ # process the body parameter
2898
+ if sign_up_dto is not None:
2899
+ _body_params = sign_up_dto
2900
+
2901
+ # set the HTTP header `Accept`
2902
+ if "Accept" not in _header_params:
2903
+ _header_params["Accept"] = self.api_client.select_header_accept(
2904
+ ["application/json"]
2905
+ )
2906
+
2907
+ # set the HTTP header `Content-Type`
2908
+ if _content_type:
2909
+ _header_params["Content-Type"] = _content_type
2910
+ else:
2911
+ _default_content_type = self.api_client.select_header_content_type(
2912
+ ["application/json"]
2913
+ )
2914
+ if _default_content_type is not None:
2915
+ _header_params["Content-Type"] = _default_content_type
2916
+
2917
+ # authentication setting
2918
+ _auth_settings: List[str] = []
2919
+
2920
+ return self.api_client.param_serialize(
2921
+ method="POST",
2922
+ resource_path="/auth/admin-sign-up",
2923
+ path_params=_path_params,
2924
+ query_params=_query_params,
2925
+ header_params=_header_params,
2926
+ body=_body_params,
2927
+ post_params=_form_params,
2928
+ files=_files,
2929
+ auth_settings=_auth_settings,
2930
+ collection_formats=_collection_formats,
2931
+ _host=_host,
2932
+ _request_auth=_request_auth,
2933
+ )
2934
+
2935
+ @validate_call
2936
+ async def start_o_auth(
2937
+ self,
2938
+ o_auth_config_dto: OAuthConfigDto,
2939
+ _request_timeout: Union[
2940
+ None,
2941
+ Annotated[StrictFloat, Field(gt=0)],
2942
+ Tuple[
2943
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2944
+ ],
2945
+ ] = None,
2946
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2947
+ _content_type: Optional[StrictStr] = None,
2948
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2949
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2950
+ ) -> OAuthAuthorizeResponseDto:
2951
+ """Start OAuth
2952
+
2953
+ Initiate the OAuth authorization process.
2954
+
2955
+ :param o_auth_config_dto: (required)
2956
+ :type o_auth_config_dto: OAuthConfigDto
2957
+ :param _request_timeout: timeout setting for this request. If one
2958
+ number provided, it will be total request
2959
+ timeout. It can also be a pair (tuple) of
2960
+ (connection, read) timeouts.
2961
+ :type _request_timeout: int, tuple(int, int), optional
2962
+ :param _request_auth: set to override the auth_settings for an a single
2963
+ request; this effectively ignores the
2964
+ authentication in the spec for a single request.
2965
+ :type _request_auth: dict, optional
2966
+ :param _content_type: force content-type for the request.
2967
+ :type _content_type: str, Optional
2968
+ :param _headers: set to override the headers for a single
2969
+ request; this effectively ignores the headers
2970
+ in the spec for a single request.
2971
+ :type _headers: dict, optional
2972
+ :param _host_index: set to override the host_index for a single
2973
+ request; this effectively ignores the host_index
2974
+ in the spec for a single request.
2975
+ :type _host_index: int, optional
2976
+ :return: Returns the result object.
2977
+ """ # noqa: E501
2978
+
2979
+ _param = self._start_o_auth_serialize(
2980
+ o_auth_config_dto=o_auth_config_dto,
2981
+ _request_auth=_request_auth,
2982
+ _content_type=_content_type,
2983
+ _headers=_headers,
2984
+ _host_index=_host_index,
2985
+ )
2986
+
2987
+ _response_types_map: Dict[str, Optional[str]] = {
2988
+ "201": "OAuthAuthorizeResponseDto",
2989
+ }
2990
+ response_data = await self.api_client.call_api(
2991
+ *_param, _request_timeout=_request_timeout
2992
+ )
2993
+ await response_data.read()
2994
+ return self.api_client.response_deserialize(
2995
+ response_data=response_data,
2996
+ response_types_map=_response_types_map,
2997
+ ).data
2998
+
2999
+ @validate_call
3000
+ async def start_o_auth_with_http_info(
3001
+ self,
3002
+ o_auth_config_dto: OAuthConfigDto,
3003
+ _request_timeout: Union[
3004
+ None,
3005
+ Annotated[StrictFloat, Field(gt=0)],
3006
+ Tuple[
3007
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3008
+ ],
3009
+ ] = None,
3010
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3011
+ _content_type: Optional[StrictStr] = None,
3012
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3013
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3014
+ ) -> ApiResponse[OAuthAuthorizeResponseDto]:
3015
+ """Start OAuth
3016
+
3017
+ Initiate the OAuth authorization process.
3018
+
3019
+ :param o_auth_config_dto: (required)
3020
+ :type o_auth_config_dto: OAuthConfigDto
3021
+ :param _request_timeout: timeout setting for this request. If one
3022
+ number provided, it will be total request
3023
+ timeout. It can also be a pair (tuple) of
3024
+ (connection, read) timeouts.
3025
+ :type _request_timeout: int, tuple(int, int), optional
3026
+ :param _request_auth: set to override the auth_settings for an a single
3027
+ request; this effectively ignores the
3028
+ authentication in the spec for a single request.
3029
+ :type _request_auth: dict, optional
3030
+ :param _content_type: force content-type for the request.
3031
+ :type _content_type: str, Optional
3032
+ :param _headers: set to override the headers for a single
3033
+ request; this effectively ignores the headers
3034
+ in the spec for a single request.
3035
+ :type _headers: dict, optional
3036
+ :param _host_index: set to override the host_index for a single
3037
+ request; this effectively ignores the host_index
3038
+ in the spec for a single request.
3039
+ :type _host_index: int, optional
3040
+ :return: Returns the result object.
3041
+ """ # noqa: E501
3042
+
3043
+ _param = self._start_o_auth_serialize(
3044
+ o_auth_config_dto=o_auth_config_dto,
3045
+ _request_auth=_request_auth,
3046
+ _content_type=_content_type,
3047
+ _headers=_headers,
3048
+ _host_index=_host_index,
3049
+ )
3050
+
3051
+ _response_types_map: Dict[str, Optional[str]] = {
3052
+ "201": "OAuthAuthorizeResponseDto",
3053
+ }
3054
+ response_data = await self.api_client.call_api(
3055
+ *_param, _request_timeout=_request_timeout
3056
+ )
3057
+ await response_data.read()
3058
+ return self.api_client.response_deserialize(
3059
+ response_data=response_data,
3060
+ response_types_map=_response_types_map,
3061
+ )
3062
+
3063
+ @validate_call
3064
+ async def start_o_auth_without_preload_content(
3065
+ self,
3066
+ o_auth_config_dto: OAuthConfigDto,
3067
+ _request_timeout: Union[
3068
+ None,
3069
+ Annotated[StrictFloat, Field(gt=0)],
3070
+ Tuple[
3071
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3072
+ ],
3073
+ ] = None,
3074
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3075
+ _content_type: Optional[StrictStr] = None,
3076
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3077
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3078
+ ) -> RESTResponseType:
3079
+ """Start OAuth
3080
+
3081
+ Initiate the OAuth authorization process.
3082
+
3083
+ :param o_auth_config_dto: (required)
3084
+ :type o_auth_config_dto: OAuthConfigDto
3085
+ :param _request_timeout: timeout setting for this request. If one
3086
+ number provided, it will be total request
3087
+ timeout. It can also be a pair (tuple) of
3088
+ (connection, read) timeouts.
3089
+ :type _request_timeout: int, tuple(int, int), optional
3090
+ :param _request_auth: set to override the auth_settings for an a single
3091
+ request; this effectively ignores the
3092
+ authentication in the spec for a single request.
3093
+ :type _request_auth: dict, optional
3094
+ :param _content_type: force content-type for the request.
3095
+ :type _content_type: str, Optional
3096
+ :param _headers: set to override the headers for a single
3097
+ request; this effectively ignores the headers
3098
+ in the spec for a single request.
3099
+ :type _headers: dict, optional
3100
+ :param _host_index: set to override the host_index for a single
3101
+ request; this effectively ignores the host_index
3102
+ in the spec for a single request.
3103
+ :type _host_index: int, optional
3104
+ :return: Returns the result object.
3105
+ """ # noqa: E501
3106
+
3107
+ _param = self._start_o_auth_serialize(
3108
+ o_auth_config_dto=o_auth_config_dto,
3109
+ _request_auth=_request_auth,
3110
+ _content_type=_content_type,
3111
+ _headers=_headers,
3112
+ _host_index=_host_index,
3113
+ )
3114
+
3115
+ _response_types_map: Dict[str, Optional[str]] = {
3116
+ "201": "OAuthAuthorizeResponseDto",
3117
+ }
3118
+ response_data = await self.api_client.call_api(
3119
+ *_param, _request_timeout=_request_timeout
3120
+ )
3121
+ return response_data.response
3122
+
3123
+ def _start_o_auth_serialize(
3124
+ self,
3125
+ o_auth_config_dto,
3126
+ _request_auth,
3127
+ _content_type,
3128
+ _headers,
3129
+ _host_index,
3130
+ ) -> RequestSerialized:
3131
+ _host = None
3132
+
3133
+ _collection_formats: Dict[str, str] = {}
3134
+
3135
+ _path_params: Dict[str, str] = {}
3136
+ _query_params: List[Tuple[str, str]] = []
3137
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3138
+ _form_params: List[Tuple[str, str]] = []
3139
+ _files: Dict[
3140
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3141
+ ] = {}
3142
+ _body_params: Optional[bytes] = None
3143
+
3144
+ # process the path parameters
3145
+ # process the query parameters
3146
+ # process the header parameters
3147
+ # process the form parameters
3148
+ # process the body parameter
3149
+ if o_auth_config_dto is not None:
3150
+ _body_params = o_auth_config_dto
3151
+
3152
+ # set the HTTP header `Accept`
3153
+ if "Accept" not in _header_params:
3154
+ _header_params["Accept"] = self.api_client.select_header_accept(
3155
+ ["application/json"]
3156
+ )
3157
+
3158
+ # set the HTTP header `Content-Type`
3159
+ if _content_type:
3160
+ _header_params["Content-Type"] = _content_type
3161
+ else:
3162
+ _default_content_type = self.api_client.select_header_content_type(
3163
+ ["application/json"]
3164
+ )
3165
+ if _default_content_type is not None:
3166
+ _header_params["Content-Type"] = _default_content_type
3167
+
3168
+ # authentication setting
3169
+ _auth_settings: List[str] = []
3170
+
3171
+ return self.api_client.param_serialize(
3172
+ method="POST",
3173
+ resource_path="/oauth/authorize",
3174
+ path_params=_path_params,
3175
+ query_params=_query_params,
3176
+ header_params=_header_params,
3177
+ body=_body_params,
3178
+ post_params=_form_params,
3179
+ files=_files,
3180
+ auth_settings=_auth_settings,
3181
+ collection_formats=_collection_formats,
3182
+ _host=_host,
3183
+ _request_auth=_request_auth,
3184
+ )
3185
+
3186
+ @validate_call
3187
+ async def unlink_o_auth_account(
3188
+ self,
3189
+ _request_timeout: Union[
3190
+ None,
3191
+ Annotated[StrictFloat, Field(gt=0)],
3192
+ Tuple[
3193
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3194
+ ],
3195
+ ] = None,
3196
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3197
+ _content_type: Optional[StrictStr] = None,
3198
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3199
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3200
+ ) -> UserAdminResponseDto:
3201
+ """Unlink OAuth account
3202
+
3203
+ Unlink the OAuth account from the authenticated user.
3204
+
3205
+ :param _request_timeout: timeout setting for this request. If one
3206
+ number provided, it will be total request
3207
+ timeout. It can also be a pair (tuple) of
3208
+ (connection, read) timeouts.
3209
+ :type _request_timeout: int, tuple(int, int), optional
3210
+ :param _request_auth: set to override the auth_settings for an a single
3211
+ request; this effectively ignores the
3212
+ authentication in the spec for a single request.
3213
+ :type _request_auth: dict, optional
3214
+ :param _content_type: force content-type for the request.
3215
+ :type _content_type: str, Optional
3216
+ :param _headers: set to override the headers for a single
3217
+ request; this effectively ignores the headers
3218
+ in the spec for a single request.
3219
+ :type _headers: dict, optional
3220
+ :param _host_index: set to override the host_index for a single
3221
+ request; this effectively ignores the host_index
3222
+ in the spec for a single request.
3223
+ :type _host_index: int, optional
3224
+ :return: Returns the result object.
3225
+ """ # noqa: E501
3226
+
3227
+ _param = self._unlink_o_auth_account_serialize(
3228
+ _request_auth=_request_auth,
3229
+ _content_type=_content_type,
3230
+ _headers=_headers,
3231
+ _host_index=_host_index,
3232
+ )
3233
+
3234
+ _response_types_map: Dict[str, Optional[str]] = {
3235
+ "200": "UserAdminResponseDto",
3236
+ }
3237
+ response_data = await self.api_client.call_api(
3238
+ *_param, _request_timeout=_request_timeout
3239
+ )
3240
+ await response_data.read()
3241
+ return self.api_client.response_deserialize(
3242
+ response_data=response_data,
3243
+ response_types_map=_response_types_map,
3244
+ ).data
3245
+
3246
+ @validate_call
3247
+ async def unlink_o_auth_account_with_http_info(
3248
+ self,
3249
+ _request_timeout: Union[
3250
+ None,
3251
+ Annotated[StrictFloat, Field(gt=0)],
3252
+ Tuple[
3253
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3254
+ ],
3255
+ ] = None,
3256
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3257
+ _content_type: Optional[StrictStr] = None,
3258
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3259
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3260
+ ) -> ApiResponse[UserAdminResponseDto]:
3261
+ """Unlink OAuth account
3262
+
3263
+ Unlink the OAuth account from the authenticated user.
3264
+
3265
+ :param _request_timeout: timeout setting for this request. If one
3266
+ number provided, it will be total request
3267
+ timeout. It can also be a pair (tuple) of
3268
+ (connection, read) timeouts.
3269
+ :type _request_timeout: int, tuple(int, int), optional
3270
+ :param _request_auth: set to override the auth_settings for an a single
3271
+ request; this effectively ignores the
3272
+ authentication in the spec for a single request.
3273
+ :type _request_auth: dict, optional
3274
+ :param _content_type: force content-type for the request.
3275
+ :type _content_type: str, Optional
3276
+ :param _headers: set to override the headers for a single
3277
+ request; this effectively ignores the headers
3278
+ in the spec for a single request.
3279
+ :type _headers: dict, optional
3280
+ :param _host_index: set to override the host_index for a single
3281
+ request; this effectively ignores the host_index
3282
+ in the spec for a single request.
3283
+ :type _host_index: int, optional
3284
+ :return: Returns the result object.
3285
+ """ # noqa: E501
3286
+
3287
+ _param = self._unlink_o_auth_account_serialize(
3288
+ _request_auth=_request_auth,
3289
+ _content_type=_content_type,
3290
+ _headers=_headers,
3291
+ _host_index=_host_index,
3292
+ )
3293
+
3294
+ _response_types_map: Dict[str, Optional[str]] = {
3295
+ "200": "UserAdminResponseDto",
3296
+ }
3297
+ response_data = await self.api_client.call_api(
3298
+ *_param, _request_timeout=_request_timeout
3299
+ )
3300
+ await response_data.read()
3301
+ return self.api_client.response_deserialize(
3302
+ response_data=response_data,
3303
+ response_types_map=_response_types_map,
3304
+ )
3305
+
3306
+ @validate_call
3307
+ async def unlink_o_auth_account_without_preload_content(
3308
+ self,
3309
+ _request_timeout: Union[
3310
+ None,
3311
+ Annotated[StrictFloat, Field(gt=0)],
3312
+ Tuple[
3313
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3314
+ ],
3315
+ ] = None,
3316
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3317
+ _content_type: Optional[StrictStr] = None,
3318
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3319
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3320
+ ) -> RESTResponseType:
3321
+ """Unlink OAuth account
3322
+
3323
+ Unlink the OAuth account from the authenticated user.
3324
+
3325
+ :param _request_timeout: timeout setting for this request. If one
3326
+ number provided, it will be total request
3327
+ timeout. It can also be a pair (tuple) of
3328
+ (connection, read) timeouts.
3329
+ :type _request_timeout: int, tuple(int, int), optional
3330
+ :param _request_auth: set to override the auth_settings for an a single
3331
+ request; this effectively ignores the
3332
+ authentication in the spec for a single request.
3333
+ :type _request_auth: dict, optional
3334
+ :param _content_type: force content-type for the request.
3335
+ :type _content_type: str, Optional
3336
+ :param _headers: set to override the headers for a single
3337
+ request; this effectively ignores the headers
3338
+ in the spec for a single request.
3339
+ :type _headers: dict, optional
3340
+ :param _host_index: set to override the host_index for a single
3341
+ request; this effectively ignores the host_index
3342
+ in the spec for a single request.
3343
+ :type _host_index: int, optional
3344
+ :return: Returns the result object.
3345
+ """ # noqa: E501
3346
+
3347
+ _param = self._unlink_o_auth_account_serialize(
3348
+ _request_auth=_request_auth,
3349
+ _content_type=_content_type,
3350
+ _headers=_headers,
3351
+ _host_index=_host_index,
3352
+ )
3353
+
3354
+ _response_types_map: Dict[str, Optional[str]] = {
3355
+ "200": "UserAdminResponseDto",
3356
+ }
3357
+ response_data = await self.api_client.call_api(
3358
+ *_param, _request_timeout=_request_timeout
3359
+ )
3360
+ return response_data.response
3361
+
3362
+ def _unlink_o_auth_account_serialize(
3363
+ self,
3364
+ _request_auth,
3365
+ _content_type,
3366
+ _headers,
3367
+ _host_index,
3368
+ ) -> RequestSerialized:
3369
+ _host = None
3370
+
3371
+ _collection_formats: Dict[str, str] = {}
3372
+
3373
+ _path_params: Dict[str, str] = {}
3374
+ _query_params: List[Tuple[str, str]] = []
3375
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3376
+ _form_params: List[Tuple[str, str]] = []
3377
+ _files: Dict[
3378
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3379
+ ] = {}
3380
+ _body_params: Optional[bytes] = None
3381
+
3382
+ # process the path parameters
3383
+ # process the query parameters
3384
+ # process the header parameters
3385
+ # process the form parameters
3386
+ # process the body parameter
3387
+
3388
+ # set the HTTP header `Accept`
3389
+ if "Accept" not in _header_params:
3390
+ _header_params["Accept"] = self.api_client.select_header_accept(
3391
+ ["application/json"]
3392
+ )
3393
+
3394
+ # authentication setting
3395
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3396
+
3397
+ return self.api_client.param_serialize(
3398
+ method="POST",
3399
+ resource_path="/oauth/unlink",
3400
+ path_params=_path_params,
3401
+ query_params=_query_params,
3402
+ header_params=_header_params,
3403
+ body=_body_params,
3404
+ post_params=_form_params,
3405
+ files=_files,
3406
+ auth_settings=_auth_settings,
3407
+ collection_formats=_collection_formats,
3408
+ _host=_host,
3409
+ _request_auth=_request_auth,
3410
+ )
3411
+
3412
+ @validate_call
3413
+ async def unlock_auth_session(
3414
+ self,
3415
+ session_unlock_dto: SessionUnlockDto,
3416
+ _request_timeout: Union[
3417
+ None,
3418
+ Annotated[StrictFloat, Field(gt=0)],
3419
+ Tuple[
3420
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3421
+ ],
3422
+ ] = None,
3423
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3424
+ _content_type: Optional[StrictStr] = None,
3425
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3426
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3427
+ ) -> None:
3428
+ """Unlock auth session
3429
+
3430
+ Temporarily grant the session elevated access to locked assets by providing the correct PIN code.
3431
+
3432
+ :param session_unlock_dto: (required)
3433
+ :type session_unlock_dto: SessionUnlockDto
3434
+ :param _request_timeout: timeout setting for this request. If one
3435
+ number provided, it will be total request
3436
+ timeout. It can also be a pair (tuple) of
3437
+ (connection, read) timeouts.
3438
+ :type _request_timeout: int, tuple(int, int), optional
3439
+ :param _request_auth: set to override the auth_settings for an a single
3440
+ request; this effectively ignores the
3441
+ authentication in the spec for a single request.
3442
+ :type _request_auth: dict, optional
3443
+ :param _content_type: force content-type for the request.
3444
+ :type _content_type: str, Optional
3445
+ :param _headers: set to override the headers for a single
3446
+ request; this effectively ignores the headers
3447
+ in the spec for a single request.
3448
+ :type _headers: dict, optional
3449
+ :param _host_index: set to override the host_index for a single
3450
+ request; this effectively ignores the host_index
3451
+ in the spec for a single request.
3452
+ :type _host_index: int, optional
3453
+ :return: Returns the result object.
3454
+ """ # noqa: E501
3455
+
3456
+ _param = self._unlock_auth_session_serialize(
3457
+ session_unlock_dto=session_unlock_dto,
3458
+ _request_auth=_request_auth,
3459
+ _content_type=_content_type,
3460
+ _headers=_headers,
3461
+ _host_index=_host_index,
3462
+ )
3463
+
3464
+ _response_types_map: Dict[str, Optional[str]] = {
3465
+ "204": None,
3466
+ }
3467
+ response_data = await self.api_client.call_api(
3468
+ *_param, _request_timeout=_request_timeout
3469
+ )
3470
+ await response_data.read()
3471
+ return self.api_client.response_deserialize(
3472
+ response_data=response_data,
3473
+ response_types_map=_response_types_map,
3474
+ ).data
3475
+
3476
+ @validate_call
3477
+ async def unlock_auth_session_with_http_info(
3478
+ self,
3479
+ session_unlock_dto: SessionUnlockDto,
3480
+ _request_timeout: Union[
3481
+ None,
3482
+ Annotated[StrictFloat, Field(gt=0)],
3483
+ Tuple[
3484
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3485
+ ],
3486
+ ] = None,
3487
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3488
+ _content_type: Optional[StrictStr] = None,
3489
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3490
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3491
+ ) -> ApiResponse[None]:
3492
+ """Unlock auth session
3493
+
3494
+ Temporarily grant the session elevated access to locked assets by providing the correct PIN code.
3495
+
3496
+ :param session_unlock_dto: (required)
3497
+ :type session_unlock_dto: SessionUnlockDto
3498
+ :param _request_timeout: timeout setting for this request. If one
3499
+ number provided, it will be total request
3500
+ timeout. It can also be a pair (tuple) of
3501
+ (connection, read) timeouts.
3502
+ :type _request_timeout: int, tuple(int, int), optional
3503
+ :param _request_auth: set to override the auth_settings for an a single
3504
+ request; this effectively ignores the
3505
+ authentication in the spec for a single request.
3506
+ :type _request_auth: dict, optional
3507
+ :param _content_type: force content-type for the request.
3508
+ :type _content_type: str, Optional
3509
+ :param _headers: set to override the headers for a single
3510
+ request; this effectively ignores the headers
3511
+ in the spec for a single request.
3512
+ :type _headers: dict, optional
3513
+ :param _host_index: set to override the host_index for a single
3514
+ request; this effectively ignores the host_index
3515
+ in the spec for a single request.
3516
+ :type _host_index: int, optional
3517
+ :return: Returns the result object.
3518
+ """ # noqa: E501
3519
+
3520
+ _param = self._unlock_auth_session_serialize(
3521
+ session_unlock_dto=session_unlock_dto,
3522
+ _request_auth=_request_auth,
3523
+ _content_type=_content_type,
3524
+ _headers=_headers,
3525
+ _host_index=_host_index,
3526
+ )
3527
+
3528
+ _response_types_map: Dict[str, Optional[str]] = {
3529
+ "204": None,
3530
+ }
3531
+ response_data = await self.api_client.call_api(
3532
+ *_param, _request_timeout=_request_timeout
3533
+ )
3534
+ await response_data.read()
3535
+ return self.api_client.response_deserialize(
3536
+ response_data=response_data,
3537
+ response_types_map=_response_types_map,
3538
+ )
3539
+
3540
+ @validate_call
3541
+ async def unlock_auth_session_without_preload_content(
3542
+ self,
3543
+ session_unlock_dto: SessionUnlockDto,
3544
+ _request_timeout: Union[
3545
+ None,
3546
+ Annotated[StrictFloat, Field(gt=0)],
3547
+ Tuple[
3548
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3549
+ ],
3550
+ ] = None,
3551
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3552
+ _content_type: Optional[StrictStr] = None,
3553
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3554
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3555
+ ) -> RESTResponseType:
3556
+ """Unlock auth session
3557
+
3558
+ Temporarily grant the session elevated access to locked assets by providing the correct PIN code.
3559
+
3560
+ :param session_unlock_dto: (required)
3561
+ :type session_unlock_dto: SessionUnlockDto
3562
+ :param _request_timeout: timeout setting for this request. If one
3563
+ number provided, it will be total request
3564
+ timeout. It can also be a pair (tuple) of
3565
+ (connection, read) timeouts.
3566
+ :type _request_timeout: int, tuple(int, int), optional
3567
+ :param _request_auth: set to override the auth_settings for an a single
3568
+ request; this effectively ignores the
3569
+ authentication in the spec for a single request.
3570
+ :type _request_auth: dict, optional
3571
+ :param _content_type: force content-type for the request.
3572
+ :type _content_type: str, Optional
3573
+ :param _headers: set to override the headers for a single
3574
+ request; this effectively ignores the headers
3575
+ in the spec for a single request.
3576
+ :type _headers: dict, optional
3577
+ :param _host_index: set to override the host_index for a single
3578
+ request; this effectively ignores the host_index
3579
+ in the spec for a single request.
3580
+ :type _host_index: int, optional
3581
+ :return: Returns the result object.
3582
+ """ # noqa: E501
3583
+
3584
+ _param = self._unlock_auth_session_serialize(
3585
+ session_unlock_dto=session_unlock_dto,
3586
+ _request_auth=_request_auth,
3587
+ _content_type=_content_type,
3588
+ _headers=_headers,
3589
+ _host_index=_host_index,
3590
+ )
3591
+
3592
+ _response_types_map: Dict[str, Optional[str]] = {
3593
+ "204": None,
3594
+ }
3595
+ response_data = await self.api_client.call_api(
3596
+ *_param, _request_timeout=_request_timeout
3597
+ )
3598
+ return response_data.response
3599
+
3600
+ def _unlock_auth_session_serialize(
3601
+ self,
3602
+ session_unlock_dto,
3603
+ _request_auth,
3604
+ _content_type,
3605
+ _headers,
3606
+ _host_index,
3607
+ ) -> RequestSerialized:
3608
+ _host = None
3609
+
3610
+ _collection_formats: Dict[str, str] = {}
3611
+
3612
+ _path_params: Dict[str, str] = {}
3613
+ _query_params: List[Tuple[str, str]] = []
3614
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3615
+ _form_params: List[Tuple[str, str]] = []
3616
+ _files: Dict[
3617
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3618
+ ] = {}
3619
+ _body_params: Optional[bytes] = None
3620
+
3621
+ # process the path parameters
3622
+ # process the query parameters
3623
+ # process the header parameters
3624
+ # process the form parameters
3625
+ # process the body parameter
3626
+ if session_unlock_dto is not None:
3627
+ _body_params = session_unlock_dto
3628
+
3629
+ # set the HTTP header `Content-Type`
3630
+ if _content_type:
3631
+ _header_params["Content-Type"] = _content_type
3632
+ else:
3633
+ _default_content_type = self.api_client.select_header_content_type(
3634
+ ["application/json"]
3635
+ )
3636
+ if _default_content_type is not None:
3637
+ _header_params["Content-Type"] = _default_content_type
3638
+
3639
+ # authentication setting
3640
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3641
+
3642
+ return self.api_client.param_serialize(
3643
+ method="POST",
3644
+ resource_path="/auth/session/unlock",
3645
+ path_params=_path_params,
3646
+ query_params=_query_params,
3647
+ header_params=_header_params,
3648
+ body=_body_params,
3649
+ post_params=_form_params,
3650
+ files=_files,
3651
+ auth_settings=_auth_settings,
3652
+ collection_formats=_collection_formats,
3653
+ _host=_host,
3654
+ _request_auth=_request_auth,
3655
+ )
3656
+
3657
+ @validate_call
3658
+ async def validate_access_token(
3659
+ self,
3660
+ _request_timeout: Union[
3661
+ None,
3662
+ Annotated[StrictFloat, Field(gt=0)],
3663
+ Tuple[
3664
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3665
+ ],
3666
+ ] = None,
3667
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3668
+ _content_type: Optional[StrictStr] = None,
3669
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3670
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3671
+ ) -> ValidateAccessTokenResponseDto:
3672
+ """Validate access token
3673
+
3674
+ Validate the current authorization method is still valid.
3675
+
3676
+ :param _request_timeout: timeout setting for this request. If one
3677
+ number provided, it will be total request
3678
+ timeout. It can also be a pair (tuple) of
3679
+ (connection, read) timeouts.
3680
+ :type _request_timeout: int, tuple(int, int), optional
3681
+ :param _request_auth: set to override the auth_settings for an a single
3682
+ request; this effectively ignores the
3683
+ authentication in the spec for a single request.
3684
+ :type _request_auth: dict, optional
3685
+ :param _content_type: force content-type for the request.
3686
+ :type _content_type: str, Optional
3687
+ :param _headers: set to override the headers for a single
3688
+ request; this effectively ignores the headers
3689
+ in the spec for a single request.
3690
+ :type _headers: dict, optional
3691
+ :param _host_index: set to override the host_index for a single
3692
+ request; this effectively ignores the host_index
3693
+ in the spec for a single request.
3694
+ :type _host_index: int, optional
3695
+ :return: Returns the result object.
3696
+ """ # noqa: E501
3697
+
3698
+ _param = self._validate_access_token_serialize(
3699
+ _request_auth=_request_auth,
3700
+ _content_type=_content_type,
3701
+ _headers=_headers,
3702
+ _host_index=_host_index,
3703
+ )
3704
+
3705
+ _response_types_map: Dict[str, Optional[str]] = {
3706
+ "200": "ValidateAccessTokenResponseDto",
3707
+ }
3708
+ response_data = await self.api_client.call_api(
3709
+ *_param, _request_timeout=_request_timeout
3710
+ )
3711
+ await response_data.read()
3712
+ return self.api_client.response_deserialize(
3713
+ response_data=response_data,
3714
+ response_types_map=_response_types_map,
3715
+ ).data
3716
+
3717
+ @validate_call
3718
+ async def validate_access_token_with_http_info(
3719
+ self,
3720
+ _request_timeout: Union[
3721
+ None,
3722
+ Annotated[StrictFloat, Field(gt=0)],
3723
+ Tuple[
3724
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3725
+ ],
3726
+ ] = None,
3727
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3728
+ _content_type: Optional[StrictStr] = None,
3729
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3730
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3731
+ ) -> ApiResponse[ValidateAccessTokenResponseDto]:
3732
+ """Validate access token
3733
+
3734
+ Validate the current authorization method is still valid.
3735
+
3736
+ :param _request_timeout: timeout setting for this request. If one
3737
+ number provided, it will be total request
3738
+ timeout. It can also be a pair (tuple) of
3739
+ (connection, read) timeouts.
3740
+ :type _request_timeout: int, tuple(int, int), optional
3741
+ :param _request_auth: set to override the auth_settings for an a single
3742
+ request; this effectively ignores the
3743
+ authentication in the spec for a single request.
3744
+ :type _request_auth: dict, optional
3745
+ :param _content_type: force content-type for the request.
3746
+ :type _content_type: str, Optional
3747
+ :param _headers: set to override the headers for a single
3748
+ request; this effectively ignores the headers
3749
+ in the spec for a single request.
3750
+ :type _headers: dict, optional
3751
+ :param _host_index: set to override the host_index for a single
3752
+ request; this effectively ignores the host_index
3753
+ in the spec for a single request.
3754
+ :type _host_index: int, optional
3755
+ :return: Returns the result object.
3756
+ """ # noqa: E501
3757
+
3758
+ _param = self._validate_access_token_serialize(
3759
+ _request_auth=_request_auth,
3760
+ _content_type=_content_type,
3761
+ _headers=_headers,
3762
+ _host_index=_host_index,
3763
+ )
3764
+
3765
+ _response_types_map: Dict[str, Optional[str]] = {
3766
+ "200": "ValidateAccessTokenResponseDto",
3767
+ }
3768
+ response_data = await self.api_client.call_api(
3769
+ *_param, _request_timeout=_request_timeout
3770
+ )
3771
+ await response_data.read()
3772
+ return self.api_client.response_deserialize(
3773
+ response_data=response_data,
3774
+ response_types_map=_response_types_map,
3775
+ )
3776
+
3777
+ @validate_call
3778
+ async def validate_access_token_without_preload_content(
3779
+ self,
3780
+ _request_timeout: Union[
3781
+ None,
3782
+ Annotated[StrictFloat, Field(gt=0)],
3783
+ Tuple[
3784
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3785
+ ],
3786
+ ] = None,
3787
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3788
+ _content_type: Optional[StrictStr] = None,
3789
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3790
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3791
+ ) -> RESTResponseType:
3792
+ """Validate access token
3793
+
3794
+ Validate the current authorization method is still valid.
3795
+
3796
+ :param _request_timeout: timeout setting for this request. If one
3797
+ number provided, it will be total request
3798
+ timeout. It can also be a pair (tuple) of
3799
+ (connection, read) timeouts.
3800
+ :type _request_timeout: int, tuple(int, int), optional
3801
+ :param _request_auth: set to override the auth_settings for an a single
3802
+ request; this effectively ignores the
3803
+ authentication in the spec for a single request.
3804
+ :type _request_auth: dict, optional
3805
+ :param _content_type: force content-type for the request.
3806
+ :type _content_type: str, Optional
3807
+ :param _headers: set to override the headers for a single
3808
+ request; this effectively ignores the headers
3809
+ in the spec for a single request.
3810
+ :type _headers: dict, optional
3811
+ :param _host_index: set to override the host_index for a single
3812
+ request; this effectively ignores the host_index
3813
+ in the spec for a single request.
3814
+ :type _host_index: int, optional
3815
+ :return: Returns the result object.
3816
+ """ # noqa: E501
3817
+
3818
+ _param = self._validate_access_token_serialize(
3819
+ _request_auth=_request_auth,
3820
+ _content_type=_content_type,
3821
+ _headers=_headers,
3822
+ _host_index=_host_index,
3823
+ )
3824
+
3825
+ _response_types_map: Dict[str, Optional[str]] = {
3826
+ "200": "ValidateAccessTokenResponseDto",
3827
+ }
3828
+ response_data = await self.api_client.call_api(
3829
+ *_param, _request_timeout=_request_timeout
3830
+ )
3831
+ return response_data.response
3832
+
3833
+ def _validate_access_token_serialize(
3834
+ self,
3835
+ _request_auth,
3836
+ _content_type,
3837
+ _headers,
3838
+ _host_index,
3839
+ ) -> RequestSerialized:
3840
+ _host = None
3841
+
3842
+ _collection_formats: Dict[str, str] = {}
3843
+
3844
+ _path_params: Dict[str, str] = {}
3845
+ _query_params: List[Tuple[str, str]] = []
3846
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3847
+ _form_params: List[Tuple[str, str]] = []
3848
+ _files: Dict[
3849
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3850
+ ] = {}
3851
+ _body_params: Optional[bytes] = None
3852
+
3853
+ # process the path parameters
3854
+ # process the query parameters
3855
+ # process the header parameters
3856
+ # process the form parameters
3857
+ # process the body parameter
3858
+
3859
+ # set the HTTP header `Accept`
3860
+ if "Accept" not in _header_params:
3861
+ _header_params["Accept"] = self.api_client.select_header_accept(
3862
+ ["application/json"]
3863
+ )
3864
+
3865
+ # authentication setting
3866
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3867
+
3868
+ return self.api_client.param_serialize(
3869
+ method="POST",
3870
+ resource_path="/auth/validateToken",
3871
+ path_params=_path_params,
3872
+ query_params=_query_params,
3873
+ header_params=_header_params,
3874
+ body=_body_params,
3875
+ post_params=_form_params,
3876
+ files=_files,
3877
+ auth_settings=_auth_settings,
3878
+ collection_formats=_collection_formats,
3879
+ _host=_host,
3880
+ _request_auth=_request_auth,
3881
+ )