algolia 3.10.1 → 3.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/Bug_report.yml +1 -1
  3. data/.github/workflows/do-not-edit-this-repository.yml +1 -1
  4. data/.github/workflows/release.yml +1 -1
  5. data/CHANGELOG.md +18 -0
  6. data/Gemfile.lock +1 -1
  7. data/lib/algolia/api/ingestion_client.rb +12 -2
  8. data/lib/algolia/api/search_client.rb +79 -68
  9. data/lib/algolia/models/abtesting/ab_test.rb +0 -5
  10. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -5
  11. data/lib/algolia/models/abtesting/ab_test_response.rb +0 -5
  12. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -5
  13. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +5 -3
  14. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -5
  15. data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +5 -6
  16. data/lib/algolia/models/abtesting/currency.rb +0 -5
  17. data/lib/algolia/models/abtesting/empty_search.rb +0 -5
  18. data/lib/algolia/models/abtesting/empty_search_filter.rb +0 -5
  19. data/lib/algolia/models/abtesting/error_base.rb +0 -5
  20. data/lib/algolia/models/abtesting/estimate_ab_test_request.rb +0 -5
  21. data/lib/algolia/models/abtesting/estimate_ab_test_response.rb +0 -5
  22. data/lib/algolia/models/abtesting/estimate_configuration.rb +0 -5
  23. data/lib/algolia/models/abtesting/filter_effects.rb +0 -5
  24. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +0 -5
  25. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -5
  26. data/lib/algolia/models/abtesting/outliers.rb +0 -5
  27. data/lib/algolia/models/abtesting/outliers_filter.rb +0 -5
  28. data/lib/algolia/models/abtesting/schedule_ab_test_response.rb +0 -5
  29. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -5
  30. data/lib/algolia/models/abtesting/variant.rb +0 -5
  31. data/lib/algolia/models/analytics/click_position.rb +0 -5
  32. data/lib/algolia/models/analytics/currency_code.rb +0 -5
  33. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -5
  34. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -5
  35. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -5
  36. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -5
  37. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -5
  38. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -5
  39. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -5
  40. data/lib/algolia/models/analytics/daily_revenue.rb +0 -5
  41. data/lib/algolia/models/analytics/daily_searches.rb +0 -5
  42. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -5
  43. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -5
  44. data/lib/algolia/models/analytics/daily_users.rb +0 -5
  45. data/lib/algolia/models/analytics/error_base.rb +0 -5
  46. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -5
  47. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -5
  48. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -5
  49. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -5
  50. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -5
  51. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -5
  52. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -5
  53. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -5
  54. data/lib/algolia/models/analytics/get_revenue.rb +0 -5
  55. data/lib/algolia/models/analytics/get_searches_count_response.rb +0 -5
  56. data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +0 -5
  57. data/lib/algolia/models/analytics/get_searches_no_results_response.rb +0 -5
  58. data/lib/algolia/models/analytics/get_status_response.rb +0 -5
  59. data/lib/algolia/models/analytics/get_top_countries_response.rb +0 -5
  60. data/lib/algolia/models/analytics/get_top_filter_attribute.rb +0 -5
  61. data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +0 -5
  62. data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +0 -5
  63. data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +0 -5
  64. data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +0 -5
  65. data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +0 -5
  66. data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +0 -5
  67. data/lib/algolia/models/analytics/get_top_hits_response.rb +5 -6
  68. data/lib/algolia/models/analytics/get_top_searches_response.rb +5 -6
  69. data/lib/algolia/models/analytics/get_users_count_response.rb +0 -5
  70. data/lib/algolia/models/analytics/top_country.rb +0 -5
  71. data/lib/algolia/models/analytics/top_hit.rb +0 -5
  72. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -5
  73. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -5
  74. data/lib/algolia/models/analytics/top_hits_response.rb +0 -5
  75. data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +0 -5
  76. data/lib/algolia/models/analytics/top_hits_response_with_revenue_analytics.rb +0 -5
  77. data/lib/algolia/models/analytics/top_search.rb +0 -5
  78. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -5
  79. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -5
  80. data/lib/algolia/models/analytics/top_searches_response.rb +0 -5
  81. data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +0 -5
  82. data/lib/algolia/models/analytics/top_searches_response_with_revenue_analytics.rb +0 -5
  83. data/lib/algolia/models/ingestion/auth_algolia.rb +0 -5
  84. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +0 -5
  85. data/lib/algolia/models/ingestion/auth_algolia_insights_partial.rb +0 -5
  86. data/lib/algolia/models/ingestion/auth_algolia_partial.rb +0 -5
  87. data/lib/algolia/models/ingestion/auth_api_key.rb +5 -3
  88. data/lib/algolia/models/ingestion/auth_api_key_partial.rb +5 -3
  89. data/lib/algolia/models/ingestion/auth_basic.rb +6 -3
  90. data/lib/algolia/models/ingestion/auth_basic_partial.rb +5 -3
  91. data/lib/algolia/models/ingestion/auth_google_service_account.rb +6 -3
  92. data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +5 -3
  93. data/lib/algolia/models/ingestion/auth_input.rb +5 -6
  94. data/lib/algolia/models/ingestion/auth_input_partial.rb +5 -6
  95. data/lib/algolia/models/ingestion/auth_o_auth.rb +7 -3
  96. data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +5 -3
  97. data/lib/algolia/models/ingestion/authentication.rb +0 -5
  98. data/lib/algolia/models/ingestion/authentication_create.rb +0 -5
  99. data/lib/algolia/models/ingestion/authentication_create_response.rb +0 -5
  100. data/lib/algolia/models/ingestion/authentication_search.rb +0 -5
  101. data/lib/algolia/models/ingestion/authentication_update.rb +0 -5
  102. data/lib/algolia/models/ingestion/authentication_update_response.rb +0 -5
  103. data/lib/algolia/models/ingestion/big_commerce_channel.rb +0 -5
  104. data/lib/algolia/models/ingestion/big_commerce_metafield.rb +0 -5
  105. data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +0 -5
  106. data/lib/algolia/models/ingestion/delete_response.rb +0 -5
  107. data/lib/algolia/models/ingestion/destination.rb +0 -5
  108. data/lib/algolia/models/ingestion/destination_create.rb +0 -5
  109. data/lib/algolia/models/ingestion/destination_create_response.rb +0 -5
  110. data/lib/algolia/models/ingestion/destination_index_name.rb +0 -5
  111. data/lib/algolia/models/ingestion/destination_input.rb +5 -6
  112. data/lib/algolia/models/ingestion/destination_search.rb +0 -5
  113. data/lib/algolia/models/ingestion/destination_update.rb +0 -5
  114. data/lib/algolia/models/ingestion/destination_update_response.rb +0 -5
  115. data/lib/algolia/models/ingestion/docker_image_type.rb +1 -2
  116. data/lib/algolia/models/ingestion/docker_streams.rb +0 -5
  117. data/lib/algolia/models/ingestion/docker_streams_input.rb +6 -4
  118. data/lib/algolia/models/ingestion/email_notifications.rb +207 -0
  119. data/lib/algolia/models/ingestion/error_base.rb +0 -5
  120. data/lib/algolia/models/ingestion/event.rb +0 -5
  121. data/lib/algolia/models/ingestion/list_authentications_response.rb +0 -5
  122. data/lib/algolia/models/ingestion/list_destinations_response.rb +0 -5
  123. data/lib/algolia/models/ingestion/list_events_response.rb +0 -5
  124. data/lib/algolia/models/ingestion/list_sources_response.rb +0 -5
  125. data/lib/algolia/models/ingestion/list_tasks_response.rb +0 -5
  126. data/lib/algolia/models/ingestion/list_tasks_response_v1.rb +0 -5
  127. data/lib/algolia/models/ingestion/list_transformations_response.rb +0 -5
  128. data/lib/algolia/models/ingestion/mapping_field_directive.rb +0 -5
  129. data/lib/algolia/models/ingestion/mapping_input.rb +6 -3
  130. data/lib/algolia/models/ingestion/mapping_kit_action.rb +0 -5
  131. data/lib/algolia/models/ingestion/notifications.rb +209 -0
  132. data/lib/algolia/models/ingestion/on_demand_trigger.rb +0 -5
  133. data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +0 -5
  134. data/lib/algolia/models/ingestion/pagination.rb +0 -5
  135. data/lib/algolia/models/ingestion/platform_with_none.rb +5 -6
  136. data/lib/algolia/models/ingestion/policies.rb +205 -0
  137. data/lib/algolia/models/ingestion/push_task_payload.rb +0 -5
  138. data/lib/algolia/models/ingestion/push_task_records.rb +0 -5
  139. data/lib/algolia/models/ingestion/run.rb +0 -5
  140. data/lib/algolia/models/ingestion/run_list_response.rb +0 -5
  141. data/lib/algolia/models/ingestion/run_progress.rb +0 -5
  142. data/lib/algolia/models/ingestion/run_response.rb +0 -5
  143. data/lib/algolia/models/ingestion/run_source_payload.rb +0 -5
  144. data/lib/algolia/models/ingestion/run_source_response.rb +0 -5
  145. data/lib/algolia/models/ingestion/schedule_trigger.rb +0 -5
  146. data/lib/algolia/models/ingestion/schedule_trigger_input.rb +5 -3
  147. data/lib/algolia/models/ingestion/shopify_input.rb +0 -5
  148. data/lib/algolia/models/ingestion/shopify_market.rb +0 -5
  149. data/lib/algolia/models/ingestion/shopify_metafield.rb +0 -5
  150. data/lib/algolia/models/ingestion/source.rb +0 -5
  151. data/lib/algolia/models/ingestion/source_big_commerce.rb +5 -3
  152. data/lib/algolia/models/ingestion/source_big_query.rb +5 -3
  153. data/lib/algolia/models/ingestion/source_commercetools.rb +5 -3
  154. data/lib/algolia/models/ingestion/source_create.rb +0 -5
  155. data/lib/algolia/models/ingestion/source_create_response.rb +0 -5
  156. data/lib/algolia/models/ingestion/source_csv.rb +0 -5
  157. data/lib/algolia/models/ingestion/source_docker.rb +8 -3
  158. data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +7 -3
  159. data/lib/algolia/models/ingestion/source_input.rb +5 -6
  160. data/lib/algolia/models/ingestion/source_json.rb +0 -5
  161. data/lib/algolia/models/ingestion/source_search.rb +0 -5
  162. data/lib/algolia/models/ingestion/source_shopify.rb +5 -3
  163. data/lib/algolia/models/ingestion/source_update.rb +0 -5
  164. data/lib/algolia/models/ingestion/source_update_commercetools.rb +0 -5
  165. data/lib/algolia/models/ingestion/source_update_docker.rb +5 -3
  166. data/lib/algolia/models/ingestion/source_update_input.rb +5 -6
  167. data/lib/algolia/models/ingestion/source_update_response.rb +0 -5
  168. data/lib/algolia/models/ingestion/source_update_shopify.rb +0 -5
  169. data/lib/algolia/models/ingestion/streaming_input.rb +5 -3
  170. data/lib/algolia/models/ingestion/streaming_trigger.rb +0 -5
  171. data/lib/algolia/models/ingestion/subscription_trigger.rb +0 -5
  172. data/lib/algolia/models/ingestion/task.rb +20 -5
  173. data/lib/algolia/models/ingestion/task_create.rb +22 -9
  174. data/lib/algolia/models/ingestion/task_create_response.rb +0 -5
  175. data/lib/algolia/models/ingestion/task_create_trigger.rb +5 -6
  176. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -5
  177. data/lib/algolia/models/ingestion/task_input.rb +5 -6
  178. data/lib/algolia/models/ingestion/task_search.rb +0 -5
  179. data/lib/algolia/models/ingestion/task_update.rb +22 -9
  180. data/lib/algolia/models/ingestion/task_update_response.rb +0 -5
  181. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -5
  182. data/lib/algolia/models/ingestion/task_v1.rb +20 -5
  183. data/lib/algolia/models/ingestion/transformation.rb +0 -5
  184. data/lib/algolia/models/ingestion/transformation_create.rb +0 -5
  185. data/lib/algolia/models/ingestion/transformation_create_response.rb +0 -5
  186. data/lib/algolia/models/ingestion/transformation_error.rb +0 -5
  187. data/lib/algolia/models/ingestion/transformation_search.rb +0 -5
  188. data/lib/algolia/models/ingestion/transformation_try.rb +0 -5
  189. data/lib/algolia/models/ingestion/transformation_try_response.rb +0 -5
  190. data/lib/algolia/models/ingestion/transformation_update_response.rb +0 -5
  191. data/lib/algolia/models/ingestion/trigger.rb +5 -6
  192. data/lib/algolia/models/ingestion/trigger_update_input.rb +0 -5
  193. data/lib/algolia/models/ingestion/watch_response.rb +0 -5
  194. data/lib/algolia/models/ingestion/window.rb +0 -5
  195. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +7 -3
  196. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +8 -3
  197. data/lib/algolia/models/insights/clicked_filters.rb +6 -3
  198. data/lib/algolia/models/insights/clicked_object_ids.rb +6 -3
  199. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -3
  200. data/lib/algolia/models/insights/converted_filters.rb +6 -3
  201. data/lib/algolia/models/insights/converted_object_ids.rb +6 -3
  202. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +6 -3
  203. data/lib/algolia/models/insights/discount.rb +5 -6
  204. data/lib/algolia/models/insights/error_base.rb +0 -5
  205. data/lib/algolia/models/insights/events_items.rb +5 -6
  206. data/lib/algolia/models/insights/events_response.rb +0 -5
  207. data/lib/algolia/models/insights/insights_events.rb +0 -5
  208. data/lib/algolia/models/insights/object_data.rb +0 -5
  209. data/lib/algolia/models/insights/object_data_after_search.rb +0 -5
  210. data/lib/algolia/models/insights/price.rb +5 -6
  211. data/lib/algolia/models/insights/purchased_object_ids.rb +7 -3
  212. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +8 -3
  213. data/lib/algolia/models/insights/value.rb +5 -6
  214. data/lib/algolia/models/insights/viewed_filters.rb +6 -3
  215. data/lib/algolia/models/insights/viewed_object_ids.rb +6 -3
  216. data/lib/algolia/models/monitoring/error_base.rb +0 -5
  217. data/lib/algolia/models/monitoring/incident.rb +0 -5
  218. data/lib/algolia/models/monitoring/incident_entry.rb +0 -5
  219. data/lib/algolia/models/monitoring/incidents_response.rb +0 -5
  220. data/lib/algolia/models/monitoring/indexing_metric.rb +0 -5
  221. data/lib/algolia/models/monitoring/indexing_time_response.rb +0 -5
  222. data/lib/algolia/models/monitoring/infrastructure_response.rb +0 -5
  223. data/lib/algolia/models/monitoring/inventory_response.rb +0 -5
  224. data/lib/algolia/models/monitoring/latency_metric.rb +0 -5
  225. data/lib/algolia/models/monitoring/latency_response.rb +0 -5
  226. data/lib/algolia/models/monitoring/metrics.rb +0 -5
  227. data/lib/algolia/models/monitoring/probes_metric.rb +0 -5
  228. data/lib/algolia/models/monitoring/server.rb +0 -5
  229. data/lib/algolia/models/monitoring/status_response.rb +0 -5
  230. data/lib/algolia/models/monitoring/time_entry.rb +0 -5
  231. data/lib/algolia/models/personalization/delete_user_profile_response.rb +0 -5
  232. data/lib/algolia/models/personalization/error_base.rb +0 -5
  233. data/lib/algolia/models/personalization/{event_scoring.rb → events_scoring.rb} +3 -8
  234. data/lib/algolia/models/personalization/{facet_scoring.rb → facets_scoring.rb} +3 -8
  235. data/lib/algolia/models/personalization/get_user_token_response.rb +0 -5
  236. data/lib/algolia/models/personalization/personalization_strategy_params.rb +17 -22
  237. data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +0 -5
  238. data/lib/algolia/models/query-suggestions/base_response.rb +0 -5
  239. data/lib/algolia/models/query-suggestions/config_status.rb +0 -5
  240. data/lib/algolia/models/query-suggestions/configuration.rb +0 -5
  241. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -5
  242. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -5
  243. data/lib/algolia/models/query-suggestions/error_base.rb +0 -5
  244. data/lib/algolia/models/query-suggestions/facet.rb +0 -5
  245. data/lib/algolia/models/query-suggestions/languages.rb +5 -6
  246. data/lib/algolia/models/query-suggestions/log_file.rb +0 -5
  247. data/lib/algolia/models/query-suggestions/source_index.rb +0 -5
  248. data/lib/algolia/models/recommend/around_precision.rb +5 -6
  249. data/lib/algolia/models/recommend/around_radius.rb +5 -6
  250. data/lib/algolia/models/recommend/auto_facet_filter.rb +0 -5
  251. data/lib/algolia/models/recommend/banner.rb +0 -5
  252. data/lib/algolia/models/recommend/banner_image.rb +0 -5
  253. data/lib/algolia/models/recommend/banner_image_url.rb +0 -5
  254. data/lib/algolia/models/recommend/banner_link.rb +0 -5
  255. data/lib/algolia/models/recommend/bought_together_query.rb +0 -5
  256. data/lib/algolia/models/recommend/condition.rb +0 -5
  257. data/lib/algolia/models/recommend/consequence.rb +0 -5
  258. data/lib/algolia/models/recommend/deleted_at_response.rb +0 -5
  259. data/lib/algolia/models/recommend/distinct.rb +5 -6
  260. data/lib/algolia/models/recommend/error_base.rb +0 -5
  261. data/lib/algolia/models/recommend/exhaustive.rb +0 -5
  262. data/lib/algolia/models/recommend/facet_filters.rb +5 -6
  263. data/lib/algolia/models/recommend/facet_ordering.rb +0 -5
  264. data/lib/algolia/models/recommend/facet_stats.rb +0 -5
  265. data/lib/algolia/models/recommend/fallback_params.rb +0 -5
  266. data/lib/algolia/models/recommend/get_recommend_task_response.rb +0 -5
  267. data/lib/algolia/models/recommend/get_recommendations_params.rb +0 -5
  268. data/lib/algolia/models/recommend/get_recommendations_response.rb +0 -5
  269. data/lib/algolia/models/recommend/hide_consequence_object.rb +0 -5
  270. data/lib/algolia/models/recommend/highlight_result.rb +5 -6
  271. data/lib/algolia/models/recommend/highlight_result_option.rb +6 -3
  272. data/lib/algolia/models/recommend/ignore_plurals.rb +5 -6
  273. data/lib/algolia/models/recommend/index_settings_facets.rb +0 -5
  274. data/lib/algolia/models/recommend/inside_bounding_box.rb +5 -6
  275. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -5
  276. data/lib/algolia/models/recommend/matched_geo_location.rb +0 -5
  277. data/lib/algolia/models/recommend/numeric_filters.rb +5 -6
  278. data/lib/algolia/models/recommend/optional_filters.rb +5 -6
  279. data/lib/algolia/models/recommend/optional_words.rb +5 -6
  280. data/lib/algolia/models/recommend/params_consequence.rb +0 -5
  281. data/lib/algolia/models/recommend/personalization.rb +0 -5
  282. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -5
  283. data/lib/algolia/models/recommend/range.rb +0 -5
  284. data/lib/algolia/models/recommend/ranking_info.rb +0 -5
  285. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +5 -6
  286. data/lib/algolia/models/recommend/recommend_hit.rb +5 -3
  287. data/lib/algolia/models/recommend/recommend_rule.rb +0 -5
  288. data/lib/algolia/models/recommend/recommend_search_params.rb +0 -5
  289. data/lib/algolia/models/recommend/recommend_updated_at_response.rb +0 -5
  290. data/lib/algolia/models/recommend/recommendations_hit.rb +5 -6
  291. data/lib/algolia/models/recommend/recommendations_request.rb +5 -6
  292. data/lib/algolia/models/recommend/recommendations_results.rb +0 -5
  293. data/lib/algolia/models/recommend/redirect.rb +0 -5
  294. data/lib/algolia/models/recommend/redirect_rule_index_data.rb +0 -5
  295. data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +0 -5
  296. data/lib/algolia/models/recommend/redirect_url.rb +0 -5
  297. data/lib/algolia/models/recommend/related_query.rb +0 -5
  298. data/lib/algolia/models/recommend/remove_stop_words.rb +5 -6
  299. data/lib/algolia/models/recommend/rendering_content.rb +0 -5
  300. data/lib/algolia/models/recommend/rule_metadata.rb +0 -5
  301. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -5
  302. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -5
  303. data/lib/algolia/models/recommend/snippet_result.rb +5 -6
  304. data/lib/algolia/models/recommend/snippet_result_option.rb +5 -3
  305. data/lib/algolia/models/recommend/tag_filters.rb +5 -6
  306. data/lib/algolia/models/recommend/time_range.rb +0 -5
  307. data/lib/algolia/models/recommend/trending_facet_hit.rb +6 -3
  308. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -5
  309. data/lib/algolia/models/recommend/trending_items_query.rb +0 -5
  310. data/lib/algolia/models/recommend/typo_tolerance.rb +5 -6
  311. data/lib/algolia/models/recommend/value.rb +0 -5
  312. data/lib/algolia/models/recommend/widgets.rb +0 -5
  313. data/lib/algolia/models/search/add_api_key_response.rb +0 -5
  314. data/lib/algolia/models/search/api_key.rb +0 -5
  315. data/lib/algolia/models/search/around_precision.rb +5 -6
  316. data/lib/algolia/models/search/around_radius.rb +5 -6
  317. data/lib/algolia/models/search/assign_user_id_params.rb +0 -5
  318. data/lib/algolia/models/search/attribute_to_update.rb +5 -6
  319. data/lib/algolia/models/search/automatic_facet_filter.rb +0 -5
  320. data/lib/algolia/models/search/automatic_facet_filters.rb +5 -6
  321. data/lib/algolia/models/search/banner.rb +0 -5
  322. data/lib/algolia/models/search/banner_image.rb +0 -5
  323. data/lib/algolia/models/search/banner_image_url.rb +0 -5
  324. data/lib/algolia/models/search/banner_link.rb +0 -5
  325. data/lib/algolia/models/search/batch_assign_user_ids_params.rb +0 -5
  326. data/lib/algolia/models/search/batch_dictionary_entries_params.rb +0 -5
  327. data/lib/algolia/models/search/batch_dictionary_entries_request.rb +0 -5
  328. data/lib/algolia/models/search/batch_params.rb +0 -5
  329. data/lib/algolia/models/search/batch_request.rb +0 -5
  330. data/lib/algolia/models/search/batch_response.rb +0 -5
  331. data/lib/algolia/models/search/batch_write_params.rb +0 -5
  332. data/lib/algolia/models/search/browse_params.rb +5 -6
  333. data/lib/algolia/models/search/browse_params_object.rb +0 -5
  334. data/lib/algolia/models/search/browse_response.rb +0 -5
  335. data/lib/algolia/models/search/built_in_operation.rb +0 -5
  336. data/lib/algolia/models/search/built_in_operation_value.rb +5 -6
  337. data/lib/algolia/models/search/condition.rb +0 -5
  338. data/lib/algolia/models/search/consequence.rb +0 -5
  339. data/lib/algolia/models/search/consequence_hide.rb +0 -5
  340. data/lib/algolia/models/search/consequence_params.rb +0 -5
  341. data/lib/algolia/models/search/consequence_query.rb +5 -6
  342. data/lib/algolia/models/search/consequence_query_object.rb +0 -5
  343. data/lib/algolia/models/search/created_at_response.rb +0 -5
  344. data/lib/algolia/models/search/delete_api_key_response.rb +0 -5
  345. data/lib/algolia/models/search/delete_by_params.rb +0 -5
  346. data/lib/algolia/models/search/delete_source_response.rb +0 -5
  347. data/lib/algolia/models/search/deleted_at_response.rb +0 -5
  348. data/lib/algolia/models/search/dictionary_entry.rb +0 -5
  349. data/lib/algolia/models/search/dictionary_language.rb +0 -5
  350. data/lib/algolia/models/search/dictionary_settings_params.rb +0 -5
  351. data/lib/algolia/models/search/distinct.rb +5 -6
  352. data/lib/algolia/models/search/edit.rb +0 -5
  353. data/lib/algolia/models/search/error_base.rb +0 -5
  354. data/lib/algolia/models/search/exhaustive.rb +0 -5
  355. data/lib/algolia/models/search/facet_filters.rb +5 -6
  356. data/lib/algolia/models/search/facet_hits.rb +0 -5
  357. data/lib/algolia/models/search/facet_ordering.rb +0 -5
  358. data/lib/algolia/models/search/facet_stats.rb +0 -5
  359. data/lib/algolia/models/search/facets.rb +0 -5
  360. data/lib/algolia/models/search/fetched_index.rb +0 -5
  361. data/lib/algolia/models/search/get_api_key_response.rb +0 -5
  362. data/lib/algolia/models/search/get_dictionary_settings_response.rb +0 -5
  363. data/lib/algolia/models/search/get_logs_response.rb +0 -5
  364. data/lib/algolia/models/search/get_objects_params.rb +0 -5
  365. data/lib/algolia/models/search/get_objects_request.rb +0 -5
  366. data/lib/algolia/models/search/get_objects_response.rb +0 -5
  367. data/lib/algolia/models/search/get_task_response.rb +0 -5
  368. data/lib/algolia/models/search/get_top_user_ids_response.rb +0 -5
  369. data/lib/algolia/models/search/has_pending_mappings_response.rb +0 -5
  370. data/lib/algolia/models/search/highlight_result.rb +5 -6
  371. data/lib/algolia/models/search/highlight_result_option.rb +6 -3
  372. data/lib/algolia/models/search/hit.rb +0 -5
  373. data/lib/algolia/models/search/ignore_plurals.rb +5 -6
  374. data/lib/algolia/models/search/index_settings.rb +0 -5
  375. data/lib/algolia/models/search/inside_bounding_box.rb +5 -6
  376. data/lib/algolia/models/search/languages.rb +0 -5
  377. data/lib/algolia/models/search/list_api_keys_response.rb +0 -5
  378. data/lib/algolia/models/search/list_clusters_response.rb +0 -5
  379. data/lib/algolia/models/search/list_indices_response.rb +0 -5
  380. data/lib/algolia/models/search/list_user_ids_response.rb +0 -5
  381. data/lib/algolia/models/search/log.rb +0 -5
  382. data/lib/algolia/models/search/log_query.rb +0 -5
  383. data/lib/algolia/models/search/matched_geo_location.rb +0 -5
  384. data/lib/algolia/models/search/multiple_batch_request.rb +0 -5
  385. data/lib/algolia/models/search/multiple_batch_response.rb +0 -5
  386. data/lib/algolia/models/search/numeric_filters.rb +5 -6
  387. data/lib/algolia/models/search/operation_index_params.rb +0 -5
  388. data/lib/algolia/models/search/optional_filters.rb +5 -6
  389. data/lib/algolia/models/search/optional_words.rb +5 -6
  390. data/lib/algolia/models/search/personalization.rb +0 -5
  391. data/lib/algolia/models/search/promote.rb +5 -6
  392. data/lib/algolia/models/search/promote_object_id.rb +5 -3
  393. data/lib/algolia/models/search/promote_object_ids.rb +5 -3
  394. data/lib/algolia/models/search/range.rb +0 -5
  395. data/lib/algolia/models/search/ranking_info.rb +0 -5
  396. data/lib/algolia/models/search/re_ranking_apply_filter.rb +5 -6
  397. data/lib/algolia/models/search/redirect.rb +0 -5
  398. data/lib/algolia/models/search/redirect_rule_index_data.rb +0 -5
  399. data/lib/algolia/models/search/redirect_rule_index_metadata.rb +0 -5
  400. data/lib/algolia/models/search/redirect_url.rb +0 -5
  401. data/lib/algolia/models/search/remove_stop_words.rb +5 -6
  402. data/lib/algolia/models/search/remove_user_id_response.rb +0 -5
  403. data/lib/algolia/models/search/rendering_content.rb +0 -5
  404. data/lib/algolia/models/search/replace_all_objects_response.rb +0 -5
  405. data/lib/algolia/models/search/replace_source_response.rb +0 -5
  406. data/lib/algolia/models/search/rule.rb +0 -5
  407. data/lib/algolia/models/search/save_object_response.rb +0 -5
  408. data/lib/algolia/models/search/save_synonym_response.rb +0 -5
  409. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -5
  410. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -5
  411. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -5
  412. data/lib/algolia/models/search/search_for_facet_values_response.rb +5 -3
  413. data/lib/algolia/models/search/search_for_facets.rb +6 -3
  414. data/lib/algolia/models/search/search_for_hits.rb +0 -5
  415. data/lib/algolia/models/search/search_method_params.rb +0 -5
  416. data/lib/algolia/models/search/search_params.rb +5 -6
  417. data/lib/algolia/models/search/search_params_object.rb +0 -5
  418. data/lib/algolia/models/search/search_params_string.rb +5 -3
  419. data/lib/algolia/models/search/search_query.rb +5 -6
  420. data/lib/algolia/models/search/search_response.rb +0 -5
  421. data/lib/algolia/models/search/search_responses.rb +0 -5
  422. data/lib/algolia/models/search/search_result.rb +5 -6
  423. data/lib/algolia/models/search/search_rules_params.rb +0 -5
  424. data/lib/algolia/models/search/search_rules_response.rb +0 -5
  425. data/lib/algolia/models/search/search_synonyms_params.rb +0 -5
  426. data/lib/algolia/models/search/search_synonyms_response.rb +0 -5
  427. data/lib/algolia/models/search/search_user_ids_params.rb +0 -5
  428. data/lib/algolia/models/search/search_user_ids_response.rb +0 -5
  429. data/lib/algolia/models/search/secured_api_key_restrictions.rb +0 -5
  430. data/lib/algolia/models/search/semantic_search.rb +0 -5
  431. data/lib/algolia/models/search/settings_response.rb +0 -5
  432. data/lib/algolia/models/search/snippet_result.rb +5 -6
  433. data/lib/algolia/models/search/snippet_result_option.rb +5 -3
  434. data/lib/algolia/models/search/source.rb +0 -5
  435. data/lib/algolia/models/search/standard_entries.rb +0 -5
  436. data/lib/algolia/models/search/synonym_hit.rb +0 -5
  437. data/lib/algolia/models/search/tag_filters.rb +5 -6
  438. data/lib/algolia/models/search/time_range.rb +0 -5
  439. data/lib/algolia/models/search/typo_tolerance.rb +5 -6
  440. data/lib/algolia/models/search/update_api_key_response.rb +0 -5
  441. data/lib/algolia/models/search/updated_at_response.rb +0 -5
  442. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +0 -5
  443. data/lib/algolia/models/search/user_highlight_result.rb +0 -5
  444. data/lib/algolia/models/search/user_hit.rb +0 -5
  445. data/lib/algolia/models/search/user_id.rb +0 -5
  446. data/lib/algolia/models/search/value.rb +0 -5
  447. data/lib/algolia/models/search/widgets.rb +0 -5
  448. data/lib/algolia/version.rb +1 -1
  449. metadata +8 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f82021f2d31e75f1397a47f600dff3afd13a8a56abf48cb7262f4ec310e3b5d
