algolia 3.43.0 → 3.46.1

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 (180) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/issue.yml +6 -4
  3. data/.github/workflows/release.yml +3 -3
  4. data/AGENTS.md +0 -24
  5. data/CHANGELOG.md +50 -0
  6. data/Gemfile.lock +1 -1
  7. data/lib/algolia/api/abtesting_client.rb +20 -13
  8. data/lib/algolia/api/abtesting_v3_client.rb +198 -8
  9. data/lib/algolia/api/agent_studio_client.rb +246 -7
  10. data/lib/algolia/api/analytics_client.rb +12 -11
  11. data/lib/algolia/api/composition_client.rb +2 -1
  12. data/lib/algolia/api/ingestion_client.rb +2 -1
  13. data/lib/algolia/api/insights_client.rb +2 -1
  14. data/lib/algolia/api/monitoring_client.rb +2 -1
  15. data/lib/algolia/api/personalization_client.rb +2 -1
  16. data/lib/algolia/api/query_suggestions_client.rb +2 -1
  17. data/lib/algolia/api/recommend_client.rb +4 -3
  18. data/lib/algolia/api/search_client.rb +141 -23
  19. data/lib/algolia/api_client.rb +10 -2
  20. data/lib/algolia/chunked_helper_options.rb +1 -0
  21. data/lib/algolia/configuration.rb +18 -2
  22. data/lib/algolia/defaults.rb +8 -0
  23. data/lib/algolia/error.rb +20 -3
  24. data/lib/algolia/models/abtesting-v3/ab_test.rb +13 -11
  25. data/lib/algolia/models/abtesting-v3/ab_test_configuration.rb +22 -4
  26. data/lib/algolia/models/abtesting-v3/ab_test_settings_response.rb +224 -0
  27. data/lib/algolia/models/abtesting-v3/add_ab_tests_request.rb +11 -1
  28. data/lib/algolia/models/abtesting-v3/analysis_method.rb +34 -0
  29. data/lib/algolia/models/abtesting-v3/bayesian_metric_result.rb +237 -0
  30. data/lib/algolia/models/abtesting-v3/evidence_status.rb +37 -0
  31. data/lib/algolia/models/abtesting-v3/feature_settings.rb +224 -0
  32. data/lib/algolia/models/abtesting-v3/metric_evidence.rb +209 -0
  33. data/lib/algolia/models/abtesting-v3/metric_metadata.rb +1 -1
  34. data/lib/algolia/models/abtesting-v3/metric_name.rb +7 -1
  35. data/lib/algolia/models/abtesting-v3/metric_result.rb +18 -8
  36. data/lib/algolia/models/abtesting-v3/minimum_detectable_effect.rb +1 -1
  37. data/lib/algolia/models/abtesting-v3/primary_metric.rb +37 -0
  38. data/lib/algolia/models/abtesting-v3/save_settings_request.rb +208 -0
  39. data/lib/algolia/models/abtesting-v3/variant_settings.rb +293 -0
  40. data/lib/algolia/models/agent-studio/agent_completion_algolia_params.rb +16 -4
  41. data/lib/algolia/models/agent-studio/agent_completion_request.rb +1 -3
  42. data/lib/algolia/models/agent-studio/agent_completion_request_union.rb +108 -0
  43. data/lib/algolia/models/agent-studio/agent_test_configuration.rb +1 -1
  44. data/lib/algolia/models/agent-studio/agent_with_version_response.rb +1 -1
  45. data/lib/algolia/models/agent-studio/agui_completion_request.rb +265 -0
  46. data/lib/algolia/models/agent-studio/agui_resume.rb +231 -0
  47. data/lib/algolia/models/agent-studio/algolia_grouped_results_compat_tool_config.rb +268 -0
  48. data/lib/algolia/models/agent-studio/{algolia_display_results_tool_config.rb → algolia_grouped_results_tool_config.rb} +30 -16
  49. data/lib/algolia/models/agent-studio/{algolia_recommend_tool_config_input.rb → algolia_recommend_tool_config.rb} +3 -3
  50. data/lib/algolia/models/agent-studio/algolia_search_tool_config.rb +22 -4
  51. data/lib/algolia/models/agent-studio/assistant_message_agui.rb +280 -0
  52. data/lib/algolia/models/agent-studio/assistant_message_v4.rb +1 -0
  53. data/lib/algolia/models/agent-studio/assistant_message_v5.rb +3 -1
  54. data/lib/algolia/models/agent-studio/assistant_part_v5.rb +2 -0
  55. data/lib/algolia/models/agent-studio/azure_open_ai_provider_input.rb +1 -1
  56. data/lib/algolia/models/agent-studio/boolean_param.rb +220 -0
  57. data/lib/algolia/models/agent-studio/client_side_tool_config.rb +14 -4
  58. data/lib/algolia/models/agent-studio/compaction_stats.rb +271 -0
  59. data/lib/algolia/models/agent-studio/compatibility_mode.rb +2 -1
  60. data/lib/algolia/models/agent-studio/context_compact_request.rb +263 -0
  61. data/lib/algolia/models/agent-studio/context_response.rb +231 -0
  62. data/lib/algolia/models/agent-studio/context_stats.rb +258 -0
  63. data/lib/algolia/models/agent-studio/context_trim_request.rb +239 -0
  64. data/lib/algolia/models/agent-studio/conversation_base_response.rb +16 -5
  65. data/lib/algolia/models/agent-studio/conversation_full_response.rb +26 -5
  66. data/lib/algolia/models/agent-studio/data_guardrail_violation_part_v5.rb +218 -0
  67. data/lib/algolia/models/agent-studio/data_part_v5.rb +220 -0
  68. data/lib/algolia/models/agent-studio/facet_filters_union_search_parameters_overrides.rb +108 -0
  69. data/lib/algolia/models/agent-studio/feedback_update_request.rb +253 -0
  70. data/lib/algolia/models/agent-studio/forwarded_props.rb +226 -0
  71. data/lib/algolia/models/agent-studio/function_call_agui.rb +219 -0
  72. data/lib/algolia/models/agent-studio/guardrail_outcome.rb +231 -0
  73. data/lib/algolia/models/agent-studio/guardrail_violation_data_v5.rb +230 -0
  74. data/lib/algolia/models/agent-studio/impact_analytics.rb +242 -0
  75. data/lib/algolia/models/agent-studio/index_search_parameters.rb +11 -1
  76. data/lib/algolia/models/agent-studio/input_union.rb +113 -0
  77. data/lib/algolia/models/agent-studio/items_union.rb +132 -0
  78. data/lib/algolia/models/agent-studio/items_union_agui_completion_request.rb +123 -0
  79. data/lib/algolia/models/agent-studio/managed_provider_response_input.rb +209 -0
  80. data/lib/algolia/models/agent-studio/mcp_server_tool_config.rb +1 -1
  81. data/lib/algolia/models/agent-studio/memory_record.rb +4 -4
  82. data/lib/algolia/models/agent-studio/message_event.rb +231 -0
  83. data/lib/algolia/models/agent-studio/message_part_assistant_message_agui.rb +123 -0
  84. data/lib/algolia/models/agent-studio/message_response.rb +87 -5
  85. data/lib/algolia/models/agent-studio/mode_enum.rb +34 -0
  86. data/lib/algolia/models/agent-studio/one_of_enum.rb +34 -0
  87. data/lib/algolia/models/agent-studio/open_ai_compatible_provider_input.rb +1 -1
  88. data/lib/algolia/models/agent-studio/paginated_conversations_response.rb +13 -4
  89. data/lib/algolia/models/agent-studio/provider_authentication_response.rb +14 -5
  90. data/lib/algolia/models/agent-studio/provider_input.rb +2 -1
  91. data/lib/algolia/models/agent-studio/provider_input_nullable.rb +2 -1
  92. data/lib/algolia/models/agent-studio/provider_name.rb +2 -1
  93. data/lib/algolia/models/agent-studio/reasoning_message_agui.rb +239 -0
  94. data/lib/algolia/models/agent-studio/reasoning_part_agui.rb +228 -0
  95. data/lib/algolia/models/agent-studio/search_parameters.rb +1 -1
  96. data/lib/algolia/models/agent-studio/search_parameters_overrides.rb +80 -5
  97. data/lib/algolia/models/agent-studio/status_enum.rb +34 -0
  98. data/lib/algolia/models/agent-studio/task_kind.rb +33 -0
  99. data/lib/algolia/models/agent-studio/task_request.rb +240 -0
  100. data/lib/algolia/models/agent-studio/task_response.rb +211 -0
  101. data/lib/algolia/models/agent-studio/text_part_agui.rb +219 -0
  102. data/lib/algolia/models/agent-studio/tool_approval_agui.rb +228 -0
  103. data/lib/algolia/models/agent-studio/tool_approval_request_part.rb +15 -5
  104. data/lib/algolia/models/agent-studio/tool_call_agui.rb +237 -0
  105. data/lib/algolia/models/agent-studio/tool_call_part.rb +13 -1
  106. data/lib/algolia/models/agent-studio/tool_call_part_agui.rb +272 -0
  107. data/lib/algolia/models/agent-studio/tool_call_result_part_agui.rb +250 -0
  108. data/lib/algolia/models/agent-studio/tool_config_input.rb +2 -5
  109. data/lib/algolia/models/agent-studio/{tool_config.rb → tool_config_or_boolean_union.rb} +1 -1
  110. data/lib/algolia/models/agent-studio/tool_config_output.rb +126 -0
  111. data/lib/algolia/models/agent-studio/tool_invocation_v4.rb +10 -2
  112. data/lib/algolia/models/agent-studio/tool_message_agui.rb +259 -0
  113. data/lib/algolia/models/agent-studio/tool_part_v5.rb +47 -2
  114. data/lib/algolia/models/agent-studio/tool_result_part.rb +57 -5
  115. data/lib/algolia/models/agent-studio/unknown_tool_config.rb +1 -1
  116. data/lib/algolia/models/agent-studio/user_message_agui.rb +261 -0
  117. data/lib/algolia/models/agent-studio/user_message_metadata_agui.rb +208 -0
  118. data/lib/algolia/models/agent-studio/user_message_metadata_v5.rb +4 -2
  119. data/lib/algolia/models/agent-studio/user_message_v4.rb +4 -1
  120. data/lib/algolia/models/agent-studio/user_message_v5.rb +4 -1
  121. data/lib/algolia/models/agent-studio/validation_error.rb +5 -25
  122. data/lib/algolia/models/agent-studio/xai_provider_input.rb +220 -0
  123. data/lib/algolia/models/analytics/catalog_entry.rb +1 -1
  124. data/lib/algolia/models/composition/base_injection_query_parameters.rb +18 -18
  125. data/lib/algolia/models/composition/distinct.rb +1 -1
  126. data/lib/algolia/models/composition/external_provider.rb +209 -0
  127. data/lib/algolia/models/composition/external_provider_ordering.rb +34 -0
  128. data/lib/algolia/models/composition/hit_metadata.rb +2 -2
  129. data/lib/algolia/models/composition/injected_item_external.rb +21 -14
  130. data/lib/algolia/models/composition/injected_item_external_provider.rb +258 -0
  131. data/lib/algolia/models/composition/injected_item_external_provider_source.rb +216 -0
  132. data/lib/algolia/models/composition/injected_item_hits_metadata.rb +1 -1
  133. data/lib/algolia/models/composition/{recommend.rb → injected_item_recommend.rb} +10 -3
  134. data/lib/algolia/models/composition/injected_item_recommend_source.rb +1 -1
  135. data/lib/algolia/models/composition/injected_item_search.rb +8 -1
  136. data/lib/algolia/models/composition/injected_item_source.rb +1 -0
  137. data/lib/algolia/models/composition/injection_main_external_provider.rb +258 -0
  138. data/lib/algolia/models/composition/injection_main_external_provider_source.rb +216 -0
  139. data/lib/algolia/models/composition/{main_recommend.rb → injection_main_recommend.rb} +10 -3
  140. data/lib/algolia/models/composition/injection_main_recommend_source.rb +1 -1
  141. data/lib/algolia/models/composition/{main_search.rb → injection_main_search.rb} +11 -4
  142. data/lib/algolia/models/composition/injection_main_search_source.rb +1 -1
  143. data/lib/algolia/models/composition/injection_main_source.rb +1 -0
  144. data/lib/algolia/models/composition/main_injection_query_parameters.rb +22 -22
  145. data/lib/algolia/models/composition/optional_words.rb +1 -1
  146. data/lib/algolia/models/composition/params.rb +6 -6
  147. data/lib/algolia/models/composition/processing_error.rb +209 -0
  148. data/lib/algolia/models/composition/request_body.rb +13 -4
  149. data/lib/algolia/models/composition/result_card.rb +208 -0
  150. data/lib/algolia/models/composition/search_response.rb +16 -4
  151. data/lib/algolia/models/composition/widgets.rb +13 -4
  152. data/lib/algolia/models/ingestion/source_update_commercetools.rb +11 -0
  153. data/lib/algolia/models/recommend/distinct.rb +1 -1
  154. data/lib/algolia/models/recommend/fallback_params.rb +26 -26
  155. data/lib/algolia/models/recommend/optional_words.rb +1 -1
  156. data/lib/algolia/models/recommend/recommend_search_params.rb +26 -26
  157. data/lib/algolia/models/recommend/result_card.rb +208 -0
  158. data/lib/algolia/models/recommend/widgets.rb +13 -4
  159. data/lib/algolia/models/search/api_key.rb +2 -2
  160. data/lib/algolia/models/search/attribute_criteria_computed_by.rb +35 -0
  161. data/lib/algolia/models/search/browse_params_object.rb +35 -25
  162. data/lib/algolia/models/search/consequence_params.rb +35 -25
  163. data/lib/algolia/models/search/distinct.rb +1 -1
  164. data/lib/algolia/models/search/get_api_key_response.rb +2 -2
  165. data/lib/algolia/models/search/index_settings.rb +28 -18
  166. data/lib/algolia/models/search/log.rb +11 -0
  167. data/lib/algolia/models/search/optional_words.rb +1 -1
  168. data/lib/algolia/models/search/result_card.rb +208 -0
  169. data/lib/algolia/models/search/search_for_facets.rb +35 -25
  170. data/lib/algolia/models/search/search_for_hits.rb +35 -25
  171. data/lib/algolia/models/search/search_params_object.rb +35 -25
  172. data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
  173. data/lib/algolia/models/search/settings_response.rb +28 -18
  174. data/lib/algolia/models/search/widgets.rb +13 -4
  175. data/lib/algolia/transport/http/http_requester.rb +2 -2
  176. data/lib/algolia/transport/request_id.rb +49 -0
  177. data/lib/algolia/transport/transport.rb +161 -18
  178. data/lib/algolia/version.rb +1 -1
  179. data/lib/algolia.rb +1 -0
  180. metadata +73 -8
