algolia 3.0.0.alpha.15 → 3.0.0.alpha.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +10 -167
  3. data/CHANGELOG.md +14 -0
  4. data/Gemfile.lock +1 -1
  5. data/lib/algolia/api/analytics_client.rb +76 -76
  6. data/lib/algolia/api/ingestion_client.rb +267 -196
  7. data/lib/algolia/api/monitoring_client.rb +49 -49
  8. data/lib/algolia/api/query_suggestions_client.rb +14 -14
  9. data/lib/algolia/api/recommend_client.rb +22 -22
  10. data/lib/algolia/api/search_client.rb +8 -8
  11. data/lib/algolia/api/usage_client.rb +329 -0
  12. data/lib/algolia/models/analytics/get_status_response.rb +1 -1
  13. data/lib/algolia/models/ingestion/auth_algolia.rb +3 -2
  14. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +212 -0
  15. data/lib/algolia/models/{recommend/consequence_query_object.rb → ingestion/auth_algolia_insights_partial.rb} +21 -24
  16. data/lib/algolia/models/ingestion/auth_algolia_partial.rb +3 -2
  17. data/lib/algolia/models/ingestion/auth_api_key.rb +2 -1
  18. data/lib/algolia/models/ingestion/auth_api_key_partial.rb +2 -1
  19. data/lib/algolia/models/ingestion/auth_basic.rb +3 -1
  20. data/lib/algolia/models/ingestion/auth_basic_partial.rb +3 -1
  21. data/lib/algolia/models/ingestion/auth_google_service_account.rb +3 -3
  22. data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +3 -3
  23. data/lib/algolia/models/ingestion/auth_input.rb +1 -0
  24. data/lib/algolia/models/ingestion/auth_input_partial.rb +1 -0
  25. data/lib/algolia/models/ingestion/auth_o_auth.rb +18 -8
  26. data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +18 -8
  27. data/lib/algolia/models/ingestion/authentication.rb +5 -5
  28. data/lib/algolia/models/ingestion/authentication_create.rb +2 -2
  29. data/lib/algolia/models/ingestion/authentication_create_response.rb +4 -4
  30. data/lib/algolia/models/ingestion/authentication_search.rb +1 -1
  31. data/lib/algolia/models/ingestion/authentication_type.rb +2 -1
  32. data/lib/algolia/models/ingestion/authentication_update.rb +2 -2
  33. data/lib/algolia/models/ingestion/authentication_update_response.rb +4 -4
  34. data/lib/algolia/models/ingestion/big_commerce_channel.rb +2 -2
  35. data/lib/algolia/models/ingestion/big_commerce_metafield.rb +2 -2
  36. data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +1 -1
  37. data/lib/algolia/models/ingestion/delete_response.rb +1 -1
  38. data/lib/algolia/models/ingestion/destination.rb +6 -6
  39. data/lib/algolia/models/ingestion/destination_create.rb +3 -3
  40. data/lib/algolia/models/ingestion/destination_create_response.rb +4 -4
  41. data/lib/algolia/models/ingestion/destination_index_name.rb +2 -2
  42. data/lib/algolia/models/ingestion/destination_index_prefix.rb +1 -1
  43. data/lib/algolia/models/ingestion/destination_search.rb +1 -1
  44. data/lib/algolia/models/ingestion/destination_type.rb +1 -2
  45. data/lib/algolia/models/ingestion/destination_update.rb +3 -3
  46. data/lib/algolia/models/ingestion/destination_update_response.rb +4 -4
  47. data/lib/algolia/models/ingestion/docker_source_discover.rb +2 -2
  48. data/lib/algolia/models/ingestion/event.rb +3 -3
  49. data/lib/algolia/models/ingestion/list_tasks_response.rb +1 -1
  50. data/lib/algolia/models/ingestion/mapping_format_schema.rb +32 -0
  51. data/lib/algolia/models/ingestion/mapping_input.rb +24 -3
  52. data/lib/algolia/models/ingestion/on_demand_date_utils_input.rb +3 -3
  53. data/lib/algolia/models/ingestion/on_demand_trigger.rb +2 -2
  54. data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +1 -1
  55. data/lib/algolia/models/ingestion/pagination.rb +65 -0
  56. data/lib/algolia/models/ingestion/platform.rb +2 -1
  57. data/lib/algolia/models/ingestion/run.rb +7 -7
  58. data/lib/algolia/models/ingestion/run_response.rb +3 -3
  59. data/lib/algolia/models/ingestion/schedule_date_utils_input.rb +2 -2
  60. data/lib/algolia/models/ingestion/schedule_trigger.rb +4 -4
  61. data/lib/algolia/models/ingestion/schedule_trigger_input.rb +2 -2
  62. data/lib/algolia/models/ingestion/source.rb +4 -4
  63. data/lib/algolia/models/ingestion/source_big_commerce.rb +1 -1
  64. data/lib/algolia/models/ingestion/source_big_query.rb +5 -5
  65. data/lib/algolia/models/ingestion/source_commercetools.rb +2 -2
  66. data/lib/algolia/models/ingestion/source_create.rb +2 -1
  67. data/lib/algolia/models/ingestion/source_create_response.rb +3 -2
  68. data/lib/algolia/models/ingestion/source_csv.rb +3 -3
  69. data/lib/algolia/models/ingestion/source_docker.rb +3 -3
  70. data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +3 -3
  71. data/lib/algolia/models/ingestion/source_json.rb +2 -2
  72. data/lib/algolia/models/ingestion/source_type.rb +5 -3
  73. data/lib/algolia/models/ingestion/source_update.rb +2 -1
  74. data/lib/algolia/models/ingestion/source_update_commercetools.rb +2 -3
  75. data/lib/algolia/models/ingestion/source_update_docker.rb +3 -3
  76. data/lib/algolia/models/ingestion/source_update_response.rb +3 -2
  77. data/lib/algolia/models/ingestion/streaming_trigger.rb +1 -1
  78. data/lib/algolia/models/ingestion/streaming_utils_input.rb +1 -1
  79. data/lib/algolia/models/ingestion/subscription_trigger.rb +1 -1
  80. data/lib/algolia/models/ingestion/task.rb +7 -7
  81. data/lib/algolia/models/ingestion/task_create.rb +5 -5
  82. data/lib/algolia/models/ingestion/task_create_response.rb +3 -3
  83. data/lib/algolia/models/ingestion/task_input.rb +1 -0
  84. data/lib/algolia/models/ingestion/task_update.rb +4 -4
  85. data/lib/algolia/models/ingestion/task_update_response.rb +3 -3
  86. data/lib/algolia/models/ingestion/trigger.rb +1 -0
  87. data/lib/algolia/models/ingestion/trigger_update_input.rb +2 -2
  88. data/lib/algolia/models/ingestion/window.rb +3 -3
  89. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +1 -1
  90. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +1 -1
  91. data/lib/algolia/models/insights/clicked_filters.rb +1 -1
  92. data/lib/algolia/models/insights/clicked_object_ids.rb +1 -1
  93. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +1 -1
  94. data/lib/algolia/models/insights/converted_filters.rb +1 -1
  95. data/lib/algolia/models/insights/converted_object_ids.rb +1 -1
  96. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +1 -1
  97. data/lib/algolia/models/insights/purchased_object_ids.rb +1 -1
  98. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +3 -1
  99. data/lib/algolia/models/insights/viewed_filters.rb +1 -1
  100. data/lib/algolia/models/insights/viewed_object_ids.rb +1 -1
  101. data/lib/algolia/models/monitoring/{get_inventory403_response.rb → get_servers403_response.rb} +3 -3
  102. data/lib/algolia/models/monitoring/incidents_inner.rb +1 -1
  103. data/lib/algolia/models/monitoring/probes_metric.rb +1 -1
  104. data/lib/algolia/models/monitoring/server.rb +2 -2
  105. data/lib/algolia/models/monitoring/time_inner.rb +1 -1
  106. data/lib/algolia/models/query-suggestions/app_id.rb +197 -0
  107. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +4 -4
  108. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +2 -2
  109. data/lib/algolia/models/query-suggestions/languages.rb +1 -1
  110. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +2 -3
  111. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +23 -34
  112. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +18 -20
  113. data/lib/algolia/models/query-suggestions/source_index.rb +3 -5
  114. data/lib/algolia/models/recommend/auto_facet_filter.rb +208 -0
  115. data/lib/algolia/models/recommend/base_recommend_request.rb +36 -7
  116. data/lib/algolia/models/recommend/base_search_params.rb +1 -1
  117. data/lib/algolia/models/recommend/base_search_params_without_query.rb +1 -1
  118. data/lib/algolia/models/recommend/bought_together_query.rb +319 -0
  119. data/lib/algolia/models/recommend/condition.rb +12 -62
  120. data/lib/algolia/models/recommend/consequence.rb +32 -54
  121. data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
  122. data/lib/algolia/models/recommend/{recommended_for_you_query_parameters.rb → fallback_params.rb} +9 -12
  123. data/lib/algolia/models/recommend/{edit_type.rb → fbt_model.rb} +5 -6
  124. data/lib/algolia/models/recommend/{base_trending_facets_query.rb → frequently_bought_together.rb} +20 -18
  125. data/lib/algolia/models/recommend/get_recommendations_params.rb +2 -2
  126. data/lib/algolia/models/recommend/{consequence_hide.rb → hide_consequence_object.rb} +4 -6
  127. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +5 -5
  128. data/lib/algolia/models/recommend/{base_recommendations_query.rb → looking_similar.rb} +6 -15
  129. data/lib/algolia/models/recommend/{anchoring.rb → looking_similar_model.rb} +5 -8
  130. data/lib/algolia/models/recommend/looking_similar_query.rb +328 -0
  131. data/lib/algolia/models/recommend/{params.rb → params_consequence.rb} +26 -28
  132. data/lib/algolia/models/recommend/{promote_object_id.rb → promote_consequence_object.rb} +19 -9
  133. data/lib/algolia/models/recommend/{rule_response.rb → recommend_rule.rb} +13 -18
  134. data/lib/algolia/models/recommend/{rule_response_metadata.rb → recommend_rule_metadata.rb} +5 -4
  135. data/lib/algolia/models/recommend/recommendations_hits.rb +4 -24
  136. data/lib/algolia/models/recommend/recommendations_request.rb +3 -1
  137. data/lib/algolia/models/recommend/recommendations_results.rb +4 -24
  138. data/lib/algolia/models/recommend/{base_recommended_for_you_query.rb → recommended_for_you.rb} +5 -14
  139. data/lib/algolia/models/recommend/recommended_for_you_query.rb +35 -15
  140. data/lib/algolia/models/recommend/{recommendation_models.rb → related_model.rb} +4 -5
  141. data/lib/algolia/models/recommend/{edit.rb → related_products.rb} +27 -24
  142. data/lib/algolia/models/recommend/{recommendations_query.rb → related_query.rb} +39 -19
  143. data/lib/algolia/models/recommend/{consequence_params.rb → search_params.rb} +25 -44
  144. data/lib/algolia/models/recommend/search_params_object.rb +6 -6
  145. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +58 -10
  146. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +2 -2
  147. data/lib/algolia/models/recommend/trending_facet_hit.rb +2 -2
  148. data/lib/algolia/models/recommend/trending_facets.rb +243 -0
  149. data/lib/algolia/models/recommend/trending_facets_query.rb +50 -10
  150. data/lib/algolia/models/recommend/{base_trending_items_query.rb → trending_items.rb} +12 -15
  151. data/lib/algolia/models/recommend/trending_items_query.rb +42 -16
  152. data/lib/algolia/models/search/add_api_key_response.rb +1 -1
  153. data/lib/algolia/models/search/base_get_api_key_response.rb +1 -1
  154. data/lib/algolia/models/search/base_index_settings.rb +4 -4
  155. data/lib/algolia/models/search/base_search_params.rb +1 -1
  156. data/lib/algolia/models/search/base_search_params_without_query.rb +1 -1
  157. data/lib/algolia/models/search/browse_params_object.rb +6 -6
  158. data/lib/algolia/models/search/consequence_params.rb +6 -6
  159. data/lib/algolia/models/search/created_at_response.rb +1 -1
  160. data/lib/algolia/models/search/delete_api_key_response.rb +1 -1
  161. data/lib/algolia/models/search/delete_by_params.rb +1 -1
  162. data/lib/algolia/models/search/delete_source_response.rb +1 -1
  163. data/lib/algolia/models/search/deleted_at_response.rb +1 -1
  164. data/lib/algolia/models/search/fetched_index.rb +1 -1
  165. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  166. data/lib/algolia/models/search/index_settings.rb +9 -9
  167. data/lib/algolia/models/search/index_settings_as_search_params.rb +5 -5
  168. data/lib/algolia/models/search/log.rb +1 -1
  169. data/lib/algolia/models/search/remove_user_id_response.rb +1 -1
  170. data/lib/algolia/models/search/replace_source_response.rb +1 -1
  171. data/lib/algolia/models/search/save_object_response.rb +1 -1
  172. data/lib/algolia/models/search/save_synonym_response.rb +1 -1
  173. data/lib/algolia/models/search/search_for_facets.rb +6 -6
  174. data/lib/algolia/models/search/search_for_hits.rb +6 -6
  175. data/lib/algolia/models/search/search_params_object.rb +6 -6
  176. data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
  177. data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
  178. data/lib/algolia/models/search/update_api_key_response.rb +1 -1
  179. data/lib/algolia/models/search/updated_at_response.rb +1 -1
  180. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +1 -1
  181. data/lib/algolia/models/search/updated_rule_response.rb +1 -1
  182. data/lib/algolia/models/search/user_hit.rb +1 -1
  183. data/lib/algolia/models/search/user_id.rb +1 -1
  184. data/lib/algolia/models/usage/error_base.rb +205 -0
  185. data/lib/algolia/models/usage/get_usage200_response.rb +198 -0
  186. data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +206 -0
  187. data/lib/algolia/models/{recommend/base_recommended_for_you_query_parameters.rb → usage/get_usage400_response.rb} +13 -14
  188. data/lib/algolia/models/usage/get_usage400_response_error.rb +216 -0
  189. data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +225 -0
  190. data/lib/algolia/models/usage/granularity.rb +33 -0
  191. data/lib/algolia/models/usage/statistic.rb +116 -0
  192. data/lib/algolia/models/{recommend/promote.rb → usage/statistic_value.rb} +5 -5
  193. data/lib/algolia/version.rb +1 -1
  194. metadata +37 -26
  195. data/lib/algolia/models/recommend/automatic_facet_filter.rb +0 -220
  196. data/lib/algolia/models/recommend/automatic_facet_filters.rb +0 -97
  197. data/lib/algolia/models/recommend/consequence_query.rb +0 -97
  198. data/lib/algolia/models/recommend/promote_object_ids.rb +0 -228