4
- data.tar.gz: 17579ca61f3d73d5966c80c70d7013e3881194eff166c3935c6c69f929bce150
3
+ metadata.gz: e03e27a671f4b6127d02f16243cb618a72c903783922e011e4554618460461f3
4
+ data.tar.gz: f294f28279df6d8c8a926d1f0316d9446e81408ff4634548aa483bbc6b0ccc3d
5
5
  SHA512:
6
- metadata.gz: d47e0f3298ab4b2147630956290d964698b257f64a826442dfa45dcc8acff56f521cf37225a34acaad75621a70262086614a093723209897694842b27c96ed98
7
- data.tar.gz: 23cac9419c2d97abafccacfa181ec386e068b9330cc367185259dcdb644536139e12161d742e59104460cc16816807525c13c0af8a35f9dc70c1f6df16fdfd05
6
+ metadata.gz: 67bfbead5107d4e2ff34f09ead938fb187369e7dfe262a844ecd3ffab78193e59c424d1f5fda64fd84346cc745361f4ee08cb772948d7df0d04454a2ef4c3b6e
7
+ data.tar.gz: aa6e751a43e053fd96364d4b0711663e2f3b1a2be571b61f1c7eaa5a94ea2ec561fb8b8fd91f2e14dafca308691663bf3ce9840916c59e7eda3c60a92ad0729c
@@ -27,7 +27,7 @@ body:
27
27
  id: client