@@ -26,7 +26,8 @@ module Algolia
26
26
  config.write_timeout = 25000
27
27
  end
28
28
 
29
- @api_client = Algolia::ApiClient.new(config)
29
+ # Per-client capability; an explicit config.request_id_enabled always wins.
30
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
30
31
  end
31
32
 
32
33
  def self.create(app_id, api_key, opts = {})
@@ -188,6 +189,50 @@ module Algolia
188
189
  nil
189
190
  end
190
191
 
192
+ # Summarize the older part of a conversation into a single user message via the caller's LLM. Everything except the trailing `keepLastMessages` messages is summarized; the summary is returned as a user-role message followed by the kept tail verbatim. Your provider runs the summary, so the provider adds the cost to your account. A conversation too large for the summarizer's context window is split into chunks that each fit, summarized concurrently, then merged in a reduce pass - so payload size alone does not fail the request. When the conversation still cannot be summarized (it needs more chunks than the server allows, or the chunk summaries will not converge), the response is a `400`, not a `500`. Two optional controls shape the output. `instructions` adds caller guidance inside the server-owned prompt frame, so it steers the summary without the model echoing the wording back. `targetTokensEstimate` sets a desired summary size, translated into word-count guidance. The `compaction` block reports what happened: `compacted` is `false` when the payload passed through untouched (nothing older than the kept tail), alongside chunk/pass counts and the summarizer's own token usage.
193
+ #
194
+ # Required API Key ACLs:
195
+ # - search
196
+ # @param context_compact_request [ContextCompactRequest] (required)
197
+ # @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)
198
+ # @return [Http::Response] the response
199
+ def compact_context_with_http_info(context_compact_request, request_options = {})
200
+ # verify the required parameter 'context_compact_request' is set
201
+ if @api_client.config.client_side_validation && context_compact_request.nil?
202
+ raise ArgumentError, "Parameter `context_compact_request` is required when calling `compact_context`."
203
+ end
204
+
205
+ path = "/agent-studio/1/unstable/context/compact"
206
+ query_params = {}
207
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
208
+ header_params = {}
209
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
210
+
211
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(context_compact_request)
212
+
213
+ new_options = request_options.merge(
214
+ :operation => :"AgentStudioClient.compact_context",
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :body => post_body,
218
+ :use_read_transporter => false
219
+ )
220
+
221
+ @api_client.call_api(:POST, path, new_options)
222
+ end
223
+
224
+ # Summarize the older part of a conversation into a single user message via the caller's LLM. Everything except the trailing `keepLastMessages` messages is summarized; the summary is returned as a user-role message followed by the kept tail verbatim. Your provider runs the summary, so the provider adds the cost to your account. A conversation too large for the summarizer's context window is split into chunks that each fit, summarized concurrently, then merged in a reduce pass - so payload size alone does not fail the request. When the conversation still cannot be summarized (it needs more chunks than the server allows, or the chunk summaries will not converge), the response is a `400`, not a `500`. Two optional controls shape the output. `instructions` adds caller guidance inside the server-owned prompt frame, so it steers the summary without the model echoing the wording back. `targetTokensEstimate` sets a desired summary size, translated into word-count guidance. The `compaction` block reports what happened: `compacted` is `false` when the payload passed through untouched (nothing older than the kept tail), alongside chunk/pass counts and the summarizer's own token usage.
225
+ #
226
+ # Required API Key ACLs:
227
+ # - search
228
+ # @param context_compact_request [ContextCompactRequest] (required)
229
+ # @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)
230
+ # @return [ContextResponse]
231
+ def compact_context(context_compact_request, request_options = {})
232
+ response = compact_context_with_http_info(context_compact_request, request_options)
233
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::ContextResponse")
234
+ end
235
+
191
236
  # Create a new agent.
