algolia 3.0.0.alpha.17 → 3.0.0.alpha.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile.lock +4 -4
  4. data/lib/algolia/api/abtesting_client.rb +20 -20
  5. data/lib/algolia/api/personalization_client.rb +12 -12
  6. data/lib/algolia/models/abtesting/ab_test.rb +41 -16
  7. data/lib/algolia/models/abtesting/ab_test_configuration.rb +217 -0
  8. data/lib/algolia/models/abtesting/ab_test_response.rb +2 -2
  9. data/lib/algolia/models/abtesting/ab_tests_variant.rb +21 -3
  10. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +21 -3
  11. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +1 -1
  12. data/lib/algolia/models/abtesting/custom_search_params.rb +1 -1
  13. data/lib/algolia/models/abtesting/effect.rb +35 -0
  14. data/lib/algolia/models/abtesting/empty_search.rb +198 -0
  15. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +1 -1
  16. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +247 -0
  17. data/lib/algolia/models/abtesting/outliers.rb +198 -0
  18. data/lib/algolia/models/abtesting/status.rb +35 -0
  19. data/lib/algolia/models/abtesting/variant.rb +31 -13
  20. data/lib/algolia/models/ingestion/destination_index_name.rb +1 -1
  21. data/lib/algolia/models/ingestion/shopify_input.rb +212 -0
  22. data/lib/algolia/models/ingestion/shopify_market.rb +227 -0
  23. data/lib/algolia/models/ingestion/shopify_metafield.rb +221 -0
  24. data/lib/algolia/models/ingestion/source_input.rb +2 -1
  25. data/lib/algolia/models/ingestion/source_shopify.rb +278 -0
  26. data/lib/algolia/models/ingestion/source_shopify_base.rb +199 -0
  27. data/lib/algolia/models/ingestion/source_update_input.rb +2 -1
  28. data/lib/algolia/models/ingestion/source_update_shopify.rb +258 -0
  29. data/lib/algolia/models/ingestion/task_input.rb +1 -0
  30. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +1 -1
  31. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +1 -1
  32. data/lib/algolia/models/insights/clicked_filters.rb +1 -1
  33. data/lib/algolia/models/insights/clicked_object_ids.rb +1 -1
  34. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +1 -1
  35. data/lib/algolia/models/insights/converted_filters.rb +1 -1
  36. data/lib/algolia/models/insights/converted_object_ids.rb +1 -1
  37. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +1 -1
  38. data/lib/algolia/models/insights/purchased_object_ids.rb +1 -1
  39. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +1 -1
  40. data/lib/algolia/models/insights/viewed_filters.rb +1 -1
  41. data/lib/algolia/models/insights/viewed_object_ids.rb +1 -1
  42. data/lib/algolia/models/personalization/delete_user_profile_response.rb +2 -2
  43. data/lib/algolia/models/personalization/event_scoring.rb +25 -4
  44. data/lib/algolia/models/personalization/event_type.rb +34 -0
  45. data/lib/algolia/models/personalization/facet_scoring.rb +2 -2
  46. data/lib/algolia/models/personalization/get_user_token_response.rb +3 -3
  47. data/lib/algolia/models/personalization/personalization_strategy_params.rb +21 -3
  48. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +1 -1
  49. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -1
  50. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +1 -1
  51. data/lib/algolia/models/query-suggestions/source_index.rb +1 -1
  52. data/lib/algolia/models/recommend/base_recommend_request.rb +1 -1
  53. data/lib/algolia/models/recommend/base_search_params.rb +3 -3
  54. data/lib/algolia/models/recommend/base_search_params_without_query.rb +3 -3
  55. data/lib/algolia/models/recommend/bought_together_query.rb +1 -1
  56. data/lib/algolia/models/recommend/fallback_params.rb +9 -9
  57. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +6 -6
  58. data/lib/algolia/models/recommend/looking_similar_query.rb +1 -1
  59. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  60. data/lib/algolia/models/recommend/recommended_for_you_query.rb +1 -1
  61. data/lib/algolia/models/recommend/related_query.rb +1 -1
  62. data/lib/algolia/models/recommend/search_params.rb +9 -9
  63. data/lib/algolia/models/recommend/search_params_object.rb +10 -9
  64. data/lib/algolia/models/recommend/trending_facets_query.rb +1 -1
  65. data/lib/algolia/models/recommend/trending_items_query.rb +1 -1
  66. data/lib/algolia/models/search/base_index_settings.rb +9 -9
  67. data/lib/algolia/models/search/base_search_params.rb +3 -3
  68. data/lib/algolia/models/search/base_search_params_without_query.rb +3 -3
  69. data/lib/algolia/models/search/browse_params_object.rb +9 -9
  70. data/lib/algolia/models/search/consequence_params.rb +9 -9
  71. data/lib/algolia/models/search/delete_by_params.rb +1 -1
  72. data/lib/algolia/models/search/index_settings.rb +15 -15
  73. data/lib/algolia/models/search/index_settings_as_search_params.rb +6 -6
  74. data/lib/algolia/models/search/multiple_batch_request.rb +1 -1
  75. data/lib/algolia/models/search/operation_index_params.rb +1 -1
  76. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  77. data/lib/algolia/models/search/search_for_facets.rb +10 -10
  78. data/lib/algolia/models/search/search_for_facets_options.rb +1 -1
  79. data/lib/algolia/models/search/search_for_hits.rb +10 -10
  80. data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
  81. data/lib/algolia/models/search/search_params_object.rb +10 -9
  82. data/lib/algolia/version.rb +1 -1
  83. metadata +15 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6538541f98ce3b8342fe5caeac947d74b090d6b35a0ae4401a42bdde12520744