@@ -5,11 +5,11 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Payload to partially update an Authentication.
8
+ # Request body for updating an authentication resource.
9
9
  class AuthenticationUpdate
10
10
  attr_accessor :type
11
11
 
12
- # An human readable name describing the object.
12
+ # Descriptive name for the resource.
13
13
  attr_accessor :name
14
14
 
15
15
  attr_accessor :platform
@@ -5,15 +5,15 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Response from the API when the Authentication is successfully updated.
8
+ # API response for a successful update of an authentication resource.
9
9
  class AuthenticationUpdateResponse
10
- # The authentication UUID.
10
+ # Universally unique identifier (UUID) of an authentication resource.
11
11
  attr_accessor :authentication_id
12
12
 
13
- # An human readable name describing the object.
13
+ # Descriptive name for the resource.
14
14
  attr_accessor :name
15
15
 
16
- # Date of last update (RFC3339 format).
16
+ # Date of last update in RFC3339 format.
17
17
  attr_accessor :updated_at
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,10 +6,10 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class BigCommerceChannel
9
- # The ID of the bigcommerce channel.
9
+ # ID of the BigCommerce channel.
10
10
  attr_accessor :id
11
11
 
12
- # An array of currencies for the given channel `ID`, a currency is a trigram string that represents the currency code.
12
+ # Currencies for the given channel.
13
13
  attr_accessor :currencies