192
237
  #
193
238
  # Required API Key ACLs:
@@ -301,7 +346,7 @@ module Algolia
301
346
  # - search
302
347
  # @param agent_id [String] The agentId. (required)
303
348
  # @param compatibility_mode [CompatibilityMode] Compatibility mode for the completion API. (required)
304
- # @param agent_completion_request [AgentCompletionRequest] (required)
349
+ # @param agent_completion_request [AgentCompletionRequestUnion] (required)
305
350
  # @param stream [Boolean] Whether to stream the response or not. (default to true)
306
351
  # @param cache [Boolean] Use cached responses if available. (default to true)
307
352
  # @param memory [Boolean] Set to false to disable memory (enabled by default).
@@ -374,7 +419,7 @@ module Algolia
374
419
  # - search
375
420
  # @param agent_id [String] The agentId. (required)
376
421
  # @param compatibility_mode [CompatibilityMode] Compatibility mode for the completion API. (required)
377
- # @param agent_completion_request [AgentCompletionRequest] (required)
422
+ # @param agent_completion_request [AgentCompletionRequestUnion] (required)
378
423
  # @param stream [Boolean] Whether to stream the response or not. (default to true)
379
424
  # @param cache [Boolean] Use cached responses if available. (default to true)
380
425
  # @param memory [Boolean] Set to false to disable memory (enabled by default).
