algolia 3.0.0.alpha.16 → 3.0.0.alpha.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +10 -167
  3. data/CHANGELOG.md +16 -0
  4. data/Gemfile.lock +4 -4
  5. data/lib/algolia/api/abtesting_client.rb +20 -20
  6. data/lib/algolia/api/analytics_client.rb +76 -76
  7. data/lib/algolia/api/personalization_client.rb +12 -12
  8. data/lib/algolia/api/recommend_client.rb +22 -22
  9. data/lib/algolia/api/search_client.rb +8 -8
  10. data/lib/algolia/api/usage_client.rb +329 -0
  11. data/lib/algolia/models/abtesting/ab_test.rb +41 -16
  12. data/lib/algolia/models/abtesting/ab_test_configuration.rb +217 -0
  13. data/lib/algolia/models/abtesting/ab_test_response.rb +2 -2
  14. data/lib/algolia/models/abtesting/ab_tests_variant.rb +21 -3
  15. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +21 -3
  16. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +1 -1
  17. data/lib/algolia/models/abtesting/custom_search_params.rb +1 -1
  18. data/lib/algolia/models/abtesting/effect.rb +35 -0
  19. data/lib/algolia/models/abtesting/empty_search.rb +198 -0
  20. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +1 -1
  21. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +247 -0
  22. data/lib/algolia/models/abtesting/outliers.rb +198 -0
  23. data/lib/algolia/models/abtesting/status.rb +35 -0
  24. data/lib/algolia/models/abtesting/variant.rb +31 -13
  25. data/lib/algolia/models/analytics/get_status_response.rb +1 -1
  26. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +212 -0
  27. data/lib/algolia/models/{recommend/consequence_query_object.rb → ingestion/auth_algolia_insights_partial.rb} +21 -24
  28. data/lib/algolia/models/ingestion/auth_input.rb +1 -0
  29. data/lib/algolia/models/ingestion/auth_input_partial.rb +1 -0
  30. data/lib/algolia/models/ingestion/authentication_type.rb +2 -1
  31. data/lib/algolia/models/ingestion/destination_index_name.rb +1 -1
  32. data/lib/algolia/models/ingestion/shopify_input.rb +212 -0
  33. data/lib/algolia/models/ingestion/shopify_market.rb +227 -0
  34. data/lib/algolia/models/ingestion/shopify_metafield.rb +221 -0
  35. data/lib/algolia/models/ingestion/source_input.rb +2 -1
  36. data/lib/algolia/models/ingestion/source_shopify.rb +278 -0
  37. data/lib/algolia/models/{recommend/base_recommended_for_you_query_parameters.rb → ingestion/source_shopify_base.rb} +14 -14
  38. data/lib/algolia/models/ingestion/source_update_input.rb +2 -1
  39. data/lib/algolia/models/ingestion/source_update_shopify.rb +258 -0
  40. data/lib/algolia/models/ingestion/task_input.rb +1 -0
  41. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +2 -2
  42. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +2 -2
  43. data/lib/algolia/models/insights/clicked_filters.rb +2 -2
  44. data/lib/algolia/models/insights/clicked_object_ids.rb +2 -2
  45. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +2 -2
  46. data/lib/algolia/models/insights/converted_filters.rb +2 -2
  47. data/lib/algolia/models/insights/converted_object_ids.rb +2 -2
  48. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +2 -2
  49. data/lib/algolia/models/insights/purchased_object_ids.rb +2 -2
  50. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +2 -2
  51. data/lib/algolia/models/insights/viewed_filters.rb +2 -2
  52. data/lib/algolia/models/insights/viewed_object_ids.rb +2 -2
  53. data/lib/algolia/models/monitoring/incidents_inner.rb +1 -1
  54. data/lib/algolia/models/monitoring/probes_metric.rb +1 -1
  55. data/lib/algolia/models/monitoring/time_inner.rb +1 -1
  56. data/lib/algolia/models/personalization/delete_user_profile_response.rb +2 -2
  57. data/lib/algolia/models/personalization/event_scoring.rb +25 -4
  58. data/lib/algolia/models/personalization/event_type.rb +34 -0
  59. data/lib/algolia/models/personalization/facet_scoring.rb +2 -2
  60. data/lib/algolia/models/personalization/get_user_token_response.rb +3 -3
  61. data/lib/algolia/models/personalization/personalization_strategy_params.rb +21 -3
  62. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +3 -3
  63. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +1 -1
  64. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -1
  65. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +1 -1
  66. data/lib/algolia/models/query-suggestions/source_index.rb +1 -1
  67. data/lib/algolia/models/recommend/auto_facet_filter.rb +208 -0
  68. data/lib/algolia/models/recommend/base_recommend_request.rb +37 -8
  69. data/lib/algolia/models/recommend/base_search_params.rb +4 -4
  70. data/lib/algolia/models/recommend/base_search_params_without_query.rb +4 -4
  71. data/lib/algolia/models/recommend/bought_together_query.rb +319 -0
  72. data/lib/algolia/models/recommend/condition.rb +12 -62
  73. data/lib/algolia/models/recommend/consequence.rb +32 -54
  74. data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
  75. data/lib/algolia/models/recommend/{recommended_for_you_query_parameters.rb → fallback_params.rb} +17 -20
  76. data/lib/algolia/models/recommend/{edit_type.rb → fbt_model.rb} +5 -6
  77. data/lib/algolia/models/recommend/{base_trending_facets_query.rb → frequently_bought_together.rb} +20 -18
  78. data/lib/algolia/models/recommend/get_recommendations_params.rb +2 -2
  79. data/lib/algolia/models/recommend/{consequence_hide.rb → hide_consequence_object.rb} +4 -6
  80. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +10 -10
  81. data/lib/algolia/models/recommend/{base_recommendations_query.rb → looking_similar.rb} +6 -15
  82. data/lib/algolia/models/recommend/{anchoring.rb → looking_similar_model.rb} +5 -8
  83. data/lib/algolia/models/recommend/looking_similar_query.rb +328 -0
  84. data/lib/algolia/models/recommend/{params.rb → params_consequence.rb} +26 -28
  85. data/lib/algolia/models/recommend/{promote_object_id.rb → promote_consequence_object.rb} +19 -9
  86. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  87. data/lib/algolia/models/recommend/{rule_response.rb → recommend_rule.rb} +13 -18
  88. data/lib/algolia/models/recommend/{rule_response_metadata.rb → recommend_rule_metadata.rb} +5 -4
  89. data/lib/algolia/models/recommend/recommendations_hits.rb +4 -24
  90. data/lib/algolia/models/recommend/recommendations_request.rb +3 -1
  91. data/lib/algolia/models/recommend/recommendations_results.rb +4 -24
  92. data/lib/algolia/models/recommend/{base_recommended_for_you_query.rb → recommended_for_you.rb} +5 -14
  93. data/lib/algolia/models/recommend/recommended_for_you_query.rb +36 -16
  94. data/lib/algolia/models/recommend/{recommendation_models.rb → related_model.rb} +4 -5
  95. data/lib/algolia/models/recommend/{edit.rb → related_products.rb} +27 -24
  96. data/lib/algolia/models/recommend/{recommendations_query.rb → related_query.rb} +40 -20
  97. data/lib/algolia/models/recommend/{consequence_params.rb → search_params.rb} +33 -52
  98. data/lib/algolia/models/recommend/search_params_object.rb +15 -14
  99. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +58 -10
  100. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +2 -2
  101. data/lib/algolia/models/recommend/trending_facet_hit.rb +2 -2
  102. data/lib/algolia/models/recommend/trending_facets.rb +243 -0
  103. data/lib/algolia/models/recommend/trending_facets_query.rb +51 -11
  104. data/lib/algolia/models/recommend/{base_trending_items_query.rb → trending_items.rb} +12 -15
  105. data/lib/algolia/models/recommend/trending_items_query.rb +43 -17
  106. data/lib/algolia/models/search/add_api_key_response.rb +1 -1
  107. data/lib/algolia/models/search/base_get_api_key_response.rb +1 -1
  108. data/lib/algolia/models/search/base_index_settings.rb +10 -10
  109. data/lib/algolia/models/search/base_search_params.rb +4 -4
  110. data/lib/algolia/models/search/base_search_params_without_query.rb +4 -4
  111. data/lib/algolia/models/search/browse_params_object.rb +14 -14
  112. data/lib/algolia/models/search/consequence_params.rb +14 -14
  113. data/lib/algolia/models/search/created_at_response.rb +1 -1
  114. data/lib/algolia/models/search/delete_api_key_response.rb +1 -1
  115. data/lib/algolia/models/search/delete_by_params.rb +2 -2
  116. data/lib/algolia/models/search/delete_source_response.rb +1 -1
  117. data/lib/algolia/models/search/deleted_at_response.rb +1 -1
  118. data/lib/algolia/models/search/fetched_index.rb +1 -1
  119. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  120. data/lib/algolia/models/search/index_settings.rb +20 -20
  121. data/lib/algolia/models/search/index_settings_as_search_params.rb +10 -10
  122. data/lib/algolia/models/search/log.rb +1 -1
  123. data/lib/algolia/models/search/multiple_batch_request.rb +1 -1
  124. data/lib/algolia/models/search/operation_index_params.rb +1 -1
  125. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  126. data/lib/algolia/models/search/remove_user_id_response.rb +1 -1
  127. data/lib/algolia/models/search/replace_source_response.rb +1 -1
  128. data/lib/algolia/models/search/save_object_response.rb +1 -1
  129. data/lib/algolia/models/search/save_synonym_response.rb +1 -1
  130. data/lib/algolia/models/search/search_for_facets.rb +15 -15
  131. data/lib/algolia/models/search/search_for_facets_options.rb +1 -1
  132. data/lib/algolia/models/search/search_for_hits.rb +15 -15
  133. data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
  134. data/lib/algolia/models/search/search_params_object.rb +15 -14
  135. data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
  136. data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
  137. data/lib/algolia/models/search/update_api_key_response.rb +1 -1
  138. data/lib/algolia/models/search/updated_at_response.rb +1 -1
  139. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +1 -1
  140. data/lib/algolia/models/search/updated_rule_response.rb +1 -1
  141. data/lib/algolia/models/search/user_hit.rb +1 -1
  142. data/lib/algolia/models/search/user_id.rb +1 -1
  143. data/lib/algolia/models/usage/error_base.rb +205 -0
  144. data/lib/algolia/models/usage/get_usage200_response.rb +198 -0
  145. data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +206 -0
  146. data/lib/algolia/models/usage/get_usage400_response.rb +198 -0
  147. data/lib/algolia/models/usage/get_usage400_response_error.rb +216 -0
  148. data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +225 -0
  149. data/lib/algolia/models/usage/granularity.rb +33 -0
  150. data/lib/algolia/models/usage/statistic.rb +116 -0
  151. data/lib/algolia/models/{recommend/promote.rb → usage/statistic_value.rb} +5 -5
  152. data/lib/algolia/version.rb +1 -1
  153. metadata +47 -25
  154. data/lib/algolia/models/recommend/automatic_facet_filter.rb +0 -220
  155. data/lib/algolia/models/recommend/automatic_facet_filters.rb +0 -97
  156. data/lib/algolia/models/recommend/consequence_query.rb +0 -97
  157. data/lib/algolia/models/recommend/promote_object_ids.rb +0 -228
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
@@ -24,7 +24,7 @@ module Algolia
24
24
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  attr_accessor :authenticated_user_token
26
26
 
