algolia 3.45.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.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -2
- data/AGENTS.md +0 -24
- data/CHANGELOG.md +30 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/abtesting_v3_client.rb +196 -7
- data/lib/algolia/api/agent_studio_client.rb +244 -6
- data/lib/algolia/api/recommend_client.rb +2 -2
- data/lib/algolia/api/search_client.rb +17 -3
- data/lib/algolia/configuration.rb +8 -0
- data/lib/algolia/defaults.rb +8 -0
- data/lib/algolia/models/abtesting-v3/ab_test.rb +25 -1
- data/lib/algolia/models/abtesting-v3/ab_test_configuration.rb +22 -4
- data/lib/algolia/models/abtesting-v3/ab_test_settings_response.rb +224 -0
- data/lib/algolia/models/abtesting-v3/add_ab_tests_request.rb +11 -1
- data/lib/algolia/models/abtesting-v3/analysis_method.rb +34 -0
- data/lib/algolia/models/abtesting-v3/bayesian_metric_result.rb +237 -0
- data/lib/algolia/models/abtesting-v3/evidence_status.rb +37 -0
- data/lib/algolia/models/abtesting-v3/feature_settings.rb +224 -0
- data/lib/algolia/models/abtesting-v3/metric_evidence.rb +209 -0
- data/lib/algolia/models/abtesting-v3/metric_metadata.rb +1 -1
- data/lib/algolia/models/abtesting-v3/metric_name.rb +7 -1
- data/lib/algolia/models/abtesting-v3/metric_result.rb +18 -8
- data/lib/algolia/models/abtesting-v3/minimum_detectable_effect.rb +1 -1
- data/lib/algolia/models/abtesting-v3/primary_metric.rb +37 -0
- data/lib/algolia/models/abtesting-v3/save_settings_request.rb +208 -0
- data/lib/algolia/models/abtesting-v3/variant_settings.rb +293 -0
- data/lib/algolia/models/agent-studio/agent_completion_algolia_params.rb +16 -4
- data/lib/algolia/models/agent-studio/agent_completion_request.rb +1 -3
- data/lib/algolia/models/agent-studio/agent_completion_request_union.rb +108 -0
- data/lib/algolia/models/agent-studio/agent_test_configuration.rb +1 -1
- data/lib/algolia/models/agent-studio/agent_with_version_response.rb +1 -1
- data/lib/algolia/models/agent-studio/agui_completion_request.rb +265 -0
- data/lib/algolia/models/agent-studio/agui_resume.rb +231 -0
- data/lib/algolia/models/agent-studio/algolia_grouped_results_compat_tool_config.rb +268 -0
- data/lib/algolia/models/agent-studio/{algolia_display_results_tool_config.rb → algolia_grouped_results_tool_config.rb} +30 -16
- data/lib/algolia/models/agent-studio/{algolia_recommend_tool_config_input.rb → algolia_recommend_tool_config.rb} +3 -3
- data/lib/algolia/models/agent-studio/algolia_search_tool_config.rb +22 -4
- data/lib/algolia/models/agent-studio/assistant_message_agui.rb +280 -0
- data/lib/algolia/models/agent-studio/assistant_message_v4.rb +1 -0
- data/lib/algolia/models/agent-studio/assistant_message_v5.rb +3 -1
- data/lib/algolia/models/agent-studio/assistant_part_v5.rb +2 -0
- data/lib/algolia/models/agent-studio/azure_open_ai_provider_input.rb +1 -1
- data/lib/algolia/models/agent-studio/boolean_param.rb +220 -0
- data/lib/algolia/models/agent-studio/client_side_tool_config.rb +14 -4
- data/lib/algolia/models/agent-studio/compaction_stats.rb +271 -0
- data/lib/algolia/models/agent-studio/compatibility_mode.rb +2 -1
- data/lib/algolia/models/agent-studio/context_compact_request.rb +263 -0
- data/lib/algolia/models/agent-studio/context_response.rb +231 -0
- data/lib/algolia/models/agent-studio/context_stats.rb +258 -0
- data/lib/algolia/models/agent-studio/context_trim_request.rb +239 -0
- data/lib/algolia/models/agent-studio/conversation_base_response.rb +16 -5
- data/lib/algolia/models/agent-studio/conversation_full_response.rb +26 -5
- data/lib/algolia/models/agent-studio/data_guardrail_violation_part_v5.rb +218 -0
- data/lib/algolia/models/agent-studio/data_part_v5.rb +220 -0
- data/lib/algolia/models/agent-studio/facet_filters_union_search_parameters_overrides.rb +108 -0
- data/lib/algolia/models/agent-studio/feedback_update_request.rb +253 -0
- data/lib/algolia/models/agent-studio/forwarded_props.rb +226 -0
- data/lib/algolia/models/agent-studio/function_call_agui.rb +219 -0
- data/lib/algolia/models/agent-studio/guardrail_outcome.rb +231 -0
- data/lib/algolia/models/agent-studio/guardrail_violation_data_v5.rb +230 -0
- data/lib/algolia/models/agent-studio/impact_analytics.rb +242 -0
- data/lib/algolia/models/agent-studio/index_search_parameters.rb +11 -1
- data/lib/algolia/models/agent-studio/input_union.rb +113 -0
- data/lib/algolia/models/agent-studio/items_union.rb +132 -0
- data/lib/algolia/models/agent-studio/items_union_agui_completion_request.rb +123 -0
- data/lib/algolia/models/agent-studio/managed_provider_response_input.rb +209 -0
- data/lib/algolia/models/agent-studio/mcp_server_tool_config.rb +1 -1
- data/lib/algolia/models/agent-studio/memory_record.rb +4 -4
- data/lib/algolia/models/agent-studio/message_event.rb +231 -0
- data/lib/algolia/models/agent-studio/message_part_assistant_message_agui.rb +123 -0
- data/lib/algolia/models/agent-studio/message_response.rb +87 -5
- data/lib/algolia/models/agent-studio/mode_enum.rb +34 -0
- data/lib/algolia/models/agent-studio/one_of_enum.rb +34 -0
- data/lib/algolia/models/agent-studio/open_ai_compatible_provider_input.rb +1 -1
- data/lib/algolia/models/agent-studio/paginated_conversations_response.rb +13 -4
- data/lib/algolia/models/agent-studio/provider_authentication_response.rb +14 -5
- data/lib/algolia/models/agent-studio/provider_input.rb +2 -1
- data/lib/algolia/models/agent-studio/provider_input_nullable.rb +2 -1
- data/lib/algolia/models/agent-studio/provider_name.rb +2 -1
- data/lib/algolia/models/agent-studio/reasoning_message_agui.rb +239 -0
- data/lib/algolia/models/agent-studio/reasoning_part_agui.rb +228 -0
- data/lib/algolia/models/agent-studio/search_parameters.rb +1 -1
- data/lib/algolia/models/agent-studio/search_parameters_overrides.rb +80 -5
- data/lib/algolia/models/agent-studio/status_enum.rb +34 -0
- data/lib/algolia/models/agent-studio/task_kind.rb +33 -0
- data/lib/algolia/models/agent-studio/task_request.rb +240 -0
- data/lib/algolia/models/agent-studio/task_response.rb +211 -0
- data/lib/algolia/models/agent-studio/text_part_agui.rb +219 -0
- data/lib/algolia/models/agent-studio/tool_approval_agui.rb +228 -0
- data/lib/algolia/models/agent-studio/tool_approval_request_part.rb +15 -5
- data/lib/algolia/models/agent-studio/tool_call_agui.rb +237 -0
- data/lib/algolia/models/agent-studio/tool_call_part.rb +13 -1
- data/lib/algolia/models/agent-studio/tool_call_part_agui.rb +272 -0
- data/lib/algolia/models/agent-studio/tool_call_result_part_agui.rb +250 -0
- data/lib/algolia/models/agent-studio/tool_config_input.rb +2 -5
- data/lib/algolia/models/agent-studio/{tool_config.rb → tool_config_or_boolean_union.rb} +1 -1
- data/lib/algolia/models/agent-studio/tool_config_output.rb +126 -0
- data/lib/algolia/models/agent-studio/tool_invocation_v4.rb +10 -2
- data/lib/algolia/models/agent-studio/tool_message_agui.rb +259 -0
- data/lib/algolia/models/agent-studio/tool_part_v5.rb +47 -2
- data/lib/algolia/models/agent-studio/tool_result_part.rb +57 -5
- data/lib/algolia/models/agent-studio/unknown_tool_config.rb +1 -1
- data/lib/algolia/models/agent-studio/user_message_agui.rb +261 -0
- data/lib/algolia/models/agent-studio/user_message_metadata_agui.rb +208 -0
- data/lib/algolia/models/agent-studio/user_message_metadata_v5.rb +4 -2
- data/lib/algolia/models/agent-studio/user_message_v4.rb +4 -1
- data/lib/algolia/models/agent-studio/user_message_v5.rb +4 -1
- data/lib/algolia/models/agent-studio/validation_error.rb +5 -25
- data/lib/algolia/models/agent-studio/xai_provider_input.rb +220 -0
- data/lib/algolia/models/analytics/catalog_entry.rb +1 -1
- data/lib/algolia/models/composition/base_injection_query_parameters.rb +18 -18
- data/lib/algolia/models/composition/distinct.rb +1 -1
- data/lib/algolia/models/composition/external_provider.rb +209 -0
- data/lib/algolia/models/composition/external_provider_ordering.rb +34 -0
- data/lib/algolia/models/composition/hit_metadata.rb +2 -2
- data/lib/algolia/models/composition/injected_item_external.rb +21 -14
- data/lib/algolia/models/composition/injected_item_external_provider.rb +258 -0
- data/lib/algolia/models/composition/injected_item_external_provider_source.rb +216 -0
- data/lib/algolia/models/composition/injected_item_hits_metadata.rb +1 -1
- data/lib/algolia/models/composition/{recommend.rb → injected_item_recommend.rb} +10 -3
- data/lib/algolia/models/composition/injected_item_recommend_source.rb +1 -1
- data/lib/algolia/models/composition/injected_item_search.rb +8 -1
- data/lib/algolia/models/composition/injected_item_source.rb +1 -0
- data/lib/algolia/models/composition/injection_main_external_provider.rb +258 -0
- data/lib/algolia/models/composition/injection_main_external_provider_source.rb +216 -0
- data/lib/algolia/models/composition/{main_recommend.rb → injection_main_recommend.rb} +10 -3
- data/lib/algolia/models/composition/injection_main_recommend_source.rb +1 -1
- data/lib/algolia/models/composition/{main_search.rb → injection_main_search.rb} +11 -4
- data/lib/algolia/models/composition/injection_main_search_source.rb +1 -1
- data/lib/algolia/models/composition/injection_main_source.rb +1 -0
- data/lib/algolia/models/composition/main_injection_query_parameters.rb +22 -22
- data/lib/algolia/models/composition/optional_words.rb +1 -1
- data/lib/algolia/models/composition/params.rb +6 -6
- data/lib/algolia/models/composition/processing_error.rb +209 -0
- data/lib/algolia/models/composition/request_body.rb +13 -4
- data/lib/algolia/models/composition/result_card.rb +208 -0
- data/lib/algolia/models/composition/search_response.rb +16 -4
- data/lib/algolia/models/composition/widgets.rb +13 -4
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +11 -0
- data/lib/algolia/models/recommend/distinct.rb +1 -1
- data/lib/algolia/models/recommend/fallback_params.rb +26 -26
- data/lib/algolia/models/recommend/optional_words.rb +1 -1
- data/lib/algolia/models/recommend/recommend_search_params.rb +26 -26
- data/lib/algolia/models/recommend/result_card.rb +208 -0
- data/lib/algolia/models/recommend/widgets.rb +13 -4
- data/lib/algolia/models/search/api_key.rb +2 -2
- data/lib/algolia/models/search/attribute_criteria_computed_by.rb +35 -0
- data/lib/algolia/models/search/browse_params_object.rb +35 -25
- data/lib/algolia/models/search/consequence_params.rb +35 -25
- data/lib/algolia/models/search/distinct.rb +1 -1
- data/lib/algolia/models/search/get_api_key_response.rb +2 -2
- data/lib/algolia/models/search/index_settings.rb +28 -18
- data/lib/algolia/models/search/optional_words.rb +1 -1
- data/lib/algolia/models/search/result_card.rb +208 -0
- data/lib/algolia/models/search/search_for_facets.rb +35 -25
- data/lib/algolia/models/search/search_for_hits.rb +35 -25
- data/lib/algolia/models/search/search_params_object.rb +35 -25
- data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
- data/lib/algolia/models/search/settings_response.rb +28 -18
- data/lib/algolia/models/search/widgets.rb +13 -4
- data/lib/algolia/transport/transport.rb +82 -10
- data/lib/algolia/version.rb +1 -1
- metadata +72 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 328e8475c7136afd5c3ecb2e096a3c7cbeeaccc7fe1f00e46ef1f0d761ba5371
|
|
4
|
+
data.tar.gz: 6191e28670fce3448e29aa71b1d348ff9fa033e726101e5e7d67a024bd9592e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 164520f8480480fd77846475b8fbe0c71d61b9180564f132835ef7d9a7ca471ab82f6737ca354f7bba0d0c4a4b8fcab5149874c5b8fd4a26bef7fb6aba14e26f
|
|
7
|
+
data.tar.gz: 9e4c5bfd50ce5ec2e98efe1a7fbe55316ff640e542035871085bb92903bbd89d55f8ade740a4ae8a470ee066c102a6c5589fe2fbde8e12610548969075627c6b
|
|
@@ -19,9 +19,9 @@ jobs:
|
|
|
19
19
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
20
|
|
|
21
21
|
- name: Install Ruby
|
|
22
|
-
uses: ruby/setup-ruby@
|
|
22
|
+
uses: ruby/setup-ruby@651ff0d62c5c79bed6d53ec518387aae20e72c1a # v1.329.0
|
|
23
23
|
with:
|
|
24
|
-
ruby-version: 4.0.
|
|
24
|
+
ruby-version: 4.0.7
|
|
25
25
|
bundler-cache: true
|
|
26
26
|
|
|
27
27
|
- uses: rubygems/release-gem@7f9650160c1a4e7989fdc9855807bdbd421d8b6b # v1.4.1
|
data/AGENTS.md
CHANGED
|
@@ -122,18 +122,6 @@ response['hits'] # Works
|
|
|
122
122
|
response.hits # Works if using model objects
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
### Block Syntax
|
|
126
|
-
|
|
127
|
-
```ruby
|
|
128
|
-
# Use do..end for multi-line, braces for single-line
|
|
129
|
-
client.search { |r| r.query = 'test' }
|
|
130
|
-
|
|
131
|
-
client.search do |params|
|
|
132
|
-
params.query = 'test'
|
|
133
|
-
params.hits_per_page = 10
|
|
134
|
-
end
|
|
135
|
-
```
|
|
136
|
-
|
|
137
125
|
### Error Handling
|
|
138
126
|
|
|
139
127
|
```ruby
|
|
@@ -148,18 +136,6 @@ rescue Algolia::ApiError => e
|
|
|
148
136
|
end
|
|
149
137
|
```
|
|
150
138
|
|
|
151
|
-
### Nil Safety
|
|
152
|
-
|
|
153
|
-
```ruby
|
|
154
|
-
# Use safe navigation
|
|
155
|
-
result&.hits&.first&.object_id
|
|
156
|
-
|
|
157
|
-
# Or explicit checks
|
|
158
|
-
if result && result.hits && result.hits.any?
|
|
159
|
-
result.hits.first.object_id
|
|
160
|
-
end
|
|
161
|
-
```
|
|
162
|
-
|
|
163
139
|
### Deprecated Operations
|
|
164
140
|
|
|
165
141
|
Some operations in `ingestion_client.rb` and `search_client.rb` are deprecated. Check method documentation before use.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
## [3.46.1](https://github.com/algolia/algoliasearch-client-ruby/compare/3.46.0...3.46.1)
|
|
2
|
+
|
|
3
|
+
- [f2854eb518](https://github.com/algolia/api-clients-automation/commit/f2854eb518) chore(ci): bump ruby/setup-ruby to v1.329.0 to support Ruby 4.0.7 ([#7142](https://github.com/algolia/api-clients-automation/pull/7142)) by [@Fluf22](https://github.com/Fluf22/)
|
|
4
|
+
|
|
5
|
+
## [3.46.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.45.0...3.46.0)
|
|
6
|
+
|
|
7
|
+
BREAKING CHANGES: this minor version includes breaking changes (A/B Testing V3 API, Agent Studio API). See below for more details.
|
|
8
|
+
|
|
9
|
+
- [ba46df188a](https://github.com/algolia/api-clients-automation/commit/ba46df188a) feat(clients): wait and retry on 429 with Retry-After ([#7062](https://github.com/algolia/api-clients-automation/pull/7062)) by [@MarioAlexandruDan](https://github.com/MarioAlexandruDan/)
|
|
10
|
+
- [41ed59956a](https://github.com/algolia/api-clients-automation/commit/41ed59956a) fix(specs): clarify when _extra and _injectedItemKey are present on hits ([#7031](https://github.com/algolia/api-clients-automation/pull/7031)) by [@charlottetaylor-oss](https://github.com/charlottetaylor-oss/)
|
|
11
|
+
- [987444f36d](https://github.com/algolia/api-clients-automation/commit/987444f36d) fix(specs): clarify addItemKey description in injectedItem metadata ([#7029](https://github.com/algolia/api-clients-automation/pull/7029)) by [@charlottetaylor-oss](https://github.com/charlottetaylor-oss/)
|
|
12
|
+
- [f6a0478eec](https://github.com/algolia/api-clients-automation/commit/f6a0478eec) docs(specs): update analytics catalog entitlement example ([#7028](https://github.com/algolia/api-clients-automation/pull/7028)) by [@cdhawke](https://github.com/cdhawke/)
|
|
13
|
+
- [5da059b7ae](https://github.com/algolia/api-clients-automation/commit/5da059b7ae) feat(specs): add A/B test settings endpoints to abtesting-v3 ([#6786](https://github.com/algolia/api-clients-automation/pull/6786)) by [@stevenMevans](https://github.com/stevenMevans/)
|
|
14
|
+
- [f89fe94db5](https://github.com/algolia/api-clients-automation/commit/f89fe94db5) fix(clients): send request bodies with Content-Length instead of chunked encoding ([#7069](https://github.com/algolia/api-clients-automation/pull/7069)) by [@Fluf22](https://github.com/Fluf22/)
|
|
15
|
+
- [461575c4a4](https://github.com/algolia/api-clients-automation/commit/461575c4a4) feat(specs): add A/B testing hypothesis ([#6829](https://github.com/algolia/api-clients-automation/pull/6829)) by [@leonardogavaudan](https://github.com/leonardogavaudan/)
|
|
16
|
+
- [b58c40832b](https://github.com/algolia/api-clients-automation/commit/b58c40832b) fix(specs): BREAKING CHANGE - make AB test pValue optional ([#7066](https://github.com/algolia/api-clients-automation/pull/7066)) by [@stevenMevans](https://github.com/stevenMevans/)
|
|
17
|
+
- `pValue` is now optional in the A/B test models. Update code that reads it as a required value.
|
|
18
|
+
- [4cab83c8b1](https://github.com/algolia/api-clients-automation/commit/4cab83c8b1) feat(specs): add `externalProvider` source for CompAPI client ([#7073](https://github.com/algolia/api-clients-automation/pull/7073)) by [@ClaraMuller](https://github.com/ClaraMuller/)
|
|
19
|
+
- [b6cd822bfb](https://github.com/algolia/api-clients-automation/commit/b6cd822bfb) feat(specs): add resultCard to renderingContent widgets ([#7084](https://github.com/algolia/api-clients-automation/pull/7084)) by [@FabienMotte](https://github.com/FabienMotte/)
|
|
20
|
+
- [63c591d078](https://github.com/algolia/api-clients-automation/commit/63c591d078) refactor(specs): extract source object from behaviour object ([#7074](https://github.com/algolia/api-clients-automation/pull/7074)) by [@ClaraMuller](https://github.com/ClaraMuller/)
|
|
21
|
+
- [2ae63dbdfc](https://github.com/algolia/api-clients-automation/commit/2ae63dbdfc) docs: improve AGENTS.md agent context ([#7085](https://github.com/algolia/api-clients-automation/pull/7085)) by [@Fluf22](https://github.com/Fluf22/)
|
|
22
|
+
- [07c1b2ea15](https://github.com/algolia/api-clients-automation/commit/07c1b2ea15) fix(specs): BREAKING CHANGE – sync agent-studio OpenAPI from conversational-ai ([#6967](https://github.com/algolia/api-clients-automation/pull/6967)) by [@algolia-api-clients-automation-bot[bot]](https://github.com/apps/algolia-api-clients-automation-bot)
|
|
23
|
+
- The Agent Studio specs were updated to match the API behaviour, which may require updating your implementation:
|
|
24
|
+
- `createAgentCompletion`: the body type changed from `AgentCompletionRequest` to `AgentCompletionRequestUnion`.
|
|
25
|
+
- `createAgent`, `updateAgent`, `getAgent`: tool config models were renamed or merged (`AlgoliaDisplayResultsToolConfig` is now `AlgoliaGroupedResultsToolConfig`, `AlgoliaRecommendToolConfigInput`/`Output` are now `AlgoliaRecommendToolConfig`, `ToolConfig` is now `ToolConfigOrBooleanUnion`).
|
|
26
|
+
- The memory request models `MessagesUnionAgentConsolidateRequest`, `MessagesUnionAgentMemorizeRequest` and `MessagesUnionAgentPonderRequest` were removed.
|
|
27
|
+
- [a41727d2e1](https://github.com/algolia/api-clients-automation/commit/a41727d2e1) chore(deps): dependencies 2026-09-21 ([#7068](https://github.com/algolia/api-clients-automation/pull/7068)) by [@algolia-api-clients-automation-bot[bot]](https://github.com/apps/algolia-api-clients-automation-bot)
|
|
28
|
+
- [9a6faf38f6](https://github.com/algolia/api-clients-automation/commit/9a6faf38f6) fix(specs): correct links to Algolia docs ([#7134](https://github.com/algolia/api-clients-automation/pull/7134)) by [@kai687](https://github.com/kai687/)
|
|
29
|
+
- [329efbae3b](https://github.com/algolia/api-clients-automation/commit/329efbae3b) fix(specs): update allowed value for externalProvider source ordering field ([#7131](https://github.com/algolia/api-clients-automation/pull/7131)) by [@aiordache](https://github.com/aiordache/)
|
|
30
|
+
|
|
1
31
|
## [3.45.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.44.0...3.45.0)
|
|
2
32
|
|
|
3
33
|
BREAKING CHANGES: this minor version includes breaking changes in the A/B Testing V3 API. See below for more details.
|
data/Gemfile.lock
CHANGED
|
@@ -114,6 +114,61 @@ module Algolia
|
|
|
114
114
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AbtestingV3::ABTestResponse")
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
+
# Applies the captured settings of the given variant to the control index. The settings must first be captured with the `saveVariantSettings` operation. To revert previously applied settings on the control index, use this operation with the control variant (variant 1). Settings can be applied up to 14 days after the A/B test ends, and reverted up to 15 days after. Later requests return `400`. Each set of captured settings can only be applied once, and settings that were reverted can't be applied again. Both cases return `400`. The control index must not be in use by an active A/B test. Otherwise, the request returns `422`.
|
|
118
|
+
#
|
|
119
|
+
# Required API Key ACLs:
|
|
120
|
+
# - analytics
|
|
121
|
+
# - editSettings
|
|
122
|
+
# @param id [Integer] Unique A/B test identifier. (required)
|
|
123
|
+
# @param variant_id [Integer] One-based index of the A/B test variant. The control is variant 1. (required)
|
|
124
|
+
# @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)
|
|
125
|
+
# @return [Http::Response] the response
|
|
126
|
+
def apply_variant_settings_with_http_info(id, variant_id, request_options = {})
|
|
127
|
+
# verify the required parameter 'id' is set
|
|
128
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
129
|
+
raise ArgumentError, "Parameter `id` is required when calling `apply_variant_settings`."
|
|
130
|
+
end
|
|
131
|
+
# verify the required parameter 'variant_id' is set
|
|
132
|
+
if @api_client.config.client_side_validation && variant_id.nil?
|
|
133
|
+
raise ArgumentError, "Parameter `variant_id` is required when calling `apply_variant_settings`."
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
path = "/3/abtests/{id}/settings/{variantId}/apply".sub("{" + "id" + "}", Transport.encode_uri(id.to_s)).sub(
|
|
137
|
+
"{" + "variantId" + "}",
|
|
138
|
+
Transport.encode_uri(variant_id.to_s)
|
|
139
|
+
)
|
|
140
|
+
query_params = {}
|
|
141
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
142
|
+
header_params = {}
|
|
143
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
144
|
+
|
|
145
|
+
post_body = request_options[:debug_body]
|
|
146
|
+
|
|
147
|
+
new_options = request_options.merge(
|
|
148
|
+
:operation => :"AbtestingV3Client.apply_variant_settings",
|
|
149
|
+
:header_params => header_params,
|
|
150
|
+
:query_params => query_params,
|
|
151
|
+
:body => post_body,
|
|
152
|
+
:use_read_transporter => false
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
@api_client.call_api(:POST, path, new_options)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Applies the captured settings of the given variant to the control index. The settings must first be captured with the `saveVariantSettings` operation. To revert previously applied settings on the control index, use this operation with the control variant (variant 1). Settings can be applied up to 14 days after the A/B test ends, and reverted up to 15 days after. Later requests return `400`. Each set of captured settings can only be applied once, and settings that were reverted can't be applied again. Both cases return `400`. The control index must not be in use by an active A/B test. Otherwise, the request returns `422`.
|
|
159
|
+
#
|
|
160
|
+
# Required API Key ACLs:
|
|
161
|
+
# - analytics
|
|
162
|
+
# - editSettings
|
|
163
|
+
# @param id [Integer] Unique A/B test identifier. (required)
|
|
164
|
+
# @param variant_id [Integer] One-based index of the A/B test variant. The control is variant 1. (required)
|
|
165
|
+
# @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)
|
|
166
|
+
# @return [nil]
|
|
167
|
+
def apply_variant_settings(id, variant_id, request_options = {})
|
|
168
|
+
apply_variant_settings_with_http_info(id, variant_id, request_options)
|
|
169
|
+
nil
|
|
170
|
+
end
|
|
171
|
+
|
|
117
172
|
# This method lets you send requests to the Algolia REST API.
|
|
118
173
|
|
|
119
174
|
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
@@ -402,9 +457,10 @@ module Algolia
|
|
|
402
457
|
# Required API Key ACLs:
|
|
403
458
|
# - analytics
|
|
404
459
|
# @param id [Integer] Unique A/B test identifier. (required)
|
|
460
|
+
# @param methods [Array<AnalysisMethod>] Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn't change the test configuration or compute missing results. Duplicate values aren't allowed.
|
|
405
461
|
# @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)
|
|
406
462
|
# @return [Http::Response] the response
|
|
407
|
-
def get_ab_test_with_http_info(id, request_options = {})
|
|
463
|
+
def get_ab_test_with_http_info(id, methods = nil, request_options = {})
|
|
408
464
|
# verify the required parameter 'id' is set
|
|
409
465
|
if @api_client.config.client_side_validation && id.nil?
|
|
410
466
|
raise ArgumentError, "Parameter `id` is required when calling `get_ab_test`."
|
|
@@ -412,6 +468,7 @@ module Algolia
|
|
|
412
468
|
|
|
413
469
|
path = "/3/abtests/{id}".sub("{" + "id" + "}", Transport.encode_uri(id.to_s))
|
|
414
470
|
query_params = {}
|
|
471
|
+
query_params[:methods] = @api_client.build_collection_param(methods, :csv) unless methods.nil?
|
|
415
472
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
416
473
|
header_params = {}
|
|
417
474
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
@@ -434,13 +491,61 @@ module Algolia
|
|
|
434
491
|
# Required API Key ACLs:
|
|
435
492
|
# - analytics
|
|
436
493
|
# @param id [Integer] Unique A/B test identifier. (required)
|
|
494
|
+
# @param methods [Array<AnalysisMethod>] Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn't change the test configuration or compute missing results. Duplicate values aren't allowed.
|
|
437
495
|
# @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)
|
|
438
496
|
# @return [ABTest]
|
|
439
|
-
def get_ab_test(id, request_options = {})
|
|
440
|
-
response = get_ab_test_with_http_info(id, request_options)
|
|
497
|
+
def get_ab_test(id, methods = nil, request_options = {})
|
|
498
|
+
response = get_ab_test_with_http_info(id, methods, request_options)
|
|
441
499
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AbtestingV3::ABTest")
|
|
442
500
|
end
|
|
443
501
|
|
|
502
|
+
# Retrieves the settings captured for each variant of an A/B test, and whether another active A/B test is using the control index. Settings are captured by the `saveVariantSettings` operation. The response includes an entry for the control (variant 1) alongside the captured variant, so the control's original configuration can be restored later. Returns `404` if the A/B test doesn't exist or no settings have been captured for it.
|
|
503
|
+
#
|
|
504
|
+
# Required API Key ACLs:
|
|
505
|
+
# - analytics
|
|
506
|
+
# @param id [Integer] Unique A/B test identifier. (required)
|
|
507
|
+
# @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)
|
|
508
|
+
# @return [Http::Response] the response
|
|
509
|
+
def get_ab_test_settings_with_http_info(id, request_options = {})
|
|
510
|
+
# verify the required parameter 'id' is set
|
|
511
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
512
|
+
raise ArgumentError, "Parameter `id` is required when calling `get_ab_test_settings`."
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
path = "/3/abtests/{id}/settings".sub("{" + "id" + "}", Transport.encode_uri(id.to_s))
|
|
516
|
+
query_params = {}
|
|
517
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
518
|
+
header_params = {}
|
|
519
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
520
|
+
|
|
521
|
+
post_body = request_options[:debug_body]
|
|
522
|
+
|
|
523
|
+
new_options = request_options.merge(
|
|
524
|
+
:operation => :"AbtestingV3Client.get_ab_test_settings",
|
|
525
|
+
:header_params => header_params,
|
|
526
|
+
:query_params => query_params,
|
|
527
|
+
:body => post_body,
|
|
528
|
+
:use_read_transporter => false
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
@api_client.call_api(:GET, path, new_options)
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Retrieves the settings captured for each variant of an A/B test, and whether another active A/B test is using the control index. Settings are captured by the `saveVariantSettings` operation. The response includes an entry for the control (variant 1) alongside the captured variant, so the control's original configuration can be restored later. Returns `404` if the A/B test doesn't exist or no settings have been captured for it.
|
|
535
|
+
#
|
|
536
|
+
# Required API Key ACLs:
|
|
537
|
+
# - analytics
|
|
538
|
+
# @param id [Integer] Unique A/B test identifier. (required)
|
|
539
|
+
# @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)
|
|
540
|
+
# @return [ABTestSettingsResponse]
|
|
541
|
+
def get_ab_test_settings(id, request_options = {})
|
|
542
|
+
response = get_ab_test_settings_with_http_info(id, request_options)
|
|
543
|
+
@api_client.deserialize(
|
|
544
|
+
response.body,
|
|
545
|
+
request_options[:debug_return_type] || "AbtestingV3::ABTestSettingsResponse"
|
|
546
|
+
)
|
|
547
|
+
end
|
|
548
|
+
|
|
444
549
|
# Retrieves timeseries for an A/B test by its ID.
|
|
445
550
|
#
|
|
446
551
|
# Required API Key ACLs:
|
|
@@ -449,9 +554,17 @@ module Algolia
|
|
|
449
554
|
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
450
555
|
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
451
556
|
# @param metric [Array<MetricName>] List of metrics to retrieve. If not specified, all metrics are returned.
|
|
557
|
+
# @param methods [Array<AnalysisMethod>] Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn't change the test configuration or compute missing results. Duplicate values aren't allowed.
|
|
452
558
|
# @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)
|
|
453
559
|
# @return [Http::Response] the response
|
|
454
|
-
def get_timeseries_with_http_info(
|
|
560
|
+
def get_timeseries_with_http_info(
|
|
561
|
+
id,
|
|
562
|
+
start_date = nil,
|
|
563
|
+
end_date = nil,
|
|
564
|
+
metric = nil,
|
|
565
|
+
methods = nil,
|
|
566
|
+
request_options = {}
|
|
567
|
+
)
|
|
455
568
|
# verify the required parameter 'id' is set
|
|
456
569
|
if @api_client.config.client_side_validation && id.nil?
|
|
457
570
|
raise ArgumentError, "Parameter `id` is required when calling `get_timeseries`."
|
|
@@ -462,6 +575,7 @@ module Algolia
|
|
|
462
575
|
query_params[:startDate] = start_date unless start_date.nil?
|
|
463
576
|
query_params[:endDate] = end_date unless end_date.nil?
|
|
464
577
|
query_params[:metric] = @api_client.build_collection_param(metric, :multi) unless metric.nil?
|
|
578
|
+
query_params[:methods] = @api_client.build_collection_param(methods, :csv) unless methods.nil?
|
|
465
579
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
466
580
|
header_params = {}
|
|
467
581
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
@@ -487,10 +601,11 @@ module Algolia
|
|
|
487
601
|
# @param start_date [String] Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
488
602
|
# @param end_date [String] End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
489
603
|
# @param metric [Array<MetricName>] List of metrics to retrieve. If not specified, all metrics are returned.
|
|
604
|
+
# @param methods [Array<AnalysisMethod>] Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn't change the test configuration or compute missing results. Duplicate values aren't allowed.
|
|
490
605
|
# @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)
|
|
491
606
|
# @return [Timeseries]
|
|
492
|
-
def get_timeseries(id, start_date = nil, end_date = nil, metric = nil, request_options = {})
|
|
493
|
-
response = get_timeseries_with_http_info(id, start_date, end_date, metric, request_options)
|
|
607
|
+
def get_timeseries(id, start_date = nil, end_date = nil, metric = nil, methods = nil, request_options = {})
|
|
608
|
+
response = get_timeseries_with_http_info(id, start_date, end_date, metric, methods, request_options)
|
|
494
609
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AbtestingV3::Timeseries")
|
|
495
610
|
end
|
|
496
611
|
|
|
@@ -503,6 +618,7 @@ module Algolia
|
|
|
503
618
|
# @param index_prefix [String] Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
504
619
|
# @param index_suffix [String] Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
505
620
|
# @param direction [Direction] Sort order for A/B tests by start date. Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first.
|
|
621
|
+
# @param methods [Array<AnalysisMethod>] Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn't change the test configuration or compute missing results. Duplicate values aren't allowed.
|
|
506
622
|
# @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)
|
|
507
623
|
# @return [Http::Response] the response
|
|
508
624
|
def list_ab_tests_with_http_info(
|
|
@@ -511,6 +627,7 @@ module Algolia
|
|
|
511
627
|
index_prefix = nil,
|
|
512
628
|
index_suffix = nil,
|
|
513
629
|
direction = nil,
|
|
630
|
+
methods = nil,
|
|
514
631
|
request_options = {}
|
|
515
632
|
)
|
|
516
633
|
path = "/3/abtests"
|
|
@@ -520,6 +637,7 @@ module Algolia
|
|
|
520
637
|
query_params[:indexPrefix] = index_prefix unless index_prefix.nil?
|
|
521
638
|
query_params[:indexSuffix] = index_suffix unless index_suffix.nil?
|
|
522
639
|
query_params[:direction] = direction unless direction.nil?
|
|
640
|
+
query_params[:methods] = @api_client.build_collection_param(methods, :csv) unless methods.nil?
|
|
523
641
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
524
642
|
header_params = {}
|
|
525
643
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
@@ -546,6 +664,7 @@ module Algolia
|
|
|
546
664
|
# @param index_prefix [String] Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
547
665
|
# @param index_suffix [String] Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
548
666
|
# @param direction [Direction] Sort order for A/B tests by start date. Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first.
|
|
667
|
+
# @param methods [Array<AnalysisMethod>] Statistical analysis results to include, as a comma-separated list. When omitted, each test uses its configured method, or `frequentist` if no method is configured. Request both methods to include both sets of available results. This doesn't change the test configuration or compute missing results. Duplicate values aren't allowed.
|
|
549
668
|
# @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)
|
|
550
669
|
# @return [ListABTestsResponse]
|
|
551
670
|
def list_ab_tests(
|
|
@@ -554,12 +673,82 @@ module Algolia
|
|
|
554
673
|
index_prefix = nil,
|
|
555
674
|
index_suffix = nil,
|
|
556
675
|
direction = nil,
|
|
676
|
+
methods = nil,
|
|
557
677
|
request_options = {}
|
|
558
678
|
)
|
|
559
|
-
response = list_ab_tests_with_http_info(
|
|
679
|
+
response = list_ab_tests_with_http_info(
|
|
680
|
+
offset,
|
|
681
|
+
limit,
|
|
682
|
+
index_prefix,
|
|
683
|
+
index_suffix,
|
|
684
|
+
direction,
|
|
685
|
+
methods,
|
|
686
|
+
request_options
|
|
687
|
+
)
|
|
560
688
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AbtestingV3::ListABTestsResponse")
|
|
561
689
|
end
|
|
562
690
|
|
|
691
|
+
# Captures the settings of the given variant and of the control, then stops the A/B test. The captured settings can later be applied to the control index with the `applyVariantSettings` operation, and read back with the `getABTestSettings` operation. The A/B test must have reached 80% of its planned duration. Earlier requests return `400`. Settings can only be captured once per A/B test. A second request returns `409`. `synonyms` and `enableRules` are not captured, so applying the captured settings never changes them on the control index.
|
|
692
|
+
#
|
|
693
|
+
# Required API Key ACLs:
|
|
694
|
+
# - analytics
|
|
695
|
+
# - editSettings
|
|
696
|
+
# @param id [Integer] Unique A/B test identifier. (required)
|
|
697
|
+
# @param variant_id [Integer] One-based index of the A/B test variant. The control is variant 1. (required)
|
|
698
|
+
# @param save_settings_request [SaveSettingsRequest] (required)
|
|
699
|
+
# @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)
|
|
700
|
+
# @return [Http::Response] the response
|
|
701
|
+
def save_variant_settings_with_http_info(id, variant_id, save_settings_request, request_options = {})
|
|
702
|
+
# verify the required parameter 'id' is set
|
|
703
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
704
|
+
raise ArgumentError, "Parameter `id` is required when calling `save_variant_settings`."
|
|
705
|
+
end
|
|
706
|
+
# verify the required parameter 'variant_id' is set
|
|
707
|
+
if @api_client.config.client_side_validation && variant_id.nil?
|
|
708
|
+
raise ArgumentError, "Parameter `variant_id` is required when calling `save_variant_settings`."
|
|
709
|
+
end
|
|
710
|
+
# verify the required parameter 'save_settings_request' is set
|
|
711
|
+
if @api_client.config.client_side_validation && save_settings_request.nil?
|
|
712
|
+
raise ArgumentError, "Parameter `save_settings_request` is required when calling `save_variant_settings`."
|
|
713
|
+
end
|
|
714
|
+
|
|
715
|
+
path = "/3/abtests/{id}/settings/{variantId}".sub("{" + "id" + "}", Transport.encode_uri(id.to_s)).sub(
|
|
716
|
+
"{" + "variantId" + "}",
|
|
717
|
+
Transport.encode_uri(variant_id.to_s)
|
|
718
|
+
)
|
|
719
|
+
query_params = {}
|
|
720
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
721
|
+
header_params = {}
|
|
722
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
723
|
+
|
|
724
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(save_settings_request)
|
|
725
|
+
|
|
726
|
+
new_options = request_options.merge(
|
|
727
|
+
:operation => :"AbtestingV3Client.save_variant_settings",
|
|
728
|
+
:header_params => header_params,
|
|
729
|
+
:query_params => query_params,
|
|
730
|
+
:body => post_body,
|
|
731
|
+
:use_read_transporter => false
|
|
732
|
+
)
|
|
733
|
+
|
|
734
|
+
@api_client.call_api(:POST, path, new_options)
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# Captures the settings of the given variant and of the control, then stops the A/B test. The captured settings can later be applied to the control index with the `applyVariantSettings` operation, and read back with the `getABTestSettings` operation. The A/B test must have reached 80% of its planned duration. Earlier requests return `400`. Settings can only be captured once per A/B test. A second request returns `409`. `synonyms` and `enableRules` are not captured, so applying the captured settings never changes them on the control index.
|
|
738
|
+
#
|
|
739
|
+
# Required API Key ACLs:
|
|
740
|
+
# - analytics
|
|
741
|
+
# - editSettings
|
|
742
|
+
# @param id [Integer] Unique A/B test identifier. (required)
|
|
743
|
+
# @param variant_id [Integer] One-based index of the A/B test variant. The control is variant 1. (required)
|
|
744
|
+
# @param save_settings_request [SaveSettingsRequest] (required)
|
|
745
|
+
# @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)
|
|
746
|
+
# @return [nil]
|
|
747
|
+
def save_variant_settings(id, variant_id, save_settings_request, request_options = {})
|
|
748
|
+
save_variant_settings_with_http_info(id, variant_id, save_settings_request, request_options)
|
|
749
|
+
nil
|
|
750
|
+
end
|
|
751
|
+
|
|
563
752
|
# Stops an A/B test by its ID. You can't restart stopped A/B tests.
|
|
564
753
|
#
|
|
565
754
|
# Required API Key ACLs:
|