@@ -407,6 +452,76 @@ module Algolia
407
452
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Object>")
408
453
  end
409
454
 
455
+ # Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself.
456
+ #
457
+ # Required API Key ACLs:
458
+ # - search
459
+ # @param agent_id [String] The agentId. (required)
460
+ # @param task_request [TaskRequest] (required)
461
+ # @param stream [Boolean] Whether to stream the response or not. (default to false)
462
+ # @param cache [Boolean] Use cached responses if available. (default to true)
463
+ # @param analytics [Boolean] Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. (default to true)
464
+ # @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)
465
+ # @return [Http::Response] the response
466
+ def create_agent_task_with_http_info(
467
+ agent_id,
468
+ task_request,
469
+ stream = nil,
470
+ cache = nil,
471
+ analytics = nil,
472
+ request_options = {}
473
+ )
474
+ # verify the required parameter 'agent_id' is set
475
+ if @api_client.config.client_side_validation && agent_id.nil?
476
+ raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_task`."
477
+ end
478
+ # verify the required parameter 'agent_id' is not empty
479
+ if @api_client.config.client_side_validation && agent_id.empty?
480
+ raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_task`."
481
+ end
482
+ # verify the required parameter 'task_request' is set
483
+ if @api_client.config.client_side_validation && task_request.nil?
484
+ raise ArgumentError, "Parameter `task_request` is required when calling `create_agent_task`."
485
+ end
486
+
487
+ path = "/agent-studio/1/agents/{agentId}/tasks".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
488
+ query_params = {}
489
+ query_params[:stream] = stream unless stream.nil?
490
+ query_params[:cache] = cache unless cache.nil?
491
+ query_params[:analytics] = analytics unless analytics.nil?
492
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
493
+ header_params = {}
494
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
495
+
496
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_request)
497
+
498
+ new_options = request_options.merge(
499
+ :operation => :"AgentStudioClient.create_agent_task",
500
+ :header_params => header_params,
501
+ :query_params => query_params,
502
+ :body => post_body,
503
+ :use_read_transporter => false
504
+ )
505
+
506
+ @api_client.call_api(:POST, path, new_options)
507
+ end
508
+
509
+ # Run a configured task and return the generated object as ``{ output }``. With ``?stream=true``, returns the raw partial JSON text stream expected by AI SDK v5 ``useObject``. The streamed JSON is the task output itself.
510
+ #
511
+ # Required API Key ACLs:
512
+ # - search
513
+ # @param agent_id [String] The agentId. (required)
514
+ # @param task_request [TaskRequest] (required)
515
+ # @param stream [Boolean] Whether to stream the response or not. (default to false)
516
+ # @param cache [Boolean] Use cached responses if available. (default to true)
517
+ # @param analytics [Boolean] Set to false to skip endpoint-specific analytics for this task call (default: true). Disables the task analytics event; operational metrics and traces are always emitted. (default to true)
518
+ # @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)
519
+ # @return [TaskResponse]
520
+ def create_agent_task(agent_id, task_request, stream = nil, cache = nil, analytics = nil, request_options = {})
521
+ response = create_agent_task_with_http_info(agent_id, task_request, stream, cache, analytics, request_options)
522
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::TaskResponse")
523
+ end
524
+
410
525
  # Create new feedback entry.