27
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
27
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
28
28
  attr_accessor :timestamp
29
29
 
30
30
  class EnumAttributeValidator
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Object IDs of the records that are part of the event.
@@ -24,7 +24,7 @@ module Algolia
24
24
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  attr_accessor :authenticated_user_token
26
26
 
27
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
27
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
28
28
  attr_accessor :timestamp
29
29
 
30
30
  class EnumAttributeValidator
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Object IDs of the records that are part of the event.
@@ -30,7 +30,7 @@ module Algolia
30
30
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
31
31
  attr_accessor :authenticated_user_token
32
32
 
33
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
33
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
34
34
  attr_accessor :timestamp
35
35
 
36
36
  class EnumAttributeValidator
@@ -11,7 +11,7 @@ module Algolia
11
11
 
12
12
  attr_accessor :event_type
13
13
 
14
- # Index name to which the event's items belong.
14
+ # Index name (case-sensitive) to which the event's items belong.
15
15
  attr_accessor :index
16
16
 
17
17
  # Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
@@ -23,7 +23,7 @@ module Algolia
23
23
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
24
24
  attr_accessor :authenticated_user_token
25
25
 
26
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
26
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
27
27
  attr_accessor :timestamp
28
28
 
29
29
  class EnumAttributeValidator
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Object IDs of the records that are part of the event.
@@ -24,7 +24,7 @@ module Algolia
24
24
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  attr_accessor :authenticated_user_token
26
26
 
