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,2250 @@
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 datetime import datetime
19
+ from pydantic import StrictBool
20
+ from uuid import UUID
21
+ from immich.client.models.bulk_id_response_dto import BulkIdResponseDto
22
+ from immich.client.models.bulk_ids_dto import BulkIdsDto
23
+ from immich.client.models.memory_create_dto import MemoryCreateDto
24
+ from immich.client.models.memory_response_dto import MemoryResponseDto
25
+ from immich.client.models.memory_search_order import MemorySearchOrder
26
+ from immich.client.models.memory_statistics_response_dto import (
27
+ MemoryStatisticsResponseDto,
28
+ )
29
+ from immich.client.models.memory_type import MemoryType
30
+ from immich.client.models.memory_update_dto import MemoryUpdateDto
31
+
32
+ from immich.client.api_client import ApiClient, RequestSerialized
33
+ from immich.client.api_response import ApiResponse
34
+ from immich.client.rest import RESTResponseType
35
+
36
+
37
+ class MemoriesApi:
38
+ """NOTE: This class is auto generated by OpenAPI Generator
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+ """
43
+
44
+ def __init__(self, api_client=None) -> None:
45
+ if api_client is None:
46
+ api_client = ApiClient.get_default()
47
+ self.api_client = api_client
48
+
49
+ @validate_call
50
+ async def add_memory_assets(
51
+ self,
52
+ id: UUID,
53
+ bulk_ids_dto: BulkIdsDto,
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
59
+ ],
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> List[BulkIdResponseDto]:
66
+ """Add assets to a memory
67
+
68
+ Add a list of asset IDs to a specific memory.
69
+
70
+ :param id: (required)
71
+ :type id: UUID
72
+ :param bulk_ids_dto: (required)
73
+ :type bulk_ids_dto: BulkIdsDto
74
+ :param _request_timeout: timeout setting for this request. If one
75
+ number provided, it will be total request
76
+ timeout. It can also be a pair (tuple) of
77
+ (connection, read) timeouts.
78
+ :type _request_timeout: int, tuple(int, int), optional
79
+ :param _request_auth: set to override the auth_settings for an a single
80
+ request; this effectively ignores the
81
+ authentication in the spec for a single request.
82
+ :type _request_auth: dict, optional
83
+ :param _content_type: force content-type for the request.
84
+ :type _content_type: str, Optional
85
+ :param _headers: set to override the headers for a single
86
+ request; this effectively ignores the headers
87
+ in the spec for a single request.
88
+ :type _headers: dict, optional
89
+ :param _host_index: set to override the host_index for a single
90
+ request; this effectively ignores the host_index
91
+ in the spec for a single request.
92
+ :type _host_index: int, optional
93
+ :return: Returns the result object.
94
+ """ # noqa: E501
95
+
96
+ _param = self._add_memory_assets_serialize(
97
+ id=id,
98
+ bulk_ids_dto=bulk_ids_dto,
99
+ _request_auth=_request_auth,
100
+ _content_type=_content_type,
101
+ _headers=_headers,
102
+ _host_index=_host_index,
103
+ )
104
+
105
+ _response_types_map: Dict[str, Optional[str]] = {
106
+ "200": "List[BulkIdResponseDto]",
107
+ }
108
+ response_data = await self.api_client.call_api(
109
+ *_param, _request_timeout=_request_timeout
110
+ )
111
+ await response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+ @validate_call
118
+ async def add_memory_assets_with_http_info(
119
+ self,
120
+ id: UUID,
121
+ bulk_ids_dto: BulkIdsDto,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
127
+ ],
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
134
+ """Add assets to a memory
135
+
136
+ Add a list of asset IDs to a specific memory.
137
+
138
+ :param id: (required)
139
+ :type id: UUID
140
+ :param bulk_ids_dto: (required)
141
+ :type bulk_ids_dto: BulkIdsDto
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._add_memory_assets_serialize(
165
+ id=id,
166
+ bulk_ids_dto=bulk_ids_dto,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index,
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ "200": "List[BulkIdResponseDto]",
175
+ }
176
+ response_data = await self.api_client.call_api(
177
+ *_param, _request_timeout=_request_timeout
178
+ )
179
+ await response_data.read()
180
+ return self.api_client.response_deserialize(
181
+ response_data=response_data,
182
+ response_types_map=_response_types_map,
183
+ )
184
+
185
+ @validate_call
186
+ async def add_memory_assets_without_preload_content(
187
+ self,
188
+ id: UUID,
189
+ bulk_ids_dto: BulkIdsDto,
190
+ _request_timeout: Union[
191
+ None,
192
+ Annotated[StrictFloat, Field(gt=0)],
193
+ Tuple[
194
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
195
+ ],
196
+ ] = None,
197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
198
+ _content_type: Optional[StrictStr] = None,
199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
201
+ ) -> RESTResponseType:
202
+ """Add assets to a memory
203
+
204
+ Add a list of asset IDs to a specific memory.
205
+
206
+ :param id: (required)
207
+ :type id: UUID
208
+ :param bulk_ids_dto: (required)
209
+ :type bulk_ids_dto: BulkIdsDto
210
+ :param _request_timeout: timeout setting for this request. If one
211
+ number provided, it will be total request
212
+ timeout. It can also be a pair (tuple) of
213
+ (connection, read) timeouts.
214
+ :type _request_timeout: int, tuple(int, int), optional
215
+ :param _request_auth: set to override the auth_settings for an a single
216
+ request; this effectively ignores the
217
+ authentication in the spec for a single request.
218
+ :type _request_auth: dict, optional
219
+ :param _content_type: force content-type for the request.
220
+ :type _content_type: str, Optional
221
+ :param _headers: set to override the headers for a single
222
+ request; this effectively ignores the headers
223
+ in the spec for a single request.
224
+ :type _headers: dict, optional
225
+ :param _host_index: set to override the host_index for a single
226
+ request; this effectively ignores the host_index
227
+ in the spec for a single request.
228
+ :type _host_index: int, optional
229
+ :return: Returns the result object.
230
+ """ # noqa: E501
231
+
232
+ _param = self._add_memory_assets_serialize(
233
+ id=id,
234
+ bulk_ids_dto=bulk_ids_dto,
235
+ _request_auth=_request_auth,
236
+ _content_type=_content_type,
237
+ _headers=_headers,
238
+ _host_index=_host_index,
239
+ )
240
+
241
+ _response_types_map: Dict[str, Optional[str]] = {
242
+ "200": "List[BulkIdResponseDto]",
243
+ }
244
+ response_data = await self.api_client.call_api(
245
+ *_param, _request_timeout=_request_timeout
246
+ )
247
+ return response_data.response
248
+
249
+ def _add_memory_assets_serialize(
250
+ self,
251
+ id,
252
+ bulk_ids_dto,
253
+ _request_auth,
254
+ _content_type,
255
+ _headers,
256
+ _host_index,
257
+ ) -> RequestSerialized:
258
+ _host = None
259
+
260
+ _collection_formats: Dict[str, str] = {}
261
+
262
+ _path_params: Dict[str, str] = {}
263
+ _query_params: List[Tuple[str, str]] = []
264
+ _header_params: Dict[str, Optional[str]] = _headers or {}
265
+ _form_params: List[Tuple[str, str]] = []
266
+ _files: Dict[
267
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
268
+ ] = {}
269
+ _body_params: Optional[bytes] = None
270
+
271
+ # process the path parameters
272
+ if id is not None:
273
+ _path_params["id"] = id
274
+ # process the query parameters
275
+ # process the header parameters
276
+ # process the form parameters
277
+ # process the body parameter
278
+ if bulk_ids_dto is not None:
279
+ _body_params = bulk_ids_dto
280
+
281
+ # set the HTTP header `Accept`
282
+ if "Accept" not in _header_params:
283
+ _header_params["Accept"] = self.api_client.select_header_accept(
284
+ ["application/json"]
285
+ )
286
+
287
+ # set the HTTP header `Content-Type`
288
+ if _content_type:
289
+ _header_params["Content-Type"] = _content_type
290
+ else:
291
+ _default_content_type = self.api_client.select_header_content_type(
292
+ ["application/json"]
293
+ )
294
+ if _default_content_type is not None:
295
+ _header_params["Content-Type"] = _default_content_type
296
+
297
+ # authentication setting
298
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
299
+
300
+ return self.api_client.param_serialize(
301
+ method="PUT",
302
+ resource_path="/memories/{id}/assets",
303
+ path_params=_path_params,
304
+ query_params=_query_params,
305
+ header_params=_header_params,
306
+ body=_body_params,
307
+ post_params=_form_params,
308
+ files=_files,
309
+ auth_settings=_auth_settings,
310
+ collection_formats=_collection_formats,
311
+ _host=_host,
312
+ _request_auth=_request_auth,
313
+ )
314
+
315
+ @validate_call
316
+ async def create_memory(
317
+ self,
318
+ memory_create_dto: MemoryCreateDto,
319
+ _request_timeout: Union[
320
+ None,
321
+ Annotated[StrictFloat, Field(gt=0)],
322
+ Tuple[
323
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
324
+ ],
325
+ ] = None,
326
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
327
+ _content_type: Optional[StrictStr] = None,
328
+ _headers: Optional[Dict[StrictStr, Any]] = None,
329
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
330
+ ) -> MemoryResponseDto:
331
+ """Create a memory
332
+
333
+ Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
334
+
335
+ :param memory_create_dto: (required)
336
+ :type memory_create_dto: MemoryCreateDto
337
+ :param _request_timeout: timeout setting for this request. If one
338
+ number provided, it will be total request
339
+ timeout. It can also be a pair (tuple) of
340
+ (connection, read) timeouts.
341
+ :type _request_timeout: int, tuple(int, int), optional
342
+ :param _request_auth: set to override the auth_settings for an a single
343
+ request; this effectively ignores the
344
+ authentication in the spec for a single request.
345
+ :type _request_auth: dict, optional
346
+ :param _content_type: force content-type for the request.
347
+ :type _content_type: str, Optional
348
+ :param _headers: set to override the headers for a single
349
+ request; this effectively ignores the headers
350
+ in the spec for a single request.
351
+ :type _headers: dict, optional
352
+ :param _host_index: set to override the host_index for a single
353
+ request; this effectively ignores the host_index
354
+ in the spec for a single request.
355
+ :type _host_index: int, optional
356
+ :return: Returns the result object.
357
+ """ # noqa: E501
358
+
359
+ _param = self._create_memory_serialize(
360
+ memory_create_dto=memory_create_dto,
361
+ _request_auth=_request_auth,
362
+ _content_type=_content_type,
363
+ _headers=_headers,
364
+ _host_index=_host_index,
365
+ )
366
+
367
+ _response_types_map: Dict[str, Optional[str]] = {
368
+ "201": "MemoryResponseDto",
369
+ }
370
+ response_data = await self.api_client.call_api(
371
+ *_param, _request_timeout=_request_timeout
372
+ )
373
+ await response_data.read()
374
+ return self.api_client.response_deserialize(
375
+ response_data=response_data,
376
+ response_types_map=_response_types_map,
377
+ ).data
378
+
379
+ @validate_call
380
+ async def create_memory_with_http_info(
381
+ self,
382
+ memory_create_dto: MemoryCreateDto,
383
+ _request_timeout: Union[
384
+ None,
385
+ Annotated[StrictFloat, Field(gt=0)],
386
+ Tuple[
387
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
388
+ ],
389
+ ] = None,
390
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
391
+ _content_type: Optional[StrictStr] = None,
392
+ _headers: Optional[Dict[StrictStr, Any]] = None,
393
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
394
+ ) -> ApiResponse[MemoryResponseDto]:
395
+ """Create a memory
396
+
397
+ Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
398
+
399
+ :param memory_create_dto: (required)
400
+ :type memory_create_dto: MemoryCreateDto
401
+ :param _request_timeout: timeout setting for this request. If one
402
+ number provided, it will be total request
403
+ timeout. It can also be a pair (tuple) of
404
+ (connection, read) timeouts.
405
+ :type _request_timeout: int, tuple(int, int), optional
406
+ :param _request_auth: set to override the auth_settings for an a single
407
+ request; this effectively ignores the
408
+ authentication in the spec for a single request.
409
+ :type _request_auth: dict, optional
410
+ :param _content_type: force content-type for the request.
411
+ :type _content_type: str, Optional
412
+ :param _headers: set to override the headers for a single
413
+ request; this effectively ignores the headers
414
+ in the spec for a single request.
415
+ :type _headers: dict, optional
416
+ :param _host_index: set to override the host_index for a single
417
+ request; this effectively ignores the host_index
418
+ in the spec for a single request.
419
+ :type _host_index: int, optional
420
+ :return: Returns the result object.
421
+ """ # noqa: E501
422
+
423
+ _param = self._create_memory_serialize(
424
+ memory_create_dto=memory_create_dto,
425
+ _request_auth=_request_auth,
426
+ _content_type=_content_type,
427
+ _headers=_headers,
428
+ _host_index=_host_index,
429
+ )
430
+
431
+ _response_types_map: Dict[str, Optional[str]] = {
432
+ "201": "MemoryResponseDto",
433
+ }
434
+ response_data = await self.api_client.call_api(
435
+ *_param, _request_timeout=_request_timeout
436
+ )
437
+ await response_data.read()
438
+ return self.api_client.response_deserialize(
439
+ response_data=response_data,
440
+ response_types_map=_response_types_map,
441
+ )
442
+
443
+ @validate_call
444
+ async def create_memory_without_preload_content(
445
+ self,
446
+ memory_create_dto: MemoryCreateDto,
447
+ _request_timeout: Union[
448
+ None,
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Tuple[
451
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
452
+ ],
453
+ ] = None,
454
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
455
+ _content_type: Optional[StrictStr] = None,
456
+ _headers: Optional[Dict[StrictStr, Any]] = None,
457
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
458
+ ) -> RESTResponseType:
459
+ """Create a memory
460
+
461
+ Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
462
+
463
+ :param memory_create_dto: (required)
464
+ :type memory_create_dto: MemoryCreateDto
465
+ :param _request_timeout: timeout setting for this request. If one
466
+ number provided, it will be total request
467
+ timeout. It can also be a pair (tuple) of
468
+ (connection, read) timeouts.
469
+ :type _request_timeout: int, tuple(int, int), optional
470
+ :param _request_auth: set to override the auth_settings for an a single
471
+ request; this effectively ignores the
472
+ authentication in the spec for a single request.
473
+ :type _request_auth: dict, optional
474
+ :param _content_type: force content-type for the request.
475
+ :type _content_type: str, Optional
476
+ :param _headers: set to override the headers for a single
477
+ request; this effectively ignores the headers
478
+ in the spec for a single request.
479
+ :type _headers: dict, optional
480
+ :param _host_index: set to override the host_index for a single
481
+ request; this effectively ignores the host_index
482
+ in the spec for a single request.
483
+ :type _host_index: int, optional
484
+ :return: Returns the result object.
485
+ """ # noqa: E501
486
+
487
+ _param = self._create_memory_serialize(
488
+ memory_create_dto=memory_create_dto,
489
+ _request_auth=_request_auth,
490
+ _content_type=_content_type,
491
+ _headers=_headers,
492
+ _host_index=_host_index,
493
+ )
494
+
495
+ _response_types_map: Dict[str, Optional[str]] = {
496
+ "201": "MemoryResponseDto",
497
+ }
498
+ response_data = await self.api_client.call_api(
499
+ *_param, _request_timeout=_request_timeout
500
+ )
501
+ return response_data.response
502
+
503
+ def _create_memory_serialize(
504
+ self,
505
+ memory_create_dto,
506
+ _request_auth,
507
+ _content_type,
508
+ _headers,
509
+ _host_index,
510
+ ) -> RequestSerialized:
511
+ _host = None
512
+
513
+ _collection_formats: Dict[str, str] = {}
514
+
515
+ _path_params: Dict[str, str] = {}
516
+ _query_params: List[Tuple[str, str]] = []
517
+ _header_params: Dict[str, Optional[str]] = _headers or {}
518
+ _form_params: List[Tuple[str, str]] = []
519
+ _files: Dict[
520
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
521
+ ] = {}
522
+ _body_params: Optional[bytes] = None
523
+
524
+ # process the path parameters
525
+ # process the query parameters
526
+ # process the header parameters
527
+ # process the form parameters
528
+ # process the body parameter
529
+ if memory_create_dto is not None:
530
+ _body_params = memory_create_dto
531
+
532
+ # set the HTTP header `Accept`
533
+ if "Accept" not in _header_params:
534
+ _header_params["Accept"] = self.api_client.select_header_accept(
535
+ ["application/json"]
536
+ )
537
+
538
+ # set the HTTP header `Content-Type`
539
+ if _content_type:
540
+ _header_params["Content-Type"] = _content_type
541
+ else:
542
+ _default_content_type = self.api_client.select_header_content_type(
543
+ ["application/json"]
544
+ )
545
+ if _default_content_type is not None:
546
+ _header_params["Content-Type"] = _default_content_type
547
+
548
+ # authentication setting
549
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
550
+
551
+ return self.api_client.param_serialize(
552
+ method="POST",
553
+ resource_path="/memories",
554
+ path_params=_path_params,
555
+ query_params=_query_params,
556
+ header_params=_header_params,
557
+ body=_body_params,
558
+ post_params=_form_params,
559
+ files=_files,
560
+ auth_settings=_auth_settings,
561
+ collection_formats=_collection_formats,
562
+ _host=_host,
563
+ _request_auth=_request_auth,
564
+ )
565
+
566
+ @validate_call
567
+ async def delete_memory(
568
+ self,
569
+ id: UUID,
570
+ _request_timeout: Union[
571
+ None,
572
+ Annotated[StrictFloat, Field(gt=0)],
573
+ Tuple[
574
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
575
+ ],
576
+ ] = None,
577
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
578
+ _content_type: Optional[StrictStr] = None,
579
+ _headers: Optional[Dict[StrictStr, Any]] = None,
580
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
581
+ ) -> None:
582
+ """Delete a memory
583
+
584
+ Delete a specific memory by its ID.
585
+
586
+ :param id: (required)
587
+ :type id: UUID
588
+ :param _request_timeout: timeout setting for this request. If one
589
+ number provided, it will be total request
590
+ timeout. It can also be a pair (tuple) of
591
+ (connection, read) timeouts.
592
+ :type _request_timeout: int, tuple(int, int), optional
593
+ :param _request_auth: set to override the auth_settings for an a single
594
+ request; this effectively ignores the
595
+ authentication in the spec for a single request.
596
+ :type _request_auth: dict, optional
597
+ :param _content_type: force content-type for the request.
598
+ :type _content_type: str, Optional
599
+ :param _headers: set to override the headers for a single
600
+ request; this effectively ignores the headers
601
+ in the spec for a single request.
602
+ :type _headers: dict, optional
603
+ :param _host_index: set to override the host_index for a single
604
+ request; this effectively ignores the host_index
605
+ in the spec for a single request.
606
+ :type _host_index: int, optional
607
+ :return: Returns the result object.
608
+ """ # noqa: E501
609
+
610
+ _param = self._delete_memory_serialize(
611
+ id=id,
612
+ _request_auth=_request_auth,
613
+ _content_type=_content_type,
614
+ _headers=_headers,
615
+ _host_index=_host_index,
616
+ )
617
+
618
+ _response_types_map: Dict[str, Optional[str]] = {
619
+ "204": None,
620
+ }
621
+ response_data = await self.api_client.call_api(
622
+ *_param, _request_timeout=_request_timeout
623
+ )
624
+ await response_data.read()
625
+ return self.api_client.response_deserialize(
626
+ response_data=response_data,
627
+ response_types_map=_response_types_map,
628
+ ).data
629
+
630
+ @validate_call
631
+ async def delete_memory_with_http_info(
632
+ self,
633
+ id: UUID,
634
+ _request_timeout: Union[
635
+ None,
636
+ Annotated[StrictFloat, Field(gt=0)],
637
+ Tuple[
638
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
639
+ ],
640
+ ] = None,
641
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
642
+ _content_type: Optional[StrictStr] = None,
643
+ _headers: Optional[Dict[StrictStr, Any]] = None,
644
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
645
+ ) -> ApiResponse[None]:
646
+ """Delete a memory
647
+
648
+ Delete a specific memory by its ID.
649
+
650
+ :param id: (required)
651
+ :type id: UUID
652
+ :param _request_timeout: timeout setting for this request. If one
653
+ number provided, it will be total request
654
+ timeout. It can also be a pair (tuple) of
655
+ (connection, read) timeouts.
656
+ :type _request_timeout: int, tuple(int, int), optional
657
+ :param _request_auth: set to override the auth_settings for an a single
658
+ request; this effectively ignores the
659
+ authentication in the spec for a single request.
660
+ :type _request_auth: dict, optional
661
+ :param _content_type: force content-type for the request.
662
+ :type _content_type: str, Optional
663
+ :param _headers: set to override the headers for a single
664
+ request; this effectively ignores the headers
665
+ in the spec for a single request.
666
+ :type _headers: dict, optional
667
+ :param _host_index: set to override the host_index for a single
668
+ request; this effectively ignores the host_index
669
+ in the spec for a single request.
670
+ :type _host_index: int, optional
671
+ :return: Returns the result object.
672
+ """ # noqa: E501
673
+
674
+ _param = self._delete_memory_serialize(
675
+ id=id,
676
+ _request_auth=_request_auth,
677
+ _content_type=_content_type,
678
+ _headers=_headers,
679
+ _host_index=_host_index,
680
+ )
681
+
682
+ _response_types_map: Dict[str, Optional[str]] = {
683
+ "204": None,
684
+ }
685
+ response_data = await self.api_client.call_api(
686
+ *_param, _request_timeout=_request_timeout
687
+ )
688
+ await response_data.read()
689
+ return self.api_client.response_deserialize(
690
+ response_data=response_data,
691
+ response_types_map=_response_types_map,
692
+ )
693
+
694
+ @validate_call
695
+ async def delete_memory_without_preload_content(
696
+ self,
697
+ id: UUID,
698
+ _request_timeout: Union[
699
+ None,
700
+ Annotated[StrictFloat, Field(gt=0)],
701
+ Tuple[
702
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
703
+ ],
704
+ ] = None,
705
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
706
+ _content_type: Optional[StrictStr] = None,
707
+ _headers: Optional[Dict[StrictStr, Any]] = None,
708
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
709
+ ) -> RESTResponseType:
710
+ """Delete a memory
711
+
712
+ Delete a specific memory by its ID.
713
+
714
+ :param id: (required)
715
+ :type id: UUID
716
+ :param _request_timeout: timeout setting for this request. If one
717
+ number provided, it will be total request
718
+ timeout. It can also be a pair (tuple) of
719
+ (connection, read) timeouts.
720
+ :type _request_timeout: int, tuple(int, int), optional
721
+ :param _request_auth: set to override the auth_settings for an a single
722
+ request; this effectively ignores the
723
+ authentication in the spec for a single request.
724
+ :type _request_auth: dict, optional
725
+ :param _content_type: force content-type for the request.
726
+ :type _content_type: str, Optional
727
+ :param _headers: set to override the headers for a single
728
+ request; this effectively ignores the headers
729
+ in the spec for a single request.
730
+ :type _headers: dict, optional
731
+ :param _host_index: set to override the host_index for a single
732
+ request; this effectively ignores the host_index
733
+ in the spec for a single request.
734
+ :type _host_index: int, optional
735
+ :return: Returns the result object.
736
+ """ # noqa: E501
737
+
738
+ _param = self._delete_memory_serialize(
739
+ id=id,
740
+ _request_auth=_request_auth,
741
+ _content_type=_content_type,
742
+ _headers=_headers,
743
+ _host_index=_host_index,
744
+ )
745
+
746
+ _response_types_map: Dict[str, Optional[str]] = {
747
+ "204": None,
748
+ }
749
+ response_data = await self.api_client.call_api(
750
+ *_param, _request_timeout=_request_timeout
751
+ )
752
+ return response_data.response
753
+
754
+ def _delete_memory_serialize(
755
+ self,
756
+ id,
757
+ _request_auth,
758
+ _content_type,
759
+ _headers,
760
+ _host_index,
761
+ ) -> RequestSerialized:
762
+ _host = None
763
+
764
+ _collection_formats: Dict[str, str] = {}
765
+
766
+ _path_params: Dict[str, str] = {}
767
+ _query_params: List[Tuple[str, str]] = []
768
+ _header_params: Dict[str, Optional[str]] = _headers or {}
769
+ _form_params: List[Tuple[str, str]] = []
770
+ _files: Dict[
771
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
772
+ ] = {}
773
+ _body_params: Optional[bytes] = None
774
+
775
+ # process the path parameters
776
+ if id is not None:
777
+ _path_params["id"] = id
778
+ # process the query parameters
779
+ # process the header parameters
780
+ # process the form parameters
781
+ # process the body parameter
782
+
783
+ # authentication setting
784
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
785
+
786
+ return self.api_client.param_serialize(
787
+ method="DELETE",
788
+ resource_path="/memories/{id}",
789
+ path_params=_path_params,
790
+ query_params=_query_params,
791
+ header_params=_header_params,
792
+ body=_body_params,
793
+ post_params=_form_params,
794
+ files=_files,
795
+ auth_settings=_auth_settings,
796
+ collection_formats=_collection_formats,
797
+ _host=_host,
798
+ _request_auth=_request_auth,
799
+ )
800
+
801
+ @validate_call
802
+ async def get_memory(
803
+ self,
804
+ id: UUID,
805
+ _request_timeout: Union[
806
+ None,
807
+ Annotated[StrictFloat, Field(gt=0)],
808
+ Tuple[
809
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
810
+ ],
811
+ ] = None,
812
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
813
+ _content_type: Optional[StrictStr] = None,
814
+ _headers: Optional[Dict[StrictStr, Any]] = None,
815
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
816
+ ) -> MemoryResponseDto:
817
+ """Retrieve a memory
818
+
819
+ Retrieve a specific memory by its ID.
820
+
821
+ :param id: (required)
822
+ :type id: UUID
823
+ :param _request_timeout: timeout setting for this request. If one
824
+ number provided, it will be total request
825
+ timeout. It can also be a pair (tuple) of
826
+ (connection, read) timeouts.
827
+ :type _request_timeout: int, tuple(int, int), optional
828
+ :param _request_auth: set to override the auth_settings for an a single
829
+ request; this effectively ignores the
830
+ authentication in the spec for a single request.
831
+ :type _request_auth: dict, optional
832
+ :param _content_type: force content-type for the request.
833
+ :type _content_type: str, Optional
834
+ :param _headers: set to override the headers for a single
835
+ request; this effectively ignores the headers
836
+ in the spec for a single request.
837
+ :type _headers: dict, optional
838
+ :param _host_index: set to override the host_index for a single
839
+ request; this effectively ignores the host_index
840
+ in the spec for a single request.
841
+ :type _host_index: int, optional
842
+ :return: Returns the result object.
843
+ """ # noqa: E501
844
+
845
+ _param = self._get_memory_serialize(
846
+ id=id,
847
+ _request_auth=_request_auth,
848
+ _content_type=_content_type,
849
+ _headers=_headers,
850
+ _host_index=_host_index,
851
+ )
852
+
853
+ _response_types_map: Dict[str, Optional[str]] = {
854
+ "200": "MemoryResponseDto",
855
+ }
856
+ response_data = await self.api_client.call_api(
857
+ *_param, _request_timeout=_request_timeout
858
+ )
859
+ await response_data.read()
860
+ return self.api_client.response_deserialize(
861
+ response_data=response_data,
862
+ response_types_map=_response_types_map,
863
+ ).data
864
+
865
+ @validate_call
866
+ async def get_memory_with_http_info(
867
+ self,
868
+ id: UUID,
869
+ _request_timeout: Union[
870
+ None,
871
+ Annotated[StrictFloat, Field(gt=0)],
872
+ Tuple[
873
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
874
+ ],
875
+ ] = None,
876
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
877
+ _content_type: Optional[StrictStr] = None,
878
+ _headers: Optional[Dict[StrictStr, Any]] = None,
879
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
880
+ ) -> ApiResponse[MemoryResponseDto]:
881
+ """Retrieve a memory
882
+
883
+ Retrieve a specific memory by its ID.
884
+
885
+ :param id: (required)
886
+ :type id: UUID
887
+ :param _request_timeout: timeout setting for this request. If one
888
+ number provided, it will be total request
889
+ timeout. It can also be a pair (tuple) of
890
+ (connection, read) timeouts.
891
+ :type _request_timeout: int, tuple(int, int), optional
892
+ :param _request_auth: set to override the auth_settings for an a single
893
+ request; this effectively ignores the
894
+ authentication in the spec for a single request.
895
+ :type _request_auth: dict, optional
896
+ :param _content_type: force content-type for the request.
897
+ :type _content_type: str, Optional
898
+ :param _headers: set to override the headers for a single
899
+ request; this effectively ignores the headers
900
+ in the spec for a single request.
901
+ :type _headers: dict, optional
902
+ :param _host_index: set to override the host_index for a single
903
+ request; this effectively ignores the host_index
904
+ in the spec for a single request.
905
+ :type _host_index: int, optional
906
+ :return: Returns the result object.
907
+ """ # noqa: E501
908
+
909
+ _param = self._get_memory_serialize(
910
+ id=id,
911
+ _request_auth=_request_auth,
912
+ _content_type=_content_type,
913
+ _headers=_headers,
914
+ _host_index=_host_index,
915
+ )
916
+
917
+ _response_types_map: Dict[str, Optional[str]] = {
918
+ "200": "MemoryResponseDto",
919
+ }
920
+ response_data = await self.api_client.call_api(
921
+ *_param, _request_timeout=_request_timeout
922
+ )
923
+ await response_data.read()
924
+ return self.api_client.response_deserialize(
925
+ response_data=response_data,
926
+ response_types_map=_response_types_map,
927
+ )
928
+
929
+ @validate_call
930
+ async def get_memory_without_preload_content(
931
+ self,
932
+ id: UUID,
933
+ _request_timeout: Union[
934
+ None,
935
+ Annotated[StrictFloat, Field(gt=0)],
936
+ Tuple[
937
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
938
+ ],
939
+ ] = None,
940
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
941
+ _content_type: Optional[StrictStr] = None,
942
+ _headers: Optional[Dict[StrictStr, Any]] = None,
943
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
944
+ ) -> RESTResponseType:
945
+ """Retrieve a memory
946
+
947
+ Retrieve a specific memory by its ID.
948
+
949
+ :param id: (required)
950
+ :type id: UUID
951
+ :param _request_timeout: timeout setting for this request. If one
952
+ number provided, it will be total request
953
+ timeout. It can also be a pair (tuple) of
954
+ (connection, read) timeouts.
955
+ :type _request_timeout: int, tuple(int, int), optional
956
+ :param _request_auth: set to override the auth_settings for an a single
957
+ request; this effectively ignores the
958
+ authentication in the spec for a single request.
959
+ :type _request_auth: dict, optional
960
+ :param _content_type: force content-type for the request.
961
+ :type _content_type: str, Optional
962
+ :param _headers: set to override the headers for a single
963
+ request; this effectively ignores the headers
964
+ in the spec for a single request.
965
+ :type _headers: dict, optional
966
+ :param _host_index: set to override the host_index for a single
967
+ request; this effectively ignores the host_index
968
+ in the spec for a single request.
969
+ :type _host_index: int, optional
970
+ :return: Returns the result object.
971
+ """ # noqa: E501
972
+
973
+ _param = self._get_memory_serialize(
974
+ id=id,
975
+ _request_auth=_request_auth,
976
+ _content_type=_content_type,
977
+ _headers=_headers,
978
+ _host_index=_host_index,
979
+ )
980
+
981
+ _response_types_map: Dict[str, Optional[str]] = {
982
+ "200": "MemoryResponseDto",
983
+ }
984
+ response_data = await self.api_client.call_api(
985
+ *_param, _request_timeout=_request_timeout
986
+ )
987
+ return response_data.response
988
+
989
+ def _get_memory_serialize(
990
+ self,
991
+ id,
992
+ _request_auth,
993
+ _content_type,
994
+ _headers,
995
+ _host_index,
996
+ ) -> RequestSerialized:
997
+ _host = None
998
+
999
+ _collection_formats: Dict[str, str] = {}
1000
+
1001
+ _path_params: Dict[str, str] = {}
1002
+ _query_params: List[Tuple[str, str]] = []
1003
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1004
+ _form_params: List[Tuple[str, str]] = []
1005
+ _files: Dict[
1006
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1007
+ ] = {}
1008
+ _body_params: Optional[bytes] = None
1009
+
1010
+ # process the path parameters
1011
+ if id is not None:
1012
+ _path_params["id"] = id
1013
+ # process the query parameters
1014
+ # process the header parameters
1015
+ # process the form parameters
1016
+ # process the body parameter
1017
+
1018
+ # set the HTTP header `Accept`
1019
+ if "Accept" not in _header_params:
1020
+ _header_params["Accept"] = self.api_client.select_header_accept(
1021
+ ["application/json"]
1022
+ )
1023
+
1024
+ # authentication setting
1025
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1026
+
1027
+ return self.api_client.param_serialize(
1028
+ method="GET",
1029
+ resource_path="/memories/{id}",
1030
+ path_params=_path_params,
1031
+ query_params=_query_params,
1032
+ header_params=_header_params,
1033
+ body=_body_params,
1034
+ post_params=_form_params,
1035
+ files=_files,
1036
+ auth_settings=_auth_settings,
1037
+ collection_formats=_collection_formats,
1038
+ _host=_host,
1039
+ _request_auth=_request_auth,
1040
+ )
1041
+
1042
+ @validate_call
1043
+ async def memories_statistics(
1044
+ self,
1045
+ var_for: Optional[datetime] = None,
1046
+ is_saved: Optional[StrictBool] = None,
1047
+ is_trashed: Optional[StrictBool] = None,
1048
+ order: Optional[MemorySearchOrder] = None,
1049
+ size: Annotated[
1050
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1051
+ Field(description="Number of memories to return"),
1052
+ ] = None,
1053
+ type: Optional[MemoryType] = None,
1054
+ _request_timeout: Union[
1055
+ None,
1056
+ Annotated[StrictFloat, Field(gt=0)],
1057
+ Tuple[
1058
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1059
+ ],
1060
+ ] = None,
1061
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1062
+ _content_type: Optional[StrictStr] = None,
1063
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1064
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1065
+ ) -> MemoryStatisticsResponseDto:
1066
+ """Retrieve memories statistics
1067
+
1068
+ Retrieve statistics about memories, such as total count and other relevant metrics.
1069
+
1070
+ :param var_for:
1071
+ :type var_for: datetime
1072
+ :param is_saved:
1073
+ :type is_saved: bool
1074
+ :param is_trashed:
1075
+ :type is_trashed: bool
1076
+ :param order:
1077
+ :type order: MemorySearchOrder
1078
+ :param size: Number of memories to return
1079
+ :type size: int
1080
+ :param type:
1081
+ :type type: MemoryType
1082
+ :param _request_timeout: timeout setting for this request. If one
1083
+ number provided, it will be total request
1084
+ timeout. It can also be a pair (tuple) of
1085
+ (connection, read) timeouts.
1086
+ :type _request_timeout: int, tuple(int, int), optional
1087
+ :param _request_auth: set to override the auth_settings for an a single
1088
+ request; this effectively ignores the
1089
+ authentication in the spec for a single request.
1090
+ :type _request_auth: dict, optional
1091
+ :param _content_type: force content-type for the request.
1092
+ :type _content_type: str, Optional
1093
+ :param _headers: set to override the headers for a single
1094
+ request; this effectively ignores the headers
1095
+ in the spec for a single request.
1096
+ :type _headers: dict, optional
1097
+ :param _host_index: set to override the host_index for a single
1098
+ request; this effectively ignores the host_index
1099
+ in the spec for a single request.
1100
+ :type _host_index: int, optional
1101
+ :return: Returns the result object.
1102
+ """ # noqa: E501
1103
+
1104
+ _param = self._memories_statistics_serialize(
1105
+ var_for=var_for,
1106
+ is_saved=is_saved,
1107
+ is_trashed=is_trashed,
1108
+ order=order,
1109
+ size=size,
1110
+ type=type,
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": "MemoryStatisticsResponseDto",
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
+ ).data
1128
+
1129
+ @validate_call
1130
+ async def memories_statistics_with_http_info(
1131
+ self,
1132
+ var_for: Optional[datetime] = None,
1133
+ is_saved: Optional[StrictBool] = None,
1134
+ is_trashed: Optional[StrictBool] = None,
1135
+ order: Optional[MemorySearchOrder] = None,
1136
+ size: Annotated[
1137
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1138
+ Field(description="Number of memories to return"),
1139
+ ] = None,
1140
+ type: Optional[MemoryType] = None,
1141
+ _request_timeout: Union[
1142
+ None,
1143
+ Annotated[StrictFloat, Field(gt=0)],
1144
+ Tuple[
1145
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1146
+ ],
1147
+ ] = None,
1148
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1149
+ _content_type: Optional[StrictStr] = None,
1150
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1151
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1152
+ ) -> ApiResponse[MemoryStatisticsResponseDto]:
1153
+ """Retrieve memories statistics
1154
+
1155
+ Retrieve statistics about memories, such as total count and other relevant metrics.
1156
+
1157
+ :param var_for:
1158
+ :type var_for: datetime
1159
+ :param is_saved:
1160
+ :type is_saved: bool
1161
+ :param is_trashed:
1162
+ :type is_trashed: bool
1163
+ :param order:
1164
+ :type order: MemorySearchOrder
1165
+ :param size: Number of memories to return
1166
+ :type size: int
1167
+ :param type:
1168
+ :type type: MemoryType
1169
+ :param _request_timeout: timeout setting for this request. If one
1170
+ number provided, it will be total request
1171
+ timeout. It can also be a pair (tuple) of
1172
+ (connection, read) timeouts.
1173
+ :type _request_timeout: int, tuple(int, int), optional
1174
+ :param _request_auth: set to override the auth_settings for an a single
1175
+ request; this effectively ignores the
1176
+ authentication in the spec for a single request.
1177
+ :type _request_auth: dict, optional
1178
+ :param _content_type: force content-type for the request.
1179
+ :type _content_type: str, Optional
1180
+ :param _headers: set to override the headers for a single
1181
+ request; this effectively ignores the headers
1182
+ in the spec for a single request.
1183
+ :type _headers: dict, optional
1184
+ :param _host_index: set to override the host_index for a single
1185
+ request; this effectively ignores the host_index
1186
+ in the spec for a single request.
1187
+ :type _host_index: int, optional
1188
+ :return: Returns the result object.
1189
+ """ # noqa: E501
1190
+
1191
+ _param = self._memories_statistics_serialize(
1192
+ var_for=var_for,
1193
+ is_saved=is_saved,
1194
+ is_trashed=is_trashed,
1195
+ order=order,
1196
+ size=size,
1197
+ type=type,
1198
+ _request_auth=_request_auth,
1199
+ _content_type=_content_type,
1200
+ _headers=_headers,
1201
+ _host_index=_host_index,
1202
+ )
1203
+
1204
+ _response_types_map: Dict[str, Optional[str]] = {
1205
+ "200": "MemoryStatisticsResponseDto",
1206
+ }
1207
+ response_data = await self.api_client.call_api(
1208
+ *_param, _request_timeout=_request_timeout
1209
+ )
1210
+ await response_data.read()
1211
+ return self.api_client.response_deserialize(
1212
+ response_data=response_data,
1213
+ response_types_map=_response_types_map,
1214
+ )
1215
+
1216
+ @validate_call
1217
+ async def memories_statistics_without_preload_content(
1218
+ self,
1219
+ var_for: Optional[datetime] = None,
1220
+ is_saved: Optional[StrictBool] = None,
1221
+ is_trashed: Optional[StrictBool] = None,
1222
+ order: Optional[MemorySearchOrder] = None,
1223
+ size: Annotated[
1224
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1225
+ Field(description="Number of memories to return"),
1226
+ ] = None,
1227
+ type: Optional[MemoryType] = None,
1228
+ _request_timeout: Union[
1229
+ None,
1230
+ Annotated[StrictFloat, Field(gt=0)],
1231
+ Tuple[
1232
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1233
+ ],
1234
+ ] = None,
1235
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1236
+ _content_type: Optional[StrictStr] = None,
1237
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1238
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1239
+ ) -> RESTResponseType:
1240
+ """Retrieve memories statistics
1241
+
1242
+ Retrieve statistics about memories, such as total count and other relevant metrics.
1243
+
1244
+ :param var_for:
1245
+ :type var_for: datetime
1246
+ :param is_saved:
1247
+ :type is_saved: bool
1248
+ :param is_trashed:
1249
+ :type is_trashed: bool
1250
+ :param order:
1251
+ :type order: MemorySearchOrder
1252
+ :param size: Number of memories to return
1253
+ :type size: int
1254
+ :param type:
1255
+ :type type: MemoryType
1256
+ :param _request_timeout: timeout setting for this request. If one
1257
+ number provided, it will be total request
1258
+ timeout. It can also be a pair (tuple) of
1259
+ (connection, read) timeouts.
1260
+ :type _request_timeout: int, tuple(int, int), optional
1261
+ :param _request_auth: set to override the auth_settings for an a single
1262
+ request; this effectively ignores the
1263
+ authentication in the spec for a single request.
1264
+ :type _request_auth: dict, optional
1265
+ :param _content_type: force content-type for the request.
1266
+ :type _content_type: str, Optional
1267
+ :param _headers: set to override the headers for a single
1268
+ request; this effectively ignores the headers
1269
+ in the spec for a single request.
1270
+ :type _headers: dict, optional
1271
+ :param _host_index: set to override the host_index for a single
1272
+ request; this effectively ignores the host_index
1273
+ in the spec for a single request.
1274
+ :type _host_index: int, optional
1275
+ :return: Returns the result object.
1276
+ """ # noqa: E501
1277
+
1278
+ _param = self._memories_statistics_serialize(
1279
+ var_for=var_for,
1280
+ is_saved=is_saved,
1281
+ is_trashed=is_trashed,
1282
+ order=order,
1283
+ size=size,
1284
+ type=type,
1285
+ _request_auth=_request_auth,
1286
+ _content_type=_content_type,
1287
+ _headers=_headers,
1288
+ _host_index=_host_index,
1289
+ )
1290
+
1291
+ _response_types_map: Dict[str, Optional[str]] = {
1292
+ "200": "MemoryStatisticsResponseDto",
1293
+ }
1294
+ response_data = await self.api_client.call_api(
1295
+ *_param, _request_timeout=_request_timeout
1296
+ )
1297
+ return response_data.response
1298
+
1299
+ def _memories_statistics_serialize(
1300
+ self,
1301
+ var_for,
1302
+ is_saved,
1303
+ is_trashed,
1304
+ order,
1305
+ size,
1306
+ type,
1307
+ _request_auth,
1308
+ _content_type,
1309
+ _headers,
1310
+ _host_index,
1311
+ ) -> RequestSerialized:
1312
+ _host = None
1313
+
1314
+ _collection_formats: Dict[str, str] = {}
1315
+
1316
+ _path_params: Dict[str, str] = {}
1317
+ _query_params: List[Tuple[str, str]] = []
1318
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1319
+ _form_params: List[Tuple[str, str]] = []
1320
+ _files: Dict[
1321
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1322
+ ] = {}
1323
+ _body_params: Optional[bytes] = None
1324
+
1325
+ # process the path parameters
1326
+ # process the query parameters
1327
+ if var_for is not None:
1328
+ if isinstance(var_for, datetime):
1329
+ _query_params.append(
1330
+ (
1331
+ "for",
1332
+ var_for.strftime(self.api_client.configuration.datetime_format),
1333
+ )
1334
+ )
1335
+ else:
1336
+ _query_params.append(("for", var_for))
1337
+
1338
+ if is_saved is not None:
1339
+ _query_params.append(("isSaved", is_saved))
1340
+
1341
+ if is_trashed is not None:
1342
+ _query_params.append(("isTrashed", is_trashed))
1343
+
1344
+ if order is not None:
1345
+ _query_params.append(("order", order.value))
1346
+
1347
+ if size is not None:
1348
+ _query_params.append(("size", size))
1349
+
1350
+ if type is not None:
1351
+ _query_params.append(("type", type.value))
1352
+
1353
+ # process the header parameters
1354
+ # process the form parameters
1355
+ # process the body parameter
1356
+
1357
+ # set the HTTP header `Accept`
1358
+ if "Accept" not in _header_params:
1359
+ _header_params["Accept"] = self.api_client.select_header_accept(
1360
+ ["application/json"]
1361
+ )
1362
+
1363
+ # authentication setting
1364
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1365
+
1366
+ return self.api_client.param_serialize(
1367
+ method="GET",
1368
+ resource_path="/memories/statistics",
1369
+ path_params=_path_params,
1370
+ query_params=_query_params,
1371
+ header_params=_header_params,
1372
+ body=_body_params,
1373
+ post_params=_form_params,
1374
+ files=_files,
1375
+ auth_settings=_auth_settings,
1376
+ collection_formats=_collection_formats,
1377
+ _host=_host,
1378
+ _request_auth=_request_auth,
1379
+ )
1380
+
1381
+ @validate_call
1382
+ async def remove_memory_assets(
1383
+ self,
1384
+ id: UUID,
1385
+ bulk_ids_dto: BulkIdsDto,
1386
+ _request_timeout: Union[
1387
+ None,
1388
+ Annotated[StrictFloat, Field(gt=0)],
1389
+ Tuple[
1390
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1391
+ ],
1392
+ ] = None,
1393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1394
+ _content_type: Optional[StrictStr] = None,
1395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1397
+ ) -> List[BulkIdResponseDto]:
1398
+ """Remove assets from a memory
1399
+
1400
+ Remove a list of asset IDs from a specific memory.
1401
+
1402
+ :param id: (required)
1403
+ :type id: UUID
1404
+ :param bulk_ids_dto: (required)
1405
+ :type bulk_ids_dto: BulkIdsDto
1406
+ :param _request_timeout: timeout setting for this request. If one
1407
+ number provided, it will be total request
1408
+ timeout. It can also be a pair (tuple) of
1409
+ (connection, read) timeouts.
1410
+ :type _request_timeout: int, tuple(int, int), optional
1411
+ :param _request_auth: set to override the auth_settings for an a single
1412
+ request; this effectively ignores the
1413
+ authentication in the spec for a single request.
1414
+ :type _request_auth: dict, optional
1415
+ :param _content_type: force content-type for the request.
1416
+ :type _content_type: str, Optional
1417
+ :param _headers: set to override the headers for a single
1418
+ request; this effectively ignores the headers
1419
+ in the spec for a single request.
1420
+ :type _headers: dict, optional
1421
+ :param _host_index: set to override the host_index for a single
1422
+ request; this effectively ignores the host_index
1423
+ in the spec for a single request.
1424
+ :type _host_index: int, optional
1425
+ :return: Returns the result object.
1426
+ """ # noqa: E501
1427
+
1428
+ _param = self._remove_memory_assets_serialize(
1429
+ id=id,
1430
+ bulk_ids_dto=bulk_ids_dto,
1431
+ _request_auth=_request_auth,
1432
+ _content_type=_content_type,
1433
+ _headers=_headers,
1434
+ _host_index=_host_index,
1435
+ )
1436
+
1437
+ _response_types_map: Dict[str, Optional[str]] = {
1438
+ "200": "List[BulkIdResponseDto]",
1439
+ }
1440
+ response_data = await self.api_client.call_api(
1441
+ *_param, _request_timeout=_request_timeout
1442
+ )
1443
+ await response_data.read()
1444
+ return self.api_client.response_deserialize(
1445
+ response_data=response_data,
1446
+ response_types_map=_response_types_map,
1447
+ ).data
1448
+
1449
+ @validate_call
1450
+ async def remove_memory_assets_with_http_info(
1451
+ self,
1452
+ id: UUID,
1453
+ bulk_ids_dto: BulkIdsDto,
1454
+ _request_timeout: Union[
1455
+ None,
1456
+ Annotated[StrictFloat, Field(gt=0)],
1457
+ Tuple[
1458
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1459
+ ],
1460
+ ] = None,
1461
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1462
+ _content_type: Optional[StrictStr] = None,
1463
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1464
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1465
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
1466
+ """Remove assets from a memory
1467
+
1468
+ Remove a list of asset IDs from a specific memory.
1469
+
1470
+ :param id: (required)
1471
+ :type id: UUID
1472
+ :param bulk_ids_dto: (required)
1473
+ :type bulk_ids_dto: BulkIdsDto
1474
+ :param _request_timeout: timeout setting for this request. If one
1475
+ number provided, it will be total request
1476
+ timeout. It can also be a pair (tuple) of
1477
+ (connection, read) timeouts.
1478
+ :type _request_timeout: int, tuple(int, int), optional
1479
+ :param _request_auth: set to override the auth_settings for an a single
1480
+ request; this effectively ignores the
1481
+ authentication in the spec for a single request.
1482
+ :type _request_auth: dict, optional
1483
+ :param _content_type: force content-type for the request.
1484
+ :type _content_type: str, Optional
1485
+ :param _headers: set to override the headers for a single
1486
+ request; this effectively ignores the headers
1487
+ in the spec for a single request.
1488
+ :type _headers: dict, optional
1489
+ :param _host_index: set to override the host_index for a single
1490
+ request; this effectively ignores the host_index
1491
+ in the spec for a single request.
1492
+ :type _host_index: int, optional
1493
+ :return: Returns the result object.
1494
+ """ # noqa: E501
1495
+
1496
+ _param = self._remove_memory_assets_serialize(
1497
+ id=id,
1498
+ bulk_ids_dto=bulk_ids_dto,
1499
+ _request_auth=_request_auth,
1500
+ _content_type=_content_type,
1501
+ _headers=_headers,
1502
+ _host_index=_host_index,
1503
+ )
1504
+
1505
+ _response_types_map: Dict[str, Optional[str]] = {
1506
+ "200": "List[BulkIdResponseDto]",
1507
+ }
1508
+ response_data = await self.api_client.call_api(
1509
+ *_param, _request_timeout=_request_timeout
1510
+ )
1511
+ await response_data.read()
1512
+ return self.api_client.response_deserialize(
1513
+ response_data=response_data,
1514
+ response_types_map=_response_types_map,
1515
+ )
1516
+
1517
+ @validate_call
1518
+ async def remove_memory_assets_without_preload_content(
1519
+ self,
1520
+ id: UUID,
1521
+ bulk_ids_dto: BulkIdsDto,
1522
+ _request_timeout: Union[
1523
+ None,
1524
+ Annotated[StrictFloat, Field(gt=0)],
1525
+ Tuple[
1526
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1527
+ ],
1528
+ ] = None,
1529
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1530
+ _content_type: Optional[StrictStr] = None,
1531
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1532
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1533
+ ) -> RESTResponseType:
1534
+ """Remove assets from a memory
1535
+
1536
+ Remove a list of asset IDs from a specific memory.
1537
+
1538
+ :param id: (required)
1539
+ :type id: UUID
1540
+ :param bulk_ids_dto: (required)
1541
+ :type bulk_ids_dto: BulkIdsDto
1542
+ :param _request_timeout: timeout setting for this request. If one
1543
+ number provided, it will be total request
1544
+ timeout. It can also be a pair (tuple) of
1545
+ (connection, read) timeouts.
1546
+ :type _request_timeout: int, tuple(int, int), optional
1547
+ :param _request_auth: set to override the auth_settings for an a single
1548
+ request; this effectively ignores the
1549
+ authentication in the spec for a single request.
1550
+ :type _request_auth: dict, optional
1551
+ :param _content_type: force content-type for the request.
1552
+ :type _content_type: str, Optional
1553
+ :param _headers: set to override the headers for a single
1554
+ request; this effectively ignores the headers
1555
+ in the spec for a single request.
1556
+ :type _headers: dict, optional
1557
+ :param _host_index: set to override the host_index for a single
1558
+ request; this effectively ignores the host_index
1559
+ in the spec for a single request.
1560
+ :type _host_index: int, optional
1561
+ :return: Returns the result object.
1562
+ """ # noqa: E501
1563
+
1564
+ _param = self._remove_memory_assets_serialize(
1565
+ id=id,
1566
+ bulk_ids_dto=bulk_ids_dto,
1567
+ _request_auth=_request_auth,
1568
+ _content_type=_content_type,
1569
+ _headers=_headers,
1570
+ _host_index=_host_index,
1571
+ )
1572
+
1573
+ _response_types_map: Dict[str, Optional[str]] = {
1574
+ "200": "List[BulkIdResponseDto]",
1575
+ }
1576
+ response_data = await self.api_client.call_api(
1577
+ *_param, _request_timeout=_request_timeout
1578
+ )
1579
+ return response_data.response
1580
+
1581
+ def _remove_memory_assets_serialize(
1582
+ self,
1583
+ id,
1584
+ bulk_ids_dto,
1585
+ _request_auth,
1586
+ _content_type,
1587
+ _headers,
1588
+ _host_index,
1589
+ ) -> RequestSerialized:
1590
+ _host = None
1591
+
1592
+ _collection_formats: Dict[str, str] = {}
1593
+
1594
+ _path_params: Dict[str, str] = {}
1595
+ _query_params: List[Tuple[str, str]] = []
1596
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1597
+ _form_params: List[Tuple[str, str]] = []
1598
+ _files: Dict[
1599
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1600
+ ] = {}
1601
+ _body_params: Optional[bytes] = None
1602
+
1603
+ # process the path parameters
1604
+ if id is not None:
1605
+ _path_params["id"] = id
1606
+ # process the query parameters
1607
+ # process the header parameters
1608
+ # process the form parameters
1609
+ # process the body parameter
1610
+ if bulk_ids_dto is not None:
1611
+ _body_params = bulk_ids_dto
1612
+
1613
+ # set the HTTP header `Accept`
1614
+ if "Accept" not in _header_params:
1615
+ _header_params["Accept"] = self.api_client.select_header_accept(
1616
+ ["application/json"]
1617
+ )
1618
+
1619
+ # set the HTTP header `Content-Type`
1620
+ if _content_type:
1621
+ _header_params["Content-Type"] = _content_type
1622
+ else:
1623
+ _default_content_type = self.api_client.select_header_content_type(
1624
+ ["application/json"]
1625
+ )
1626
+ if _default_content_type is not None:
1627
+ _header_params["Content-Type"] = _default_content_type
1628
+
1629
+ # authentication setting
1630
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1631
+
1632
+ return self.api_client.param_serialize(
1633
+ method="DELETE",
1634
+ resource_path="/memories/{id}/assets",
1635
+ path_params=_path_params,
1636
+ query_params=_query_params,
1637
+ header_params=_header_params,
1638
+ body=_body_params,
1639
+ post_params=_form_params,
1640
+ files=_files,
1641
+ auth_settings=_auth_settings,
1642
+ collection_formats=_collection_formats,
1643
+ _host=_host,
1644
+ _request_auth=_request_auth,
1645
+ )
1646
+
1647
+ @validate_call
1648
+ async def search_memories(
1649
+ self,
1650
+ var_for: Optional[datetime] = None,
1651
+ is_saved: Optional[StrictBool] = None,
1652
+ is_trashed: Optional[StrictBool] = None,
1653
+ order: Optional[MemorySearchOrder] = None,
1654
+ size: Annotated[
1655
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1656
+ Field(description="Number of memories to return"),
1657
+ ] = None,
1658
+ type: Optional[MemoryType] = None,
1659
+ _request_timeout: Union[
1660
+ None,
1661
+ Annotated[StrictFloat, Field(gt=0)],
1662
+ Tuple[
1663
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1664
+ ],
1665
+ ] = None,
1666
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1667
+ _content_type: Optional[StrictStr] = None,
1668
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1669
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1670
+ ) -> List[MemoryResponseDto]:
1671
+ """Retrieve memories
1672
+
1673
+ Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
1674
+
1675
+ :param var_for:
1676
+ :type var_for: datetime
1677
+ :param is_saved:
1678
+ :type is_saved: bool
1679
+ :param is_trashed:
1680
+ :type is_trashed: bool
1681
+ :param order:
1682
+ :type order: MemorySearchOrder
1683
+ :param size: Number of memories to return
1684
+ :type size: int
1685
+ :param type:
1686
+ :type type: MemoryType
1687
+ :param _request_timeout: timeout setting for this request. If one
1688
+ number provided, it will be total request
1689
+ timeout. It can also be a pair (tuple) of
1690
+ (connection, read) timeouts.
1691
+ :type _request_timeout: int, tuple(int, int), optional
1692
+ :param _request_auth: set to override the auth_settings for an a single
1693
+ request; this effectively ignores the
1694
+ authentication in the spec for a single request.
1695
+ :type _request_auth: dict, optional
1696
+ :param _content_type: force content-type for the request.
1697
+ :type _content_type: str, Optional
1698
+ :param _headers: set to override the headers for a single
1699
+ request; this effectively ignores the headers
1700
+ in the spec for a single request.
1701
+ :type _headers: dict, optional
1702
+ :param _host_index: set to override the host_index for a single
1703
+ request; this effectively ignores the host_index
1704
+ in the spec for a single request.
1705
+ :type _host_index: int, optional
1706
+ :return: Returns the result object.
1707
+ """ # noqa: E501
1708
+
1709
+ _param = self._search_memories_serialize(
1710
+ var_for=var_for,
1711
+ is_saved=is_saved,
1712
+ is_trashed=is_trashed,
1713
+ order=order,
1714
+ size=size,
1715
+ type=type,
1716
+ _request_auth=_request_auth,
1717
+ _content_type=_content_type,
1718
+ _headers=_headers,
1719
+ _host_index=_host_index,
1720
+ )
1721
+
1722
+ _response_types_map: Dict[str, Optional[str]] = {
1723
+ "200": "List[MemoryResponseDto]",
1724
+ }
1725
+ response_data = await self.api_client.call_api(
1726
+ *_param, _request_timeout=_request_timeout
1727
+ )
1728
+ await response_data.read()
1729
+ return self.api_client.response_deserialize(
1730
+ response_data=response_data,
1731
+ response_types_map=_response_types_map,
1732
+ ).data
1733
+
1734
+ @validate_call
1735
+ async def search_memories_with_http_info(
1736
+ self,
1737
+ var_for: Optional[datetime] = None,
1738
+ is_saved: Optional[StrictBool] = None,
1739
+ is_trashed: Optional[StrictBool] = None,
1740
+ order: Optional[MemorySearchOrder] = None,
1741
+ size: Annotated[
1742
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1743
+ Field(description="Number of memories to return"),
1744
+ ] = None,
1745
+ type: Optional[MemoryType] = None,
1746
+ _request_timeout: Union[
1747
+ None,
1748
+ Annotated[StrictFloat, Field(gt=0)],
1749
+ Tuple[
1750
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1751
+ ],
1752
+ ] = None,
1753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1754
+ _content_type: Optional[StrictStr] = None,
1755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1757
+ ) -> ApiResponse[List[MemoryResponseDto]]:
1758
+ """Retrieve memories
1759
+
1760
+ Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
1761
+
1762
+ :param var_for:
1763
+ :type var_for: datetime
1764
+ :param is_saved:
1765
+ :type is_saved: bool
1766
+ :param is_trashed:
1767
+ :type is_trashed: bool
1768
+ :param order:
1769
+ :type order: MemorySearchOrder
1770
+ :param size: Number of memories to return
1771
+ :type size: int
1772
+ :param type:
1773
+ :type type: MemoryType
1774
+ :param _request_timeout: timeout setting for this request. If one
1775
+ number provided, it will be total request
1776
+ timeout. It can also be a pair (tuple) of
1777
+ (connection, read) timeouts.
1778
+ :type _request_timeout: int, tuple(int, int), optional
1779
+ :param _request_auth: set to override the auth_settings for an a single
1780
+ request; this effectively ignores the
1781
+ authentication in the spec for a single request.
1782
+ :type _request_auth: dict, optional
1783
+ :param _content_type: force content-type for the request.
1784
+ :type _content_type: str, Optional
1785
+ :param _headers: set to override the headers for a single
1786
+ request; this effectively ignores the headers
1787
+ in the spec for a single request.
1788
+ :type _headers: dict, optional
1789
+ :param _host_index: set to override the host_index for a single
1790
+ request; this effectively ignores the host_index
1791
+ in the spec for a single request.
1792
+ :type _host_index: int, optional
1793
+ :return: Returns the result object.
1794
+ """ # noqa: E501
1795
+
1796
+ _param = self._search_memories_serialize(
1797
+ var_for=var_for,
1798
+ is_saved=is_saved,
1799
+ is_trashed=is_trashed,
1800
+ order=order,
1801
+ size=size,
1802
+ type=type,
1803
+ _request_auth=_request_auth,
1804
+ _content_type=_content_type,
1805
+ _headers=_headers,
1806
+ _host_index=_host_index,
1807
+ )
1808
+
1809
+ _response_types_map: Dict[str, Optional[str]] = {
1810
+ "200": "List[MemoryResponseDto]",
1811
+ }
1812
+ response_data = await self.api_client.call_api(
1813
+ *_param, _request_timeout=_request_timeout
1814
+ )
1815
+ await response_data.read()
1816
+ return self.api_client.response_deserialize(
1817
+ response_data=response_data,
1818
+ response_types_map=_response_types_map,
1819
+ )
1820
+
1821
+ @validate_call
1822
+ async def search_memories_without_preload_content(
1823
+ self,
1824
+ var_for: Optional[datetime] = None,
1825
+ is_saved: Optional[StrictBool] = None,
1826
+ is_trashed: Optional[StrictBool] = None,
1827
+ order: Optional[MemorySearchOrder] = None,
1828
+ size: Annotated[
1829
+ Optional[Annotated[int, Field(strict=True, ge=1)]],
1830
+ Field(description="Number of memories to return"),
1831
+ ] = None,
1832
+ type: Optional[MemoryType] = None,
1833
+ _request_timeout: Union[
1834
+ None,
1835
+ Annotated[StrictFloat, Field(gt=0)],
1836
+ Tuple[
1837
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1838
+ ],
1839
+ ] = None,
1840
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1841
+ _content_type: Optional[StrictStr] = None,
1842
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1843
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1844
+ ) -> RESTResponseType:
1845
+ """Retrieve memories
1846
+
1847
+ Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
1848
+
1849
+ :param var_for:
1850
+ :type var_for: datetime
1851
+ :param is_saved:
1852
+ :type is_saved: bool
1853
+ :param is_trashed:
1854
+ :type is_trashed: bool
1855
+ :param order:
1856
+ :type order: MemorySearchOrder
1857
+ :param size: Number of memories to return
1858
+ :type size: int
1859
+ :param type:
1860
+ :type type: MemoryType
1861
+ :param _request_timeout: timeout setting for this request. If one
1862
+ number provided, it will be total request
1863
+ timeout. It can also be a pair (tuple) of
1864
+ (connection, read) timeouts.
1865
+ :type _request_timeout: int, tuple(int, int), optional
1866
+ :param _request_auth: set to override the auth_settings for an a single
1867
+ request; this effectively ignores the
1868
+ authentication in the spec for a single request.
1869
+ :type _request_auth: dict, optional
1870
+ :param _content_type: force content-type for the request.
1871
+ :type _content_type: str, Optional
1872
+ :param _headers: set to override the headers for a single
1873
+ request; this effectively ignores the headers
1874
+ in the spec for a single request.
1875
+ :type _headers: dict, optional
1876
+ :param _host_index: set to override the host_index for a single
1877
+ request; this effectively ignores the host_index
1878
+ in the spec for a single request.
1879
+ :type _host_index: int, optional
1880
+ :return: Returns the result object.
1881
+ """ # noqa: E501
1882
+
1883
+ _param = self._search_memories_serialize(
1884
+ var_for=var_for,
1885
+ is_saved=is_saved,
1886
+ is_trashed=is_trashed,
1887
+ order=order,
1888
+ size=size,
1889
+ type=type,
1890
+ _request_auth=_request_auth,
1891
+ _content_type=_content_type,
1892
+ _headers=_headers,
1893
+ _host_index=_host_index,
1894
+ )
1895
+
1896
+ _response_types_map: Dict[str, Optional[str]] = {
1897
+ "200": "List[MemoryResponseDto]",
1898
+ }
1899
+ response_data = await self.api_client.call_api(
1900
+ *_param, _request_timeout=_request_timeout
1901
+ )
1902
+ return response_data.response
1903
+
1904
+ def _search_memories_serialize(
1905
+ self,
1906
+ var_for,
1907
+ is_saved,
1908
+ is_trashed,
1909
+ order,
1910
+ size,
1911
+ type,
1912
+ _request_auth,
1913
+ _content_type,
1914
+ _headers,
1915
+ _host_index,
1916
+ ) -> RequestSerialized:
1917
+ _host = None
1918
+
1919
+ _collection_formats: Dict[str, str] = {}
1920
+
1921
+ _path_params: Dict[str, str] = {}
1922
+ _query_params: List[Tuple[str, str]] = []
1923
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1924
+ _form_params: List[Tuple[str, str]] = []
1925
+ _files: Dict[
1926
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1927
+ ] = {}
1928
+ _body_params: Optional[bytes] = None
1929
+
1930
+ # process the path parameters
1931
+ # process the query parameters
1932
+ if var_for is not None:
1933
+ if isinstance(var_for, datetime):
1934
+ _query_params.append(
1935
+ (
1936
+ "for",
1937
+ var_for.strftime(self.api_client.configuration.datetime_format),
1938
+ )
1939
+ )
1940
+ else:
1941
+ _query_params.append(("for", var_for))
1942
+
1943
+ if is_saved is not None:
1944
+ _query_params.append(("isSaved", is_saved))
1945
+
1946
+ if is_trashed is not None:
1947
+ _query_params.append(("isTrashed", is_trashed))
1948
+
1949
+ if order is not None:
1950
+ _query_params.append(("order", order.value))
1951
+
1952
+ if size is not None:
1953
+ _query_params.append(("size", size))
1954
+
1955
+ if type is not None:
1956
+ _query_params.append(("type", type.value))
1957
+
1958
+ # process the header parameters
1959
+ # process the form parameters
1960
+ # process the body parameter
1961
+
1962
+ # set the HTTP header `Accept`
1963
+ if "Accept" not in _header_params:
1964
+ _header_params["Accept"] = self.api_client.select_header_accept(
1965
+ ["application/json"]
1966
+ )
1967
+
1968
+ # authentication setting
1969
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1970
+
1971
+ return self.api_client.param_serialize(
1972
+ method="GET",
1973
+ resource_path="/memories",
1974
+ path_params=_path_params,
1975
+ query_params=_query_params,
1976
+ header_params=_header_params,
1977
+ body=_body_params,
1978
+ post_params=_form_params,
1979
+ files=_files,
1980
+ auth_settings=_auth_settings,
1981
+ collection_formats=_collection_formats,
1982
+ _host=_host,
1983
+ _request_auth=_request_auth,
1984
+ )
1985
+
1986
+ @validate_call
1987
+ async def update_memory(
1988
+ self,
1989
+ id: UUID,
1990
+ memory_update_dto: MemoryUpdateDto,
1991
+ _request_timeout: Union[
1992
+ None,
1993
+ Annotated[StrictFloat, Field(gt=0)],
1994
+ Tuple[
1995
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1996
+ ],
1997
+ ] = None,
1998
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1999
+ _content_type: Optional[StrictStr] = None,
2000
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2001
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2002
+ ) -> MemoryResponseDto:
2003
+ """Update a memory
2004
+
2005
+ Update an existing memory by its ID.
2006
+
2007
+ :param id: (required)
2008
+ :type id: UUID
2009
+ :param memory_update_dto: (required)
2010
+ :type memory_update_dto: MemoryUpdateDto
2011
+ :param _request_timeout: timeout setting for this request. If one
2012
+ number provided, it will be total request
2013
+ timeout. It can also be a pair (tuple) of
2014
+ (connection, read) timeouts.
2015
+ :type _request_timeout: int, tuple(int, int), optional
2016
+ :param _request_auth: set to override the auth_settings for an a single
2017
+ request; this effectively ignores the
2018
+ authentication in the spec for a single request.
2019
+ :type _request_auth: dict, optional
2020
+ :param _content_type: force content-type for the request.
2021
+ :type _content_type: str, Optional
2022
+ :param _headers: set to override the headers for a single
2023
+ request; this effectively ignores the headers
2024
+ in the spec for a single request.
2025
+ :type _headers: dict, optional
2026
+ :param _host_index: set to override the host_index for a single
2027
+ request; this effectively ignores the host_index
2028
+ in the spec for a single request.
2029
+ :type _host_index: int, optional
2030
+ :return: Returns the result object.
2031
+ """ # noqa: E501
2032
+
2033
+ _param = self._update_memory_serialize(
2034
+ id=id,
2035
+ memory_update_dto=memory_update_dto,
2036
+ _request_auth=_request_auth,
2037
+ _content_type=_content_type,
2038
+ _headers=_headers,
2039
+ _host_index=_host_index,
2040
+ )
2041
+
2042
+ _response_types_map: Dict[str, Optional[str]] = {
2043
+ "200": "MemoryResponseDto",
2044
+ }
2045
+ response_data = await self.api_client.call_api(
2046
+ *_param, _request_timeout=_request_timeout
2047
+ )
2048
+ await response_data.read()
2049
+ return self.api_client.response_deserialize(
2050
+ response_data=response_data,
2051
+ response_types_map=_response_types_map,
2052
+ ).data
2053
+
2054
+ @validate_call
2055
+ async def update_memory_with_http_info(
2056
+ self,
2057
+ id: UUID,
2058
+ memory_update_dto: MemoryUpdateDto,
2059
+ _request_timeout: Union[
2060
+ None,
2061
+ Annotated[StrictFloat, Field(gt=0)],
2062
+ Tuple[
2063
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2064
+ ],
2065
+ ] = None,
2066
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2067
+ _content_type: Optional[StrictStr] = None,
2068
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2069
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2070
+ ) -> ApiResponse[MemoryResponseDto]:
2071
+ """Update a memory
2072
+
2073
+ Update an existing memory by its ID.
2074
+
2075
+ :param id: (required)
2076
+ :type id: UUID
2077
+ :param memory_update_dto: (required)
2078
+ :type memory_update_dto: MemoryUpdateDto
2079
+ :param _request_timeout: timeout setting for this request. If one
2080
+ number provided, it will be total request
2081
+ timeout. It can also be a pair (tuple) of
2082
+ (connection, read) timeouts.
2083
+ :type _request_timeout: int, tuple(int, int), optional
2084
+ :param _request_auth: set to override the auth_settings for an a single
2085
+ request; this effectively ignores the
2086
+ authentication in the spec for a single request.
2087
+ :type _request_auth: dict, optional
2088
+ :param _content_type: force content-type for the request.
2089
+ :type _content_type: str, Optional
2090
+ :param _headers: set to override the headers for a single
2091
+ request; this effectively ignores the headers
2092
+ in the spec for a single request.
2093
+ :type _headers: dict, optional
2094
+ :param _host_index: set to override the host_index for a single
2095
+ request; this effectively ignores the host_index
2096
+ in the spec for a single request.
2097
+ :type _host_index: int, optional
2098
+ :return: Returns the result object.
2099
+ """ # noqa: E501
2100
+
2101
+ _param = self._update_memory_serialize(
2102
+ id=id,
2103
+ memory_update_dto=memory_update_dto,
2104
+ _request_auth=_request_auth,
2105
+ _content_type=_content_type,
2106
+ _headers=_headers,
2107
+ _host_index=_host_index,
2108
+ )
2109
+
2110
+ _response_types_map: Dict[str, Optional[str]] = {
2111
+ "200": "MemoryResponseDto",
2112
+ }
2113
+ response_data = await self.api_client.call_api(
2114
+ *_param, _request_timeout=_request_timeout
2115
+ )
2116
+ await response_data.read()
2117
+ return self.api_client.response_deserialize(
2118
+ response_data=response_data,
2119
+ response_types_map=_response_types_map,
2120
+ )
2121
+
2122
+ @validate_call
2123
+ async def update_memory_without_preload_content(
2124
+ self,
2125
+ id: UUID,
2126
+ memory_update_dto: MemoryUpdateDto,
2127
+ _request_timeout: Union[
2128
+ None,
2129
+ Annotated[StrictFloat, Field(gt=0)],
2130
+ Tuple[
2131
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2132
+ ],
2133
+ ] = None,
2134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2135
+ _content_type: Optional[StrictStr] = None,
2136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2138
+ ) -> RESTResponseType:
2139
+ """Update a memory
2140
+
2141
+ Update an existing memory by its ID.
2142
+
2143
+ :param id: (required)
2144
+ :type id: UUID
2145
+ :param memory_update_dto: (required)
2146
+ :type memory_update_dto: MemoryUpdateDto
2147
+ :param _request_timeout: timeout setting for this request. If one
2148
+ number provided, it will be total request
2149
+ timeout. It can also be a pair (tuple) of
2150
+ (connection, read) timeouts.
2151
+ :type _request_timeout: int, tuple(int, int), optional
2152
+ :param _request_auth: set to override the auth_settings for an a single
2153
+ request; this effectively ignores the
2154
+ authentication in the spec for a single request.
2155
+ :type _request_auth: dict, optional
2156
+ :param _content_type: force content-type for the request.
2157
+ :type _content_type: str, Optional
2158
+ :param _headers: set to override the headers for a single
2159
+ request; this effectively ignores the headers
2160
+ in the spec for a single request.
2161
+ :type _headers: dict, optional
2162
+ :param _host_index: set to override the host_index for a single
2163
+ request; this effectively ignores the host_index
2164
+ in the spec for a single request.
2165
+ :type _host_index: int, optional
2166
+ :return: Returns the result object.
2167
+ """ # noqa: E501
2168
+
2169
+ _param = self._update_memory_serialize(
2170
+ id=id,
2171
+ memory_update_dto=memory_update_dto,
2172
+ _request_auth=_request_auth,
2173
+ _content_type=_content_type,
2174
+ _headers=_headers,
2175
+ _host_index=_host_index,
2176
+ )
2177
+
2178
+ _response_types_map: Dict[str, Optional[str]] = {
2179
+ "200": "MemoryResponseDto",
2180
+ }
2181
+ response_data = await self.api_client.call_api(
2182
+ *_param, _request_timeout=_request_timeout
2183
+ )
2184
+ return response_data.response
2185
+
2186
+ def _update_memory_serialize(
2187
+ self,
2188
+ id,
2189
+ memory_update_dto,
2190
+ _request_auth,
2191
+ _content_type,
2192
+ _headers,
2193
+ _host_index,
2194
+ ) -> RequestSerialized:
2195
+ _host = None
2196
+
2197
+ _collection_formats: Dict[str, str] = {}
2198
+
2199
+ _path_params: Dict[str, str] = {}
2200
+ _query_params: List[Tuple[str, str]] = []
2201
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2202
+ _form_params: List[Tuple[str, str]] = []
2203
+ _files: Dict[
2204
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2205
+ ] = {}
2206
+ _body_params: Optional[bytes] = None
2207
+
2208
+ # process the path parameters
2209
+ if id is not None:
2210
+ _path_params["id"] = id
2211
+ # process the query parameters
2212
+ # process the header parameters
2213
+ # process the form parameters
2214
+ # process the body parameter
2215
+ if memory_update_dto is not None:
2216
+ _body_params = memory_update_dto
2217
+
2218
+ # set the HTTP header `Accept`
2219
+ if "Accept" not in _header_params:
2220
+ _header_params["Accept"] = self.api_client.select_header_accept(
2221
+ ["application/json"]
2222
+ )
2223
+
2224
+ # set the HTTP header `Content-Type`
2225
+ if _content_type:
2226
+ _header_params["Content-Type"] = _content_type
2227
+ else:
2228
+ _default_content_type = self.api_client.select_header_content_type(
2229
+ ["application/json"]
2230
+ )
2231
+ if _default_content_type is not None:
2232
+ _header_params["Content-Type"] = _default_content_type
2233
+
2234
+ # authentication setting
2235
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2236
+
2237
+ return self.api_client.param_serialize(
2238
+ method="PUT",
2239
+ resource_path="/memories/{id}",
2240
+ path_params=_path_params,
2241
+ query_params=_query_params,
2242
+ header_params=_header_params,
2243
+ body=_body_params,
2244
+ post_params=_form_params,
2245
+ files=_files,
2246
+ auth_settings=_auth_settings,
2247
+ collection_formats=_collection_formats,
2248
+ _host=_host,
2249
+ _request_auth=_request_auth,
2250
+ )