411
526
  #
412
527
  # Required API Key ACLs:
@@ -782,7 +897,7 @@ module Algolia
782
897
  nil
783
898
  end
784
899
 
785
- # Deletes the conversations matching the given filers.
900
+ # Deletes the conversations matching the given filters.
786
901
  #
787
902
  # Required API Key ACLs:
788
903
  # - logs
@@ -825,7 +940,7 @@ module Algolia
825
940
  @api_client.call_api(:DELETE, path, new_options)
826
941
  end
827
942
 
828
- # Deletes the conversations matching the given filers.
943
+ # Deletes the conversations matching the given filters.
829
944
  #
830
945
  # Required API Key ACLs:
831
946
  # - logs
@@ -1330,6 +1445,8 @@ module Algolia
1330
1445
  # @param conversation_id [String] The conversationId. (required)
1331
1446
  # @param agent_id [String] The agentId. (required)
1332
1447
  # @param include_feedback [Boolean] Include feedback for the conversation. (default to false)
1448
+ # @param include_message_events [Boolean] Include Insights events attributed to each assistant message. (default to false)
1449
+ # @param include_impact_analytics [Boolean] Include outcome signals (hasView, hasClick, hasConversion) for the conversation. (default to false)
1333
1450
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1334
1451
  # @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)
1335
1452
  # @return [Http::Response] the response
@@ -1337,6 +1454,8 @@ module Algolia
1337
1454
  conversation_id,
1338
1455
  agent_id,
1339
1456
  include_feedback = nil,
1457
+ include_message_events = nil,
1458
+ include_impact_analytics = nil,
1340
1459
  x_algolia_secure_user_token = nil,
1341
1460
  request_options = {}
1342
1461
  )
@@ -1362,6 +1481,8 @@ module Algolia
1362
1481
  .sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
1363
1482
  query_params = {}
1364
1483
  query_params[:includeFeedback] = include_feedback unless include_feedback.nil?
1484
+ query_params[:includeMessageEvents] = include_message_events unless include_message_events.nil?
1485
+ query_params[:includeImpactAnalytics] = include_impact_analytics unless include_impact_analytics.nil?
1365
1486
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1366
1487
  header_params = {}
1367
1488
  unless x_algolia_secure_user_token.nil?
@@ -1390,6 +1511,8 @@ module Algolia
1390
1511
  # @param conversation_id [String] The conversationId. (required)
1391
1512
  # @param agent_id [String] The agentId. (required)
1392
1513
  # @param include_feedback [Boolean] Include feedback for the conversation. (default to false)
1514
+ # @param include_message_events [Boolean] Include Insights events attributed to each assistant message. (default to false)
1515
+ # @param include_impact_analytics [Boolean] Include outcome signals (hasView, hasClick, hasConversion) for the conversation. (default to false)
1393
1516
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1394
1517
  # @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)
1395
1518
  # @return [ConversationFullResponse]
@@ -1397,6 +1520,8 @@ module Algolia
1397
1520
  conversation_id,
1398
1521
  agent_id,
1399
1522
  include_feedback = nil,
1523
+ include_message_events = nil,
1524
+ include_impact_analytics = nil,
1400
1525
  x_algolia_secure_user_token = nil,
1401
1526
  request_options = {}
1402
1527
  )
@@ -1404,6 +1529,8 @@ module Algolia
1404
1529
  conversation_id,
1405
1530
  agent_id,
1406
1531
  include_feedback,
1532
+ include_message_events,
1533
+ include_impact_analytics,
1407
1534
  x_algolia_secure_user_token,
1408
1535
  request_options
1409
1536
  )
@@ -1566,7 +1693,7 @@ module Algolia
1566
1693
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::UserDataResponse")
1567
1694
  end
1568
1695
 
1569
- # Invalidate cached completions for this agent. Filter with `before` (exclusive).
1696
+ # Invalidate cached completions and task outputs for this agent. Filter with `before` (exclusive).
1570
1697
  #
1571
1698
  # Required API Key ACLs:
1572
1699
  # - editSettings
@@ -1604,7 +1731,7 @@ module Algolia
1604
1731
  @api_client.call_api(:DELETE, path, new_options)