27
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
27
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
28
28
  attr_accessor :timestamp
29
29
 
30
30
  class EnumAttributeValidator
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Object IDs of the records that are part of the event.
@@ -27,7 +27,7 @@ module Algolia
27
27
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
28
28
  attr_accessor :authenticated_user_token
29
29
 
30
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
30
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
31
31
  attr_accessor :timestamp
32
32
 
33
33
  class EnumAttributeValidator
@@ -14,7 +14,7 @@ module Algolia
14
14
 
15
15
  attr_accessor :event_subtype
16
16
 
17
- # Index name to which the event's items belong.
17
+ # Index name (case-sensitive) to which the event's items belong.
18
18
  attr_accessor :index
19
19
 
20
20
  # Object IDs of the records that are part of the event.
@@ -32,7 +32,7 @@ module Algolia
32
32
  # Extra information about the records involved in a purchase or add-to-cart event. If specified, it must have the same length as `objectIDs`.
33
33
  attr_accessor :object_data
34
34
 
35
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
35
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
36
36
  attr_accessor :timestamp
37
37
 
38
38
  attr_accessor :value
@@ -14,7 +14,7 @@ module Algolia
14
14
 
15
15
  attr_accessor :event_subtype
16
16
 
17
- # Index name to which the event's items belong.
17
+ # Index name (case-sensitive) to which the event's items belong.
18
18
  attr_accessor :index