14
14
 
15
15
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,10 +6,10 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class BigCommerceMetafield
9
- # The namespace of the metafield.
9
+ # Namespace of the metafield.
10
10
  attr_accessor :namespace
11
11
 
12
- # The key identifier of the metafield.
12
+ # Key identifier of the metafield.
13
13
  attr_accessor :key
14
14
 
15
15
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,7 +5,7 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Custom fields from Commercetools to index in the records (see https://docs.commercetools.com/tutorials/custom-types).
8
+ # Custom fields from commercetools to add to the records. For more information, see [Using Custom Types and Custom Fields](https://docs.commercetools.com/tutorials/custom-types).
9
9
  class CommercetoolsCustomFields
10
10
  # Inventory custom fields.
11
11
  attr_accessor :inventory
@@ -6,7 +6,7 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class DeleteResponse
9
- # Date of deletion (RFC3339 format).
9
+ # Date of deletion in RFC3339 format.
10
10
  attr_accessor :deleted_at
11
11
 
12
12
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,25 +5,25 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # A destination describe how the data is indexed on the Algolia side.
8
+ # Destinations are Algolia resources like indices or event streams.
9
9
  class Destination
10
- # The destination UUID.
10
+ # Universally unique identifier (UUID) of a destination resource.
11
11
  attr_accessor :destination_id
12
12
 
13
13
  attr_accessor :type
14
14
 
15
- # An human readable name describing the object.
15
+ # Descriptive name for the resource.
16
16
  attr_accessor :name
17
17
 
18
18
  attr_accessor :input
19
19
 
20
- # Date of creation (RFC3339 format).
20
+ # Date of creation in RFC3339 format.
21
21
  attr_accessor :created_at
22
22
 
23
- # Date of last update (RFC3339 format).
23
+ # Date of last update in RFC3339 format.
24
24
  attr_accessor :updated_at
25
25
 
26
- # The authentication UUID.
26
+ # Universally unique identifier (UUID) of an authentication resource.
27
27
  attr_accessor :authentication_id
28
28
 
29
29
  class EnumAttributeValidator
@@ -5,16 +5,16 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The payload when creating a destination.
8
+ # API request body for creating a new destination.
9
9
  class DestinationCreate
10
10
  attr_accessor :type
11
11
 
12
- # An human readable name describing the object.
12
+ # Descriptive name for the resource.
13
13
  attr_accessor :name
14
14
 
15
15
  attr_accessor :input
16
16
 
17
- # The authentication UUID.
17
+ # Universally unique identifier (UUID) of an authentication resource.
18
18
  attr_accessor :authentication_id
19
19
 
20
20
  class EnumAttributeValidator
@@ -5,15 +5,15 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Response from the API when the Destination is successfully created.
8
+ # API response for creating a new destination.
9
9
  class DestinationCreateResponse
10
- # The destination UUID.
10
+ # Universally unique identifier (UUID) of a destination resource.
11
11
  attr_accessor :destination_id
12
12
 
13
- # An human readable name describing the object.
13
+ # Descriptive name for the resource.
14
14
  attr_accessor :name
15
15
 
16
- # Date of creation (RFC3339 format).
16
+ # Date of creation in RFC3339 format.
17
17
  attr_accessor :created_at
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,12 +6,12 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class DestinationIndexName
9
- # The index name to store data in.
9
+ # Algolia index name.
10
10
  attr_accessor :index_name
11
11
 
12
12
  attr_accessor :record_type
13
13
 
14
- # Determines the attributes to exclude from an Algolia record. To remove nested element, you can separate the path to the element with dots (`.`): - \"foo.bar\": will remove `bar` from `foo`. To remove elements from an array, you can use the following: - \"foo.[0].bar\": will only remove `bar` from the first element of `foo`. - \"foo.[*].bar\": will remove `bar` from every elements of `foo`.
14
+ # Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array.
15
15
  attr_accessor :attributes_to_exclude
16
16
 
17
17
  class EnumAttributeValidator
@@ -6,7 +6,7 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class DestinationIndexPrefix
9
- # The prefix of the final index name.
9
+ # String added to the beginning of all indices created by this destination.
10
10
  attr_accessor :index_prefix
11
11
 
12
12
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,7 +5,7 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Payload to search for multiple destinations, based on the given `destinationIDs`.
8
+ # API request body for searching destinations.
9
9
  class DestinationSearch
10
10
  attr_accessor :destination_ids
11
11
 
@@ -8,10 +8,9 @@ module Algolia
8
8
  class DestinationType
9
9
  SEARCH = "search".freeze
10
10
  INSIGHTS = "insights".freeze
11
- FLOW = "flow".freeze
12
11
 
13
12
  def self.all_vars
14
- @all_vars ||= [SEARCH, INSIGHTS, FLOW].freeze
13
+ @all_vars ||= [SEARCH, INSIGHTS].freeze
15
14
  end
16
15
 
17
16
  # Builds the enum from string
@@ -5,16 +5,16 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Payload to partially update a Destination.
8
+ # API request body for updating a destination.
9
9
  class DestinationUpdate
10
10
  attr_accessor :type
11
11
 
12
- # An human readable name describing the object.
12
+ # Descriptive name for the resource.
13
13
  attr_accessor :name
14
14
 
15
15
  attr_accessor :input
16
16
 
17
- # The authentication UUID.
17
+ # Universally unique identifier (UUID) of an authentication resource.
18
18
  attr_accessor :authentication_id
19
19
 
20
20
  class EnumAttributeValidator
@@ -5,15 +5,15 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Response from the API when the Destination is successfully updated.
8
+ # API response for updating a destination.
9
9
  class DestinationUpdateResponse
10
- # The destination UUID.
10
+ # Universally unique identifier (UUID) of a destination resource.
11
11
  attr_accessor :destination_id
12
12
 
13
- # An human readable name describing the object.
13
+ # Descriptive name for the resource.
14
14
  attr_accessor :name
15
15
 
16
- # Date of last update (RFC3339 format).
16
+ # Date of last update in RFC3339 format.
17
17
  attr_accessor :updated_at
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -6,10 +6,10 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class DockerSourceDiscover
9
- # The run UUID.
9
+ # Universally unique identifier (UUID) of a task run.
10
10
  attr_accessor :run_id
11
11
 
12
- # Date of creation (RFC3339 format).
12
+ # Date of creation in RFC3339 format.
13
13
  attr_accessor :created_at
14
14
 
15
15
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -7,10 +7,10 @@ module Algolia
7
7
  module Ingestion
8
8
  # An event describe a step of the task execution flow..
9
9
  class Event
10
- # The event UUID.
10
+ # Universally unique identifier (UUID) of an event.
11
11
  attr_accessor :event_id
12
12
 
13
- # The run UUID.
13
+ # Universally unique identifier (UUID) of a task run.
14
14
  attr_accessor :run_id
15
15
 
16
16
  # The parent event, the cause of this event.
@@ -25,7 +25,7 @@ module Algolia
25
25
 
26
26
  attr_accessor :data
27
27
 
28
- # Date of publish (RFC3339 format).
28
+ # Date of publish RFC3339 format.
29
29
  attr_accessor :published_at
30
30
 
31
31
  class EnumAttributeValidator
@@ -5,7 +5,7 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # A list of tasks with pagination details.
8
+ # Configured tasks and pagination information.
9
9
  class ListTasksResponse
10
10
  attr_accessor :tasks
11
11
 
@@ -0,0 +1,32 @@
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 Ingestion
8
+ class MappingFormatSchema
9
+ MAPPINGKIT_V1 = "mappingkit/v1".freeze
10
+
11
+ def self.all_vars
12
+ @all_vars ||= [MAPPINGKIT_V1].freeze
13
+ end
14
+
15
+ # Builds the enum from string
16
+ # @param [String] The enum value in the form of the string
17
+ # @return [String] The enum value
18
+ def self.build_from_hash(value)
19
+ new.build_from_hash(value)
20
+ end
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def build_from_hash(value)
26
+ return value if MappingFormatSchema.all_vars.include?(value)
27
+
28
+ raise "Invalid ENUM value #{value} for class #MappingFormatSchema"
29
+ end
30
+ end
31
+ end
32
+ end
@@ -5,13 +5,34 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # Transformations to apply to source, serialized as a JSON string.
8
+ # Transformations to apply to the source, serialized as a JSON string.
9
9
  class MappingInput
10
- # Name of the mapping format schema, `mappingkit/v1` is currently the only supported format.
11
10
  attr_accessor :format
12
11
 
13
12
  attr_accessor :actions
14
13
 
14
+ class EnumAttributeValidator
15
+ attr_reader :datatype
16
+ attr_reader :allowable_values
17
+
18
+ def initialize(datatype, allowable_values)
19
+ @allowable_values = allowable_values.map do |value|
20
+ case datatype.to_s
21
+ when /Integer/i
22
+ value.to_i
23
+ when /Float/i
24
+ value.to_f
25
+ else
26
+ value
27
+ end
28
+ end
29
+ end
30
+
31
+ def valid?(value)
32
+ !value || allowable_values.include?(value)
33
+ end
34
+ end
35
+
15
36
  # Attribute mapping from ruby-style variable name to JSON key.
16
37
  def self.attribute_map
17
38
  {
@@ -28,7 +49,7 @@ module Algolia
28
49
  # Attribute type mapping.
29
50
  def self.types_mapping
30
51
  {
31
- :format => :String,
52
+ :format => :MappingFormatSchema,
32
53
  :actions => :'Array<MappingKitAction>'
33
54
  }
34
55
  end
@@ -5,12 +5,12 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The input for an `onDemand` task whose source is of type `bigquery` and for which extracted data spans a given time range.
8
+ # Input for a manually-triggered task whose source is of type `bigquery` and for which extracted data spans a given time range.
9
9
  class OnDemandDateUtilsInput
10
- # The start date of the extraction (RFC3339 format).
10
+ # Earliest date in RFC3339 format of the extracted data from Big Query.
11
11
  attr_accessor :start_date
12
12
 
13
- # The end date of the extraction (RFC3339 format).
13
+ # Latest date in RFC3339 format of the extracted data from Big Query.
14
14
  attr_accessor :end_date
15
15
 
16
16
  attr_accessor :mapping
@@ -5,11 +5,11 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The trigger information of a task of type `onDemand`.
8
+ # Trigger information for manually-triggered tasks.
9
9
  class OnDemandTrigger
10
10
  attr_accessor :type
11
11
 
12
- # The last time the scheduled task ran (RFC3339 format).
12
+ # The last time the scheduled task ran in RFC3339 format.
13
13
  attr_accessor :last_run
14
14
 
15
15
  class EnumAttributeValidator
@@ -5,7 +5,7 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The trigger information of a task of type `onDemand`.
8
+ # Trigger information for manually-triggered tasks.
9
9
  class OnDemandTriggerInput
10
10
  attr_accessor :type
11
11
 
@@ -5,13 +5,18 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
+ # Paginated API response.
8
9
  class Pagination
10
+ # Number of pages in the API response.
9
11
  attr_accessor :nb_pages
10
12
 
13
+ # Page of the API response to retrieve.
11
14
  attr_accessor :page
12
15
 
16
+ # Number of items in the API response.
13
17
  attr_accessor :nb_items
14
18
 
19
+ # Number of items per page.
15
20
  attr_accessor :items_per_page
16
21
 
17
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -86,6 +91,66 @@ module Algolia
86
91
  end
87
92
  end
88
93
 
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] nb_pages Value to be assigned
96
+ def nb_pages=(nb_pages)
97
+ if nb_pages.nil?
98
+ raise ArgumentError, 'nb_pages cannot be nil'
99
+ end
100
+
101
+ if nb_pages < 1
102
+ raise ArgumentError, 'invalid value for "nb_pages", must be greater than or equal to 1.'
103
+ end
104
+
105
+ @nb_pages = nb_pages
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] page Value to be assigned
110
+ def page=(page)
111
+ if page.nil?
112
+ raise ArgumentError, 'page cannot be nil'
113
+ end
114
+
115
+ if page < 1
116
+ raise ArgumentError, 'invalid value for "page", must be greater than or equal to 1.'
117
+ end
118
+
119
+ @page = page
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param [Object] nb_items Value to be assigned
124
+ def nb_items=(nb_items)
125
+ if nb_items.nil?
126
+ raise ArgumentError, 'nb_items cannot be nil'
127
+ end
128
+
129
+ if nb_items < 0
130
+ raise ArgumentError, 'invalid value for "nb_items", must be greater than or equal to 0.'
131
+ end
132
+
133
+ @nb_items = nb_items
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] items_per_page Value to be assigned
138
+ def items_per_page=(items_per_page)
139
+ if items_per_page.nil?
140
+ raise ArgumentError, 'items_per_page cannot be nil'
141
+ end
142
+
143
+ if items_per_page > 100
144
+ raise ArgumentError, 'invalid value for "items_per_page", must be smaller than or equal to 100.'
145
+ end
146
+
147
+ if items_per_page < 1
148
+ raise ArgumentError, 'invalid value for "items_per_page", must be greater than or equal to 1.'
149
+ end
150
+
151
+ @items_per_page = items_per_page
152
+ end
153
+
89
154
  # Checks equality by comparing each attribute.