1605
1732
  end
1606
1733
 
1607
- # Invalidate cached completions for this agent. Filter with `before` (exclusive).
1734
+ # Invalidate cached completions and task outputs for this agent. Filter with `before` (exclusive).
1608
1735
  #
1609
1736
  # Required API Key ACLs:
1610
1737
  # - editSettings
@@ -1682,6 +1809,10 @@ module Algolia
1682
1809
  # @param feedback_vote [Integer] Filter by feedback value (requires includeFeedback=true).
1683
1810
  # @param page [Integer] Page number. (default to 1)
1684
1811
  # @param limit [Integer] Items per page. (default to 20)
1812
+ # @param include_impact_analytics [Boolean] Include impact analytics (hasView, hasClick, hasConversion) per conversation.
1813
+ # @param clicked [Boolean] Filter by conversations with at least one item click.
1814
+ # @param converted [Boolean] Filter by conversations with at least one conversion.
1815
+ # @param has_algolia_search [Boolean] Filter by conversations where the search tool was used.
1685
1816
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1686
1817
  # @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)
1687
1818
  # @return [Http::Response] the response
@@ -1693,6 +1824,10 @@ module Algolia
1693
1824
  feedback_vote = nil,
1694
1825
  page = nil,
1695
1826
  limit = nil,
1827
+ include_impact_analytics = nil,
1828
+ clicked = nil,
1829
+ converted = nil,
1830
+ has_algolia_search = nil,
1696
1831
  x_algolia_secure_user_token = nil,
1697
1832
  request_options = {}
1698
1833
  )
@@ -1716,6 +1851,10 @@ module Algolia
1716
1851
  query_params[:feedbackVote] = feedback_vote unless feedback_vote.nil?
1717
1852
  query_params[:page] = page unless page.nil?
1718
1853
  query_params[:limit] = limit unless limit.nil?
1854
+ query_params[:includeImpactAnalytics] = include_impact_analytics unless include_impact_analytics.nil?
1855
+ query_params[:clicked] = clicked unless clicked.nil?
1856
+ query_params[:converted] = converted unless converted.nil?
1857
+ query_params[:hasAlgoliaSearch] = has_algolia_search unless has_algolia_search.nil?
1719
1858
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
1720
1859
  header_params = {}
1721
1860
  unless x_algolia_secure_user_token.nil?
@@ -1748,6 +1887,10 @@ module Algolia
1748
1887
  # @param feedback_vote [Integer] Filter by feedback value (requires includeFeedback=true).
1749
1888
  # @param page [Integer] Page number. (default to 1)
1750
1889
  # @param limit [Integer] Items per page. (default to 20)
1890
+ # @param include_impact_analytics [Boolean] Include impact analytics (hasView, hasClick, hasConversion) per conversation.
1891
+ # @param clicked [Boolean] Filter by conversations with at least one item click.
1892
+ # @param converted [Boolean] Filter by conversations with at least one conversion.
1893
+ # @param has_algolia_search [Boolean] Filter by conversations where the search tool was used.
1751
1894
  # @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
1752
1895
  # @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)
1753
1896
  # @return [PaginatedConversationsResponse]
@@ -1759,6 +1902,10 @@ module Algolia
1759
1902
  feedback_vote = nil,
1760
1903
  page = nil,
1761
1904
  limit = nil,
1905
+ include_impact_analytics = nil,
1906
+ clicked = nil,
1907
+ converted = nil,
1908
+ has_algolia_search = nil,
1762
1909
  x_algolia_secure_user_token = nil,
1763
1910
  request_options = {}
1764
1911
  )
@@ -1770,6 +1917,10 @@ module Algolia
1770
1917
  feedback_vote,
1771
1918
  page,
1772
1919
  limit,
1920
+ include_impact_analytics,
1921
+ clicked,
1922
+ converted,
1923
+ has_algolia_search,
1773
1924
  x_algolia_secure_user_token,
1774
1925
  request_options
1775
1926
  )
@@ -2059,6 +2210,50 @@ module Algolia
2059
2210
  )
2060
2211
  end
2061
2212
 
2213
+ # Deterministically trim a conversation payload (no LLM calls). Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap \"how big is my context?\" probe (no LLM call, no mutation).
2214
+ #
2215
+ # Required API Key ACLs:
2216
+ # - search
2217
+ # @param context_trim_request [ContextTrimRequest] (required)
2218
+ # @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)
2219
+ # @return [Http::Response] the response
2220
+ def trim_context_with_http_info(context_trim_request, request_options = {})
2221
+ # verify the required parameter 'context_trim_request' is set
2222
+ if @api_client.config.client_side_validation && context_trim_request.nil?
2223
+ raise ArgumentError, "Parameter `context_trim_request` is required when calling `trim_context`."
2224
+ end
2225
+
2226
+ path = "/agent-studio/1/unstable/context/trim"
2227
+ query_params = {}
2228
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2229
+ header_params = {}
2230
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2231
+
2232
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(context_trim_request)
2233
+
2234
+ new_options = request_options.merge(
2235
+ :operation => :"AgentStudioClient.trim_context",
2236
+ :header_params => header_params,
2237
+ :query_params => query_params,
2238
+ :body => post_body,
2239
+ :use_read_transporter => false
2240
+ )
2241
+
2242
+ @api_client.call_api(:POST, path, new_options)
2243
+ end
2244
+
2245
+ # Deterministically trim a conversation payload (no LLM calls). Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap \"how big is my context?\" probe (no LLM call, no mutation).
2246
+ #
2247
+ # Required API Key ACLs:
2248
+ # - search
2249
+ # @param context_trim_request [ContextTrimRequest] (required)
2250
+ # @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)
2251
+ # @return [ContextResponse]
2252
+ def trim_context(context_trim_request, request_options = {})
2253
+ response = trim_context_with_http_info(context_trim_request, request_options)
2254
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::ContextResponse")
2255
+ end
2256
+
2062
2257
  # Unpublish the specified agent.