4
- data.tar.gz: 5e7b8fe566c8fe3105cfd54434ad9adb972d85f421eb0b27d1608c274eb1a63f
3
+ metadata.gz: ee3c010806ca98c1f64cf944a8f110697c3adefd62466255b6a632862dccc217
4
+ data.tar.gz: 7772d5cee40c3723a1dfbaff12de1691f6c5db2e4149a8afec0b0e9c4e695112
5
5
  SHA512:
6
- metadata.gz: 445704e29d28c4725966938e112d96fe1a82cafeda1356b2fa583a34e0a874fab476b360fd4b6c72b0d548024ef013fab8914f14558efa411a7c0d6b3e8377a2
7
- data.tar.gz: 5e226767b883f0c37ca2476580371202f9a4b07ff1bd8cbb4572b20ad580ce3cdffe55c74555a97c7359204e0a4a51c0821cc878710a9e7fa6ed65db8fbc5f42
6
+ metadata.gz: 42c86265e7ad23499dab2ac75f1b15f7d50133d585bc9065ef55465f47af0244b9e52aa3788a886a3b2f61c586dbc2d50445e2580ee44474dd3493760ddd5343
7
+ data.tar.gz: 84b2006973c2c3a3994d7ecd780a4d618ae97e17d354bae6d016f28c5f617b78fbba40efc49a9113f6a41b5230555e41d02a359f0bf48f0d77a61445af7a488f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.0.0.alpha.18](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.alpha.17...3.0.0.alpha.18)
2
+
3
+ - [41121e77e](https://github.com/algolia/api-clients-automation/commit/41121e77e) fix(specs): attribute and index names case sensitive ([#2990](https://github.com/algolia/api-clients-automation/pull/2990)) by [@kai687](https://github.com/kai687/)
4
+ - [67b0eab89](https://github.com/algolia/api-clients-automation/commit/67b0eab89) feat(specs): update shopify source and task inputs ([#2987](https://github.com/algolia/api-clients-automation/pull/2987)) by [@Fluf22](https://github.com/Fluf22/)
5
+ - [60e8e6d68](https://github.com/algolia/api-clients-automation/commit/60e8e6d68) fix(specs): Personalization API ([#2982](https://github.com/algolia/api-clients-automation/pull/2982)) by [@kai687](https://github.com/kai687/)
6
+ - [60322c0b5](https://github.com/algolia/api-clients-automation/commit/60322c0b5) fix(specs): a/b testing ([#2981](https://github.com/algolia/api-clients-automation/pull/2981)) by [@kai687](https://github.com/kai687/)
7
+
1
8
  ## [3.0.0.alpha.17](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.alpha.16...3.0.0.alpha.17)
2
9
 
3
10
  - [dabdd0291](https://github.com/algolia/api-clients-automation/commit/dabdd0291) fix(specs): recommend api ([#2958](https://github.com/algolia/api-clients-automation/pull/2958)) by [@kai687](https://github.com/kai687/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.0.0.alpha.17)
4
+ algolia (3.0.0.alpha.18)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-net_http_persistent (>= 0.15, < 3)
7
7
  net-http-persistent
@@ -18,7 +18,7 @@ GEM
18
18
  faraday-net_http_persistent (2.1.0)
19
19
  faraday (~> 2.5)
20
20
  net-http-persistent (~> 4.0)
21
- json (2.7.1)
21
+ json (2.7.2)
22
22
  language_server-protocol (3.17.0.3)
23
23
  net-http (0.4.1)
24
24
  uri
@@ -30,10 +30,10 @@ GEM
30
30
  racc
31
31
  racc (1.7.3)
32
32
  rainbow (3.1.1)
33
- rake (13.1.0)
33
+ rake (13.2.1)
34
34
  regexp_parser (2.9.0)
35
35
  rexml (3.2.6)
36
- rubocop (1.62.1)
36
+ rubocop (1.63.1)
37
37
  json (~> 2.3)
38
38
  language_server-protocol (>= 3.17.0)
39
39
  parallel (~> 1.10)
@@ -34,7 +34,7 @@ module Algolia
34
34
  new(config)
35
35
  end
36
36
 
37
- # Creates an A/B test.
37
+ # Creates a new A/B test.
38
38
  #
39
39
  # Required API Key ACLs:
40
40
  # - editSettings
@@ -66,7 +66,7 @@ module Algolia
66
66
  @api_client.call_api(:POST, path, new_options)
67
67
  end
68
68
 
69
- # Creates an A/B test.
69
+ # Creates a new A/B test.
70
70
  #
71
71
  # Required API Key ACLs:
72
72
  # - editSettings
@@ -254,11 +254,11 @@ module Algolia
254
254
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
255
255
  end
256
256
 
257
- # Delete an A/B test. To determine the &#x60;id&#x60; for an A/B test, use the [&#x60;listABTests&#x60; operation](#tag/abtest/operation/listABTests).
257
+ # Deletes an A/B test by its ID.
258
258
  #
259
259
  # Required API Key ACLs:
260
260
  # - editSettings
261
- # @param id [Integer] Unique A/B test ID. (required)
261
+ # @param id [Integer] Unique A/B test identifier. (required)
262
262
  # @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)
263
263
  # @return [Http::Response] the response
264
264
  def delete_ab_test_with_http_info(id, request_options = {})
@@ -286,11 +286,11 @@ module Algolia
286
286
  @api_client.call_api(:DELETE, path, new_options)
287
287
  end
288
288
 
289
- # Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
289
+ # Deletes an A/B test by its ID.
290
290
  #
291
291
  # Required API Key ACLs:
292
292
  # - editSettings
293
- # @param id [Integer] Unique A/B test ID. (required)
293
+ # @param id [Integer] Unique A/B test identifier. (required)
294
294
  # @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)
295
295
  # @return [ABTestResponse]
296
296
  def delete_ab_test(id, request_options = {})
@@ -298,11 +298,11 @@ module Algolia
298
298
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Abtesting::ABTestResponse')
299
299
  end
300
300
 
301
- # Get specific details for an A/B test. To determine the &#x60;id&#x60; for an A/B test, use the [&#x60;listABTests&#x60; operation](#tag/abtest/operation/listABTests).
301
+ # Retrieves the details for an A/B test by its ID.
302
302
  #
303
303
  # Required API Key ACLs:
304
304
  # - analytics
305
- # @param id [Integer] Unique A/B test ID. (required)
305
+ # @param id [Integer] Unique A/B test identifier. (required)
306
306
  # @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)
307
307
  # @return [Http::Response] the response
308
308
  def get_ab_test_with_http_info(id, request_options = {})
@@ -330,11 +330,11 @@ module Algolia
330
330
  @api_client.call_api(:GET, path, new_options)
331
331
  end
332
332
 
333
- # Get specific details for an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
333
+ # Retrieves the details for an A/B test by its ID.
334
334
  #
335
335
  # Required API Key ACLs:
336
336
  # - analytics
337
- # @param id [Integer] Unique A/B test ID. (required)
337
+ # @param id [Integer] Unique A/B test identifier. (required)
338
338
  # @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)
339
339
  # @return [ABTest]
340
340
  def get_ab_test(id, request_options = {})
@@ -342,14 +342,14 @@ module Algolia
342
342
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Abtesting::ABTest')
343
343
  end
344
344
 
345
- # List all A/B tests.
345
+ # Lists all A/B tests you configured for this application.
346
346
  #
347
347
  # Required API Key ACLs:
348
348
  # - analytics
349
349
  # @param offset [Integer] Position of the first item to return. (default to 0)
350
350
  # @param limit [Integer] Number of items to return. (default to 10)
351
- # @param index_prefix [String] Only return A/B tests for indices starting with this prefix.
352
- # @param index_suffix [String] Only return A/B tests for indices ending with this suffix.
351
+ # @param index_prefix [String] Index name prefix. Only A/B tests for indices starting with this string are included in the response.
352
+ # @param index_suffix [String] Index name suffix. Only A/B tests for indices ending with this string are included in the response.
353
353
  # @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)
354
354
  # @return [Http::Response] the response
355
355
  def list_ab_tests_with_http_info(offset = nil, limit = nil, index_prefix = nil, index_suffix = nil, request_options = {})
@@ -380,14 +380,14 @@ module Algolia
380
380
  @api_client.call_api(:GET, path, new_options)
381
381
  end
382
382
 
383
- # List all A/B tests.
383
+ # Lists all A/B tests you configured for this application.
384
384
  #
385
385
  # Required API Key ACLs:
386
386
  # - analytics
387
387
  # @param offset [Integer] Position of the first item to return. (default to 0)
388
388
  # @param limit [Integer] Number of items to return. (default to 10)
389
- # @param index_prefix [String] Only return A/B tests for indices starting with this prefix.
390
- # @param index_suffix [String] Only return A/B tests for indices ending with this suffix.
389
+ # @param index_prefix [String] Index name prefix. Only A/B tests for indices starting with this string are included in the response.
390
+ # @param index_suffix [String] Index name suffix. Only A/B tests for indices ending with this string are included in the response.
391
391
  # @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)
392
392
  # @return [ListABTestsResponse]
393
393
  def list_ab_tests(offset = nil, limit = nil, index_prefix = nil, index_suffix = nil, request_options = {})
@@ -395,11 +395,11 @@ module Algolia
395
395
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Abtesting::ListABTestsResponse')
396
396
  end
397
397
 
398
- # If stopped, the test is over and can&#39;t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the &#x60;id&#x60; for an A/B test, use the [&#x60;listABTests&#x60; operation](#tag/abtest/operation/listABTests).
398
+ # Stops an A/B test by its ID. You can&#39;t restart stopped A/B tests.
399
399
  #
400
400
  # Required API Key ACLs:
401
401
  # - editSettings
402
- # @param id [Integer] Unique A/B test ID. (required)
402
+ # @param id [Integer] Unique A/B test identifier. (required)
403
403
  # @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)
404
404
  # @return [Http::Response] the response
405
405
  def stop_ab_test_with_http_info(id, request_options = {})
@@ -427,11 +427,11 @@ module Algolia
427
427
  @api_client.call_api(:POST, path, new_options)
428
428
  end
429
429
 
430
- # If stopped, the test is over and can't be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
430
+ # Stops an A/B test by its ID. You can't restart stopped A/B tests.
431
431
  #
432
432
  # Required API Key ACLs:
433
433
  # - editSettings
434
- # @param id [Integer] Unique A/B test ID. (required)
434
+ # @param id [Integer] Unique A/B test identifier. (required)
435
435
  # @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)
436
436
  # @return [ABTestResponse]
437
437
  def stop_ab_test(id, request_options = {})
@@ -209,11 +209,11 @@ module Algolia
209
209
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
210
210
  end
211
211
 
212
- # Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
212
+ # Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
213
213
  #
214
214
  # Required API Key ACLs:
215
215
  # - recommendation
216
- # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
216
+ # @param user_token [String] Unique identifier representing a user for which to fetch the personalization profile. (required)
217
217
  # @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)
218
218
  # @return [Http::Response] the response
219
219
  def delete_user_profile_with_http_info(user_token, request_options = {})
@@ -241,11 +241,11 @@ module Algolia
241
241
  @api_client.call_api(:DELETE, path, new_options)
242
242
  end
243
243
 
244
- # Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
244
+ # Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
245
245
  #
246
246
  # Required API Key ACLs:
247
247
  # - recommendation
248
- # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
248
+ # @param user_token [String] Unique identifier representing a user for which to fetch the personalization profile. (required)
249
249
  # @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)
250
250
  # @return [DeleteUserProfileResponse]
251
251
  def delete_user_profile(user_token, request_options = {})
@@ -253,7 +253,7 @@ module Algolia
253
253
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Personalization::DeleteUserProfileResponse')
254
254
  end
255
255
 
256
- # The strategy contains information on the events and facets that impact user profiles and personalized search results.
256
+ # Retrieves the current personalization strategy.
257
257
  #
258
258
  # Required API Key ACLs:
259
259
  # - recommendation
@@ -279,7 +279,7 @@ module Algolia
279
279
  @api_client.call_api(:GET, path, new_options)
280
280
  end
281
281
 
282
- # The strategy contains information on the events and facets that impact user profiles and personalized search results.
282
+ # Retrieves the current personalization strategy.
283
283
  #
284
284
  # Required API Key ACLs:
285
285
  # - recommendation
@@ -290,11 +290,11 @@ module Algolia
290
290
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Personalization::PersonalizationStrategyParams')
291
291
  end
292
292
 
293
- # Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
293
+ # Retrieves a user profile and their affinities for different facets.
294
294
  #
295
295
  # Required API Key ACLs:
296
296
  # - recommendation
297
- # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
297
+ # @param user_token [String] Unique identifier representing a user for which to fetch the personalization profile. (required)
298
298
  # @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)
299
299
  # @return [Http::Response] the response
300
300
  def get_user_token_profile_with_http_info(user_token, request_options = {})
@@ -322,11 +322,11 @@ module Algolia
322
322
  @api_client.call_api(:GET, path, new_options)
323
323
  end
324
324
 
325
- # Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
325
+ # Retrieves a user profile and their affinities for different facets.
326
326
  #
327
327
  # Required API Key ACLs:
328
328
  # - recommendation
329
- # @param user_token [String] userToken representing the user for which to fetch the Personalization profile. (required)
329
+ # @param user_token [String] Unique identifier representing a user for which to fetch the personalization profile. (required)
330
330
  # @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)
331
331
  # @return [GetUserTokenResponse]
332
332
  def get_user_token_profile(user_token, request_options = {})
@@ -334,7 +334,7 @@ module Algolia
334
334
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Personalization::GetUserTokenResponse')
335
335
  end
336
336
 
337
- # A strategy defines the events and facets that impact user profiles and personalized search results.
337
+ # Creates a new personalization strategy.
338
338
  #
339
339
  # Required API Key ACLs:
340
340
  # - recommendation
@@ -366,7 +366,7 @@ module Algolia
366
366
  @api_client.call_api(:POST, path, new_options)
367
367
  end
368
368
 
369
- # A strategy defines the events and facets that impact user profiles and personalized search results.
369
+ # Creates a new personalization strategy.
370
370
  #
371
371
  # Required API Key ACLs:
372
372
  # - recommendation
@@ -6,42 +6,60 @@ require 'time'
6
6
  module Algolia
7
7
  module Abtesting
8
8
  class ABTest
9
- # Unique A/B test ID.
9
+ # Unique A/B test identifier.
10
10
  attr_accessor :ab_test_id
11
11
 
12
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on click data. A value of 0.95 or over is considered to be _significant_.
13
12
  attr_accessor :click_significance
14
13
 
15
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on conversion. A value of 0.95 or over is considered to be _significant_.
16
14
  attr_accessor :conversion_significance
17
15
 
18
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on add-to-cart data. A value of 0.95 or over is considered to be _significant_.
19
16
  attr_accessor :add_to_cart_significance
20
17
 
21
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on purchase data. A value of 0.95 or over is considered to be _significant_.
22
18
  attr_accessor :purchase_significance
23
19
 
24
- # [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on revenue data. A value of 0.95 or over is considered to be _significant_.
25
20
  attr_accessor :revenue_significance
26
21
 
27
- # Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
22
+ # Date and time when the A/B test was last updated, in RFC 3339 format.
28
23
  attr_accessor :updated_at
29
24
 
30
- # Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
25
+ # Date and time when the A/B test was created, in RFC 3339 format.
31
26
  attr_accessor :created_at
32
27
 
33
- # End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
28
+ # End date and time of the A/B test, in RFC 3339 format.
34
29
  attr_accessor :end_at
35
30
 
36
31
  # A/B test name.
37
32
  attr_accessor :name
38
33
 
39
- # A/B test status.
40
34
  attr_accessor :status
41
35
 
42
- # A/B test variants.
36
+ # A/B test variants. The first variant is your _control_ index, typically your production index. The second variant is an index with changed settings that you want to test against the control.
43
37
  attr_accessor :variants
44
38
 
39
+ attr_accessor :configuration
40
+
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
45
63
  # Attribute mapping from ruby-style variable name to JSON key.
46
64
  def self.attribute_map
47
65
  {
@@ -56,7 +74,8 @@ module Algolia
56
74
  :end_at => :endAt,
57
75
  :name => :name,
58
76
  :status => :status,
59
- :variants => :variants
77
+ :variants => :variants,
78
+ :configuration => :configuration
60
79
  }
61
80
  end
62
81
 
@@ -78,8 +97,9 @@ module Algolia
78
97
  :created_at => :String,
79
98
  :end_at => :String,
80
99
  :name => :String,
81
- :status => :String,
82
- :variants => :'Array<Variant>'
100
+ :status => :Status,
101
+ :variants => :'Array<Variant>',
102
+ :configuration => :ABTestConfiguration
83
103
  }
84
104
  end
85
105
 
@@ -186,6 +206,10 @@ module Algolia
186
206
  else
187
207
  self.variants = nil
188
208
  end
209
+
210
+ if attributes.key?(:configuration)
211
+ self.configuration = attributes[:configuration]
212
+ end
189
213
  end
190
214
 
191
215
  # Checks equality by comparing each attribute.
@@ -205,7 +229,8 @@ module Algolia
205
229
  end_at == other.end_at &&
206
230
  name == other.name &&
207
231
  status == other.status &&
208
- variants == other.variants
232
+ variants == other.variants &&
233
+ configuration == other.configuration
209
234
  end
210
235
 
211
236
  # @see the `==` method
@@ -218,7 +243,7 @@ module Algolia
218
243
  # @return [Integer] Hash code
219
244
  def hash
220
245
  [ab_test_id, click_significance, conversion_significance, add_to_cart_significance, purchase_significance, revenue_significance, updated_at, created_at, end_at, name,
221
- status, variants].hash
246
+ status, variants, configuration].hash
222
247
  end
223
248
 
224
249
  # Builds the object from hash
@@ -0,0 +1,217 @@
1
+ # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ require 'date'
4
+ require 'time'
5
+
6
+ module Algolia
7
+ module Abtesting
8
+ # A/B test configuration.
9
+ class ABTestConfiguration
10
+ attr_accessor :outliers
11
+
12
+ attr_accessor :empty_search
13
+
14
+ attr_accessor :minimum_detectable_effect
15
+
16
+ # Attribute mapping from ruby-style variable name to JSON key.
17
+ def self.attribute_map
18
+ {
19
+ :outliers => :outliers,
20
+ :empty_search => :emptySearch,
21
+ :minimum_detectable_effect => :minimumDetectableEffect
22
+ }
23
+ end
24
+
25
+ # Returns all the JSON keys this model knows about
26
+ def self.acceptable_attributes
27
+ attribute_map.values
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.types_mapping
32
+ {
33
+ :outliers => :Outliers,
34
+ :empty_search => :EmptySearch,
35
+ :minimum_detectable_effect => :MinimumDetectableEffect
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ unless attributes.is_a?(Hash)
48
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::ABTestConfiguration` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) do |(k, v), h|
53
+ unless self.class.attribute_map.key?(k.to_sym)
54
+ raise ArgumentError,
55
+ "`#{k}` is not a valid attribute in `Algolia::ABTestConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+
58
+ h[k.to_sym] = v
59
+ end
60
+
61
+ if attributes.key?(:outliers)
62
+ self.outliers = attributes[:outliers]
63
+ else
64
+ self.outliers = nil
65
+ end
66
+
67
+ if attributes.key?(:empty_search)
68
+ self.empty_search = attributes[:empty_search]
69
+ end
70
+
71
+ if attributes.key?(:minimum_detectable_effect)
72
+ self.minimum_detectable_effect = attributes[:minimum_detectable_effect]
73
+ end
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(other)
79
+ return true if equal?(other)
80
+
81
+ self.class == other.class &&
82
+ outliers == other.outliers &&
83
+ empty_search == other.empty_search &&
84
+ minimum_detectable_effect == other.minimum_detectable_effect
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(other)
90
+ self == other
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [outliers, empty_search, minimum_detectable_effect].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+
105
+ attributes = attributes.transform_keys(&:to_sym)
106
+ transformed_hash = {}
107
+ types_mapping.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash[key.to_sym] = nil
110
+ elsif type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }
115
+ end
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
118
+ end
119
+ end
120
+ new(transformed_hash)
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def self._deserialize(type, value)
128
+ case type.to_sym
129
+ when :Time
130
+ Time.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :Boolean
140
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
141
+ true
142
+ else
143
+ false
144
+ end
145
+ when :Object
146
+ # generic object (usually a Hash), return directly
147
+ value
148
+ when /\AArray<(?<inner_type>.+)>\z/
149
+ inner_type = Regexp.last_match[:inner_type]
150
+ value.map { |v| _deserialize(inner_type, v) }
151
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
152
+ k_type = Regexp.last_match[:k_type]
153
+ v_type = Regexp.last_match[:v_type]
154
+ {}.tap do |hash|
155
+ value.each do |k, v|
156
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
+ end
158
+ end
159
+ else # model
160
+ # models (e.g. Pet) or oneOf
161
+ klass = Algolia::Abtesting.const_get(type)
162
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
163
+ end
164
+ end
165
+
166
+ # Returns the string representation of the object
167
+ # @return [String] String presentation of the object
168
+ def to_s
169
+ to_hash.to_s
170
+ end
171
+
172
+ # to_body is an alias to to_hash (backward compatibility)
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_body
175
+ to_hash
176
+ end
177
+
178
+ def to_json(*_args)
179
+ to_hash.to_json
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+ end
216
+ end
217
+ end
@@ -6,10 +6,10 @@ require 'time'
6
6
  module Algolia
7
7
  module Abtesting
8
8
  class ABTestResponse
9
- # A/B test index.
9
+ # Index name of the A/B test variant (case-sensitive).
10
10
  attr_accessor :index
11
11
 
12
- # Unique A/B test ID.
12
+ # Unique A/B test identifier.
13
13
  attr_accessor :ab_test_id
14
14
 
15
15
  # Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.