90
155
  # @param [Object] Object to be compared
91
156
  def ==(other)
@@ -8,9 +8,10 @@ module Algolia
8
8
  class Platform
9
9
  BIGCOMMERCE = "bigcommerce".freeze
10
10
  COMMERCETOOLS = "commercetools".freeze
11
+ SHOPIFY = "shopify".freeze
11
12
 
12
13
  def self.all_vars
13
- @all_vars ||= [BIGCOMMERCE, COMMERCETOOLS].freeze
14
+ @all_vars ||= [BIGCOMMERCE, COMMERCETOOLS, SHOPIFY].freeze
14
15
  end
15
16
 
16
17
  # Builds the enum from string
@@ -6,12 +6,12 @@ require 'time'
6
6
  module Algolia
7
7
  module Ingestion
8
8
  class Run
9
- # The run UUID.
9
+ # Universally unique identifier (UUID) of a task run.
10
10
  attr_accessor :run_id
11
11
 
12
12
  attr_accessor :app_id
13
13
 
14
- # The task UUID.
14
+ # Universally unique identifier (UUID) of a task.
15
15
  attr_accessor :task_id
16
16
 
17
17
  attr_accessor :status
@@ -20,23 +20,23 @@ module Algolia
20
20
 
21
21
  attr_accessor :outcome
