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,3577 @@
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 pydantic import StrictBytes
19
+ from uuid import UUID
20
+ from immich.client.models.create_profile_image_response_dto import (
21
+ CreateProfileImageResponseDto,
22
+ )
23
+ from immich.client.models.license_key_dto import LicenseKeyDto
24
+ from immich.client.models.license_response_dto import LicenseResponseDto
25
+ from immich.client.models.onboarding_dto import OnboardingDto
26
+ from immich.client.models.onboarding_response_dto import OnboardingResponseDto
27
+ from immich.client.models.user_admin_response_dto import UserAdminResponseDto
28
+ from immich.client.models.user_preferences_response_dto import (
29
+ UserPreferencesResponseDto,
30
+ )
31
+ from immich.client.models.user_preferences_update_dto import UserPreferencesUpdateDto
32
+ from immich.client.models.user_response_dto import UserResponseDto
33
+ from immich.client.models.user_update_me_dto import UserUpdateMeDto
34
+
35
+ from immich.client.api_client import ApiClient, RequestSerialized
36
+ from immich.client.api_response import ApiResponse
37
+ from immich.client.rest import RESTResponseType
38
+
39
+
40
+ class UsersApi:
41
+ """NOTE: This class is auto generated by OpenAPI Generator
42
+ Ref: https://openapi-generator.tech
43
+
44
+ Do not edit the class manually.
45
+ """
46
+
47
+ def __init__(self, api_client=None) -> None:
48
+ if api_client is None:
49
+ api_client = ApiClient.get_default()
50
+ self.api_client = api_client
51
+
52
+ @validate_call
53
+ async def create_profile_image(
54
+ self,
55
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
61
+ ],
62
+ ] = None,
63
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
64
+ _content_type: Optional[StrictStr] = None,
65
+ _headers: Optional[Dict[StrictStr, Any]] = None,
66
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
67
+ ) -> CreateProfileImageResponseDto:
68
+ """Create user profile image
69
+
70
+ Upload and set a new profile image for the current user.
71
+
72
+ :param file: (required)
73
+ :type file: bytearray
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._create_profile_image_serialize(
97
+ file=file,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index,
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ "201": "CreateProfileImageResponseDto",
106
+ }
107
+ response_data = await self.api_client.call_api(
108
+ *_param, _request_timeout=_request_timeout
109
+ )
110
+ await response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+ @validate_call
117
+ async def create_profile_image_with_http_info(
118
+ self,
119
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
120
+ _request_timeout: Union[
121
+ None,
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Tuple[
124
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
125
+ ],
126
+ ] = None,
127
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
128
+ _content_type: Optional[StrictStr] = None,
129
+ _headers: Optional[Dict[StrictStr, Any]] = None,
130
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
131
+ ) -> ApiResponse[CreateProfileImageResponseDto]:
132
+ """Create user profile image
133
+
134
+ Upload and set a new profile image for the current user.
135
+
136
+ :param file: (required)
137
+ :type file: bytearray
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._create_profile_image_serialize(
161
+ file=file,
162
+ _request_auth=_request_auth,
163
+ _content_type=_content_type,
164
+ _headers=_headers,
165
+ _host_index=_host_index,
166
+ )
167
+
168
+ _response_types_map: Dict[str, Optional[str]] = {
169
+ "201": "CreateProfileImageResponseDto",
170
+ }
171
+ response_data = await self.api_client.call_api(
172
+ *_param, _request_timeout=_request_timeout
173
+ )
174
+ await response_data.read()
175
+ return self.api_client.response_deserialize(
176
+ response_data=response_data,
177
+ response_types_map=_response_types_map,
178
+ )
179
+
180
+ @validate_call
181
+ async def create_profile_image_without_preload_content(
182
+ self,
183
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
184
+ _request_timeout: Union[
185
+ None,
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Tuple[
188
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
189
+ ],
190
+ ] = None,
191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
192
+ _content_type: Optional[StrictStr] = None,
193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
+ ) -> RESTResponseType:
196
+ """Create user profile image
197
+
198
+ Upload and set a new profile image for the current user.
199
+
200
+ :param file: (required)
201
+ :type file: bytearray
202
+ :param _request_timeout: timeout setting for this request. If one
203
+ number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :type _request_timeout: int, tuple(int, int), optional
207
+ :param _request_auth: set to override the auth_settings for an a single
208
+ request; this effectively ignores the
209
+ authentication in the spec for a single request.
210
+ :type _request_auth: dict, optional
211
+ :param _content_type: force content-type for the request.
212
+ :type _content_type: str, Optional
213
+ :param _headers: set to override the headers for a single
214
+ request; this effectively ignores the headers
215
+ in the spec for a single request.
216
+ :type _headers: dict, optional
217
+ :param _host_index: set to override the host_index for a single
218
+ request; this effectively ignores the host_index
219
+ in the spec for a single request.
220
+ :type _host_index: int, optional
221
+ :return: Returns the result object.
222
+ """ # noqa: E501
223
+
224
+ _param = self._create_profile_image_serialize(
225
+ file=file,
226
+ _request_auth=_request_auth,
227
+ _content_type=_content_type,
228
+ _headers=_headers,
229
+ _host_index=_host_index,
230
+ )
231
+
232
+ _response_types_map: Dict[str, Optional[str]] = {
233
+ "201": "CreateProfileImageResponseDto",
234
+ }
235
+ response_data = await self.api_client.call_api(
236
+ *_param, _request_timeout=_request_timeout
237
+ )
238
+ return response_data.response
239
+
240
+ def _create_profile_image_serialize(
241
+ self,
242
+ file,
243
+ _request_auth,
244
+ _content_type,
245
+ _headers,
246
+ _host_index,
247
+ ) -> RequestSerialized:
248
+ _host = None
249
+
250
+ _collection_formats: Dict[str, str] = {}
251
+
252
+ _path_params: Dict[str, str] = {}
253
+ _query_params: List[Tuple[str, str]] = []
254
+ _header_params: Dict[str, Optional[str]] = _headers or {}
255
+ _form_params: List[Tuple[str, str]] = []
256
+ _files: Dict[
257
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
258
+ ] = {}
259
+ _body_params: Optional[bytes] = None
260
+
261
+ # process the path parameters
262
+ # process the query parameters
263
+ # process the header parameters
264
+ # process the form parameters
265
+ if file is not None:
266
+ _files["file"] = file
267
+ # process the body parameter
268
+
269
+ # set the HTTP header `Accept`
270
+ if "Accept" not in _header_params:
271
+ _header_params["Accept"] = self.api_client.select_header_accept(
272
+ ["application/json"]
273
+ )
274
+
275
+ # set the HTTP header `Content-Type`
276
+ if _content_type:
277
+ _header_params["Content-Type"] = _content_type
278
+ else:
279
+ _default_content_type = self.api_client.select_header_content_type(
280
+ ["multipart/form-data"]
281
+ )
282
+ if _default_content_type is not None:
283
+ _header_params["Content-Type"] = _default_content_type
284
+
285
+ # authentication setting
286
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
287
+
288
+ return self.api_client.param_serialize(
289
+ method="POST",
290
+ resource_path="/users/profile-image",
291
+ path_params=_path_params,
292
+ query_params=_query_params,
293
+ header_params=_header_params,
294
+ body=_body_params,
295
+ post_params=_form_params,
296
+ files=_files,
297
+ auth_settings=_auth_settings,
298
+ collection_formats=_collection_formats,
299
+ _host=_host,
300
+ _request_auth=_request_auth,
301
+ )
302
+
303
+ @validate_call
304
+ async def delete_profile_image(
305
+ self,
306
+ _request_timeout: Union[
307
+ None,
308
+ Annotated[StrictFloat, Field(gt=0)],
309
+ Tuple[
310
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
311
+ ],
312
+ ] = None,
313
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
314
+ _content_type: Optional[StrictStr] = None,
315
+ _headers: Optional[Dict[StrictStr, Any]] = None,
316
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
317
+ ) -> None:
318
+ """Delete user profile image
319
+
320
+ Delete the profile image of the current user.
321
+
322
+ :param _request_timeout: timeout setting for this request. If one
323
+ number provided, it will be total request
324
+ timeout. It can also be a pair (tuple) of
325
+ (connection, read) timeouts.
326
+ :type _request_timeout: int, tuple(int, int), optional
327
+ :param _request_auth: set to override the auth_settings for an a single
328
+ request; this effectively ignores the
329
+ authentication in the spec for a single request.
330
+ :type _request_auth: dict, optional
331
+ :param _content_type: force content-type for the request.
332
+ :type _content_type: str, Optional
333
+ :param _headers: set to override the headers for a single
334
+ request; this effectively ignores the headers
335
+ in the spec for a single request.
336
+ :type _headers: dict, optional
337
+ :param _host_index: set to override the host_index for a single
338
+ request; this effectively ignores the host_index
339
+ in the spec for a single request.
340
+ :type _host_index: int, optional
341
+ :return: Returns the result object.
342
+ """ # noqa: E501
343
+
344
+ _param = self._delete_profile_image_serialize(
345
+ _request_auth=_request_auth,
346
+ _content_type=_content_type,
347
+ _headers=_headers,
348
+ _host_index=_host_index,
349
+ )
350
+
351
+ _response_types_map: Dict[str, Optional[str]] = {
352
+ "204": None,
353
+ }
354
+ response_data = await self.api_client.call_api(
355
+ *_param, _request_timeout=_request_timeout
356
+ )
357
+ await response_data.read()
358
+ return self.api_client.response_deserialize(
359
+ response_data=response_data,
360
+ response_types_map=_response_types_map,
361
+ ).data
362
+
363
+ @validate_call
364
+ async def delete_profile_image_with_http_info(
365
+ self,
366
+ _request_timeout: Union[
367
+ None,
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Tuple[
370
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
371
+ ],
372
+ ] = None,
373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
374
+ _content_type: Optional[StrictStr] = None,
375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
377
+ ) -> ApiResponse[None]:
378
+ """Delete user profile image
379
+
380
+ Delete the profile image of the current user.
381
+
382
+ :param _request_timeout: timeout setting for this request. If one
383
+ number provided, it will be total request
384
+ timeout. It can also be a pair (tuple) of
385
+ (connection, read) timeouts.
386
+ :type _request_timeout: int, tuple(int, int), optional
387
+ :param _request_auth: set to override the auth_settings for an a single
388
+ request; this effectively ignores the
389
+ authentication in the spec for a single request.
390
+ :type _request_auth: dict, optional
391
+ :param _content_type: force content-type for the request.
392
+ :type _content_type: str, Optional
393
+ :param _headers: set to override the headers for a single
394
+ request; this effectively ignores the headers
395
+ in the spec for a single request.
396
+ :type _headers: dict, optional
397
+ :param _host_index: set to override the host_index for a single
398
+ request; this effectively ignores the host_index
399
+ in the spec for a single request.
400
+ :type _host_index: int, optional
401
+ :return: Returns the result object.
402
+ """ # noqa: E501
403
+
404
+ _param = self._delete_profile_image_serialize(
405
+ _request_auth=_request_auth,
406
+ _content_type=_content_type,
407
+ _headers=_headers,
408
+ _host_index=_host_index,
409
+ )
410
+
411
+ _response_types_map: Dict[str, Optional[str]] = {
412
+ "204": None,
413
+ }
414
+ response_data = await self.api_client.call_api(
415
+ *_param, _request_timeout=_request_timeout
416
+ )
417
+ await response_data.read()
418
+ return self.api_client.response_deserialize(
419
+ response_data=response_data,
420
+ response_types_map=_response_types_map,
421
+ )
422
+
423
+ @validate_call
424
+ async def delete_profile_image_without_preload_content(
425
+ self,
426
+ _request_timeout: Union[
427
+ None,
428
+ Annotated[StrictFloat, Field(gt=0)],
429
+ Tuple[
430
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
431
+ ],
432
+ ] = None,
433
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
434
+ _content_type: Optional[StrictStr] = None,
435
+ _headers: Optional[Dict[StrictStr, Any]] = None,
436
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
437
+ ) -> RESTResponseType:
438
+ """Delete user profile image
439
+
440
+ Delete the profile image of the current user.
441
+
442
+ :param _request_timeout: timeout setting for this request. If one
443
+ number provided, it will be total request
444
+ timeout. It can also be a pair (tuple) of
445
+ (connection, read) timeouts.
446
+ :type _request_timeout: int, tuple(int, int), optional
447
+ :param _request_auth: set to override the auth_settings for an a single
448
+ request; this effectively ignores the
449
+ authentication in the spec for a single request.
450
+ :type _request_auth: dict, optional
451
+ :param _content_type: force content-type for the request.
452
+ :type _content_type: str, Optional
453
+ :param _headers: set to override the headers for a single
454
+ request; this effectively ignores the headers
455
+ in the spec for a single request.
456
+ :type _headers: dict, optional
457
+ :param _host_index: set to override the host_index for a single
458
+ request; this effectively ignores the host_index
459
+ in the spec for a single request.
460
+ :type _host_index: int, optional
461
+ :return: Returns the result object.
462
+ """ # noqa: E501
463
+
464
+ _param = self._delete_profile_image_serialize(
465
+ _request_auth=_request_auth,
466
+ _content_type=_content_type,
467
+ _headers=_headers,
468
+ _host_index=_host_index,
469
+ )
470
+
471
+ _response_types_map: Dict[str, Optional[str]] = {
472
+ "204": None,
473
+ }
474
+ response_data = await self.api_client.call_api(
475
+ *_param, _request_timeout=_request_timeout
476
+ )
477
+ return response_data.response
478
+
479
+ def _delete_profile_image_serialize(
480
+ self,
481
+ _request_auth,
482
+ _content_type,
483
+ _headers,
484
+ _host_index,
485
+ ) -> RequestSerialized:
486
+ _host = None
487
+
488
+ _collection_formats: Dict[str, str] = {}
489
+
490
+ _path_params: Dict[str, str] = {}
491
+ _query_params: List[Tuple[str, str]] = []
492
+ _header_params: Dict[str, Optional[str]] = _headers or {}
493
+ _form_params: List[Tuple[str, str]] = []
494
+ _files: Dict[
495
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
496
+ ] = {}
497
+ _body_params: Optional[bytes] = None
498
+
499
+ # process the path parameters
500
+ # process the query parameters
501
+ # process the header parameters
502
+ # process the form parameters
503
+ # process the body parameter
504
+
505
+ # authentication setting
506
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
507
+
508
+ return self.api_client.param_serialize(
509
+ method="DELETE",
510
+ resource_path="/users/profile-image",
511
+ path_params=_path_params,
512
+ query_params=_query_params,
513
+ header_params=_header_params,
514
+ body=_body_params,
515
+ post_params=_form_params,
516
+ files=_files,
517
+ auth_settings=_auth_settings,
518
+ collection_formats=_collection_formats,
519
+ _host=_host,
520
+ _request_auth=_request_auth,
521
+ )
522
+
523
+ @validate_call
524
+ async def delete_user_license(
525
+ self,
526
+ _request_timeout: Union[
527
+ None,
528
+ Annotated[StrictFloat, Field(gt=0)],
529
+ Tuple[
530
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
531
+ ],
532
+ ] = None,
533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
534
+ _content_type: Optional[StrictStr] = None,
535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
537
+ ) -> None:
538
+ """Delete user product key
539
+
540
+ Delete the registered product key for the current user.
541
+
542
+ :param _request_timeout: timeout setting for this request. If one
543
+ number provided, it will be total request
544
+ timeout. It can also be a pair (tuple) of
545
+ (connection, read) timeouts.
546
+ :type _request_timeout: int, tuple(int, int), optional
547
+ :param _request_auth: set to override the auth_settings for an a single
548
+ request; this effectively ignores the
549
+ authentication in the spec for a single request.
550
+ :type _request_auth: dict, optional
551
+ :param _content_type: force content-type for the request.
552
+ :type _content_type: str, Optional
553
+ :param _headers: set to override the headers for a single
554
+ request; this effectively ignores the headers
555
+ in the spec for a single request.
556
+ :type _headers: dict, optional
557
+ :param _host_index: set to override the host_index for a single
558
+ request; this effectively ignores the host_index
559
+ in the spec for a single request.
560
+ :type _host_index: int, optional
561
+ :return: Returns the result object.
562
+ """ # noqa: E501
563
+
564
+ _param = self._delete_user_license_serialize(
565
+ _request_auth=_request_auth,
566
+ _content_type=_content_type,
567
+ _headers=_headers,
568
+ _host_index=_host_index,
569
+ )
570
+
571
+ _response_types_map: Dict[str, Optional[str]] = {
572
+ "204": None,
573
+ }
574
+ response_data = await self.api_client.call_api(
575
+ *_param, _request_timeout=_request_timeout
576
+ )
577
+ await response_data.read()
578
+ return self.api_client.response_deserialize(
579
+ response_data=response_data,
580
+ response_types_map=_response_types_map,
581
+ ).data
582
+
583
+ @validate_call
584
+ async def delete_user_license_with_http_info(
585
+ self,
586
+ _request_timeout: Union[
587
+ None,
588
+ Annotated[StrictFloat, Field(gt=0)],
589
+ Tuple[
590
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
591
+ ],
592
+ ] = None,
593
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
594
+ _content_type: Optional[StrictStr] = None,
595
+ _headers: Optional[Dict[StrictStr, Any]] = None,
596
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
597
+ ) -> ApiResponse[None]:
598
+ """Delete user product key
599
+
600
+ Delete the registered product key for the current user.
601
+
602
+ :param _request_timeout: timeout setting for this request. If one
603
+ number provided, it will be total request
604
+ timeout. It can also be a pair (tuple) of
605
+ (connection, read) timeouts.
606
+ :type _request_timeout: int, tuple(int, int), optional
607
+ :param _request_auth: set to override the auth_settings for an a single
608
+ request; this effectively ignores the
609
+ authentication in the spec for a single request.
610
+ :type _request_auth: dict, optional
611
+ :param _content_type: force content-type for the request.
612
+ :type _content_type: str, Optional
613
+ :param _headers: set to override the headers for a single
614
+ request; this effectively ignores the headers
615
+ in the spec for a single request.
616
+ :type _headers: dict, optional
617
+ :param _host_index: set to override the host_index for a single
618
+ request; this effectively ignores the host_index
619
+ in the spec for a single request.
620
+ :type _host_index: int, optional
621
+ :return: Returns the result object.
622
+ """ # noqa: E501
623
+
624
+ _param = self._delete_user_license_serialize(
625
+ _request_auth=_request_auth,
626
+ _content_type=_content_type,
627
+ _headers=_headers,
628
+ _host_index=_host_index,
629
+ )
630
+
631
+ _response_types_map: Dict[str, Optional[str]] = {
632
+ "204": None,
633
+ }
634
+ response_data = await self.api_client.call_api(
635
+ *_param, _request_timeout=_request_timeout
636
+ )
637
+ await response_data.read()
638
+ return self.api_client.response_deserialize(
639
+ response_data=response_data,
640
+ response_types_map=_response_types_map,
641
+ )
642
+
643
+ @validate_call
644
+ async def delete_user_license_without_preload_content(
645
+ self,
646
+ _request_timeout: Union[
647
+ None,
648
+ Annotated[StrictFloat, Field(gt=0)],
649
+ Tuple[
650
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
651
+ ],
652
+ ] = None,
653
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
654
+ _content_type: Optional[StrictStr] = None,
655
+ _headers: Optional[Dict[StrictStr, Any]] = None,
656
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
657
+ ) -> RESTResponseType:
658
+ """Delete user product key
659
+
660
+ Delete the registered product key for the current user.
661
+
662
+ :param _request_timeout: timeout setting for this request. If one
663
+ number provided, it will be total request
664
+ timeout. It can also be a pair (tuple) of
665
+ (connection, read) timeouts.
666
+ :type _request_timeout: int, tuple(int, int), optional
667
+ :param _request_auth: set to override the auth_settings for an a single
668
+ request; this effectively ignores the
669
+ authentication in the spec for a single request.
670
+ :type _request_auth: dict, optional
671
+ :param _content_type: force content-type for the request.
672
+ :type _content_type: str, Optional
673
+ :param _headers: set to override the headers for a single
674
+ request; this effectively ignores the headers
675
+ in the spec for a single request.
676
+ :type _headers: dict, optional
677
+ :param _host_index: set to override the host_index for a single
678
+ request; this effectively ignores the host_index
679
+ in the spec for a single request.
680
+ :type _host_index: int, optional
681
+ :return: Returns the result object.
682
+ """ # noqa: E501
683
+
684
+ _param = self._delete_user_license_serialize(
685
+ _request_auth=_request_auth,
686
+ _content_type=_content_type,
687
+ _headers=_headers,
688
+ _host_index=_host_index,
689
+ )
690
+
691
+ _response_types_map: Dict[str, Optional[str]] = {
692
+ "204": None,
693
+ }
694
+ response_data = await self.api_client.call_api(
695
+ *_param, _request_timeout=_request_timeout
696
+ )
697
+ return response_data.response
698
+
699
+ def _delete_user_license_serialize(
700
+ self,
701
+ _request_auth,
702
+ _content_type,
703
+ _headers,
704
+ _host_index,
705
+ ) -> RequestSerialized:
706
+ _host = None
707
+
708
+ _collection_formats: Dict[str, str] = {}
709
+
710
+ _path_params: Dict[str, str] = {}
711
+ _query_params: List[Tuple[str, str]] = []
712
+ _header_params: Dict[str, Optional[str]] = _headers or {}
713
+ _form_params: List[Tuple[str, str]] = []
714
+ _files: Dict[
715
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
716
+ ] = {}
717
+ _body_params: Optional[bytes] = None
718
+
719
+ # process the path parameters
720
+ # process the query parameters
721
+ # process the header parameters
722
+ # process the form parameters
723
+ # process the body parameter
724
+
725
+ # authentication setting
726
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
727
+
728
+ return self.api_client.param_serialize(
729
+ method="DELETE",
730
+ resource_path="/users/me/license",
731
+ path_params=_path_params,
732
+ query_params=_query_params,
733
+ header_params=_header_params,
734
+ body=_body_params,
735
+ post_params=_form_params,
736
+ files=_files,
737
+ auth_settings=_auth_settings,
738
+ collection_formats=_collection_formats,
739
+ _host=_host,
740
+ _request_auth=_request_auth,
741
+ )
742
+
743
+ @validate_call
744
+ async def delete_user_onboarding(
745
+ self,
746
+ _request_timeout: Union[
747
+ None,
748
+ Annotated[StrictFloat, Field(gt=0)],
749
+ Tuple[
750
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
751
+ ],
752
+ ] = None,
753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
754
+ _content_type: Optional[StrictStr] = None,
755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
757
+ ) -> None:
758
+ """Delete user onboarding
759
+
760
+ Delete the onboarding status of the current user.
761
+
762
+ :param _request_timeout: timeout setting for this request. If one
763
+ number provided, it will be total request
764
+ timeout. It can also be a pair (tuple) of
765
+ (connection, read) timeouts.
766
+ :type _request_timeout: int, tuple(int, int), optional
767
+ :param _request_auth: set to override the auth_settings for an a single
768
+ request; this effectively ignores the
769
+ authentication in the spec for a single request.
770
+ :type _request_auth: dict, optional
771
+ :param _content_type: force content-type for the request.
772
+ :type _content_type: str, Optional
773
+ :param _headers: set to override the headers for a single
774
+ request; this effectively ignores the headers
775
+ in the spec for a single request.
776
+ :type _headers: dict, optional
777
+ :param _host_index: set to override the host_index for a single
778
+ request; this effectively ignores the host_index
779
+ in the spec for a single request.
780
+ :type _host_index: int, optional
781
+ :return: Returns the result object.
782
+ """ # noqa: E501
783
+
784
+ _param = self._delete_user_onboarding_serialize(
785
+ _request_auth=_request_auth,
786
+ _content_type=_content_type,
787
+ _headers=_headers,
788
+ _host_index=_host_index,
789
+ )
790
+
791
+ _response_types_map: Dict[str, Optional[str]] = {
792
+ "204": None,
793
+ }
794
+ response_data = await self.api_client.call_api(
795
+ *_param, _request_timeout=_request_timeout
796
+ )
797
+ await response_data.read()
798
+ return self.api_client.response_deserialize(
799
+ response_data=response_data,
800
+ response_types_map=_response_types_map,
801
+ ).data
802
+
803
+ @validate_call
804
+ async def delete_user_onboarding_with_http_info(
805
+ self,
806
+ _request_timeout: Union[
807
+ None,
808
+ Annotated[StrictFloat, Field(gt=0)],
809
+ Tuple[
810
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
811
+ ],
812
+ ] = None,
813
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
814
+ _content_type: Optional[StrictStr] = None,
815
+ _headers: Optional[Dict[StrictStr, Any]] = None,
816
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
817
+ ) -> ApiResponse[None]:
818
+ """Delete user onboarding
819
+
820
+ Delete the onboarding status of the current user.
821
+
822
+ :param _request_timeout: timeout setting for this request. If one
823
+ number provided, it will be total request
824
+ timeout. It can also be a pair (tuple) of
825
+ (connection, read) timeouts.
826
+ :type _request_timeout: int, tuple(int, int), optional
827
+ :param _request_auth: set to override the auth_settings for an a single
828
+ request; this effectively ignores the
829
+ authentication in the spec for a single request.
830
+ :type _request_auth: dict, optional
831
+ :param _content_type: force content-type for the request.
832
+ :type _content_type: str, Optional
833
+ :param _headers: set to override the headers for a single
834
+ request; this effectively ignores the headers
835
+ in the spec for a single request.
836
+ :type _headers: dict, optional
837
+ :param _host_index: set to override the host_index for a single
838
+ request; this effectively ignores the host_index
839
+ in the spec for a single request.
840
+ :type _host_index: int, optional
841
+ :return: Returns the result object.
842
+ """ # noqa: E501
843
+
844
+ _param = self._delete_user_onboarding_serialize(
845
+ _request_auth=_request_auth,
846
+ _content_type=_content_type,
847
+ _headers=_headers,
848
+ _host_index=_host_index,
849
+ )
850
+
851
+ _response_types_map: Dict[str, Optional[str]] = {
852
+ "204": None,
853
+ }
854
+ response_data = await self.api_client.call_api(
855
+ *_param, _request_timeout=_request_timeout
856
+ )
857
+ await response_data.read()
858
+ return self.api_client.response_deserialize(
859
+ response_data=response_data,
860
+ response_types_map=_response_types_map,
861
+ )
862
+
863
+ @validate_call
864
+ async def delete_user_onboarding_without_preload_content(
865
+ self,
866
+ _request_timeout: Union[
867
+ None,
868
+ Annotated[StrictFloat, Field(gt=0)],
869
+ Tuple[
870
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
871
+ ],
872
+ ] = None,
873
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
874
+ _content_type: Optional[StrictStr] = None,
875
+ _headers: Optional[Dict[StrictStr, Any]] = None,
876
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
877
+ ) -> RESTResponseType:
878
+ """Delete user onboarding
879
+
880
+ Delete the onboarding status of the current user.
881
+
882
+ :param _request_timeout: timeout setting for this request. If one
883
+ number provided, it will be total request
884
+ timeout. It can also be a pair (tuple) of
885
+ (connection, read) timeouts.
886
+ :type _request_timeout: int, tuple(int, int), optional
887
+ :param _request_auth: set to override the auth_settings for an a single
888
+ request; this effectively ignores the
889
+ authentication in the spec for a single request.
890
+ :type _request_auth: dict, optional
891
+ :param _content_type: force content-type for the request.
892
+ :type _content_type: str, Optional
893
+ :param _headers: set to override the headers for a single
894
+ request; this effectively ignores the headers
895
+ in the spec for a single request.
896
+ :type _headers: dict, optional
897
+ :param _host_index: set to override the host_index for a single
898
+ request; this effectively ignores the host_index
899
+ in the spec for a single request.
900
+ :type _host_index: int, optional
901
+ :return: Returns the result object.
902
+ """ # noqa: E501
903
+
904
+ _param = self._delete_user_onboarding_serialize(
905
+ _request_auth=_request_auth,
906
+ _content_type=_content_type,
907
+ _headers=_headers,
908
+ _host_index=_host_index,
909
+ )
910
+
911
+ _response_types_map: Dict[str, Optional[str]] = {
912
+ "204": None,
913
+ }
914
+ response_data = await self.api_client.call_api(
915
+ *_param, _request_timeout=_request_timeout
916
+ )
917
+ return response_data.response
918
+
919
+ def _delete_user_onboarding_serialize(
920
+ self,
921
+ _request_auth,
922
+ _content_type,
923
+ _headers,
924
+ _host_index,
925
+ ) -> RequestSerialized:
926
+ _host = None
927
+
928
+ _collection_formats: Dict[str, str] = {}
929
+
930
+ _path_params: Dict[str, str] = {}
931
+ _query_params: List[Tuple[str, str]] = []
932
+ _header_params: Dict[str, Optional[str]] = _headers or {}
933
+ _form_params: List[Tuple[str, str]] = []
934
+ _files: Dict[
935
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
936
+ ] = {}
937
+ _body_params: Optional[bytes] = None
938
+
939
+ # process the path parameters
940
+ # process the query parameters
941
+ # process the header parameters
942
+ # process the form parameters
943
+ # process the body parameter
944
+
945
+ # authentication setting
946
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
947
+
948
+ return self.api_client.param_serialize(
949
+ method="DELETE",
950
+ resource_path="/users/me/onboarding",
951
+ path_params=_path_params,
952
+ query_params=_query_params,
953
+ header_params=_header_params,
954
+ body=_body_params,
955
+ post_params=_form_params,
956
+ files=_files,
957
+ auth_settings=_auth_settings,
958
+ collection_formats=_collection_formats,
959
+ _host=_host,
960
+ _request_auth=_request_auth,
961
+ )
962
+
963
+ @validate_call
964
+ async def get_my_preferences(
965
+ self,
966
+ _request_timeout: Union[
967
+ None,
968
+ Annotated[StrictFloat, Field(gt=0)],
969
+ Tuple[
970
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
971
+ ],
972
+ ] = None,
973
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
974
+ _content_type: Optional[StrictStr] = None,
975
+ _headers: Optional[Dict[StrictStr, Any]] = None,
976
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
977
+ ) -> UserPreferencesResponseDto:
978
+ """Get my preferences
979
+
980
+ Retrieve the preferences for the current user.
981
+
982
+ :param _request_timeout: timeout setting for this request. If one
983
+ number provided, it will be total request
984
+ timeout. It can also be a pair (tuple) of
985
+ (connection, read) timeouts.
986
+ :type _request_timeout: int, tuple(int, int), optional
987
+ :param _request_auth: set to override the auth_settings for an a single
988
+ request; this effectively ignores the
989
+ authentication in the spec for a single request.
990
+ :type _request_auth: dict, optional
991
+ :param _content_type: force content-type for the request.
992
+ :type _content_type: str, Optional
993
+ :param _headers: set to override the headers for a single
994
+ request; this effectively ignores the headers
995
+ in the spec for a single request.
996
+ :type _headers: dict, optional
997
+ :param _host_index: set to override the host_index for a single
998
+ request; this effectively ignores the host_index
999
+ in the spec for a single request.
1000
+ :type _host_index: int, optional
1001
+ :return: Returns the result object.
1002
+ """ # noqa: E501
1003
+
1004
+ _param = self._get_my_preferences_serialize(
1005
+ _request_auth=_request_auth,
1006
+ _content_type=_content_type,
1007
+ _headers=_headers,
1008
+ _host_index=_host_index,
1009
+ )
1010
+
1011
+ _response_types_map: Dict[str, Optional[str]] = {
1012
+ "200": "UserPreferencesResponseDto",
1013
+ }
1014
+ response_data = await self.api_client.call_api(
1015
+ *_param, _request_timeout=_request_timeout
1016
+ )
1017
+ await response_data.read()
1018
+ return self.api_client.response_deserialize(
1019
+ response_data=response_data,
1020
+ response_types_map=_response_types_map,
1021
+ ).data
1022
+
1023
+ @validate_call
1024
+ async def get_my_preferences_with_http_info(
1025
+ self,
1026
+ _request_timeout: Union[
1027
+ None,
1028
+ Annotated[StrictFloat, Field(gt=0)],
1029
+ Tuple[
1030
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1031
+ ],
1032
+ ] = None,
1033
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1034
+ _content_type: Optional[StrictStr] = None,
1035
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1036
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1037
+ ) -> ApiResponse[UserPreferencesResponseDto]:
1038
+ """Get my preferences
1039
+
1040
+ Retrieve the preferences for the current user.
1041
+
1042
+ :param _request_timeout: timeout setting for this request. If one
1043
+ number provided, it will be total request
1044
+ timeout. It can also be a pair (tuple) of
1045
+ (connection, read) timeouts.
1046
+ :type _request_timeout: int, tuple(int, int), optional
1047
+ :param _request_auth: set to override the auth_settings for an a single
1048
+ request; this effectively ignores the
1049
+ authentication in the spec for a single request.
1050
+ :type _request_auth: dict, optional
1051
+ :param _content_type: force content-type for the request.
1052
+ :type _content_type: str, Optional
1053
+ :param _headers: set to override the headers for a single
1054
+ request; this effectively ignores the headers
1055
+ in the spec for a single request.
1056
+ :type _headers: dict, optional
1057
+ :param _host_index: set to override the host_index for a single
1058
+ request; this effectively ignores the host_index
1059
+ in the spec for a single request.
1060
+ :type _host_index: int, optional
1061
+ :return: Returns the result object.
1062
+ """ # noqa: E501
1063
+
1064
+ _param = self._get_my_preferences_serialize(
1065
+ _request_auth=_request_auth,
1066
+ _content_type=_content_type,
1067
+ _headers=_headers,
1068
+ _host_index=_host_index,
1069
+ )
1070
+
1071
+ _response_types_map: Dict[str, Optional[str]] = {
1072
+ "200": "UserPreferencesResponseDto",
1073
+ }
1074
+ response_data = await self.api_client.call_api(
1075
+ *_param, _request_timeout=_request_timeout
1076
+ )
1077
+ await response_data.read()
1078
+ return self.api_client.response_deserialize(
1079
+ response_data=response_data,
1080
+ response_types_map=_response_types_map,
1081
+ )
1082
+
1083
+ @validate_call
1084
+ async def get_my_preferences_without_preload_content(
1085
+ self,
1086
+ _request_timeout: Union[
1087
+ None,
1088
+ Annotated[StrictFloat, Field(gt=0)],
1089
+ Tuple[
1090
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1091
+ ],
1092
+ ] = None,
1093
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1094
+ _content_type: Optional[StrictStr] = None,
1095
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1096
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1097
+ ) -> RESTResponseType:
1098
+ """Get my preferences
1099
+
1100
+ Retrieve the preferences for the current user.
1101
+
1102
+ :param _request_timeout: timeout setting for this request. If one
1103
+ number provided, it will be total request
1104
+ timeout. It can also be a pair (tuple) of
1105
+ (connection, read) timeouts.
1106
+ :type _request_timeout: int, tuple(int, int), optional
1107
+ :param _request_auth: set to override the auth_settings for an a single
1108
+ request; this effectively ignores the
1109
+ authentication in the spec for a single request.
1110
+ :type _request_auth: dict, optional
1111
+ :param _content_type: force content-type for the request.
1112
+ :type _content_type: str, Optional
1113
+ :param _headers: set to override the headers for a single
1114
+ request; this effectively ignores the headers
1115
+ in the spec for a single request.
1116
+ :type _headers: dict, optional
1117
+ :param _host_index: set to override the host_index for a single
1118
+ request; this effectively ignores the host_index
1119
+ in the spec for a single request.
1120
+ :type _host_index: int, optional
1121
+ :return: Returns the result object.
1122
+ """ # noqa: E501
1123
+
1124
+ _param = self._get_my_preferences_serialize(
1125
+ _request_auth=_request_auth,
1126
+ _content_type=_content_type,
1127
+ _headers=_headers,
1128
+ _host_index=_host_index,
1129
+ )
1130
+
1131
+ _response_types_map: Dict[str, Optional[str]] = {
1132
+ "200": "UserPreferencesResponseDto",
1133
+ }
1134
+ response_data = await self.api_client.call_api(
1135
+ *_param, _request_timeout=_request_timeout
1136
+ )
1137
+ return response_data.response
1138
+
1139
+ def _get_my_preferences_serialize(
1140
+ self,
1141
+ _request_auth,
1142
+ _content_type,
1143
+ _headers,
1144
+ _host_index,
1145
+ ) -> RequestSerialized:
1146
+ _host = None
1147
+
1148
+ _collection_formats: Dict[str, str] = {}
1149
+
1150
+ _path_params: Dict[str, str] = {}
1151
+ _query_params: List[Tuple[str, str]] = []
1152
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1153
+ _form_params: List[Tuple[str, str]] = []
1154
+ _files: Dict[
1155
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1156
+ ] = {}
1157
+ _body_params: Optional[bytes] = None
1158
+
1159
+ # process the path parameters
1160
+ # process the query parameters
1161
+ # process the header parameters
1162
+ # process the form parameters
1163
+ # process the body parameter
1164
+
1165
+ # set the HTTP header `Accept`
1166
+ if "Accept" not in _header_params:
1167
+ _header_params["Accept"] = self.api_client.select_header_accept(
1168
+ ["application/json"]
1169
+ )
1170
+
1171
+ # authentication setting
1172
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1173
+
1174
+ return self.api_client.param_serialize(
1175
+ method="GET",
1176
+ resource_path="/users/me/preferences",
1177
+ path_params=_path_params,
1178
+ query_params=_query_params,
1179
+ header_params=_header_params,
1180
+ body=_body_params,
1181
+ post_params=_form_params,
1182
+ files=_files,
1183
+ auth_settings=_auth_settings,
1184
+ collection_formats=_collection_formats,
1185
+ _host=_host,
1186
+ _request_auth=_request_auth,
1187
+ )
1188
+
1189
+ @validate_call
1190
+ async def get_my_user(
1191
+ self,
1192
+ _request_timeout: Union[
1193
+ None,
1194
+ Annotated[StrictFloat, Field(gt=0)],
1195
+ Tuple[
1196
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1197
+ ],
1198
+ ] = None,
1199
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1200
+ _content_type: Optional[StrictStr] = None,
1201
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1202
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1203
+ ) -> UserAdminResponseDto:
1204
+ """Get current user
1205
+
1206
+ Retrieve information about the user making the API request.
1207
+
1208
+ :param _request_timeout: timeout setting for this request. If one
1209
+ number provided, it will be total request
1210
+ timeout. It can also be a pair (tuple) of
1211
+ (connection, read) timeouts.
1212
+ :type _request_timeout: int, tuple(int, int), optional
1213
+ :param _request_auth: set to override the auth_settings for an a single
1214
+ request; this effectively ignores the
1215
+ authentication in the spec for a single request.
1216
+ :type _request_auth: dict, optional
1217
+ :param _content_type: force content-type for the request.
1218
+ :type _content_type: str, Optional
1219
+ :param _headers: set to override the headers for a single
1220
+ request; this effectively ignores the headers
1221
+ in the spec for a single request.
1222
+ :type _headers: dict, optional
1223
+ :param _host_index: set to override the host_index for a single
1224
+ request; this effectively ignores the host_index
1225
+ in the spec for a single request.
1226
+ :type _host_index: int, optional
1227
+ :return: Returns the result object.
1228
+ """ # noqa: E501
1229
+
1230
+ _param = self._get_my_user_serialize(
1231
+ _request_auth=_request_auth,
1232
+ _content_type=_content_type,
1233
+ _headers=_headers,
1234
+ _host_index=_host_index,
1235
+ )
1236
+
1237
+ _response_types_map: Dict[str, Optional[str]] = {
1238
+ "200": "UserAdminResponseDto",
1239
+ }
1240
+ response_data = await self.api_client.call_api(
1241
+ *_param, _request_timeout=_request_timeout
1242
+ )
1243
+ await response_data.read()
1244
+ return self.api_client.response_deserialize(
1245
+ response_data=response_data,
1246
+ response_types_map=_response_types_map,
1247
+ ).data
1248
+
1249
+ @validate_call
1250
+ async def get_my_user_with_http_info(
1251
+ self,
1252
+ _request_timeout: Union[
1253
+ None,
1254
+ Annotated[StrictFloat, Field(gt=0)],
1255
+ Tuple[
1256
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1257
+ ],
1258
+ ] = None,
1259
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1260
+ _content_type: Optional[StrictStr] = None,
1261
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1262
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1263
+ ) -> ApiResponse[UserAdminResponseDto]:
1264
+ """Get current user
1265
+
1266
+ Retrieve information about the user making the API request.
1267
+
1268
+ :param _request_timeout: timeout setting for this request. If one
1269
+ number provided, it will be total request
1270
+ timeout. It can also be a pair (tuple) of
1271
+ (connection, read) timeouts.
1272
+ :type _request_timeout: int, tuple(int, int), optional
1273
+ :param _request_auth: set to override the auth_settings for an a single
1274
+ request; this effectively ignores the
1275
+ authentication in the spec for a single request.
1276
+ :type _request_auth: dict, optional
1277
+ :param _content_type: force content-type for the request.
1278
+ :type _content_type: str, Optional
1279
+ :param _headers: set to override the headers for a single
1280
+ request; this effectively ignores the headers
1281
+ in the spec for a single request.
1282
+ :type _headers: dict, optional
1283
+ :param _host_index: set to override the host_index for a single
1284
+ request; this effectively ignores the host_index
1285
+ in the spec for a single request.
1286
+ :type _host_index: int, optional
1287
+ :return: Returns the result object.
1288
+ """ # noqa: E501
1289
+
1290
+ _param = self._get_my_user_serialize(
1291
+ _request_auth=_request_auth,
1292
+ _content_type=_content_type,
1293
+ _headers=_headers,
1294
+ _host_index=_host_index,
1295
+ )
1296
+
1297
+ _response_types_map: Dict[str, Optional[str]] = {
1298
+ "200": "UserAdminResponseDto",
1299
+ }
1300
+ response_data = await self.api_client.call_api(
1301
+ *_param, _request_timeout=_request_timeout
1302
+ )
1303
+ await response_data.read()
1304
+ return self.api_client.response_deserialize(
1305
+ response_data=response_data,
1306
+ response_types_map=_response_types_map,
1307
+ )
1308
+
1309
+ @validate_call
1310
+ async def get_my_user_without_preload_content(
1311
+ self,
1312
+ _request_timeout: Union[
1313
+ None,
1314
+ Annotated[StrictFloat, Field(gt=0)],
1315
+ Tuple[
1316
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1317
+ ],
1318
+ ] = None,
1319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1320
+ _content_type: Optional[StrictStr] = None,
1321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1323
+ ) -> RESTResponseType:
1324
+ """Get current user
1325
+
1326
+ Retrieve information about the user making the API request.
1327
+
1328
+ :param _request_timeout: timeout setting for this request. If one
1329
+ number provided, it will be total request
1330
+ timeout. It can also be a pair (tuple) of
1331
+ (connection, read) timeouts.
1332
+ :type _request_timeout: int, tuple(int, int), optional
1333
+ :param _request_auth: set to override the auth_settings for an a single
1334
+ request; this effectively ignores the
1335
+ authentication in the spec for a single request.
1336
+ :type _request_auth: dict, optional
1337
+ :param _content_type: force content-type for the request.
1338
+ :type _content_type: str, Optional
1339
+ :param _headers: set to override the headers for a single
1340
+ request; this effectively ignores the headers
1341
+ in the spec for a single request.
1342
+ :type _headers: dict, optional
1343
+ :param _host_index: set to override the host_index for a single
1344
+ request; this effectively ignores the host_index
1345
+ in the spec for a single request.
1346
+ :type _host_index: int, optional
1347
+ :return: Returns the result object.
1348
+ """ # noqa: E501
1349
+
1350
+ _param = self._get_my_user_serialize(
1351
+ _request_auth=_request_auth,
1352
+ _content_type=_content_type,
1353
+ _headers=_headers,
1354
+ _host_index=_host_index,
1355
+ )
1356
+
1357
+ _response_types_map: Dict[str, Optional[str]] = {
1358
+ "200": "UserAdminResponseDto",
1359
+ }
1360
+ response_data = await self.api_client.call_api(
1361
+ *_param, _request_timeout=_request_timeout
1362
+ )
1363
+ return response_data.response
1364
+
1365
+ def _get_my_user_serialize(
1366
+ self,
1367
+ _request_auth,
1368
+ _content_type,
1369
+ _headers,
1370
+ _host_index,
1371
+ ) -> RequestSerialized:
1372
+ _host = None
1373
+
1374
+ _collection_formats: Dict[str, str] = {}
1375
+
1376
+ _path_params: Dict[str, str] = {}
1377
+ _query_params: List[Tuple[str, str]] = []
1378
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1379
+ _form_params: List[Tuple[str, str]] = []
1380
+ _files: Dict[
1381
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1382
+ ] = {}
1383
+ _body_params: Optional[bytes] = None
1384
+
1385
+ # process the path parameters
1386
+ # process the query parameters
1387
+ # process the header parameters
1388
+ # process the form parameters
1389
+ # process the body parameter
1390
+
1391
+ # set the HTTP header `Accept`
1392
+ if "Accept" not in _header_params:
1393
+ _header_params["Accept"] = self.api_client.select_header_accept(
1394
+ ["application/json"]
1395
+ )
1396
+
1397
+ # authentication setting
1398
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1399
+
1400
+ return self.api_client.param_serialize(
1401
+ method="GET",
1402
+ resource_path="/users/me",
1403
+ path_params=_path_params,
1404
+ query_params=_query_params,
1405
+ header_params=_header_params,
1406
+ body=_body_params,
1407
+ post_params=_form_params,
1408
+ files=_files,
1409
+ auth_settings=_auth_settings,
1410
+ collection_formats=_collection_formats,
1411
+ _host=_host,
1412
+ _request_auth=_request_auth,
1413
+ )
1414
+
1415
+ @validate_call
1416
+ async def get_profile_image(
1417
+ self,
1418
+ id: UUID,
1419
+ _request_timeout: Union[
1420
+ None,
1421
+ Annotated[StrictFloat, Field(gt=0)],
1422
+ Tuple[
1423
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1424
+ ],
1425
+ ] = None,
1426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1427
+ _content_type: Optional[StrictStr] = None,
1428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1430
+ ) -> bytearray:
1431
+ """Retrieve user profile image
1432
+
1433
+ Retrieve the profile image file for a user.
1434
+
1435
+ :param id: (required)
1436
+ :type id: UUID
1437
+ :param _request_timeout: timeout setting for this request. If one
1438
+ number provided, it will be total request
1439
+ timeout. It can also be a pair (tuple) of
1440
+ (connection, read) timeouts.
1441
+ :type _request_timeout: int, tuple(int, int), optional
1442
+ :param _request_auth: set to override the auth_settings for an a single
1443
+ request; this effectively ignores the
1444
+ authentication in the spec for a single request.
1445
+ :type _request_auth: dict, optional
1446
+ :param _content_type: force content-type for the request.
1447
+ :type _content_type: str, Optional
1448
+ :param _headers: set to override the headers for a single
1449
+ request; this effectively ignores the headers
1450
+ in the spec for a single request.
1451
+ :type _headers: dict, optional
1452
+ :param _host_index: set to override the host_index for a single
1453
+ request; this effectively ignores the host_index
1454
+ in the spec for a single request.
1455
+ :type _host_index: int, optional
1456
+ :return: Returns the result object.
1457
+ """ # noqa: E501
1458
+
1459
+ _param = self._get_profile_image_serialize(
1460
+ id=id,
1461
+ _request_auth=_request_auth,
1462
+ _content_type=_content_type,
1463
+ _headers=_headers,
1464
+ _host_index=_host_index,
1465
+ )
1466
+
1467
+ _response_types_map: Dict[str, Optional[str]] = {
1468
+ "200": "bytearray",
1469
+ }
1470
+ response_data = await self.api_client.call_api(
1471
+ *_param, _request_timeout=_request_timeout
1472
+ )
1473
+ await response_data.read()
1474
+ return self.api_client.response_deserialize(
1475
+ response_data=response_data,
1476
+ response_types_map=_response_types_map,
1477
+ ).data
1478
+
1479
+ @validate_call
1480
+ async def get_profile_image_with_http_info(
1481
+ self,
1482
+ id: UUID,
1483
+ _request_timeout: Union[
1484
+ None,
1485
+ Annotated[StrictFloat, Field(gt=0)],
1486
+ Tuple[
1487
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1488
+ ],
1489
+ ] = None,
1490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1491
+ _content_type: Optional[StrictStr] = None,
1492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1494
+ ) -> ApiResponse[bytearray]:
1495
+ """Retrieve user profile image
1496
+
1497
+ Retrieve the profile image file for a user.
1498
+
1499
+ :param id: (required)
1500
+ :type id: UUID
1501
+ :param _request_timeout: timeout setting for this request. If one
1502
+ number provided, it will be total request
1503
+ timeout. It can also be a pair (tuple) of
1504
+ (connection, read) timeouts.
1505
+ :type _request_timeout: int, tuple(int, int), optional
1506
+ :param _request_auth: set to override the auth_settings for an a single
1507
+ request; this effectively ignores the
1508
+ authentication in the spec for a single request.
1509
+ :type _request_auth: dict, optional
1510
+ :param _content_type: force content-type for the request.
1511
+ :type _content_type: str, Optional
1512
+ :param _headers: set to override the headers for a single
1513
+ request; this effectively ignores the headers
1514
+ in the spec for a single request.
1515
+ :type _headers: dict, optional
1516
+ :param _host_index: set to override the host_index for a single
1517
+ request; this effectively ignores the host_index
1518
+ in the spec for a single request.
1519
+ :type _host_index: int, optional
1520
+ :return: Returns the result object.
1521
+ """ # noqa: E501
1522
+
1523
+ _param = self._get_profile_image_serialize(
1524
+ id=id,
1525
+ _request_auth=_request_auth,
1526
+ _content_type=_content_type,
1527
+ _headers=_headers,
1528
+ _host_index=_host_index,
1529
+ )
1530
+
1531
+ _response_types_map: Dict[str, Optional[str]] = {
1532
+ "200": "bytearray",
1533
+ }
1534
+ response_data = await self.api_client.call_api(
1535
+ *_param, _request_timeout=_request_timeout
1536
+ )
1537
+ await response_data.read()
1538
+ return self.api_client.response_deserialize(
1539
+ response_data=response_data,
1540
+ response_types_map=_response_types_map,
1541
+ )
1542
+
1543
+ @validate_call
1544
+ async def get_profile_image_without_preload_content(
1545
+ self,
1546
+ id: UUID,
1547
+ _request_timeout: Union[
1548
+ None,
1549
+ Annotated[StrictFloat, Field(gt=0)],
1550
+ Tuple[
1551
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1552
+ ],
1553
+ ] = None,
1554
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1555
+ _content_type: Optional[StrictStr] = None,
1556
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1557
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1558
+ ) -> RESTResponseType:
1559
+ """Retrieve user profile image
1560
+
1561
+ Retrieve the profile image file for a user.
1562
+
1563
+ :param id: (required)
1564
+ :type id: UUID
1565
+ :param _request_timeout: timeout setting for this request. If one
1566
+ number provided, it will be total request
1567
+ timeout. It can also be a pair (tuple) of
1568
+ (connection, read) timeouts.
1569
+ :type _request_timeout: int, tuple(int, int), optional
1570
+ :param _request_auth: set to override the auth_settings for an a single
1571
+ request; this effectively ignores the
1572
+ authentication in the spec for a single request.
1573
+ :type _request_auth: dict, optional
1574
+ :param _content_type: force content-type for the request.
1575
+ :type _content_type: str, Optional
1576
+ :param _headers: set to override the headers for a single
1577
+ request; this effectively ignores the headers
1578
+ in the spec for a single request.
1579
+ :type _headers: dict, optional
1580
+ :param _host_index: set to override the host_index for a single
1581
+ request; this effectively ignores the host_index
1582
+ in the spec for a single request.
1583
+ :type _host_index: int, optional
1584
+ :return: Returns the result object.
1585
+ """ # noqa: E501
1586
+
1587
+ _param = self._get_profile_image_serialize(
1588
+ id=id,
1589
+ _request_auth=_request_auth,
1590
+ _content_type=_content_type,
1591
+ _headers=_headers,
1592
+ _host_index=_host_index,
1593
+ )
1594
+
1595
+ _response_types_map: Dict[str, Optional[str]] = {
1596
+ "200": "bytearray",
1597
+ }
1598
+ response_data = await self.api_client.call_api(
1599
+ *_param, _request_timeout=_request_timeout
1600
+ )
1601
+ return response_data.response
1602
+
1603
+ def _get_profile_image_serialize(
1604
+ self,
1605
+ id,
1606
+ _request_auth,
1607
+ _content_type,
1608
+ _headers,
1609
+ _host_index,
1610
+ ) -> RequestSerialized:
1611
+ _host = None
1612
+
1613
+ _collection_formats: Dict[str, str] = {}
1614
+
1615
+ _path_params: Dict[str, str] = {}
1616
+ _query_params: List[Tuple[str, str]] = []
1617
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1618
+ _form_params: List[Tuple[str, str]] = []
1619
+ _files: Dict[
1620
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1621
+ ] = {}
1622
+ _body_params: Optional[bytes] = None
1623
+
1624
+ # process the path parameters
1625
+ if id is not None:
1626
+ _path_params["id"] = id
1627
+ # process the query parameters
1628
+ # process the header parameters
1629
+ # process the form parameters
1630
+ # process the body parameter
1631
+
1632
+ # set the HTTP header `Accept`
1633
+ if "Accept" not in _header_params:
1634
+ _header_params["Accept"] = self.api_client.select_header_accept(
1635
+ ["application/octet-stream"]
1636
+ )
1637
+
1638
+ # authentication setting
1639
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1640
+
1641
+ return self.api_client.param_serialize(
1642
+ method="GET",
1643
+ resource_path="/users/{id}/profile-image",
1644
+ path_params=_path_params,
1645
+ query_params=_query_params,
1646
+ header_params=_header_params,
1647
+ body=_body_params,
1648
+ post_params=_form_params,
1649
+ files=_files,
1650
+ auth_settings=_auth_settings,
1651
+ collection_formats=_collection_formats,
1652
+ _host=_host,
1653
+ _request_auth=_request_auth,
1654
+ )
1655
+
1656
+ @validate_call
1657
+ async def get_user(
1658
+ self,
1659
+ id: UUID,
1660
+ _request_timeout: Union[
1661
+ None,
1662
+ Annotated[StrictFloat, Field(gt=0)],
1663
+ Tuple[
1664
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1665
+ ],
1666
+ ] = None,
1667
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1668
+ _content_type: Optional[StrictStr] = None,
1669
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1670
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1671
+ ) -> UserResponseDto:
1672
+ """Retrieve a user
1673
+
1674
+ Retrieve a specific user by their ID.
1675
+
1676
+ :param id: (required)
1677
+ :type id: UUID
1678
+ :param _request_timeout: timeout setting for this request. If one
1679
+ number provided, it will be total request
1680
+ timeout. It can also be a pair (tuple) of
1681
+ (connection, read) timeouts.
1682
+ :type _request_timeout: int, tuple(int, int), optional
1683
+ :param _request_auth: set to override the auth_settings for an a single
1684
+ request; this effectively ignores the
1685
+ authentication in the spec for a single request.
1686
+ :type _request_auth: dict, optional
1687
+ :param _content_type: force content-type for the request.
1688
+ :type _content_type: str, Optional
1689
+ :param _headers: set to override the headers for a single
1690
+ request; this effectively ignores the headers
1691
+ in the spec for a single request.
1692
+ :type _headers: dict, optional
1693
+ :param _host_index: set to override the host_index for a single
1694
+ request; this effectively ignores the host_index
1695
+ in the spec for a single request.
1696
+ :type _host_index: int, optional
1697
+ :return: Returns the result object.
1698
+ """ # noqa: E501
1699
+
1700
+ _param = self._get_user_serialize(
1701
+ id=id,
1702
+ _request_auth=_request_auth,
1703
+ _content_type=_content_type,
1704
+ _headers=_headers,
1705
+ _host_index=_host_index,
1706
+ )
1707
+
1708
+ _response_types_map: Dict[str, Optional[str]] = {
1709
+ "200": "UserResponseDto",
1710
+ }
1711
+ response_data = await self.api_client.call_api(
1712
+ *_param, _request_timeout=_request_timeout
1713
+ )
1714
+ await response_data.read()
1715
+ return self.api_client.response_deserialize(
1716
+ response_data=response_data,
1717
+ response_types_map=_response_types_map,
1718
+ ).data
1719
+
1720
+ @validate_call
1721
+ async def get_user_with_http_info(
1722
+ self,
1723
+ id: UUID,
1724
+ _request_timeout: Union[
1725
+ None,
1726
+ Annotated[StrictFloat, Field(gt=0)],
1727
+ Tuple[
1728
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1729
+ ],
1730
+ ] = None,
1731
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1732
+ _content_type: Optional[StrictStr] = None,
1733
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1734
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1735
+ ) -> ApiResponse[UserResponseDto]:
1736
+ """Retrieve a user
1737
+
1738
+ Retrieve a specific user by their ID.
1739
+
1740
+ :param id: (required)
1741
+ :type id: UUID
1742
+ :param _request_timeout: timeout setting for this request. If one
1743
+ number provided, it will be total request
1744
+ timeout. It can also be a pair (tuple) of
1745
+ (connection, read) timeouts.
1746
+ :type _request_timeout: int, tuple(int, int), optional
1747
+ :param _request_auth: set to override the auth_settings for an a single
1748
+ request; this effectively ignores the
1749
+ authentication in the spec for a single request.
1750
+ :type _request_auth: dict, optional
1751
+ :param _content_type: force content-type for the request.
1752
+ :type _content_type: str, Optional
1753
+ :param _headers: set to override the headers for a single
1754
+ request; this effectively ignores the headers
1755
+ in the spec for a single request.
1756
+ :type _headers: dict, optional
1757
+ :param _host_index: set to override the host_index for a single
1758
+ request; this effectively ignores the host_index
1759
+ in the spec for a single request.
1760
+ :type _host_index: int, optional
1761
+ :return: Returns the result object.
1762
+ """ # noqa: E501
1763
+
1764
+ _param = self._get_user_serialize(
1765
+ id=id,
1766
+ _request_auth=_request_auth,
1767
+ _content_type=_content_type,
1768
+ _headers=_headers,
1769
+ _host_index=_host_index,
1770
+ )
1771
+
1772
+ _response_types_map: Dict[str, Optional[str]] = {
1773
+ "200": "UserResponseDto",
1774
+ }
1775
+ response_data = await self.api_client.call_api(
1776
+ *_param, _request_timeout=_request_timeout
1777
+ )
1778
+ await response_data.read()
1779
+ return self.api_client.response_deserialize(
1780
+ response_data=response_data,
1781
+ response_types_map=_response_types_map,
1782
+ )
1783
+
1784
+ @validate_call
1785
+ async def get_user_without_preload_content(
1786
+ self,
1787
+ id: UUID,
1788
+ _request_timeout: Union[
1789
+ None,
1790
+ Annotated[StrictFloat, Field(gt=0)],
1791
+ Tuple[
1792
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1793
+ ],
1794
+ ] = None,
1795
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1796
+ _content_type: Optional[StrictStr] = None,
1797
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1798
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1799
+ ) -> RESTResponseType:
1800
+ """Retrieve a user
1801
+
1802
+ Retrieve a specific user by their ID.
1803
+
1804
+ :param id: (required)
1805
+ :type id: UUID
1806
+ :param _request_timeout: timeout setting for this request. If one
1807
+ number provided, it will be total request
1808
+ timeout. It can also be a pair (tuple) of
1809
+ (connection, read) timeouts.
1810
+ :type _request_timeout: int, tuple(int, int), optional
1811
+ :param _request_auth: set to override the auth_settings for an a single
1812
+ request; this effectively ignores the
1813
+ authentication in the spec for a single request.
1814
+ :type _request_auth: dict, optional
1815
+ :param _content_type: force content-type for the request.
1816
+ :type _content_type: str, Optional
1817
+ :param _headers: set to override the headers for a single
1818
+ request; this effectively ignores the headers
1819
+ in the spec for a single request.
1820
+ :type _headers: dict, optional
1821
+ :param _host_index: set to override the host_index for a single
1822
+ request; this effectively ignores the host_index
1823
+ in the spec for a single request.
1824
+ :type _host_index: int, optional
1825
+ :return: Returns the result object.
1826
+ """ # noqa: E501
1827
+
1828
+ _param = self._get_user_serialize(
1829
+ id=id,
1830
+ _request_auth=_request_auth,
1831
+ _content_type=_content_type,
1832
+ _headers=_headers,
1833
+ _host_index=_host_index,
1834
+ )
1835
+
1836
+ _response_types_map: Dict[str, Optional[str]] = {
1837
+ "200": "UserResponseDto",
1838
+ }
1839
+ response_data = await self.api_client.call_api(
1840
+ *_param, _request_timeout=_request_timeout
1841
+ )
1842
+ return response_data.response
1843
+
1844
+ def _get_user_serialize(
1845
+ self,
1846
+ id,
1847
+ _request_auth,
1848
+ _content_type,
1849
+ _headers,
1850
+ _host_index,
1851
+ ) -> RequestSerialized:
1852
+ _host = None
1853
+
1854
+ _collection_formats: Dict[str, str] = {}
1855
+
1856
+ _path_params: Dict[str, str] = {}
1857
+ _query_params: List[Tuple[str, str]] = []
1858
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1859
+ _form_params: List[Tuple[str, str]] = []
1860
+ _files: Dict[
1861
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1862
+ ] = {}
1863
+ _body_params: Optional[bytes] = None
1864
+
1865
+ # process the path parameters
1866
+ if id is not None:
1867
+ _path_params["id"] = id
1868
+ # process the query parameters
1869
+ # process the header parameters
1870
+ # process the form parameters
1871
+ # process the body parameter
1872
+
1873
+ # set the HTTP header `Accept`
1874
+ if "Accept" not in _header_params:
1875
+ _header_params["Accept"] = self.api_client.select_header_accept(
1876
+ ["application/json"]
1877
+ )
1878
+
1879
+ # authentication setting
1880
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1881
+
1882
+ return self.api_client.param_serialize(
1883
+ method="GET",
1884
+ resource_path="/users/{id}",
1885
+ path_params=_path_params,
1886
+ query_params=_query_params,
1887
+ header_params=_header_params,
1888
+ body=_body_params,
1889
+ post_params=_form_params,
1890
+ files=_files,
1891
+ auth_settings=_auth_settings,
1892
+ collection_formats=_collection_formats,
1893
+ _host=_host,
1894
+ _request_auth=_request_auth,
1895
+ )
1896
+
1897
+ @validate_call
1898
+ async def get_user_license(
1899
+ self,
1900
+ _request_timeout: Union[
1901
+ None,
1902
+ Annotated[StrictFloat, Field(gt=0)],
1903
+ Tuple[
1904
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1905
+ ],
1906
+ ] = None,
1907
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1908
+ _content_type: Optional[StrictStr] = None,
1909
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1910
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1911
+ ) -> LicenseResponseDto:
1912
+ """Retrieve user product key
1913
+
1914
+ Retrieve information about whether the current user has a registered product key.
1915
+
1916
+ :param _request_timeout: timeout setting for this request. If one
1917
+ number provided, it will be total request
1918
+ timeout. It can also be a pair (tuple) of
1919
+ (connection, read) timeouts.
1920
+ :type _request_timeout: int, tuple(int, int), optional
1921
+ :param _request_auth: set to override the auth_settings for an a single
1922
+ request; this effectively ignores the
1923
+ authentication in the spec for a single request.
1924
+ :type _request_auth: dict, optional
1925
+ :param _content_type: force content-type for the request.
1926
+ :type _content_type: str, Optional
1927
+ :param _headers: set to override the headers for a single
1928
+ request; this effectively ignores the headers
1929
+ in the spec for a single request.
1930
+ :type _headers: dict, optional
1931
+ :param _host_index: set to override the host_index for a single
1932
+ request; this effectively ignores the host_index
1933
+ in the spec for a single request.
1934
+ :type _host_index: int, optional
1935
+ :return: Returns the result object.
1936
+ """ # noqa: E501
1937
+
1938
+ _param = self._get_user_license_serialize(
1939
+ _request_auth=_request_auth,
1940
+ _content_type=_content_type,
1941
+ _headers=_headers,
1942
+ _host_index=_host_index,
1943
+ )
1944
+
1945
+ _response_types_map: Dict[str, Optional[str]] = {
1946
+ "200": "LicenseResponseDto",
1947
+ }
1948
+ response_data = await self.api_client.call_api(
1949
+ *_param, _request_timeout=_request_timeout
1950
+ )
1951
+ await response_data.read()
1952
+ return self.api_client.response_deserialize(
1953
+ response_data=response_data,
1954
+ response_types_map=_response_types_map,
1955
+ ).data
1956
+
1957
+ @validate_call
1958
+ async def get_user_license_with_http_info(
1959
+ self,
1960
+ _request_timeout: Union[
1961
+ None,
1962
+ Annotated[StrictFloat, Field(gt=0)],
1963
+ Tuple[
1964
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1965
+ ],
1966
+ ] = None,
1967
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1968
+ _content_type: Optional[StrictStr] = None,
1969
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1970
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1971
+ ) -> ApiResponse[LicenseResponseDto]:
1972
+ """Retrieve user product key
1973
+
1974
+ Retrieve information about whether the current user has a registered product key.
1975
+
1976
+ :param _request_timeout: timeout setting for this request. If one
1977
+ number provided, it will be total request
1978
+ timeout. It can also be a pair (tuple) of
1979
+ (connection, read) timeouts.
1980
+ :type _request_timeout: int, tuple(int, int), optional
1981
+ :param _request_auth: set to override the auth_settings for an a single
1982
+ request; this effectively ignores the
1983
+ authentication in the spec for a single request.
1984
+ :type _request_auth: dict, optional
1985
+ :param _content_type: force content-type for the request.
1986
+ :type _content_type: str, Optional
1987
+ :param _headers: set to override the headers for a single
1988
+ request; this effectively ignores the headers
1989
+ in the spec for a single request.
1990
+ :type _headers: dict, optional
1991
+ :param _host_index: set to override the host_index for a single
1992
+ request; this effectively ignores the host_index
1993
+ in the spec for a single request.
1994
+ :type _host_index: int, optional
1995
+ :return: Returns the result object.
1996
+ """ # noqa: E501
1997
+
1998
+ _param = self._get_user_license_serialize(
1999
+ _request_auth=_request_auth,
2000
+ _content_type=_content_type,
2001
+ _headers=_headers,
2002
+ _host_index=_host_index,
2003
+ )
2004
+
2005
+ _response_types_map: Dict[str, Optional[str]] = {
2006
+ "200": "LicenseResponseDto",
2007
+ }
2008
+ response_data = await self.api_client.call_api(
2009
+ *_param, _request_timeout=_request_timeout
2010
+ )
2011
+ await response_data.read()
2012
+ return self.api_client.response_deserialize(
2013
+ response_data=response_data,
2014
+ response_types_map=_response_types_map,
2015
+ )
2016
+
2017
+ @validate_call
2018
+ async def get_user_license_without_preload_content(
2019
+ self,
2020
+ _request_timeout: Union[
2021
+ None,
2022
+ Annotated[StrictFloat, Field(gt=0)],
2023
+ Tuple[
2024
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2025
+ ],
2026
+ ] = None,
2027
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2028
+ _content_type: Optional[StrictStr] = None,
2029
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2030
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2031
+ ) -> RESTResponseType:
2032
+ """Retrieve user product key
2033
+
2034
+ Retrieve information about whether the current user has a registered product key.
2035
+
2036
+ :param _request_timeout: timeout setting for this request. If one
2037
+ number provided, it will be total request
2038
+ timeout. It can also be a pair (tuple) of
2039
+ (connection, read) timeouts.
2040
+ :type _request_timeout: int, tuple(int, int), optional
2041
+ :param _request_auth: set to override the auth_settings for an a single
2042
+ request; this effectively ignores the
2043
+ authentication in the spec for a single request.
2044
+ :type _request_auth: dict, optional
2045
+ :param _content_type: force content-type for the request.
2046
+ :type _content_type: str, Optional
2047
+ :param _headers: set to override the headers for a single
2048
+ request; this effectively ignores the headers
2049
+ in the spec for a single request.
2050
+ :type _headers: dict, optional
2051
+ :param _host_index: set to override the host_index for a single
2052
+ request; this effectively ignores the host_index
2053
+ in the spec for a single request.
2054
+ :type _host_index: int, optional
2055
+ :return: Returns the result object.
2056
+ """ # noqa: E501
2057
+
2058
+ _param = self._get_user_license_serialize(
2059
+ _request_auth=_request_auth,
2060
+ _content_type=_content_type,
2061
+ _headers=_headers,
2062
+ _host_index=_host_index,
2063
+ )
2064
+
2065
+ _response_types_map: Dict[str, Optional[str]] = {
2066
+ "200": "LicenseResponseDto",
2067
+ }
2068
+ response_data = await self.api_client.call_api(
2069
+ *_param, _request_timeout=_request_timeout
2070
+ )
2071
+ return response_data.response
2072
+
2073
+ def _get_user_license_serialize(
2074
+ self,
2075
+ _request_auth,
2076
+ _content_type,
2077
+ _headers,
2078
+ _host_index,
2079
+ ) -> RequestSerialized:
2080
+ _host = None
2081
+
2082
+ _collection_formats: Dict[str, str] = {}
2083
+
2084
+ _path_params: Dict[str, str] = {}
2085
+ _query_params: List[Tuple[str, str]] = []
2086
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2087
+ _form_params: List[Tuple[str, str]] = []
2088
+ _files: Dict[
2089
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2090
+ ] = {}
2091
+ _body_params: Optional[bytes] = None
2092
+
2093
+ # process the path parameters
2094
+ # process the query parameters
2095
+ # process the header parameters
2096
+ # process the form parameters
2097
+ # process the body parameter
2098
+
2099
+ # set the HTTP header `Accept`
2100
+ if "Accept" not in _header_params:
2101
+ _header_params["Accept"] = self.api_client.select_header_accept(
2102
+ ["application/json"]
2103
+ )
2104
+
2105
+ # authentication setting
2106
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2107
+
2108
+ return self.api_client.param_serialize(
2109
+ method="GET",
2110
+ resource_path="/users/me/license",
2111
+ path_params=_path_params,
2112
+ query_params=_query_params,
2113
+ header_params=_header_params,
2114
+ body=_body_params,
2115
+ post_params=_form_params,
2116
+ files=_files,
2117
+ auth_settings=_auth_settings,
2118
+ collection_formats=_collection_formats,
2119
+ _host=_host,
2120
+ _request_auth=_request_auth,
2121
+ )
2122
+
2123
+ @validate_call
2124
+ async def get_user_onboarding(
2125
+ self,
2126
+ _request_timeout: Union[
2127
+ None,
2128
+ Annotated[StrictFloat, Field(gt=0)],
2129
+ Tuple[
2130
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2131
+ ],
2132
+ ] = None,
2133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2134
+ _content_type: Optional[StrictStr] = None,
2135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2137
+ ) -> OnboardingResponseDto:
2138
+ """Retrieve user onboarding
2139
+
2140
+ Retrieve the onboarding status of the current user.
2141
+
2142
+ :param _request_timeout: timeout setting for this request. If one
2143
+ number provided, it will be total request
2144
+ timeout. It can also be a pair (tuple) of
2145
+ (connection, read) timeouts.
2146
+ :type _request_timeout: int, tuple(int, int), optional
2147
+ :param _request_auth: set to override the auth_settings for an a single
2148
+ request; this effectively ignores the
2149
+ authentication in the spec for a single request.
2150
+ :type _request_auth: dict, optional
2151
+ :param _content_type: force content-type for the request.
2152
+ :type _content_type: str, Optional
2153
+ :param _headers: set to override the headers for a single
2154
+ request; this effectively ignores the headers
2155
+ in the spec for a single request.
2156
+ :type _headers: dict, optional
2157
+ :param _host_index: set to override the host_index for a single
2158
+ request; this effectively ignores the host_index
2159
+ in the spec for a single request.
2160
+ :type _host_index: int, optional
2161
+ :return: Returns the result object.
2162
+ """ # noqa: E501
2163
+
2164
+ _param = self._get_user_onboarding_serialize(
2165
+ _request_auth=_request_auth,
2166
+ _content_type=_content_type,
2167
+ _headers=_headers,
2168
+ _host_index=_host_index,
2169
+ )
2170
+
2171
+ _response_types_map: Dict[str, Optional[str]] = {
2172
+ "200": "OnboardingResponseDto",
2173
+ }
2174
+ response_data = await self.api_client.call_api(
2175
+ *_param, _request_timeout=_request_timeout
2176
+ )
2177
+ await response_data.read()
2178
+ return self.api_client.response_deserialize(
2179
+ response_data=response_data,
2180
+ response_types_map=_response_types_map,
2181
+ ).data
2182
+
2183
+ @validate_call
2184
+ async def get_user_onboarding_with_http_info(
2185
+ self,
2186
+ _request_timeout: Union[
2187
+ None,
2188
+ Annotated[StrictFloat, Field(gt=0)],
2189
+ Tuple[
2190
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2191
+ ],
2192
+ ] = None,
2193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2194
+ _content_type: Optional[StrictStr] = None,
2195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2197
+ ) -> ApiResponse[OnboardingResponseDto]:
2198
+ """Retrieve user onboarding
2199
+
2200
+ Retrieve the onboarding status of the current user.
2201
+
2202
+ :param _request_timeout: timeout setting for this request. If one
2203
+ number provided, it will be total request
2204
+ timeout. It can also be a pair (tuple) of
2205
+ (connection, read) timeouts.
2206
+ :type _request_timeout: int, tuple(int, int), optional
2207
+ :param _request_auth: set to override the auth_settings for an a single
2208
+ request; this effectively ignores the
2209
+ authentication in the spec for a single request.
2210
+ :type _request_auth: dict, optional
2211
+ :param _content_type: force content-type for the request.
2212
+ :type _content_type: str, Optional
2213
+ :param _headers: set to override the headers for a single
2214
+ request; this effectively ignores the headers
2215
+ in the spec for a single request.
2216
+ :type _headers: dict, optional
2217
+ :param _host_index: set to override the host_index for a single
2218
+ request; this effectively ignores the host_index
2219
+ in the spec for a single request.
2220
+ :type _host_index: int, optional
2221
+ :return: Returns the result object.
2222
+ """ # noqa: E501
2223
+
2224
+ _param = self._get_user_onboarding_serialize(
2225
+ _request_auth=_request_auth,
2226
+ _content_type=_content_type,
2227
+ _headers=_headers,
2228
+ _host_index=_host_index,
2229
+ )
2230
+
2231
+ _response_types_map: Dict[str, Optional[str]] = {
2232
+ "200": "OnboardingResponseDto",
2233
+ }
2234
+ response_data = await self.api_client.call_api(
2235
+ *_param, _request_timeout=_request_timeout
2236
+ )
2237
+ await response_data.read()
2238
+ return self.api_client.response_deserialize(
2239
+ response_data=response_data,
2240
+ response_types_map=_response_types_map,
2241
+ )
2242
+
2243
+ @validate_call
2244
+ async def get_user_onboarding_without_preload_content(
2245
+ self,
2246
+ _request_timeout: Union[
2247
+ None,
2248
+ Annotated[StrictFloat, Field(gt=0)],
2249
+ Tuple[
2250
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2251
+ ],
2252
+ ] = None,
2253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2254
+ _content_type: Optional[StrictStr] = None,
2255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2257
+ ) -> RESTResponseType:
2258
+ """Retrieve user onboarding
2259
+
2260
+ Retrieve the onboarding status of the current user.
2261
+
2262
+ :param _request_timeout: timeout setting for this request. If one
2263
+ number provided, it will be total request
2264
+ timeout. It can also be a pair (tuple) of
2265
+ (connection, read) timeouts.
2266
+ :type _request_timeout: int, tuple(int, int), optional
2267
+ :param _request_auth: set to override the auth_settings for an a single
2268
+ request; this effectively ignores the
2269
+ authentication in the spec for a single request.
2270
+ :type _request_auth: dict, optional
2271
+ :param _content_type: force content-type for the request.
2272
+ :type _content_type: str, Optional
2273
+ :param _headers: set to override the headers for a single
2274
+ request; this effectively ignores the headers
2275
+ in the spec for a single request.
2276
+ :type _headers: dict, optional
2277
+ :param _host_index: set to override the host_index for a single
2278
+ request; this effectively ignores the host_index
2279
+ in the spec for a single request.
2280
+ :type _host_index: int, optional
2281
+ :return: Returns the result object.
2282
+ """ # noqa: E501
2283
+
2284
+ _param = self._get_user_onboarding_serialize(
2285
+ _request_auth=_request_auth,
2286
+ _content_type=_content_type,
2287
+ _headers=_headers,
2288
+ _host_index=_host_index,
2289
+ )
2290
+
2291
+ _response_types_map: Dict[str, Optional[str]] = {
2292
+ "200": "OnboardingResponseDto",
2293
+ }
2294
+ response_data = await self.api_client.call_api(
2295
+ *_param, _request_timeout=_request_timeout
2296
+ )
2297
+ return response_data.response
2298
+
2299
+ def _get_user_onboarding_serialize(
2300
+ self,
2301
+ _request_auth,
2302
+ _content_type,
2303
+ _headers,
2304
+ _host_index,
2305
+ ) -> RequestSerialized:
2306
+ _host = None
2307
+
2308
+ _collection_formats: Dict[str, str] = {}
2309
+
2310
+ _path_params: Dict[str, str] = {}
2311
+ _query_params: List[Tuple[str, str]] = []
2312
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2313
+ _form_params: List[Tuple[str, str]] = []
2314
+ _files: Dict[
2315
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2316
+ ] = {}
2317
+ _body_params: Optional[bytes] = None
2318
+
2319
+ # process the path parameters
2320
+ # process the query parameters
2321
+ # process the header parameters
2322
+ # process the form parameters
2323
+ # process the body parameter
2324
+
2325
+ # set the HTTP header `Accept`
2326
+ if "Accept" not in _header_params:
2327
+ _header_params["Accept"] = self.api_client.select_header_accept(
2328
+ ["application/json"]
2329
+ )
2330
+
2331
+ # authentication setting
2332
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2333
+
2334
+ return self.api_client.param_serialize(
2335
+ method="GET",
2336
+ resource_path="/users/me/onboarding",
2337
+ path_params=_path_params,
2338
+ query_params=_query_params,
2339
+ header_params=_header_params,
2340
+ body=_body_params,
2341
+ post_params=_form_params,
2342
+ files=_files,
2343
+ auth_settings=_auth_settings,
2344
+ collection_formats=_collection_formats,
2345
+ _host=_host,
2346
+ _request_auth=_request_auth,
2347
+ )
2348
+
2349
+ @validate_call
2350
+ async def search_users(
2351
+ self,
2352
+ _request_timeout: Union[
2353
+ None,
2354
+ Annotated[StrictFloat, Field(gt=0)],
2355
+ Tuple[
2356
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2357
+ ],
2358
+ ] = None,
2359
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2360
+ _content_type: Optional[StrictStr] = None,
2361
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2362
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2363
+ ) -> List[UserResponseDto]:
2364
+ """Get all users
2365
+
2366
+ Retrieve a list of all users on the server.
2367
+
2368
+ :param _request_timeout: timeout setting for this request. If one
2369
+ number provided, it will be total request
2370
+ timeout. It can also be a pair (tuple) of
2371
+ (connection, read) timeouts.
2372
+ :type _request_timeout: int, tuple(int, int), optional
2373
+ :param _request_auth: set to override the auth_settings for an a single
2374
+ request; this effectively ignores the
2375
+ authentication in the spec for a single request.
2376
+ :type _request_auth: dict, optional
2377
+ :param _content_type: force content-type for the request.
2378
+ :type _content_type: str, Optional
2379
+ :param _headers: set to override the headers for a single
2380
+ request; this effectively ignores the headers
2381
+ in the spec for a single request.
2382
+ :type _headers: dict, optional
2383
+ :param _host_index: set to override the host_index for a single
2384
+ request; this effectively ignores the host_index
2385
+ in the spec for a single request.
2386
+ :type _host_index: int, optional
2387
+ :return: Returns the result object.
2388
+ """ # noqa: E501
2389
+
2390
+ _param = self._search_users_serialize(
2391
+ _request_auth=_request_auth,
2392
+ _content_type=_content_type,
2393
+ _headers=_headers,
2394
+ _host_index=_host_index,
2395
+ )
2396
+
2397
+ _response_types_map: Dict[str, Optional[str]] = {
2398
+ "200": "List[UserResponseDto]",
2399
+ }
2400
+ response_data = await self.api_client.call_api(
2401
+ *_param, _request_timeout=_request_timeout
2402
+ )
2403
+ await response_data.read()
2404
+ return self.api_client.response_deserialize(
2405
+ response_data=response_data,
2406
+ response_types_map=_response_types_map,
2407
+ ).data
2408
+
2409
+ @validate_call
2410
+ async def search_users_with_http_info(
2411
+ self,
2412
+ _request_timeout: Union[
2413
+ None,
2414
+ Annotated[StrictFloat, Field(gt=0)],
2415
+ Tuple[
2416
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2417
+ ],
2418
+ ] = None,
2419
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2420
+ _content_type: Optional[StrictStr] = None,
2421
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2422
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2423
+ ) -> ApiResponse[List[UserResponseDto]]:
2424
+ """Get all users
2425
+
2426
+ Retrieve a list of all users on the server.
2427
+
2428
+ :param _request_timeout: timeout setting for this request. If one
2429
+ number provided, it will be total request
2430
+ timeout. It can also be a pair (tuple) of
2431
+ (connection, read) timeouts.
2432
+ :type _request_timeout: int, tuple(int, int), optional
2433
+ :param _request_auth: set to override the auth_settings for an a single
2434
+ request; this effectively ignores the
2435
+ authentication in the spec for a single request.
2436
+ :type _request_auth: dict, optional
2437
+ :param _content_type: force content-type for the request.
2438
+ :type _content_type: str, Optional
2439
+ :param _headers: set to override the headers for a single
2440
+ request; this effectively ignores the headers
2441
+ in the spec for a single request.
2442
+ :type _headers: dict, optional
2443
+ :param _host_index: set to override the host_index for a single
2444
+ request; this effectively ignores the host_index
2445
+ in the spec for a single request.
2446
+ :type _host_index: int, optional
2447
+ :return: Returns the result object.
2448
+ """ # noqa: E501
2449
+
2450
+ _param = self._search_users_serialize(
2451
+ _request_auth=_request_auth,
2452
+ _content_type=_content_type,
2453
+ _headers=_headers,
2454
+ _host_index=_host_index,
2455
+ )
2456
+
2457
+ _response_types_map: Dict[str, Optional[str]] = {
2458
+ "200": "List[UserResponseDto]",
2459
+ }
2460
+ response_data = await self.api_client.call_api(
2461
+ *_param, _request_timeout=_request_timeout
2462
+ )
2463
+ await response_data.read()
2464
+ return self.api_client.response_deserialize(
2465
+ response_data=response_data,
2466
+ response_types_map=_response_types_map,
2467
+ )
2468
+
2469
+ @validate_call
2470
+ async def search_users_without_preload_content(
2471
+ self,
2472
+ _request_timeout: Union[
2473
+ None,
2474
+ Annotated[StrictFloat, Field(gt=0)],
2475
+ Tuple[
2476
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2477
+ ],
2478
+ ] = None,
2479
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2480
+ _content_type: Optional[StrictStr] = None,
2481
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2482
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2483
+ ) -> RESTResponseType:
2484
+ """Get all users
2485
+
2486
+ Retrieve a list of all users on the server.
2487
+
2488
+ :param _request_timeout: timeout setting for this request. If one
2489
+ number provided, it will be total request
2490
+ timeout. It can also be a pair (tuple) of
2491
+ (connection, read) timeouts.
2492
+ :type _request_timeout: int, tuple(int, int), optional
2493
+ :param _request_auth: set to override the auth_settings for an a single
2494
+ request; this effectively ignores the
2495
+ authentication in the spec for a single request.
2496
+ :type _request_auth: dict, optional
2497
+ :param _content_type: force content-type for the request.
2498
+ :type _content_type: str, Optional
2499
+ :param _headers: set to override the headers for a single
2500
+ request; this effectively ignores the headers
2501
+ in the spec for a single request.
2502
+ :type _headers: dict, optional
2503
+ :param _host_index: set to override the host_index for a single
2504
+ request; this effectively ignores the host_index
2505
+ in the spec for a single request.
2506
+ :type _host_index: int, optional
2507
+ :return: Returns the result object.
2508
+ """ # noqa: E501
2509
+
2510
+ _param = self._search_users_serialize(
2511
+ _request_auth=_request_auth,
2512
+ _content_type=_content_type,
2513
+ _headers=_headers,
2514
+ _host_index=_host_index,
2515
+ )
2516
+
2517
+ _response_types_map: Dict[str, Optional[str]] = {
2518
+ "200": "List[UserResponseDto]",
2519
+ }
2520
+ response_data = await self.api_client.call_api(
2521
+ *_param, _request_timeout=_request_timeout
2522
+ )
2523
+ return response_data.response
2524
+
2525
+ def _search_users_serialize(
2526
+ self,
2527
+ _request_auth,
2528
+ _content_type,
2529
+ _headers,
2530
+ _host_index,
2531
+ ) -> RequestSerialized:
2532
+ _host = None
2533
+
2534
+ _collection_formats: Dict[str, str] = {}
2535
+
2536
+ _path_params: Dict[str, str] = {}
2537
+ _query_params: List[Tuple[str, str]] = []
2538
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2539
+ _form_params: List[Tuple[str, str]] = []
2540
+ _files: Dict[
2541
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2542
+ ] = {}
2543
+ _body_params: Optional[bytes] = None
2544
+
2545
+ # process the path parameters
2546
+ # process the query parameters
2547
+ # process the header parameters
2548
+ # process the form parameters
2549
+ # process the body parameter
2550
+
2551
+ # set the HTTP header `Accept`
2552
+ if "Accept" not in _header_params:
2553
+ _header_params["Accept"] = self.api_client.select_header_accept(
2554
+ ["application/json"]
2555
+ )
2556
+
2557
+ # authentication setting
2558
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2559
+
2560
+ return self.api_client.param_serialize(
2561
+ method="GET",
2562
+ resource_path="/users",
2563
+ path_params=_path_params,
2564
+ query_params=_query_params,
2565
+ header_params=_header_params,
2566
+ body=_body_params,
2567
+ post_params=_form_params,
2568
+ files=_files,
2569
+ auth_settings=_auth_settings,
2570
+ collection_formats=_collection_formats,
2571
+ _host=_host,
2572
+ _request_auth=_request_auth,
2573
+ )
2574
+
2575
+ @validate_call
2576
+ async def set_user_license(
2577
+ self,
2578
+ license_key_dto: LicenseKeyDto,
2579
+ _request_timeout: Union[
2580
+ None,
2581
+ Annotated[StrictFloat, Field(gt=0)],
2582
+ Tuple[
2583
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2584
+ ],
2585
+ ] = None,
2586
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2587
+ _content_type: Optional[StrictStr] = None,
2588
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2589
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2590
+ ) -> LicenseResponseDto:
2591
+ """Set user product key
2592
+
2593
+ Register a product key for the current user.
2594
+
2595
+ :param license_key_dto: (required)
2596
+ :type license_key_dto: LicenseKeyDto
2597
+ :param _request_timeout: timeout setting for this request. If one
2598
+ number provided, it will be total request
2599
+ timeout. It can also be a pair (tuple) of
2600
+ (connection, read) timeouts.
2601
+ :type _request_timeout: int, tuple(int, int), optional
2602
+ :param _request_auth: set to override the auth_settings for an a single
2603
+ request; this effectively ignores the
2604
+ authentication in the spec for a single request.
2605
+ :type _request_auth: dict, optional
2606
+ :param _content_type: force content-type for the request.
2607
+ :type _content_type: str, Optional
2608
+ :param _headers: set to override the headers for a single
2609
+ request; this effectively ignores the headers
2610
+ in the spec for a single request.
2611
+ :type _headers: dict, optional
2612
+ :param _host_index: set to override the host_index for a single
2613
+ request; this effectively ignores the host_index
2614
+ in the spec for a single request.
2615
+ :type _host_index: int, optional
2616
+ :return: Returns the result object.
2617
+ """ # noqa: E501
2618
+
2619
+ _param = self._set_user_license_serialize(
2620
+ license_key_dto=license_key_dto,
2621
+ _request_auth=_request_auth,
2622
+ _content_type=_content_type,
2623
+ _headers=_headers,
2624
+ _host_index=_host_index,
2625
+ )
2626
+
2627
+ _response_types_map: Dict[str, Optional[str]] = {
2628
+ "200": "LicenseResponseDto",
2629
+ }
2630
+ response_data = await self.api_client.call_api(
2631
+ *_param, _request_timeout=_request_timeout
2632
+ )
2633
+ await response_data.read()
2634
+ return self.api_client.response_deserialize(
2635
+ response_data=response_data,
2636
+ response_types_map=_response_types_map,
2637
+ ).data
2638
+
2639
+ @validate_call
2640
+ async def set_user_license_with_http_info(
2641
+ self,
2642
+ license_key_dto: LicenseKeyDto,
2643
+ _request_timeout: Union[
2644
+ None,
2645
+ Annotated[StrictFloat, Field(gt=0)],
2646
+ Tuple[
2647
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2648
+ ],
2649
+ ] = None,
2650
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2651
+ _content_type: Optional[StrictStr] = None,
2652
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2653
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2654
+ ) -> ApiResponse[LicenseResponseDto]:
2655
+ """Set user product key
2656
+
2657
+ Register a product key for the current user.
2658
+
2659
+ :param license_key_dto: (required)
2660
+ :type license_key_dto: LicenseKeyDto
2661
+ :param _request_timeout: timeout setting for this request. If one
2662
+ number provided, it will be total request
2663
+ timeout. It can also be a pair (tuple) of
2664
+ (connection, read) timeouts.
2665
+ :type _request_timeout: int, tuple(int, int), optional
2666
+ :param _request_auth: set to override the auth_settings for an a single
2667
+ request; this effectively ignores the
2668
+ authentication in the spec for a single request.
2669
+ :type _request_auth: dict, optional
2670
+ :param _content_type: force content-type for the request.
2671
+ :type _content_type: str, Optional
2672
+ :param _headers: set to override the headers for a single
2673
+ request; this effectively ignores the headers
2674
+ in the spec for a single request.
2675
+ :type _headers: dict, optional
2676
+ :param _host_index: set to override the host_index for a single
2677
+ request; this effectively ignores the host_index
2678
+ in the spec for a single request.
2679
+ :type _host_index: int, optional
2680
+ :return: Returns the result object.
2681
+ """ # noqa: E501
2682
+
2683
+ _param = self._set_user_license_serialize(
2684
+ license_key_dto=license_key_dto,
2685
+ _request_auth=_request_auth,
2686
+ _content_type=_content_type,
2687
+ _headers=_headers,
2688
+ _host_index=_host_index,
2689
+ )
2690
+
2691
+ _response_types_map: Dict[str, Optional[str]] = {
2692
+ "200": "LicenseResponseDto",
2693
+ }
2694
+ response_data = await self.api_client.call_api(
2695
+ *_param, _request_timeout=_request_timeout
2696
+ )
2697
+ await response_data.read()
2698
+ return self.api_client.response_deserialize(
2699
+ response_data=response_data,
2700
+ response_types_map=_response_types_map,
2701
+ )
2702
+
2703
+ @validate_call
2704
+ async def set_user_license_without_preload_content(
2705
+ self,
2706
+ license_key_dto: LicenseKeyDto,
2707
+ _request_timeout: Union[
2708
+ None,
2709
+ Annotated[StrictFloat, Field(gt=0)],
2710
+ Tuple[
2711
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2712
+ ],
2713
+ ] = None,
2714
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2715
+ _content_type: Optional[StrictStr] = None,
2716
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2717
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2718
+ ) -> RESTResponseType:
2719
+ """Set user product key
2720
+
2721
+ Register a product key for the current user.
2722
+
2723
+ :param license_key_dto: (required)
2724
+ :type license_key_dto: LicenseKeyDto
2725
+ :param _request_timeout: timeout setting for this request. If one
2726
+ number provided, it will be total request
2727
+ timeout. It can also be a pair (tuple) of
2728
+ (connection, read) timeouts.
2729
+ :type _request_timeout: int, tuple(int, int), optional
2730
+ :param _request_auth: set to override the auth_settings for an a single
2731
+ request; this effectively ignores the
2732
+ authentication in the spec for a single request.
2733
+ :type _request_auth: dict, optional
2734
+ :param _content_type: force content-type for the request.
2735
+ :type _content_type: str, Optional
2736
+ :param _headers: set to override the headers for a single
2737
+ request; this effectively ignores the headers
2738
+ in the spec for a single request.
2739
+ :type _headers: dict, optional
2740
+ :param _host_index: set to override the host_index for a single
2741
+ request; this effectively ignores the host_index
2742
+ in the spec for a single request.
2743
+ :type _host_index: int, optional
2744
+ :return: Returns the result object.
2745
+ """ # noqa: E501
2746
+
2747
+ _param = self._set_user_license_serialize(
2748
+ license_key_dto=license_key_dto,
2749
+ _request_auth=_request_auth,
2750
+ _content_type=_content_type,
2751
+ _headers=_headers,
2752
+ _host_index=_host_index,
2753
+ )
2754
+
2755
+ _response_types_map: Dict[str, Optional[str]] = {
2756
+ "200": "LicenseResponseDto",
2757
+ }
2758
+ response_data = await self.api_client.call_api(
2759
+ *_param, _request_timeout=_request_timeout
2760
+ )
2761
+ return response_data.response
2762
+
2763
+ def _set_user_license_serialize(
2764
+ self,
2765
+ license_key_dto,
2766
+ _request_auth,
2767
+ _content_type,
2768
+ _headers,
2769
+ _host_index,
2770
+ ) -> RequestSerialized:
2771
+ _host = None
2772
+
2773
+ _collection_formats: Dict[str, str] = {}
2774
+
2775
+ _path_params: Dict[str, str] = {}
2776
+ _query_params: List[Tuple[str, str]] = []
2777
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2778
+ _form_params: List[Tuple[str, str]] = []
2779
+ _files: Dict[
2780
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2781
+ ] = {}
2782
+ _body_params: Optional[bytes] = None
2783
+
2784
+ # process the path parameters
2785
+ # process the query parameters
2786
+ # process the header parameters
2787
+ # process the form parameters
2788
+ # process the body parameter
2789
+ if license_key_dto is not None:
2790
+ _body_params = license_key_dto
2791
+
2792
+ # set the HTTP header `Accept`
2793
+ if "Accept" not in _header_params:
2794
+ _header_params["Accept"] = self.api_client.select_header_accept(
2795
+ ["application/json"]
2796
+ )
2797
+
2798
+ # set the HTTP header `Content-Type`
2799
+ if _content_type:
2800
+ _header_params["Content-Type"] = _content_type
2801
+ else:
2802
+ _default_content_type = self.api_client.select_header_content_type(
2803
+ ["application/json"]
2804
+ )
2805
+ if _default_content_type is not None:
2806
+ _header_params["Content-Type"] = _default_content_type
2807
+
2808
+ # authentication setting
2809
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2810
+
2811
+ return self.api_client.param_serialize(
2812
+ method="PUT",
2813
+ resource_path="/users/me/license",
2814
+ path_params=_path_params,
2815
+ query_params=_query_params,
2816
+ header_params=_header_params,
2817
+ body=_body_params,
2818
+ post_params=_form_params,
2819
+ files=_files,
2820
+ auth_settings=_auth_settings,
2821
+ collection_formats=_collection_formats,
2822
+ _host=_host,
2823
+ _request_auth=_request_auth,
2824
+ )
2825
+
2826
+ @validate_call
2827
+ async def set_user_onboarding(
2828
+ self,
2829
+ onboarding_dto: OnboardingDto,
2830
+ _request_timeout: Union[
2831
+ None,
2832
+ Annotated[StrictFloat, Field(gt=0)],
2833
+ Tuple[
2834
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2835
+ ],
2836
+ ] = None,
2837
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2838
+ _content_type: Optional[StrictStr] = None,
2839
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2840
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2841
+ ) -> OnboardingResponseDto:
2842
+ """Update user onboarding
2843
+
2844
+ Update the onboarding status of the current user.
2845
+
2846
+ :param onboarding_dto: (required)
2847
+ :type onboarding_dto: OnboardingDto
2848
+ :param _request_timeout: timeout setting for this request. If one
2849
+ number provided, it will be total request
2850
+ timeout. It can also be a pair (tuple) of
2851
+ (connection, read) timeouts.
2852
+ :type _request_timeout: int, tuple(int, int), optional
2853
+ :param _request_auth: set to override the auth_settings for an a single
2854
+ request; this effectively ignores the
2855
+ authentication in the spec for a single request.
2856
+ :type _request_auth: dict, optional
2857
+ :param _content_type: force content-type for the request.
2858
+ :type _content_type: str, Optional
2859
+ :param _headers: set to override the headers for a single
2860
+ request; this effectively ignores the headers
2861
+ in the spec for a single request.
2862
+ :type _headers: dict, optional
2863
+ :param _host_index: set to override the host_index for a single
2864
+ request; this effectively ignores the host_index
2865
+ in the spec for a single request.
2866
+ :type _host_index: int, optional
2867
+ :return: Returns the result object.
2868
+ """ # noqa: E501
2869
+
2870
+ _param = self._set_user_onboarding_serialize(
2871
+ onboarding_dto=onboarding_dto,
2872
+ _request_auth=_request_auth,
2873
+ _content_type=_content_type,
2874
+ _headers=_headers,
2875
+ _host_index=_host_index,
2876
+ )
2877
+
2878
+ _response_types_map: Dict[str, Optional[str]] = {
2879
+ "200": "OnboardingResponseDto",
2880
+ }
2881
+ response_data = await self.api_client.call_api(
2882
+ *_param, _request_timeout=_request_timeout
2883
+ )
2884
+ await response_data.read()
2885
+ return self.api_client.response_deserialize(
2886
+ response_data=response_data,
2887
+ response_types_map=_response_types_map,
2888
+ ).data
2889
+
2890
+ @validate_call
2891
+ async def set_user_onboarding_with_http_info(
2892
+ self,
2893
+ onboarding_dto: OnboardingDto,
2894
+ _request_timeout: Union[
2895
+ None,
2896
+ Annotated[StrictFloat, Field(gt=0)],
2897
+ Tuple[
2898
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2899
+ ],
2900
+ ] = None,
2901
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2902
+ _content_type: Optional[StrictStr] = None,
2903
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2904
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2905
+ ) -> ApiResponse[OnboardingResponseDto]:
2906
+ """Update user onboarding
2907
+
2908
+ Update the onboarding status of the current user.
2909
+
2910
+ :param onboarding_dto: (required)
2911
+ :type onboarding_dto: OnboardingDto
2912
+ :param _request_timeout: timeout setting for this request. If one
2913
+ number provided, it will be total request
2914
+ timeout. It can also be a pair (tuple) of
2915
+ (connection, read) timeouts.
2916
+ :type _request_timeout: int, tuple(int, int), optional
2917
+ :param _request_auth: set to override the auth_settings for an a single
2918
+ request; this effectively ignores the
2919
+ authentication in the spec for a single request.
2920
+ :type _request_auth: dict, optional
2921
+ :param _content_type: force content-type for the request.
2922
+ :type _content_type: str, Optional
2923
+ :param _headers: set to override the headers for a single
2924
+ request; this effectively ignores the headers
2925
+ in the spec for a single request.
2926
+ :type _headers: dict, optional
2927
+ :param _host_index: set to override the host_index for a single
2928
+ request; this effectively ignores the host_index
2929
+ in the spec for a single request.
2930
+ :type _host_index: int, optional
2931
+ :return: Returns the result object.
2932
+ """ # noqa: E501
2933
+
2934
+ _param = self._set_user_onboarding_serialize(
2935
+ onboarding_dto=onboarding_dto,
2936
+ _request_auth=_request_auth,
2937
+ _content_type=_content_type,
2938
+ _headers=_headers,
2939
+ _host_index=_host_index,
2940
+ )
2941
+
2942
+ _response_types_map: Dict[str, Optional[str]] = {
2943
+ "200": "OnboardingResponseDto",
2944
+ }
2945
+ response_data = await self.api_client.call_api(
2946
+ *_param, _request_timeout=_request_timeout
2947
+ )
2948
+ await response_data.read()
2949
+ return self.api_client.response_deserialize(
2950
+ response_data=response_data,
2951
+ response_types_map=_response_types_map,
2952
+ )
2953
+
2954
+ @validate_call
2955
+ async def set_user_onboarding_without_preload_content(
2956
+ self,
2957
+ onboarding_dto: OnboardingDto,
2958
+ _request_timeout: Union[
2959
+ None,
2960
+ Annotated[StrictFloat, Field(gt=0)],
2961
+ Tuple[
2962
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2963
+ ],
2964
+ ] = None,
2965
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2966
+ _content_type: Optional[StrictStr] = None,
2967
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2968
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2969
+ ) -> RESTResponseType:
2970
+ """Update user onboarding
2971
+
2972
+ Update the onboarding status of the current user.
2973
+
2974
+ :param onboarding_dto: (required)
2975
+ :type onboarding_dto: OnboardingDto
2976
+ :param _request_timeout: timeout setting for this request. If one
2977
+ number provided, it will be total request
2978
+ timeout. It can also be a pair (tuple) of
2979
+ (connection, read) timeouts.
2980
+ :type _request_timeout: int, tuple(int, int), optional
2981
+ :param _request_auth: set to override the auth_settings for an a single
2982
+ request; this effectively ignores the
2983
+ authentication in the spec for a single request.
2984
+ :type _request_auth: dict, optional
2985
+ :param _content_type: force content-type for the request.
2986
+ :type _content_type: str, Optional
2987
+ :param _headers: set to override the headers for a single
2988
+ request; this effectively ignores the headers
2989
+ in the spec for a single request.
2990
+ :type _headers: dict, optional
2991
+ :param _host_index: set to override the host_index for a single
2992
+ request; this effectively ignores the host_index
2993
+ in the spec for a single request.
2994
+ :type _host_index: int, optional
2995
+ :return: Returns the result object.
2996
+ """ # noqa: E501
2997
+
2998
+ _param = self._set_user_onboarding_serialize(
2999
+ onboarding_dto=onboarding_dto,
3000
+ _request_auth=_request_auth,
3001
+ _content_type=_content_type,
3002
+ _headers=_headers,
3003
+ _host_index=_host_index,
3004
+ )
3005
+
3006
+ _response_types_map: Dict[str, Optional[str]] = {
3007
+ "200": "OnboardingResponseDto",
3008
+ }
3009
+ response_data = await self.api_client.call_api(
3010
+ *_param, _request_timeout=_request_timeout
3011
+ )
3012
+ return response_data.response
3013
+
3014
+ def _set_user_onboarding_serialize(
3015
+ self,
3016
+ onboarding_dto,
3017
+ _request_auth,
3018
+ _content_type,
3019
+ _headers,
3020
+ _host_index,
3021
+ ) -> RequestSerialized:
3022
+ _host = None
3023
+
3024
+ _collection_formats: Dict[str, str] = {}
3025
+
3026
+ _path_params: Dict[str, str] = {}
3027
+ _query_params: List[Tuple[str, str]] = []
3028
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3029
+ _form_params: List[Tuple[str, str]] = []
3030
+ _files: Dict[
3031
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3032
+ ] = {}
3033
+ _body_params: Optional[bytes] = None
3034
+
3035
+ # process the path parameters
3036
+ # process the query parameters
3037
+ # process the header parameters
3038
+ # process the form parameters
3039
+ # process the body parameter
3040
+ if onboarding_dto is not None:
3041
+ _body_params = onboarding_dto
3042
+
3043
+ # set the HTTP header `Accept`
3044
+ if "Accept" not in _header_params:
3045
+ _header_params["Accept"] = self.api_client.select_header_accept(
3046
+ ["application/json"]
3047
+ )
3048
+
3049
+ # set the HTTP header `Content-Type`
3050
+ if _content_type:
3051
+ _header_params["Content-Type"] = _content_type
3052
+ else:
3053
+ _default_content_type = self.api_client.select_header_content_type(
3054
+ ["application/json"]
3055
+ )
3056
+ if _default_content_type is not None:
3057
+ _header_params["Content-Type"] = _default_content_type
3058
+
3059
+ # authentication setting
3060
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3061
+
3062
+ return self.api_client.param_serialize(
3063
+ method="PUT",
3064
+ resource_path="/users/me/onboarding",
3065
+ path_params=_path_params,
3066
+ query_params=_query_params,
3067
+ header_params=_header_params,
3068
+ body=_body_params,
3069
+ post_params=_form_params,
3070
+ files=_files,
3071
+ auth_settings=_auth_settings,
3072
+ collection_formats=_collection_formats,
3073
+ _host=_host,
3074
+ _request_auth=_request_auth,
3075
+ )
3076
+
3077
+ @validate_call
3078
+ async def update_my_preferences(
3079
+ self,
3080
+ user_preferences_update_dto: UserPreferencesUpdateDto,
3081
+ _request_timeout: Union[
3082
+ None,
3083
+ Annotated[StrictFloat, Field(gt=0)],
3084
+ Tuple[
3085
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3086
+ ],
3087
+ ] = None,
3088
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3089
+ _content_type: Optional[StrictStr] = None,
3090
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3091
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3092
+ ) -> UserPreferencesResponseDto:
3093
+ """Update my preferences
3094
+
3095
+ Update the preferences of the current user.
3096
+
3097
+ :param user_preferences_update_dto: (required)
3098
+ :type user_preferences_update_dto: UserPreferencesUpdateDto
3099
+ :param _request_timeout: timeout setting for this request. If one
3100
+ number provided, it will be total request
3101
+ timeout. It can also be a pair (tuple) of
3102
+ (connection, read) timeouts.
3103
+ :type _request_timeout: int, tuple(int, int), optional
3104
+ :param _request_auth: set to override the auth_settings for an a single
3105
+ request; this effectively ignores the
3106
+ authentication in the spec for a single request.
3107
+ :type _request_auth: dict, optional
3108
+ :param _content_type: force content-type for the request.
3109
+ :type _content_type: str, Optional
3110
+ :param _headers: set to override the headers for a single
3111
+ request; this effectively ignores the headers
3112
+ in the spec for a single request.
3113
+ :type _headers: dict, optional
3114
+ :param _host_index: set to override the host_index for a single
3115
+ request; this effectively ignores the host_index
3116
+ in the spec for a single request.
3117
+ :type _host_index: int, optional
3118
+ :return: Returns the result object.
3119
+ """ # noqa: E501
3120
+
3121
+ _param = self._update_my_preferences_serialize(
3122
+ user_preferences_update_dto=user_preferences_update_dto,
3123
+ _request_auth=_request_auth,
3124
+ _content_type=_content_type,
3125
+ _headers=_headers,
3126
+ _host_index=_host_index,
3127
+ )
3128
+
3129
+ _response_types_map: Dict[str, Optional[str]] = {
3130
+ "200": "UserPreferencesResponseDto",
3131
+ }
3132
+ response_data = await self.api_client.call_api(
3133
+ *_param, _request_timeout=_request_timeout
3134
+ )
3135
+ await response_data.read()
3136
+ return self.api_client.response_deserialize(
3137
+ response_data=response_data,
3138
+ response_types_map=_response_types_map,
3139
+ ).data
3140
+
3141
+ @validate_call
3142
+ async def update_my_preferences_with_http_info(
3143
+ self,
3144
+ user_preferences_update_dto: UserPreferencesUpdateDto,
3145
+ _request_timeout: Union[
3146
+ None,
3147
+ Annotated[StrictFloat, Field(gt=0)],
3148
+ Tuple[
3149
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3150
+ ],
3151
+ ] = None,
3152
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3153
+ _content_type: Optional[StrictStr] = None,
3154
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3155
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3156
+ ) -> ApiResponse[UserPreferencesResponseDto]:
3157
+ """Update my preferences
3158
+
3159
+ Update the preferences of the current user.
3160
+
3161
+ :param user_preferences_update_dto: (required)
3162
+ :type user_preferences_update_dto: UserPreferencesUpdateDto
3163
+ :param _request_timeout: timeout setting for this request. If one
3164
+ number provided, it will be total request
3165
+ timeout. It can also be a pair (tuple) of
3166
+ (connection, read) timeouts.
3167
+ :type _request_timeout: int, tuple(int, int), optional
3168
+ :param _request_auth: set to override the auth_settings for an a single
3169
+ request; this effectively ignores the
3170
+ authentication in the spec for a single request.
3171
+ :type _request_auth: dict, optional
3172
+ :param _content_type: force content-type for the request.
3173
+ :type _content_type: str, Optional
3174
+ :param _headers: set to override the headers for a single
3175
+ request; this effectively ignores the headers
3176
+ in the spec for a single request.
3177
+ :type _headers: dict, optional
3178
+ :param _host_index: set to override the host_index for a single
3179
+ request; this effectively ignores the host_index
3180
+ in the spec for a single request.
3181
+ :type _host_index: int, optional
3182
+ :return: Returns the result object.
3183
+ """ # noqa: E501
3184
+
3185
+ _param = self._update_my_preferences_serialize(
3186
+ user_preferences_update_dto=user_preferences_update_dto,
3187
+ _request_auth=_request_auth,
3188
+ _content_type=_content_type,
3189
+ _headers=_headers,
3190
+ _host_index=_host_index,
3191
+ )
3192
+
3193
+ _response_types_map: Dict[str, Optional[str]] = {
3194
+ "200": "UserPreferencesResponseDto",
3195
+ }
3196
+ response_data = await self.api_client.call_api(
3197
+ *_param, _request_timeout=_request_timeout
3198
+ )
3199
+ await response_data.read()
3200
+ return self.api_client.response_deserialize(
3201
+ response_data=response_data,
3202
+ response_types_map=_response_types_map,
3203
+ )
3204
+
3205
+ @validate_call
3206
+ async def update_my_preferences_without_preload_content(
3207
+ self,
3208
+ user_preferences_update_dto: UserPreferencesUpdateDto,
3209
+ _request_timeout: Union[
3210
+ None,
3211
+ Annotated[StrictFloat, Field(gt=0)],
3212
+ Tuple[
3213
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3214
+ ],
3215
+ ] = None,
3216
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3217
+ _content_type: Optional[StrictStr] = None,
3218
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3219
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3220
+ ) -> RESTResponseType:
3221
+ """Update my preferences
3222
+
3223
+ Update the preferences of the current user.
3224
+
3225
+ :param user_preferences_update_dto: (required)
3226
+ :type user_preferences_update_dto: UserPreferencesUpdateDto
3227
+ :param _request_timeout: timeout setting for this request. If one
3228
+ number provided, it will be total request
3229
+ timeout. It can also be a pair (tuple) of
3230
+ (connection, read) timeouts.
3231
+ :type _request_timeout: int, tuple(int, int), optional
3232
+ :param _request_auth: set to override the auth_settings for an a single
3233
+ request; this effectively ignores the
3234
+ authentication in the spec for a single request.
3235
+ :type _request_auth: dict, optional
3236
+ :param _content_type: force content-type for the request.
3237
+ :type _content_type: str, Optional
3238
+ :param _headers: set to override the headers for a single
3239
+ request; this effectively ignores the headers
3240
+ in the spec for a single request.
3241
+ :type _headers: dict, optional
3242
+ :param _host_index: set to override the host_index for a single
3243
+ request; this effectively ignores the host_index
3244
+ in the spec for a single request.
3245
+ :type _host_index: int, optional
3246
+ :return: Returns the result object.
3247
+ """ # noqa: E501
3248
+
3249
+ _param = self._update_my_preferences_serialize(
3250
+ user_preferences_update_dto=user_preferences_update_dto,
3251
+ _request_auth=_request_auth,
3252
+ _content_type=_content_type,
3253
+ _headers=_headers,
3254
+ _host_index=_host_index,
3255
+ )
3256
+
3257
+ _response_types_map: Dict[str, Optional[str]] = {
3258
+ "200": "UserPreferencesResponseDto",
3259
+ }
3260
+ response_data = await self.api_client.call_api(
3261
+ *_param, _request_timeout=_request_timeout
3262
+ )
3263
+ return response_data.response
3264
+
3265
+ def _update_my_preferences_serialize(
3266
+ self,
3267
+ user_preferences_update_dto,
3268
+ _request_auth,
3269
+ _content_type,
3270
+ _headers,
3271
+ _host_index,
3272
+ ) -> RequestSerialized:
3273
+ _host = None
3274
+
3275
+ _collection_formats: Dict[str, str] = {}
3276
+
3277
+ _path_params: Dict[str, str] = {}
3278
+ _query_params: List[Tuple[str, str]] = []
3279
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3280
+ _form_params: List[Tuple[str, str]] = []
3281
+ _files: Dict[
3282
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3283
+ ] = {}
3284
+ _body_params: Optional[bytes] = None
3285
+
3286
+ # process the path parameters
3287
+ # process the query parameters
3288
+ # process the header parameters
3289
+ # process the form parameters
3290
+ # process the body parameter
3291
+ if user_preferences_update_dto is not None:
3292
+ _body_params = user_preferences_update_dto
3293
+
3294
+ # set the HTTP header `Accept`
3295
+ if "Accept" not in _header_params:
3296
+ _header_params["Accept"] = self.api_client.select_header_accept(
3297
+ ["application/json"]
3298
+ )
3299
+
3300
+ # set the HTTP header `Content-Type`
3301
+ if _content_type:
3302
+ _header_params["Content-Type"] = _content_type
3303
+ else:
3304
+ _default_content_type = self.api_client.select_header_content_type(
3305
+ ["application/json"]
3306
+ )
3307
+ if _default_content_type is not None:
3308
+ _header_params["Content-Type"] = _default_content_type
3309
+
3310
+ # authentication setting
3311
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3312
+
3313
+ return self.api_client.param_serialize(
3314
+ method="PUT",
3315
+ resource_path="/users/me/preferences",
3316
+ path_params=_path_params,
3317
+ query_params=_query_params,
3318
+ header_params=_header_params,
3319
+ body=_body_params,
3320
+ post_params=_form_params,
3321
+ files=_files,
3322
+ auth_settings=_auth_settings,
3323
+ collection_formats=_collection_formats,
3324
+ _host=_host,
3325
+ _request_auth=_request_auth,
3326
+ )
3327
+
3328
+ @validate_call
3329
+ async def update_my_user(
3330
+ self,
3331
+ user_update_me_dto: UserUpdateMeDto,
3332
+ _request_timeout: Union[
3333
+ None,
3334
+ Annotated[StrictFloat, Field(gt=0)],
3335
+ Tuple[
3336
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3337
+ ],
3338
+ ] = None,
3339
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3340
+ _content_type: Optional[StrictStr] = None,
3341
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3342
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3343
+ ) -> UserAdminResponseDto:
3344
+ """Update current user
3345
+
3346
+ Update the current user making teh API request.
3347
+
3348
+ :param user_update_me_dto: (required)
3349
+ :type user_update_me_dto: UserUpdateMeDto
3350
+ :param _request_timeout: timeout setting for this request. If one
3351
+ number provided, it will be total request
3352
+ timeout. It can also be a pair (tuple) of
3353
+ (connection, read) timeouts.
3354
+ :type _request_timeout: int, tuple(int, int), optional
3355
+ :param _request_auth: set to override the auth_settings for an a single
3356
+ request; this effectively ignores the
3357
+ authentication in the spec for a single request.
3358
+ :type _request_auth: dict, optional
3359
+ :param _content_type: force content-type for the request.
3360
+ :type _content_type: str, Optional
3361
+ :param _headers: set to override the headers for a single
3362
+ request; this effectively ignores the headers
3363
+ in the spec for a single request.
3364
+ :type _headers: dict, optional
3365
+ :param _host_index: set to override the host_index for a single
3366
+ request; this effectively ignores the host_index
3367
+ in the spec for a single request.
3368
+ :type _host_index: int, optional
3369
+ :return: Returns the result object.
3370
+ """ # noqa: E501
3371
+
3372
+ _param = self._update_my_user_serialize(
3373
+ user_update_me_dto=user_update_me_dto,
3374
+ _request_auth=_request_auth,
3375
+ _content_type=_content_type,
3376
+ _headers=_headers,
3377
+ _host_index=_host_index,
3378
+ )
3379
+
3380
+ _response_types_map: Dict[str, Optional[str]] = {
3381
+ "200": "UserAdminResponseDto",
3382
+ }
3383
+ response_data = await self.api_client.call_api(
3384
+ *_param, _request_timeout=_request_timeout
3385
+ )
3386
+ await response_data.read()
3387
+ return self.api_client.response_deserialize(
3388
+ response_data=response_data,
3389
+ response_types_map=_response_types_map,
3390
+ ).data
3391
+
3392
+ @validate_call
3393
+ async def update_my_user_with_http_info(
3394
+ self,
3395
+ user_update_me_dto: UserUpdateMeDto,
3396
+ _request_timeout: Union[
3397
+ None,
3398
+ Annotated[StrictFloat, Field(gt=0)],
3399
+ Tuple[
3400
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3401
+ ],
3402
+ ] = None,
3403
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3404
+ _content_type: Optional[StrictStr] = None,
3405
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3406
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3407
+ ) -> ApiResponse[UserAdminResponseDto]:
3408
+ """Update current user
3409
+
3410
+ Update the current user making teh API request.
3411
+
3412
+ :param user_update_me_dto: (required)
3413
+ :type user_update_me_dto: UserUpdateMeDto
3414
+ :param _request_timeout: timeout setting for this request. If one
3415
+ number provided, it will be total request
3416
+ timeout. It can also be a pair (tuple) of
3417
+ (connection, read) timeouts.
3418
+ :type _request_timeout: int, tuple(int, int), optional
3419
+ :param _request_auth: set to override the auth_settings for an a single
3420
+ request; this effectively ignores the
3421
+ authentication in the spec for a single request.
3422
+ :type _request_auth: dict, optional
3423
+ :param _content_type: force content-type for the request.
3424
+ :type _content_type: str, Optional
3425
+ :param _headers: set to override the headers for a single
3426
+ request; this effectively ignores the headers
3427
+ in the spec for a single request.
3428
+ :type _headers: dict, optional
3429
+ :param _host_index: set to override the host_index for a single
3430
+ request; this effectively ignores the host_index
3431
+ in the spec for a single request.
3432
+ :type _host_index: int, optional
3433
+ :return: Returns the result object.
3434
+ """ # noqa: E501
3435
+
3436
+ _param = self._update_my_user_serialize(
3437
+ user_update_me_dto=user_update_me_dto,
3438
+ _request_auth=_request_auth,
3439
+ _content_type=_content_type,
3440
+ _headers=_headers,
3441
+ _host_index=_host_index,
3442
+ )
3443
+
3444
+ _response_types_map: Dict[str, Optional[str]] = {
3445
+ "200": "UserAdminResponseDto",
3446
+ }
3447
+ response_data = await self.api_client.call_api(
3448
+ *_param, _request_timeout=_request_timeout
3449
+ )
3450
+ await response_data.read()
3451
+ return self.api_client.response_deserialize(
3452
+ response_data=response_data,
3453
+ response_types_map=_response_types_map,
3454
+ )
3455
+
3456
+ @validate_call
3457
+ async def update_my_user_without_preload_content(
3458
+ self,
3459
+ user_update_me_dto: UserUpdateMeDto,
3460
+ _request_timeout: Union[
3461
+ None,
3462
+ Annotated[StrictFloat, Field(gt=0)],
3463
+ Tuple[
3464
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3465
+ ],
3466
+ ] = None,
3467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3468
+ _content_type: Optional[StrictStr] = None,
3469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3471
+ ) -> RESTResponseType:
3472
+ """Update current user
3473
+
3474
+ Update the current user making teh API request.
3475
+
3476
+ :param user_update_me_dto: (required)
3477
+ :type user_update_me_dto: UserUpdateMeDto
3478
+ :param _request_timeout: timeout setting for this request. If one
3479
+ number provided, it will be total request
3480
+ timeout. It can also be a pair (tuple) of
3481
+ (connection, read) timeouts.
3482
+ :type _request_timeout: int, tuple(int, int), optional
3483
+ :param _request_auth: set to override the auth_settings for an a single
3484
+ request; this effectively ignores the
3485
+ authentication in the spec for a single request.
3486
+ :type _request_auth: dict, optional
3487
+ :param _content_type: force content-type for the request.
3488
+ :type _content_type: str, Optional
3489
+ :param _headers: set to override the headers for a single
3490
+ request; this effectively ignores the headers
3491
+ in the spec for a single request.
3492
+ :type _headers: dict, optional
3493
+ :param _host_index: set to override the host_index for a single
3494
+ request; this effectively ignores the host_index
3495
+ in the spec for a single request.
3496
+ :type _host_index: int, optional
3497
+ :return: Returns the result object.
3498
+ """ # noqa: E501
3499
+
3500
+ _param = self._update_my_user_serialize(
3501
+ user_update_me_dto=user_update_me_dto,
3502
+ _request_auth=_request_auth,
3503
+ _content_type=_content_type,
3504
+ _headers=_headers,
3505
+ _host_index=_host_index,
3506
+ )
3507
+
3508
+ _response_types_map: Dict[str, Optional[str]] = {
3509
+ "200": "UserAdminResponseDto",
3510
+ }
3511
+ response_data = await self.api_client.call_api(
3512
+ *_param, _request_timeout=_request_timeout
3513
+ )
3514
+ return response_data.response
3515
+
3516
+ def _update_my_user_serialize(
3517
+ self,
3518
+ user_update_me_dto,
3519
+ _request_auth,
3520
+ _content_type,
3521
+ _headers,
3522
+ _host_index,
3523
+ ) -> RequestSerialized:
3524
+ _host = None
3525
+
3526
+ _collection_formats: Dict[str, str] = {}
3527
+
3528
+ _path_params: Dict[str, str] = {}
3529
+ _query_params: List[Tuple[str, str]] = []
3530
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3531
+ _form_params: List[Tuple[str, str]] = []
3532
+ _files: Dict[
3533
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3534
+ ] = {}
3535
+ _body_params: Optional[bytes] = None
3536
+
3537
+ # process the path parameters
3538
+ # process the query parameters
3539
+ # process the header parameters
3540
+ # process the form parameters
3541
+ # process the body parameter
3542
+ if user_update_me_dto is not None:
3543
+ _body_params = user_update_me_dto
3544
+
3545
+ # set the HTTP header `Accept`
3546
+ if "Accept" not in _header_params:
3547
+ _header_params["Accept"] = self.api_client.select_header_accept(
3548
+ ["application/json"]
3549
+ )
3550
+
3551
+ # set the HTTP header `Content-Type`
3552
+ if _content_type:
3553
+ _header_params["Content-Type"] = _content_type
3554
+ else:
3555
+ _default_content_type = self.api_client.select_header_content_type(
3556
+ ["application/json"]
3557
+ )
3558
+ if _default_content_type is not None:
3559
+ _header_params["Content-Type"] = _default_content_type
3560
+
3561
+ # authentication setting
3562
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3563
+
3564
+ return self.api_client.param_serialize(
3565
+ method="PUT",
3566
+ resource_path="/users/me",
3567
+ path_params=_path_params,
3568
+ query_params=_query_params,
3569
+ header_params=_header_params,
3570
+ body=_body_params,
3571
+ post_params=_form_params,
3572
+ files=_files,
3573
+ auth_settings=_auth_settings,
3574
+ collection_formats=_collection_formats,
3575
+ _host=_host,
3576
+ _request_auth=_request_auth,
3577
+ )