19
19
 
20
20
  # Object IDs of the records that are part of the event.
@@ -32,7 +32,7 @@ module Algolia
32
32
  # Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
33
33
  attr_accessor :object_data
34
34
 
35
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
35
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
36
36
  attr_accessor :timestamp
37
37
 
38
38
  attr_accessor :value
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
@@ -24,7 +24,7 @@ module Algolia
24
24
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  attr_accessor :authenticated_user_token
26
26
 
27
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
27
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
28
28
  attr_accessor :timestamp
29
29
 
30
30
  class EnumAttributeValidator
@@ -12,7 +12,7 @@ module Algolia
12
12
 
13
13
  attr_accessor :event_type
14
14
 
15
- # Index name to which the event's items belong.
15
+ # Index name (case-sensitive) to which the event's items belong.
16
16
  attr_accessor :index
17
17
 
18
18
  # Object IDs of the records that are part of the event.
@@ -24,7 +24,7 @@ module Algolia
24
24
  # Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don't use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  attr_accessor :authenticated_user_token
26
26
 
27
- # Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
27
+ # Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
28
28
  attr_accessor :timestamp
29
29
 
30
30
  class EnumAttributeValidator
@@ -6,7 +6,7 @@ require 'time'
6
6
  module Algolia
7
7
  module Monitoring
8
8
  class IncidentsInner
9
- # Timestamp in [Unix epoch time](https://wikipedia.org/wiki/Unix_time) in milliseconds.
9
+ # Timestamp, measured in milliseconds since the Unix epoch.
10
10
  attr_accessor :t
11
11
 
12
12
  attr_accessor :v
@@ -6,7 +6,7 @@ require 'time'
6
6
  module Algolia
7
7
  module Monitoring
8
8
  class ProbesMetric
9
- # Timestamp in [Unix epoch time](https://wikipedia.org/wiki/Unix_time) in milliseconds.
9
+ # Timestamp, measured in milliseconds since the Unix epoch.
10
10
  attr_accessor :t
11
11
 
12
12
  # Value of the metric.
@@ -6,7 +6,7 @@ require 'time'
6
6
  module Algolia