22
22
 
23
- # A percentage representing the accepted failure threshold to determine if a `run` succeeded or not.
23
+ # Maximum accepted percentage of failures for a task run to finish successfully.
24
24
  attr_accessor :failure_threshold
25
25
 
26
- # Explains the result of outcome.
26
+ # More information about the task run's outcome.
27
27
  attr_accessor :reason
28
28
 
29
29
  attr_accessor :reason_code
30
30
 
31
31
  attr_accessor :type
32
32
 
33
- # Date of creation (RFC3339 format).
33
+ # Date of creation in RFC3339 format.
34
34
  attr_accessor :created_at
35
35
 
36
- # Date of start (RFC3339 format).
36
+ # Date of start in RFC3339 format.
37
37
  attr_accessor :started_at
38
38
 
39
- # Date of finish (RFC3339 format).
39
+ # Date of finish in RFC3339 format.
40
40
  attr_accessor :finished_at
41
41
 
42
42
  class EnumAttributeValidator
@@ -5,12 +5,12 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The response from the run task API, containing an Observability Run ID and the time it was created at.
8
+ # API response for running a task.
9
9
  class RunResponse
10
- # The run UUID.
10
+ # Universally unique identifier (UUID) of a task run.
11
11
  attr_accessor :run_id
12
12
 