2063
2258
  #
2064
2259
  # Required API Key ACLs:
@@ -2217,6 +2412,50 @@ module Algolia
2217
2412
  )
2218
2413
  end
2219
2414
 
2415
+ # Update an existing feedback entry.
2416
+ #
2417
+ # Required API Key ACLs:
2418
+ # - search
2419
+ # @param feedback_update_request [FeedbackUpdateRequest] (required)
2420
+ # @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)
2421
+ # @return [Http::Response] the response
2422
+ def update_feedback_with_http_info(feedback_update_request, request_options = {})
2423
+ # verify the required parameter 'feedback_update_request' is set
2424
+ if @api_client.config.client_side_validation && feedback_update_request.nil?
2425
+ raise ArgumentError, "Parameter `feedback_update_request` is required when calling `update_feedback`."
2426
+ end
2427
+
2428
+ path = "/agent-studio/1/feedback"
2429
+ query_params = {}
2430
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
2431
+ header_params = {}
2432
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
2433
+
2434
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(feedback_update_request)
2435
+
2436
+ new_options = request_options.merge(
2437
+ :operation => :"AgentStudioClient.update_feedback",
2438
+ :header_params => header_params,
2439
+ :query_params => query_params,
2440
+ :body => post_body,
2441
+ :use_read_transporter => false
2442
+ )
2443
+
2444
+ @api_client.call_api(:PATCH, path, new_options)
2445
+ end
2446
+
2447
+ # Update an existing feedback entry.
2448
+ #
2449
+ # Required API Key ACLs:
2450
+ # - search
2451
+ # @param feedback_update_request [FeedbackUpdateRequest] (required)
2452
+ # @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)
2453
+ # @return [FeedbackResponse]
2454
+ def update_feedback(feedback_update_request, request_options = {})
2455
+ response = update_feedback_with_http_info(feedback_update_request, request_options)
2456
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::FeedbackResponse")
2457
+ end
2458
+
2220
2459
  # Update Provider.
2221
2460
  #
2222
2461
  # Required API Key ACLs:
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, region = nil, opts = {})
@@ -691,7 +692,7 @@ module Algolia
691
692
  )
692
693
  end
693
694
 
694
- # **Beta**: this endpoint is under active development and may change without notice. Returns the static catalog of analytics fields, grouped by domain and usage (metrics, filters, groups, distributions). No authentication is required. Use it to discover valid `(domain, kind)` pairs before building the other `/3/patterns/*` queries; two fields are combinable in one query only when their `roots` intersect. Each entry's `requires` lists the ACLs needed when that field is actually used in a query.
695
+ # Returns the static catalog of analytics fields, grouped by domain and usage (metrics, filters, groups, distributions). No authentication is required. Use it to discover valid `(domain, kind)` pairs before building the other `/3/patterns/*` queries; two fields are combinable in one query only when their `roots` intersect. Each entry's `requires` lists the ACLs needed when that field is actually used in a query.
695
696
 
696
697
  # @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)
697
698
  # @return [Http::Response] the response
@@ -715,7 +716,7 @@ module Algolia
715
716
  @api_client.call_api(:GET, path, new_options)
716
717
  end
717
718
 
718
- # **Beta**: this endpoint is under active development and may change without notice. Returns the static catalog of analytics fields, grouped by domain and usage (metrics, filters, groups, distributions). No authentication is required. Use it to discover valid `(domain, kind)` pairs before building the other `/3/patterns/*` queries; two fields are combinable in one query only when their `roots` intersect. Each entry's `requires` lists the ACLs needed when that field is actually used in a query.
719
+ # Returns the static catalog of analytics fields, grouped by domain and usage (metrics, filters, groups, distributions). No authentication is required. Use it to discover valid `(domain, kind)` pairs before building the other `/3/patterns/*` queries; two fields are combinable in one query only when their `roots` intersect. Each entry's `requires` lists the ACLs needed when that field is actually used in a query.
719
720
 
720
721
  # @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)
721
722
  # @return [Catalog]
@@ -1798,7 +1799,7 @@ module Algolia
1798
1799
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Analytics::GetUsersCountResponse")
1799
1800
  end
1800
1801
 
1801
- # **Beta**: this endpoint is under active development and may change without notice. Buckets one or more numeric fields into histograms and returns an object keyed by `histogram<Field>`, each mapping a bin label to a count. `distributions` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1802
+ # Buckets one or more numeric fields into histograms and returns an object keyed by `histogram<Field>`, each mapping a bin label to a count. `distributions` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1802
1803
  #
1803
1804
  # Required API Key ACLs:
1804
1805
  # - analytics
@@ -1832,7 +1833,7 @@ module Algolia
1832
1833
  @api_client.call_api(:POST, path, new_options)
1833
1834
  end
1834
1835
 
1835
- # **Beta**: this endpoint is under active development and may change without notice. Buckets one or more numeric fields into histograms and returns an object keyed by `histogram<Field>`, each mapping a bin label to a count. `distributions` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1836
+ # Buckets one or more numeric fields into histograms and returns an object keyed by `histogram<Field>`, each mapping a bin label to a count. `distributions` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1836
1837
  #