28
28
  attributes:
29
29
  label: Client
30
- description: Which API are you targetting?
30
+ description: Which API are you targeting?
31
31
  options:
32
32
  - All
33
33
  - AB testing
@@ -1,7 +1,7 @@
1
1
  name: Do not edit files in this repository
2
2
 
3
3
  on:
4
- pull_request:
4
+ pull_request_target:
5
5
  types:
6
6
  - opened
7
7
  - synchronize
@@ -21,7 +21,7 @@ jobs:
21
21
  - name: Install Ruby
22
22
  uses: ruby/setup-ruby@v1
23
23
  with:
24
- ruby-version: 3.3.6
24
+ ruby-version: 3.4.1
25
25
  bundler-cache: true
26
26
 
27
27
  - uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [3.11.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.10.2...3.11.0)
2
+
3
+ - [b569646304](https://github.com/algolia/api-clients-automation/commit/b569646304) fix(specs): drop singer from ingestion specs ([#4281](https://github.com/algolia/api-clients-automation/pull/4281)) by [@shortcuts](https://github.com/shortcuts/)
4
+ - [b2b5acddab](https://github.com/algolia/api-clients-automation/commit/b2b5acddab) chore(deps): dependencies 2024-12-30 ([#4286](https://github.com/algolia/api-clients-automation/pull/4286)) by [@algolia-bot](https://github.com/algolia-bot/)
5
+ - [37223c9779](https://github.com/algolia/api-clients-automation/commit/37223c9779) feat(clients): cleanup after replaceAllObjects failure ([#3824](https://github.com/algolia/api-clients-automation/pull/3824)) by [@millotp](https://github.com/millotp/)
6
+ - [47b567fd0d](https://github.com/algolia/api-clients-automation/commit/47b567fd0d) chore(deps): dependencies 2025-01-06 ([#4299](https://github.com/algolia/api-clients-automation/pull/4299)) by [@algolia-bot](https://github.com/algolia-bot/)
7
+ - [5328ce8333](https://github.com/algolia/api-clients-automation/commit/5328ce8333) feat(specs): add notification settings to tasks ([#4297](https://github.com/algolia/api-clients-automation/pull/4297)) by [@millotp](https://github.com/millotp/)
8
+ - [653b4f32c0](https://github.com/algolia/api-clients-automation/commit/653b4f32c0) fix(ruby): use discriminators for oneOf ([#4310](https://github.com/algolia/api-clients-automation/pull/4310)) by [@millotp](https://github.com/millotp/)
9
+ - [e7b3898f06](https://github.com/algolia/api-clients-automation/commit/e7b3898f06) feat(clients): add optionnal scopes to replaceAllObjects ([#4296](https://github.com/algolia/api-clients-automation/pull/4296)) by [@millotp](https://github.com/millotp/)
10
+ - [47193ad3d1](https://github.com/algolia/api-clients-automation/commit/47193ad3d1) chore: revert release ([#4314](https://github.com/algolia/api-clients-automation/pull/4314)) by [@shortcuts](https://github.com/shortcuts/)
11
+
12
+ ## [3.10.2](https://github.com/algolia/algoliasearch-client-ruby/compare/3.10.1...3.10.2)
13
+
14
+ - [0481473fe0](https://github.com/algolia/api-clients-automation/commit/0481473fe0) chore: trigger auto close pr ([#4250](https://github.com/algolia/api-clients-automation/pull/4250)) by [@shortcuts](https://github.com/shortcuts/)
15
+ - [2856fa34a3](https://github.com/algolia/api-clients-automation/commit/2856fa34a3) fix(ruby): Set default hits_per_page for SearchClient#browse_objects using accessor ([#4253](https://github.com/algolia/api-clients-automation/pull/4253)) by [@dtyoung](https://github.com/dtyoung/)
16
+ - [bc8939f542](https://github.com/algolia/api-clients-automation/commit/bc8939f542) fix(clients): support dict in helpers ([#4254](https://github.com/algolia/api-clients-automation/pull/4254)) by [@shortcuts](https://github.com/shortcuts/)
17
+ - [679a8cdb60](https://github.com/algolia/api-clients-automation/commit/679a8cdb60) fix(specs): endpoint level timeout for ingestion ([#4251](https://github.com/algolia/api-clients-automation/pull/4251)) by [@shortcuts](https://github.com/shortcuts/)
18
+
1
19
  ## [3.10.1](https://github.com/algolia/algoliasearch-client-ruby/compare/3.10.0...3.10.1)
2
20
 
3
21
  - [6fb57f9ba](https://github.com/algolia/api-clients-automation/commit/6fb57f9ba) fix(clients): lock version ([#4228](https://github.com/algolia/api-clients-automation/pull/4228)) by [@millotp](https://github.com/millotp/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.10.1)
4
+ algolia (3.11.0)
5
5
  base64 (>= 0.2.0, < 1)
6
6
  faraday (>= 1.0.1, < 3.0)
7
7
  faraday-net_http_persistent (>= 0.15, < 3)
@@ -1862,6 +1862,7 @@ module Algolia
1862
1862
  # @param source_type [Array<SourceType>] Filters the tasks with the specified source type.
1863
1863
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1864
1864
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
1865
+ # @param with_email_notifications [Boolean] If specified, the response only includes tasks with notifications.email.enabled set to this value.
1865
1866
  # @param sort [TaskSortKeys] Property by which to sort the list of tasks. (default to 'createdAt')
1866
1867
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1867
1868
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -1875,6 +1876,7 @@ module Algolia
1875
1876
  source_type = nil,
1876
1877
  destination_id = nil,
1877
1878
  trigger_type = nil,
1879
+ with_email_notifications = nil,
1878
1880
  sort = nil,
1879
1881
  order = nil,
1880
1882
  request_options = {}
@@ -1892,6 +1894,7 @@ module Algolia
1892
1894
  end
1893
1895
 
1894
1896
  query_params[:triggerType] = @api_client.build_collection_param(trigger_type, :csv) unless trigger_type.nil?
1897
+ query_params[:withEmailNotifications] = with_email_notifications unless with_email_notifications.nil?
1895
1898
  query_params[:sort] = sort unless sort.nil?
1896
1899
  query_params[:order] = order unless order.nil?
1897
1900
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -1925,6 +1928,7 @@ module Algolia
1925
1928
  # @param source_type [Array<SourceType>] Filters the tasks with the specified source type.
1926
1929
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1927
1930
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
1931
+ # @param with_email_notifications [Boolean] If specified, the response only includes tasks with notifications.email.enabled set to this value.
1928
1932
  # @param sort [TaskSortKeys] Property by which to sort the list of tasks. (default to 'createdAt')
1929
1933
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1930
1934
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -1938,6 +1942,7 @@ module Algolia
1938
1942
  source_type = nil,
1939
1943
  destination_id = nil,
1940
1944
  trigger_type = nil,
1945
+ with_email_notifications = nil,
1941
1946
  sort = nil,
1942
1947
  order = nil,
1943
1948
  request_options = {}
@@ -1951,6 +1956,7 @@ module Algolia
1951
1956
  source_type,
1952
1957
  destination_id,
1953
1958
  trigger_type,
1959
+ with_email_notifications,
1954
1960
  sort,
1955
1961
  order,
1956
1962
  request_options
@@ -2151,6 +2157,7 @@ module Algolia
2151
2157
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2152
2158
  header_params = {}
2153
2159
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2160
+ request_options[:timeout] ||= 180000
2154
2161
 
2155
2162
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(push_task_payload)
2156
2163
 
@@ -2615,7 +2622,7 @@ module Algolia
2615
2622
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Transformation>")
2616
2623
  end
2617
2624
 
2618
- # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
2625
+ # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: airbyte`.
2619
2626
  #
2620
2627
  # Required API Key ACLs:
2621
2628
  # - addObject
@@ -2635,6 +2642,7 @@ module Algolia
2635
2642
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2636
2643
  header_params = {}
2637
2644
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2645
+ request_options[:timeout] ||= 180000
2638
2646
 
2639
2647
  post_body = request_options[:debug_body]
2640
2648
 
@@ -2649,7 +2657,7 @@ module Algolia
2649
2657
  @api_client.call_api(:POST, path, new_options)
2650
2658
  end
2651
2659
 
2652
- # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
2660
+ # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: airbyte`.
2653
2661
  #
2654
2662
  # Required API Key ACLs:
2655
2663
  # - addObject
@@ -3113,6 +3121,7 @@ module Algolia
3113
3121
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
3114
3122
  header_params = {}
3115
3123
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
3124
+ request_options[:timeout] ||= 180000
3116
3125
 
3117
3126
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_create)
3118
3127
 
@@ -3166,6 +3175,7 @@ module Algolia
3166
3175
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
3167
3176
  header_params = {}
3168
3177
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
3178
+ request_options[:timeout] ||= 180000
3169
3179
 
3170
3180
  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_update)
3171
3181
 
@@ -3150,11 +3150,13 @@ module Algolia
3150
3150
  def wait_for_api_key(
3151
3151
  key,
3152
3152
  operation,
3153
- api_key = {},
3153
+ api_key = Search::ApiKey.new,
3154
3154
  max_retries = 50,
3155
3155
  timeout = -> (retry_count) { [retry_count * 200, 5000].min },
3156
3156
  request_options = {}
3157
3157
  )
3158
+ api_key = api_client.object_to_hash(api_key)
3159
+
3158
3160
  retries = 0
3159
3161
  if operation == "update"
3160
3162
  raise ArgumentError, "`api_key` is required when waiting for an `update` operation." if api_key.nil?
@@ -3162,7 +3164,7 @@ module Algolia
3162
3164
  updated_key = get_api_key(key, request_options)
3163
3165
  updated_key_hash = updated_key.to_hash
3164
3166
  equals = true
3165
- api_key.to_hash.each do |k, v|
3167
+ api_key.each do |k, v|
3166
3168
  equals &&= updated_key_hash[k] == v
3167
3169
  end
3168
3170
 
@@ -3201,7 +3203,9 @@ module Algolia
3201
3203
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `browse` method.
3202
3204
  # @param block [Proc] the block to execute on each object of the index.
3203
3205
  def browse_objects(index_name, browse_params = Search::BrowseParamsObject.new, request_options = {}, &block)
3204
- browse_params[:hits_per_page] = browse_params[:hits_per_page] || 1000
3206
+ browse_params = api_client.object_to_hash(browse_params)
3207
+
3208
+ browse_params[:hitsPerPage] = 1000 unless browse_params.key?(:hitsPerPage)
3205
3209
 
3206
3210
  hits = []
3207
3211
  loop do
@@ -3214,8 +3218,8 @@ module Algolia
3214
3218
  hits.concat(res.hits)
3215
3219
  end
3216
3220
 
3217
- browse_params.cursor = res.cursor
3218
- break if browse_params.cursor.nil?
3221
+ browse_params[:cursor] = res.cursor
3222
+ break if browse_params[:cursor].nil?
3219
3223
  end
3220
3224
 
3221
3225
  hits unless block_given?
@@ -3227,12 +3231,11 @@ module Algolia
3227
3231
  # @param search_rules_params [SearchRulesParams] the parameters to send along with the query, they will be forwarded to the `searchRules` method.
3228
3232
  # @param request_options [Hash] the requestOptions to send along with the query, they will be forwarded to the `searchRules` method.
3229
3233
  # @param block [Proc] the block to execute on each rule of the index.
3230
- def browse_rules(
3231
- index_name,
3232
- search_rules_params = Search::SearchRulesParams.new(hits_per_page: 1000, page: 0),
3233
- request_options = {},
3234
- &block
3235
- )
3234
+ def browse_rules(index_name, search_rules_params = Search::SearchRulesParams.new, request_options = {}, &block)
3235
+ search_rules_params = api_client.object_to_hash(search_rules_params)
3236
+
3237
+ search_rules_params[:hitsPerPage] = 1000 unless search_rules_params.key?(:hitsPerPage)
3238
+
3236
3239
  rules = []
3237
3240
  loop do
3238
3241
  res = search_rules(index_name, search_rules_params, request_options)
@@ -3244,8 +3247,8 @@ module Algolia
3244
3247
  rules.concat(res.hits)
3245
3248
  end
3246
3249
 
3247
- search_rules_params.page += 1
3248
- break if res.hits.length < search_rules_params.hits_per_page
3250
+ search_rules_params[:page] += 1
3251
+ break if res.hits.length < search_rules_params[:hitsPerPage]
3249
3252
  end
3250
3253
 
3251
3254
  rules unless block_given?
@@ -3259,10 +3262,14 @@ module Algolia
3259
3262
  # @param block [Proc] the block to execute on each synonym of the index.
3260
3263
  def browse_synonyms(
3261
3264
  index_name,
3262
- search_synonyms_params = Search::SearchSynonymsParams.new(hits_per_page: 1000, page: 0),
3265
+ search_synonyms_params = Search::SearchSynonymsParams.new,
3263
3266
  request_options = {},
3264
3267
  &block
3265
3268
  )
3269
+ search_synonyms_params = api_client.object_to_hash(search_synonyms_params)
3270
+
3271
+ search_synonyms_params[:hitsPerPage] = 1000 unless search_synonyms_params.key?(:hitsPerPage)
3272
+
3266
3273
  synonyms = []
3267
3274
  loop do
3268
3275
  res = search_synonyms(index_name, search_synonyms_params, request_options)
@@ -3274,8 +3281,8 @@ module Algolia
3274
3281
  synonyms.concat(res.hits)
3275
3282
  end
3276
3283
 
3277
- search_synonyms_params.page += 1
3278
- break if res.hits.length < search_synonyms_params.hits_per_page
3284
+ search_synonyms_params[:page] += 1
3285
+ break if res.hits.length < search_synonyms_params[:hitsPerPage]
3279
3286
  end
3280
3287
 
3281
3288
  synonyms unless block_given?
@@ -3465,69 +3472,74 @@ module Algolia
3465
3472
  # @param index_name [String] The `index_name` to replace `objects` in.
3466
3473
  # @param objects [Array] The array of `objects` to store in the given Algolia `index_name`.
3467
3474
  # @param batch_size [int] The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
3475
+ # @param scopes [Array] The `scopes` to keep from the index. Defaults to `['settings', 'rules', 'synonyms']`.
3468
3476
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
3469
3477
  #
3470
3478
  # @return [Array<ReplaceAllObjectsResponse>]
3471
- def replace_all_objects(index_name, objects, batch_size = 1000, request_options = {})
3479
+ def replace_all_objects(
3480
+ index_name,
3481
+ objects,
3482
+ batch_size = 1000,
3483
+ scopes = [Search::ScopeType::SETTINGS, Search::ScopeType::RULES, Search::ScopeType::SYNONYMS],
3484
+ request_options = {}
3485
+ )
3472
3486
  tmp_index_name = index_name + "_tmp_" + rand(10_000_000).to_s
3473
3487
 
3474
- copy_operation_response = operation_index(
3475
- index_name,
3476
- Search::OperationIndexParams.new(
3477
- operation: Search::OperationType::COPY,
3478
- destination: tmp_index_name,
3479
- scope: [
3480
- Search::ScopeType::SETTINGS,
3481
- Search::ScopeType::RULES,
3482
- Search::ScopeType::SYNONYMS
3483
- ]
3484
- ),
3485
- request_options
3486
- )
3488
+ begin
3489
+ copy_operation_response = operation_index(
3490
+ index_name,
3491
+ Search::OperationIndexParams.new(
3492
+ operation: Search::OperationType::COPY,
3493
+ destination: tmp_index_name,
3494
+ scope: scopes
3495
+ ),
3496
+ request_options
3497
+ )
3487
3498
 
3488
- batch_responses = chunked_batch(
3489
- tmp_index_name,
3490
- objects,
3491
- Search::Action::ADD_OBJECT,
3492
- true,
3493
- batch_size,
3494
- request_options
3495
- )
3499
+ batch_responses = chunked_batch(
3500
+ tmp_index_name,
3501
+ objects,
3502
+ Search::Action::ADD_OBJECT,
3503
+ true,
3504
+ batch_size,
3505
+ request_options
3506
+ )
3496
3507
 
3497
- wait_for_task(tmp_index_name, copy_operation_response.task_id)
3508
+ wait_for_task(tmp_index_name, copy_operation_response.task_id)
3498
3509
 
3499
- copy_operation_response = operation_index(
3500
- index_name,
3501
- Search::OperationIndexParams.new(
3502
- operation: Search::OperationType::COPY,
3503
- destination: tmp_index_name,
3504
- scope: [
3505
- Search::ScopeType::SETTINGS,
3506
- Search::ScopeType::RULES,
3507
- Search::ScopeType::SYNONYMS
3508
- ]
3509
- ),
3510
- request_options
3511
- )
3510
+ copy_operation_response = operation_index(
3511
+ index_name,
3512
+ Search::OperationIndexParams.new(
3513
+ operation: Search::OperationType::COPY,
3514
+ destination: tmp_index_name,
3515
+ scope: scopes
3516
+ ),
3517
+ request_options
3518
+ )
3512
3519
 
3513
- wait_for_task(tmp_index_name, copy_operation_response.task_id)
3520
+ wait_for_task(tmp_index_name, copy_operation_response.task_id)
3514
3521
 
3515
- move_operation_response = operation_index(
3516
- tmp_index_name,
3517
- Search::OperationIndexParams.new(
3518
- operation: Search::OperationType::MOVE,
3519
- destination: index_name
3520
- ),
3521
- request_options
3522
- )
3522
+ move_operation_response = operation_index(
3523
+ tmp_index_name,
3524
+ Search::OperationIndexParams.new(
3525
+ operation: Search::OperationType::MOVE,
3526
+ destination: index_name
3527
+ ),
3528
+ request_options
3529
+ )
3523
3530
 
3524
- wait_for_task(tmp_index_name, move_operation_response.task_id)
3531
+ wait_for_task(tmp_index_name, move_operation_response.task_id)
3525
3532
 
3526
- Search::ReplaceAllObjectsResponse.new(
3527
- copy_operation_response: copy_operation_response,
3528
- batch_responses: batch_responses,
3529
- move_operation_response: move_operation_response
3530
- )
3533
+ Search::ReplaceAllObjectsResponse.new(
3534
+ copy_operation_response: copy_operation_response,
3535
+ batch_responses: batch_responses,
3536
+ move_operation_response: move_operation_response
3537
+ )
3538
+ rescue Exception => e
3539
+ delete_index(tmp_index_name)
3540
+
3541
+ raise e
3542
+ end
3531
3543
  end
3532
3544
 
3533
3545
  def index_exists?(index_name)
@@ -3543,6 +3555,5 @@ module Algolia
3543
3555
 
3544
3556
  true
3545
3557
  end
3546
-
3547
3558
  end
3548
3559
  end
@@ -57,11 +57,6 @@ module Algolia
57
57
  }
58
58
  end
59
59
 
60
- # Returns all the JSON keys this model knows about
61
- def self.acceptable_attributes
62
- attribute_map.values
63
- end
64
-
65
60
  # Attribute type mapping.
66
61
  def self.types_mapping
67
62
  {
@@ -22,11 +22,6 @@ module Algolia
22
22
  }
23
23
  end
24
24
 
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
25
  # Attribute type mapping.
31
26
  def self.types_mapping
32
27
  {
@@ -24,11 +24,6 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
27
  # Attribute type mapping.
33
28
  def self.types_mapping
34
29
  {
@@ -24,11 +24,6 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
27
  # Attribute type mapping.
33
28
  def self.types_mapping
34
29
  {
@@ -27,9 +27,11 @@ module Algolia
27
27
  }
28
28
  end
29
29
 
30
- # Returns all the JSON keys this model knows about
31
- def self.acceptable_attributes
32
- attribute_map.values
30
+ # Returns the keys that uniquely identify this oneOf variant when present
31
+ def self.discriminator_attributes
32
+ [
33
+ :customSearchParameters
34
+ ]
33
35
  end
34
36
 
35
37
  # Attribute type mapping.
@@ -24,11 +24,6 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
27
  # Attribute type mapping.
33
28
  def self.types_mapping
34
29
  {
@@ -44,7 +44,6 @@ module Algolia
44
44
 
45
45
  SchemaMismatchError = Class.new(StandardError)
46
46
 
47
- # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
48
47
  def find_and_cast_into_type(klass, data)
49
48
  return if data.nil?
50
49
 
@@ -83,12 +82,12 @@ module Algolia
83
82
  if const.respond_to?(:openapi_one_of)
84
83
  # nested oneOf model
85
84
  model = const.build(data)
86
- elsif const.respond_to?(:acceptable_attributes)
87
- # raise if data contains keys that are not known to the model
88
- raise unless (data.keys - const.acceptable_attributes).empty?
89
- model = const.build_from_hash(data)
85
+ elsif const.respond_to?(:discriminator_attributes)
86
+ if const.discriminator_attributes.all? { |attr| data.key?(attr) }
87
+ model = const.build_from_hash(data)
88
+ end
90
89
  else
91
- # maybe it's an enum
90
+ # maybe it's an enum, or doens't have discriminators
92
91
  model = const.build_from_hash(data)
93
92
  end
94
93
 
@@ -28,11 +28,6 @@ module Algolia
28
28
  }
29
29
  end
30
30
 
31
- # Returns all the JSON keys this model knows about
32
- def self.acceptable_attributes
33
- attribute_map.values
34
- end
35
-
36
31
  # Attribute type mapping.
37
32
  def self.types_mapping
38
33
  {
@@ -17,11 +17,6 @@ module Algolia
17
17
  }
18
18
  end
19
19
 
20
- # Returns all the JSON keys this model knows about
21
- def self.acceptable_attributes
22
- attribute_map.values
23
- end
24
-
25
20
  # Attribute type mapping.
26
21
  def self.types_mapping
27
22
  {
@@ -21,11 +21,6 @@ module Algolia
21
21
  }
22
22
  end
23
23
 
24
- # Returns all the JSON keys this model knows about
25
- def self.acceptable_attributes
26
- attribute_map.values
27
- end
28
-
29
24
  # Attribute type mapping.
30
25
  def self.types_mapping
31
26
  {
@@ -18,11 +18,6 @@ module Algolia
18
18
  }
19
19
  end
20
20
 
21
- # Returns all the JSON keys this model knows about
22
- def self.acceptable_attributes
23
- attribute_map.values
24
- end
25
-
26
21
  # Attribute type mapping.
27
22
  def self.types_mapping
28
23
  {
@@ -19,11 +19,6 @@ module Algolia
19
19
  }
20
20
  end
21
21
 
22
- # Returns all the JSON keys this model knows about
23
- def self.acceptable_attributes
24
- attribute_map.values
25
- end
26
-
27
22
  # Attribute type mapping.
28
23
  def self.types_mapping
29
24
  {
@@ -20,11 +20,6 @@ module Algolia
20
20
  }
21
21
  end
22
22
 
23
- # Returns all the JSON keys this model knows about
24
- def self.acceptable_attributes
25
- attribute_map.values
26
- end
27
-
28
23
  # Attribute type mapping.
29
24
  def self.types_mapping
30
25
  {
@@ -22,11 +22,6 @@ module Algolia
22
22
  }
23
23
  end
24
24
 
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
25
  # Attribute type mapping.
31
26
  def self.types_mapping
32
27
  {
@@ -19,11 +19,6 @@ module Algolia
19
19
  }
20
20
  end
21
21
 
22
- # Returns all the JSON keys this model knows about
23
- def self.acceptable_attributes
24
- attribute_map.values
25
- end
26
-
27
22
  # Attribute type mapping.
28
23
  def self.types_mapping
29
24
  {
@@ -24,11 +24,6 @@ module Algolia
24
24
  }
25
25
  end
26
26
 
27
- # Returns all the JSON keys this model knows about
28
- def self.acceptable_attributes
29
- attribute_map.values
30
- end
31
-
32
27
  # Attribute type mapping.
33
28
  def self.types_mapping
34
29
  {
@@ -20,11 +20,6 @@ module Algolia
20
20
  }
21
21
  end
22
22
 
23
- # Returns all the JSON keys this model knows about
24
- def self.acceptable_attributes
25
- attribute_map.values
26
- end
27
-
28
23
  # Attribute type mapping.
29
24
  def self.types_mapping
30
25
  {
@@ -17,11 +17,6 @@ module Algolia
17
17
  }
18
18
  end
19
19
 
20
- # Returns all the JSON keys this model knows about
21
- def self.acceptable_attributes
22
- attribute_map.values
23
- end
24
-
25
20
  # Attribute type mapping.
26
21
  def self.types_mapping
27
22
  {