13
- # Date of creation (RFC3339 format).
13
+ # Date of creation in RFC3339 format.
14
14
  attr_accessor :created_at
15
15
 
16
16
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,9 +5,9 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The input for a `schedule` task whose source is of type `bigquery` and for which extracted data spans a fixed number of days.
8
+ # Input for scheduled tasks whose source is of type `bigquery` and for which extracted data spans a fixed number of days.
9
9
  class ScheduleDateUtilsInput
10
- # The timeframe of the extraction, in number of days from today.
10
+ # Number of days in the past until the current day for which to extract Big Query data.
11
11
  attr_accessor :timeframe
12
12
 
13
13
  attr_accessor :mapping
@@ -5,17 +5,17 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The trigger information for a task of type 'schedule'.
8
+ # Trigger information for scheduled tasks.
9
9
  class ScheduleTrigger
10
10
  attr_accessor :type
11
11
 
12
- # A cron expression that represent at which regularity the task should run.
12
+ # Cron expression for the task's schedule.
13
13
  attr_accessor :cron
14
14
 
15
- # The last time the scheduled task ran (RFC3339 format).
15
+ # The last time the scheduled task ran in RFC3339 format.
16
16
  attr_accessor :last_run
17
17
 
18
- # The next scheduled run of the task (RFC3339 format).
18
+ # The next scheduled run of the task in RFC3339 format.
19
19
  attr_accessor :next_run
20
20
 
21
21
  class EnumAttributeValidator
@@ -5,11 +5,11 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Ingestion
8
- # The trigger input for a task of type 'schedule'.
8
+ # Trigger input for scheduled tasks.
9
9
  class ScheduleTriggerInput
10
10
  attr_accessor :type
11
11
 
12
- # A cron expression that represent at which regularity the task should run.
12
+ # Cron expression for the task's schedule.
13
13
  attr_accessor :cron
14
14
 
15
15
  class EnumAttributeValidator