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