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