1837
1838
  # Required API Key ACLs:
1838
1839
  # - analytics
@@ -1845,7 +1846,7 @@ module Algolia
1845
1846
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Object>")
1846
1847
  end
1847
1848
 
1848
- # **Beta**: this endpoint is under active development and may change without notice. Aggregates the requested `metrics` over the whole period and returns a single object keyed by metric kind. `metrics` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1849
+ # Aggregates the requested `metrics` over the whole period and returns a single object keyed by metric kind. `metrics` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1849
1850
  #
1850
1851
  # Required API Key ACLs:
1851
1852
  # - analytics
@@ -1879,7 +1880,7 @@ module Algolia
1879
1880
  @api_client.call_api(:POST, path, new_options)
1880
1881
  end
1881
1882
 
1882
- # **Beta**: this endpoint is under active development and may change without notice. Aggregates the requested `metrics` over the whole period and returns a single object keyed by metric kind. `metrics` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1883
+ # Aggregates the requested `metrics` over the whole period and returns a single object keyed by metric kind. `metrics` and `parameters` are required; `filters` is optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1883
1884
  #
1884
1885
  # Required API Key ACLs:
1885
1886
  # - analytics
@@ -1892,7 +1893,7 @@ module Algolia
1892
1893
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Object>")
1893
1894
  end
1894
1895
 
1895
- # **Beta**: this endpoint is under active development and may change without notice. Returns `rows`, each a flat object of the requested fields. `metrics` and `parameters` are required; `groupBy`, `filters`, and `orderBy` are optional, though `orderBy` is required when `groupBy` is set. Discover valid field kinds per domain with `/3/patterns/fields`.
1896
+ # Returns `rows`, each a flat object of the requested fields. `metrics` and `parameters` are required; `groupBy`, `filters`, and `orderBy` are optional, though `orderBy` is required when `groupBy` is set. Discover valid field kinds per domain with `/3/patterns/fields`.
1896
1897
  #
1897
1898
  # Required API Key ACLs:
1898
1899
  # - analytics
@@ -1926,7 +1927,7 @@ module Algolia
1926
1927
  @api_client.call_api(:POST, path, new_options)
1927
1928
  end
1928
1929
 
1929
- # **Beta**: this endpoint is under active development and may change without notice. Returns `rows`, each a flat object of the requested fields. `metrics` and `parameters` are required; `groupBy`, `filters`, and `orderBy` are optional, though `orderBy` is required when `groupBy` is set. Discover valid field kinds per domain with `/3/patterns/fields`.
1930
+ # Returns `rows`, each a flat object of the requested fields. `metrics` and `parameters` are required; `groupBy`, `filters`, and `orderBy` are optional, though `orderBy` is required when `groupBy` is set. Discover valid field kinds per domain with `/3/patterns/fields`.
1930
1931
  #
1931
1932
  # Required API Key ACLs:
1932
1933
  # - analytics
@@ -1939,7 +1940,7 @@ module Algolia
1939
1940
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Analytics::TableResponse")
1940
1941
  end
1941
1942
 
1942
- # **Beta**: this endpoint is under active development and may change without notice. Returns one time series per `groupBy` combination, each with period `totals` and a per-day metric breakdown. `metrics` and `parameters` are required; `groupBy` and `filters` are optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1943
+ # Returns one time series per `groupBy` combination, each with period `totals` and a per-day metric breakdown. `metrics` and `parameters` are required; `groupBy` and `filters` are optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1943
1944
  #
1944
1945
  # Required API Key ACLs:
1945
1946
  # - analytics
@@ -1973,7 +1974,7 @@ module Algolia
1973
1974
  @api_client.call_api(:POST, path, new_options)
1974
1975
  end
1975
1976
 
1976
- # **Beta**: this endpoint is under active development and may change without notice. Returns one time series per `groupBy` combination, each with period `totals` and a per-day metric breakdown. `metrics` and `parameters` are required; `groupBy` and `filters` are optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1977
+ # Returns one time series per `groupBy` combination, each with period `totals` and a per-day metric breakdown. `metrics` and `parameters` are required; `groupBy` and `filters` are optional. Discover valid field kinds per domain with `/3/patterns/fields`.
1977
1978
  #
1978
1979
  # Required API Key ACLs:
1979
1980
  # - analytics
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: true)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, opts = {})
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 25000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, region = nil, opts = {})
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, region = nil, opts = {})
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, opts = {})
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, region = nil, opts = {})
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: false)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, region = nil, opts = {})
@@ -23,7 +23,8 @@ module Algolia
23
23
  config.write_timeout = 30000
24
24
  end
25
25
 
26
- @api_client = Algolia::ApiClient.new(config)
26
+ # Per-client capability; an explicit config.request_id_enabled always wins.
27
+ @api_client = Algolia::ApiClient.new(config, request_id_support: true)
27
28
  end
28
29
 
29
30
  def self.create(app_id, api_key, opts = {})
@@ -62,7 +63,7 @@ module Algolia
62
63
  self
63
64
  end
64
65
 
65
- # Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
66
+ # Create or update a batch of Recommend Rules. Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
66
67
  #
67
68
  # Required API Key ACLs:
68
69
  # - editSettings
@@ -106,7 +107,7 @@ module Algolia
106
107
  @api_client.call_api(:POST, path, new_options)
107
108
  end
108
109
 
109
- # Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
110
+ # Create or update a batch of Recommend Rules. Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead).
110
111
  #
111
112
  # Required API Key ACLs:
112
113
  # - editSettings