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