7
7
  module Monitoring
8
8
  class TimeInner
9
- # Timestamp in [Unix epoch time](https://wikipedia.org/wiki/Unix_time) in milliseconds.
9
+ # Timestamp, measured in milliseconds since the Unix epoch.
10
10
  attr_accessor :t
11
11
 
12
12
  # Time in ms.
@@ -6,10 +6,10 @@ require 'time'
6
6
  module Algolia
7
7
  module Personalization
8
8
  class DeleteUserProfileResponse
9
- # userToken representing the user for which to fetch the Personalization profile.
9
+ # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
10
10
  attr_accessor :user_token
11
11
 
12
- # A date until which the data can safely be considered as deleted for the given user. Any data received after the `deletedUntil` date will start building a new user profile.
12
+ # Date and time when the user profile can be safely considered to be deleted. Any events received after the `deletedUntil` date start a new user profile.
13
13
  attr_accessor :deleted_until
14
14
 
15
15
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,15 +6,36 @@ require 'time'
6
6
  module Algolia
7
7
  module Personalization
8
8
  class EventScoring
9
- # The score for the event.
9
+ # Event score.
10
10
  attr_accessor :score
11
11
 
12
- # The name of the event.
12
+ # Event name.
13
13
  attr_accessor :event_name
14
14
 
15
- # The type of the event.
16
15
  attr_accessor :event_type
17
16
 
17
+ class EnumAttributeValidator
18
+ attr_reader :datatype
19
+ attr_reader :allowable_values
20
+
21
+ def initialize(datatype, allowable_values)
22
+ @allowable_values = allowable_values.map do |value|
23
+ case datatype.to_s
24
+ when /Integer/i
25
+ value.to_i
26
+ when /Float/i
27
+ value.to_f
28
+ else
29
+ value
30
+ end
31
+ end
32
+ end
33
+
34
+ def valid?(value)
35
+ !value || allowable_values.include?(value)
36
+ end
37
+ end
38
+
18
39
  # Attribute mapping from ruby-style variable name to JSON key.
19
40
  def self.attribute_map
20
41
  {
@@ -34,7 +55,7 @@ module Algolia
34
55
  {
35
56
  :score => :Integer,
36
57
  :event_name => :String,
37
- :event_type => :String
58
+ :event_type => :EventType
38
59
  }
39
60
  end
40
61
 
@@ -0,0 +1,34 @@
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 Personalization
8
+ class EventType
9
+ CLICK = "click".freeze
10
+ CONVERSION = "conversion".freeze
11
+ VIEW = "view".freeze
12
+
13
+ def self.all_vars
14
+ @all_vars ||= [CLICK, CONVERSION, VIEW].freeze
15
+ end
16
+
17
+ # Builds the enum from string
18
+ # @param [String] The enum value in the form of the string
19
+ # @return [String] The enum value
20
+ def self.build_from_hash(value)
21
+ new.build_from_hash(value)
22
+ end
23
+
24
+ # Builds the enum from string
25
+ # @param [String] The enum value in the form of the string
26
+ # @return [String] The enum value
27
+ def build_from_hash(value)
28
+ return value if EventType.all_vars.include?(value)
29
+
30
+ raise "Invalid ENUM value #{value} for class #EventType"
31
+ end
32
+ end
33
+ end
34
+ end
@@ -6,10 +6,10 @@ require 'time'
6
6
  module Algolia
7
7
  module Personalization
8
8
  class FacetScoring
9
- # The score for the event.
9
+ # Event score.
10
10
  attr_accessor :score
11
11
 
12
- # The name of the facet.
12
+ # Facet attribute name.
13
13
  attr_accessor :facet_name
14
14
 
15
15
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,13 +6,13 @@ require 'time'
6
6
  module Algolia
7
7
  module Personalization
8
8
  class GetUserTokenResponse
9
- # userToken representing the user for which to fetch the Personalization profile.
9
+ # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
10
10
  attr_accessor :user_token
11
11
 
12
- # Date of last event update. (ISO-8601 format).
12
+ # Date and time of the last event from this user, in RFC 3339 format.
13
13
  attr_accessor :last_event_at
14
14
 
15
- # The userToken scores.
15
+ # Scores for different facet values. Scores represent the user affinity for a user profile towards specific facet values, given the personalization strategy and past events.
16
16
  attr_accessor :scores
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,13 +6,13 @@ require 'time'
6
6
  module Algolia
7
7
  module Personalization
8
8
  class PersonalizationStrategyParams
9
- # Scores associated with the events.
9
+ # Scores associated with each event. The higher the scores, the higher the impact of those events on the personalization of search results.
10
10
  attr_accessor :event_scoring
11
11
 
12
- # Scores associated with the facets.
12
+ # Scores associated with each facet. The higher the scores, the higher the impact of those events on the personalization of search results.
13
13
  attr_accessor :facet_scoring
14
14
 
15
- # The impact that personalization has on search results: a number between 0 (personalization disabled) and 100 (personalization fully enabled).
15
+ # Impact of personalization on the search results. If set to 0, personalization has no impact on the search results.
16
16
  attr_accessor :personalization_impact
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -83,6 +83,24 @@ module Algolia
83
83
  end
84
84
  end
85
85
 
86
+ # Custom attribute writer method with validation
87
+ # @param [Object] personalization_impact Value to be assigned
88
+ def personalization_impact=(personalization_impact)
89
+ if personalization_impact.nil?
90
+ raise ArgumentError, 'personalization_impact cannot be nil'
91
+ end
92
+
93
+ if personalization_impact > 100
94
+ raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.'
95
+ end
96
+
97
+ if personalization_impact < 0
98
+ raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.'
99
+ end
100
+
101
+ @personalization_impact = personalization_impact
102
+ end
103
+
86
104
  # Checks equality by comparing each attribute.
87
105
  # @param [Object] Object to be compared
88
106
  def ==(other)
@@ -6,16 +6,16 @@ require 'time'
6
6
  module Algolia
7
7
  module QuerySuggestions
8
8
  class GetConfigStatus200Response
9
- # Name of the Query Suggestions index.
9
+ # Name of the Query Suggestions index (case-sensitive).
10
10
  attr_accessor :index_name
11
11
 
12
12
  # Whether the creation or update of the Query Suggestions index is in progress.
13
13
  attr_accessor :is_running
14
14
 
15
- # Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last built.
15
+ # Date and time when the Query Suggestions index was last built, in RFC 3339 format.
16
16
  attr_accessor :last_built_at
17
17
 
18
- # Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last updated successfully.
18
+ # Date and time when the Query Suggestions index was last updated successfully.
19
19
  attr_accessor :last_successful_built_at
20
20
 
21
21
  # Duration of the last successful build in seconds.
@@ -6,7 +6,7 @@ require 'time'
6
6
  module Algolia
7
7
  module QuerySuggestions
8
8
  class GetLogFile200Response
9
- # Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
9
+ # Date and time of the log entry, in RFC 3339 format.
10
10
  attr_accessor :timestamp
11
11
 
12
12
  attr_accessor :level
@@ -10,7 +10,7 @@ module Algolia
10
10
  # Algolia application ID to which this Query Suggestions configuration belongs.
11
11
  attr_accessor :app_id
12
12
 
13
- # Name of the Query Suggestions index.
13
+ # Name of the Query Suggestions index (case-sensitive).
14
14
  attr_accessor :index_name
15
15
 
16
16
  # Algolia indices from which to get the popular searches for query suggestions.
@@ -20,7 +20,7 @@ module Algolia
20
20
  # Whether to include suggestions with special characters.
21
21
  attr_accessor :allow_special_characters
22
22
 
23
- # Name of the Query Suggestions index.
23
+ # Name of the Query Suggestions index (case-sensitive).
24
24
  attr_accessor :index_name
25
25
 
26
26
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -7,7 +7,7 @@ module Algolia
7
7
  module QuerySuggestions
8
8
  # Configuration of an Algolia index for Query Suggestions.
9
9
  class SourceIndex
10
- # Name of the Algolia index to use as source for query suggestions.
10
+ # Name of the Algolia index (case-sensitive) to use as source for query suggestions.
11
11
  attr_accessor :index_name
12
12
 
13
13
  # If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.