algolia 3.0.0.alpha.12 → 3.0.0.alpha.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +1 -0
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile.lock +4 -4
  5. data/lib/algolia/api/abtesting_client.rb +8 -4
  6. data/lib/algolia/api/analytics_client.rb +146 -282
  7. data/lib/algolia/api/ingestion_client.rb +4 -4
  8. data/lib/algolia/api/insights_client.rb +7 -7
  9. data/lib/algolia/api/recommend_client.rb +12 -12
  10. data/lib/algolia/api/search_client.rb +242 -242
  11. data/lib/algolia/models/abtesting/ab_test_response.rb +1 -1
  12. data/lib/algolia/models/analytics/search_no_result_event.rb +1 -1
  13. data/lib/algolia/models/analytics/top_search.rb +1 -1
  14. data/lib/algolia/models/analytics/top_search_with_analytics.rb +1 -1
  15. data/lib/algolia/models/ingestion/action_type.rb +2 -1
  16. data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +223 -0
  17. data/lib/algolia/models/ingestion/source_input.rb +1 -0
  18. data/lib/algolia/models/ingestion/source_type.rb +2 -1
  19. data/lib/algolia/models/ingestion/source_update_input.rb +1 -0
  20. data/lib/algolia/models/ingestion/streaming_trigger.rb +221 -0
  21. data/lib/algolia/models/ingestion/streaming_trigger_type.rb +32 -0
  22. data/lib/algolia/models/ingestion/streaming_utils_input.rb +199 -0
  23. data/lib/algolia/models/ingestion/task_create_trigger.rb +1 -0
  24. data/lib/algolia/models/ingestion/task_input.rb +2 -1
  25. data/lib/algolia/models/ingestion/trigger.rb +1 -0
  26. data/lib/algolia/models/ingestion/trigger_type.rb +2 -1
  27. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +6 -6
  28. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +6 -6
  29. data/lib/algolia/models/insights/clicked_filters.rb +6 -6
  30. data/lib/algolia/models/insights/clicked_object_ids.rb +6 -6
  31. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -7
  32. data/lib/algolia/models/insights/converted_filters.rb +6 -6
  33. data/lib/algolia/models/insights/converted_object_ids.rb +6 -6
  34. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +6 -6
  35. data/lib/algolia/models/insights/discount.rb +1 -1
  36. data/lib/algolia/models/insights/insights_events.rb +1 -1
  37. data/lib/algolia/models/insights/object_data.rb +1 -1
  38. data/lib/algolia/models/insights/object_data_after_search.rb +1 -1
  39. data/lib/algolia/models/insights/price.rb +1 -1
  40. data/lib/algolia/models/insights/purchased_object_ids.rb +6 -6
  41. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +6 -6
  42. data/lib/algolia/models/insights/viewed_filters.rb +6 -6
  43. data/lib/algolia/models/insights/viewed_object_ids.rb +6 -6
  44. data/lib/algolia/models/recommend/around_precision.rb +1 -1
  45. data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +3 -0
  46. data/lib/algolia/models/recommend/around_radius.rb +1 -1
  47. data/lib/algolia/models/recommend/automatic_facet_filter.rb +4 -4
  48. data/lib/algolia/models/recommend/automatic_facet_filters.rb +1 -1
  49. data/lib/algolia/models/recommend/base_recommend_request.rb +1 -1
  50. data/lib/algolia/models/recommend/base_recommendations_query.rb +1 -1
  51. data/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +1 -1
  52. data/lib/algolia/models/recommend/base_search_params.rb +58 -38
  53. data/lib/algolia/models/recommend/base_search_params_without_query.rb +57 -37
  54. data/lib/algolia/models/recommend/base_search_response.rb +20 -6
  55. data/lib/algolia/models/recommend/condition.rb +32 -7
  56. data/lib/algolia/models/recommend/consequence.rb +33 -5
  57. data/lib/algolia/models/recommend/consequence_hide.rb +2 -2
  58. data/lib/algolia/models/recommend/consequence_params.rb +101 -79
  59. data/lib/algolia/models/recommend/consequence_query.rb +1 -1
  60. data/lib/algolia/models/recommend/consequence_query_object.rb +2 -2
  61. data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
  62. data/lib/algolia/models/recommend/distinct.rb +1 -1
  63. data/lib/algolia/models/recommend/edit.rb +1 -1
  64. data/lib/algolia/models/recommend/facet_filters.rb +1 -1
  65. data/lib/algolia/models/recommend/facet_ordering.rb +2 -2
  66. data/lib/algolia/models/recommend/facets.rb +2 -2
  67. data/lib/algolia/models/recommend/highlight_result_option.rb +3 -3
  68. data/lib/algolia/models/recommend/ignore_plurals.rb +1 -1
  69. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +46 -44
  70. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  71. data/lib/algolia/models/recommend/optional_filters.rb +1 -1
  72. data/lib/algolia/models/recommend/params.rb +1 -1
  73. data/lib/algolia/models/recommend/promote_object_id.rb +2 -2
  74. data/lib/algolia/models/recommend/promote_object_ids.rb +16 -2
  75. data/lib/algolia/models/recommend/ranking_info.rb +120 -7
  76. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  77. data/lib/algolia/models/recommend/recommend_hit.rb +3 -3
  78. data/lib/algolia/models/recommend/recommendations_hits.rb +1 -1
  79. data/lib/algolia/models/recommend/recommendations_query.rb +2 -2
  80. data/lib/algolia/models/recommend/recommendations_results.rb +21 -7
  81. data/lib/algolia/models/recommend/recommended_for_you_query.rb +1 -1
  82. data/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +102 -80
  83. data/lib/algolia/models/recommend/remove_stop_words.rb +1 -1
  84. data/lib/algolia/models/recommend/rendering_content.rb +1 -1
  85. data/lib/algolia/models/recommend/search_params_object.rb +102 -80
  86. data/lib/algolia/models/recommend/search_params_query.rb +1 -1
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -2
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +17 -3
  89. data/lib/algolia/models/recommend/semantic_search.rb +2 -2
  90. data/lib/algolia/models/recommend/snippet_result_option.rb +2 -2
  91. data/lib/algolia/models/recommend/tag_filters.rb +1 -1
  92. data/lib/algolia/models/recommend/trending_facets_query.rb +1 -1
  93. data/lib/algolia/models/recommend/trending_items_query.rb +1 -1
  94. data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
  95. data/lib/algolia/models/recommend/value.rb +1 -1
  96. data/lib/algolia/models/search/add_api_key_response.rb +1 -1
  97. data/lib/algolia/models/search/api_key.rb +8 -8
  98. data/lib/algolia/models/search/around_precision.rb +1 -1
  99. data/lib/algolia/models/search/around_precision_from_value_inner.rb +3 -0
  100. data/lib/algolia/models/search/around_radius.rb +1 -1
  101. data/lib/algolia/models/search/automatic_facet_filter.rb +4 -4
  102. data/lib/algolia/models/search/automatic_facet_filters.rb +1 -1
  103. data/lib/algolia/models/search/base_index_settings.rb +44 -18
  104. data/lib/algolia/models/search/base_search_params.rb +58 -38
  105. data/lib/algolia/models/search/base_search_params_without_query.rb +57 -37
  106. data/lib/algolia/models/search/base_search_response.rb +20 -6
  107. data/lib/algolia/models/search/batch_dictionary_entries_params.rb +3 -3
  108. data/lib/algolia/models/search/batch_response.rb +2 -2
  109. data/lib/algolia/models/search/browse_params_object.rb +103 -81
  110. data/lib/algolia/models/search/browse_response.rb +23 -8
  111. data/lib/algolia/models/search/built_in_operation.rb +2 -2
  112. data/lib/algolia/models/search/condition.rb +32 -7
  113. data/lib/algolia/models/search/consequence.rb +33 -5
  114. data/lib/algolia/models/search/consequence_hide.rb +2 -2
  115. data/lib/algolia/models/search/consequence_params.rb +101 -79
  116. data/lib/algolia/models/search/consequence_query.rb +1 -1
  117. data/lib/algolia/models/search/consequence_query_object.rb +2 -2
  118. data/lib/algolia/models/search/created_at_response.rb +1 -1
  119. data/lib/algolia/models/search/cursor.rb +1 -1
  120. data/lib/algolia/models/search/delete_by_params.rb +4 -4
  121. data/lib/algolia/models/search/deleted_at_response.rb +1 -1
  122. data/lib/algolia/models/search/dictionary_entry.rb +5 -5
  123. data/lib/algolia/models/search/dictionary_language.rb +2 -2
  124. data/lib/algolia/models/search/dictionary_settings_params.rb +1 -1
  125. data/lib/algolia/models/search/distinct.rb +1 -1
  126. data/lib/algolia/models/search/edit.rb +1 -1
  127. data/lib/algolia/models/search/facet_filters.rb +1 -1
  128. data/lib/algolia/models/search/facet_hits.rb +2 -2
  129. data/lib/algolia/models/search/facet_ordering.rb +2 -2
  130. data/lib/algolia/models/search/facets.rb +2 -2
  131. data/lib/algolia/models/search/get_api_key_response.rb +8 -8
  132. data/lib/algolia/models/search/get_objects_request.rb +3 -3
  133. data/lib/algolia/models/search/get_objects_response.rb +1 -1
  134. data/lib/algolia/models/search/has_pending_mappings_response.rb +1 -1
  135. data/lib/algolia/models/search/highlight_result_option.rb +3 -3
  136. data/lib/algolia/models/search/hit.rb +4 -4
  137. data/lib/algolia/models/search/ignore_plurals.rb +1 -1
  138. data/lib/algolia/models/search/index_settings.rb +89 -61
  139. data/lib/algolia/models/search/index_settings_as_search_params.rb +46 -44
  140. data/lib/algolia/models/search/log.rb +39 -11
  141. data/lib/algolia/models/search/log_query.rb +1 -1
  142. data/lib/algolia/models/search/multiple_batch_response.rb +2 -2
  143. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  144. data/lib/algolia/models/search/operation_index_params.rb +2 -2
  145. data/lib/algolia/models/search/optional_filters.rb +1 -1
  146. data/lib/algolia/models/search/params.rb +1 -1
  147. data/lib/algolia/models/search/promote_object_id.rb +2 -2
  148. data/lib/algolia/models/search/promote_object_ids.rb +16 -2
  149. data/lib/algolia/models/search/ranking_info.rb +120 -7
  150. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  151. data/lib/algolia/models/search/remove_stop_words.rb +1 -1
  152. data/lib/algolia/models/search/rendering_content.rb +1 -1
  153. data/lib/algolia/models/search/rule.rb +23 -5
  154. data/lib/algolia/models/search/save_object_response.rb +3 -3
  155. data/lib/algolia/models/search/save_synonym_response.rb +1 -1
  156. data/lib/algolia/models/search/search_dictionary_entries_params.rb +18 -4
  157. data/lib/algolia/models/search/search_dictionary_entries_response.rb +251 -0
  158. data/lib/algolia/models/search/search_for_facet_values_request.rb +1 -1
  159. data/lib/algolia/models/search/search_for_facet_values_response.rb +1 -0
  160. data/lib/algolia/models/search/search_for_facets.rb +103 -81
  161. data/lib/algolia/models/search/search_for_facets_options.rb +2 -2
  162. data/lib/algolia/models/search/search_for_hits.rb +103 -81
  163. data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
  164. data/lib/algolia/models/search/search_hits.rb +2 -1
  165. data/lib/algolia/models/search/search_params_object.rb +102 -80
  166. data/lib/algolia/models/search/search_params_query.rb +1 -1
  167. data/lib/algolia/models/search/search_response.rb +22 -7
  168. data/lib/algolia/models/search/search_rules_params.rb +8 -20
  169. data/lib/algolia/models/search/search_rules_response.rb +2 -2
  170. data/lib/algolia/models/search/search_synonyms_params.rb +16 -2
  171. data/lib/algolia/models/search/search_synonyms_response.rb +2 -2
  172. data/lib/algolia/models/search/search_user_ids_params.rb +15 -1
  173. data/lib/algolia/models/search/search_user_ids_response.rb +16 -2
  174. data/lib/algolia/models/search/secured_api_key_restrictions.rb +5 -5
  175. data/lib/algolia/models/search/semantic_search.rb +2 -2
  176. data/lib/algolia/models/search/snippet_result_option.rb +2 -2
  177. data/lib/algolia/models/search/tag_filters.rb +1 -1
  178. data/lib/algolia/models/search/time_range.rb +2 -2
  179. data/lib/algolia/models/search/typo_tolerance.rb +1 -1
  180. data/lib/algolia/models/search/updated_at_response.rb +1 -1
  181. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +2 -2
  182. data/lib/algolia/models/search/updated_rule_response.rb +2 -2
  183. data/lib/algolia/models/search/user_hit.rb +1 -1
  184. data/lib/algolia/models/search/user_id.rb +1 -1
  185. data/lib/algolia/models/search/value.rb +1 -1
  186. data/lib/algolia/version.rb +1 -1
  187. metadata +7 -2
@@ -214,9 +214,9 @@ module Algolia
214
214
  #
215
215
  # Required API Key ACLs:
216
216
  # - analytics
217
- # @param index [String] Index name to target. (required)
218
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
219
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
217
+ # @param index [String] Index name. (required)
218
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
219
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
220
220
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
221
221
  # @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)
222
222
  # @return [Http::Response] the response
@@ -226,16 +226,6 @@ module Algolia
226
226
  raise ArgumentError, "Parameter `index` is required when calling `get_average_click_position`."
227
227
  end
228
228
 
229
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
230
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
231
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_average_click_position, must conform to the pattern #{pattern}."
232
- end
233
-
234
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
235
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
236
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_average_click_position, must conform to the pattern #{pattern}."
237
- end
238
-
239
229
  path = '/2/clicks/averageClickPosition'
240
230
  query_params = {}
241
231
  query_params[:index] = index
@@ -263,9 +253,9 @@ module Algolia
263
253
  #
264
254
  # Required API Key ACLs:
265
255
  # - analytics
266
- # @param index [String] Index name to target. (required)
267
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
268
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
256
+ # @param index [String] Index name. (required)
257
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
258
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
269
259
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
270
260
  # @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)
271
261
  # @return [GetAverageClickPositionResponse]
@@ -278,9 +268,9 @@ module Algolia
278
268
  #
279
269
  # Required API Key ACLs:
280
270
  # - analytics
281
- # @param index [String] Index name to target. (required)
282
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
283
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
271
+ # @param index [String] Index name. (required)
272
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
273
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
284
274
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
285
275
  # @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)
286
276
  # @return [Http::Response] the response
@@ -290,16 +280,6 @@ module Algolia
290
280
  raise ArgumentError, "Parameter `index` is required when calling `get_click_positions`."
291
281
  end
292
282
 
293
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
294
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
295
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_click_positions, must conform to the pattern #{pattern}."
296
- end
297
-
298
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
299
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
300
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_click_positions, must conform to the pattern #{pattern}."
301
- end
302
-
303
283
  path = '/2/clicks/positions'
304
284
  query_params = {}
305
285
  query_params[:index] = index
@@ -327,9 +307,9 @@ module Algolia
327
307
  #
328
308
  # Required API Key ACLs:
329
309
  # - analytics
330
- # @param index [String] Index name to target. (required)
331
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
332
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
310
+ # @param index [String] Index name. (required)
311
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
312
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
333
313
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
334
314
  # @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)
335
315
  # @return [GetClickPositionsResponse]
@@ -342,9 +322,9 @@ module Algolia
342
322
  #
343
323
  # Required API Key ACLs:
344
324
  # - analytics
345
- # @param index [String] Index name to target. (required)
346
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
347
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
325
+ # @param index [String] Index name. (required)
326
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
327
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
348
328
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
349
329
  # @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)
350
330
  # @return [Http::Response] the response
@@ -354,16 +334,6 @@ module Algolia
354
334
  raise ArgumentError, "Parameter `index` is required when calling `get_click_through_rate`."
355
335
  end
356
336
 
357
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
358
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
359
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_click_through_rate, must conform to the pattern #{pattern}."
360
- end
361
-
362
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
363
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
364
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_click_through_rate, must conform to the pattern #{pattern}."
365
- end
366
-
367
337
  path = '/2/clicks/clickThroughRate'
368
338
  query_params = {}
369
339
  query_params[:index] = index
@@ -391,9 +361,9 @@ module Algolia
391
361
  #
392
362
  # Required API Key ACLs:
393
363
  # - analytics
394
- # @param index [String] Index name to target. (required)
395
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
396
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
364
+ # @param index [String] Index name. (required)
365
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
366
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
397
367
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
398
368
  # @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)
399
369
  # @return [GetClickThroughRateResponse]
@@ -406,9 +376,9 @@ module Algolia
406
376
  #
407
377
  # Required API Key ACLs:
408
378
  # - analytics
409
- # @param index [String] Index name to target. (required)
410
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
411
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
379
+ # @param index [String] Index name. (required)
380
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
381
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
412
382
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
413
383
  # @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)
414
384
  # @return [Http::Response] the response
@@ -418,16 +388,6 @@ module Algolia
418
388
  raise ArgumentError, "Parameter `index` is required when calling `get_conversation_rate`."
419
389
  end
420
390
 
421
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
422
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
423
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_conversation_rate, must conform to the pattern #{pattern}."
424
- end
425
-
426
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
427
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
428
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_conversation_rate, must conform to the pattern #{pattern}."
429
- end
430
-
431
391
  path = '/2/conversions/conversionRate'
432
392
  query_params = {}
433
393
  query_params[:index] = index
@@ -455,9 +415,9 @@ module Algolia
455
415
  #
456
416
  # Required API Key ACLs:
457
417
  # - analytics
458
- # @param index [String] Index name to target. (required)
459
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
460
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
418
+ # @param index [String] Index name. (required)
419
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
420
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
461
421
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
462
422
  # @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)
463
423
  # @return [GetConversationRateResponse]
@@ -470,9 +430,9 @@ module Algolia
470
430
  #
471
431
  # Required API Key ACLs:
472
432
  # - analytics
473
- # @param index [String] Index name to target. (required)
474
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
475
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
433
+ # @param index [String] Index name. (required)
434
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
435
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
476
436
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
477
437
  # @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)
478
438
  # @return [Http::Response] the response
@@ -482,16 +442,6 @@ module Algolia
482
442
  raise ArgumentError, "Parameter `index` is required when calling `get_no_click_rate`."
483
443
  end
484
444
 
485
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
486
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
487
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_no_click_rate, must conform to the pattern #{pattern}."
488
- end
489
-
490
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
491
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
492
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_no_click_rate, must conform to the pattern #{pattern}."
493
- end
494
-
495
445
  path = '/2/searches/noClickRate'
496
446
  query_params = {}
497
447
  query_params[:index] = index
@@ -519,9 +469,9 @@ module Algolia
519
469
  #
520
470
  # Required API Key ACLs:
521
471
  # - analytics
522
- # @param index [String] Index name to target. (required)
523
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
524
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
472
+ # @param index [String] Index name. (required)
473
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
474
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
525
475
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
526
476
  # @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)
527
477
  # @return [GetNoClickRateResponse]
@@ -534,9 +484,9 @@ module Algolia
534
484
  #
535
485
  # Required API Key ACLs:
536
486
  # - analytics
537
- # @param index [String] Index name to target. (required)
538
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
539
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
487
+ # @param index [String] Index name. (required)
488
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
489
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
540
490
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
541
491
  # @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)
542
492
  # @return [Http::Response] the response
@@ -546,16 +496,6 @@ module Algolia
546
496
  raise ArgumentError, "Parameter `index` is required when calling `get_no_results_rate`."
547
497
  end
548
498
 
549
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
550
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
551
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_no_results_rate, must conform to the pattern #{pattern}."
552
- end
553
-
554
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
555
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
556
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_no_results_rate, must conform to the pattern #{pattern}."
557
- end
558
-
559
499
  path = '/2/searches/noResultRate'
560
500
  query_params = {}
561
501
  query_params[:index] = index
@@ -583,9 +523,9 @@ module Algolia
583
523
  #
584
524
  # Required API Key ACLs:
585
525
  # - analytics
586
- # @param index [String] Index name to target. (required)
587
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
588
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
526
+ # @param index [String] Index name. (required)
527
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
528
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
589
529
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
590
530
  # @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)
591
531
  # @return [GetNoResultsRateResponse]
@@ -598,9 +538,9 @@ module Algolia
598
538
  #
599
539
  # Required API Key ACLs:
600
540
  # - analytics
601
- # @param index [String] Index name to target. (required)
602
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
603
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
541
+ # @param index [String] Index name. (required)
542
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
543
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
604
544
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
605
545
  # @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)
606
546
  # @return [Http::Response] the response
@@ -610,16 +550,6 @@ module Algolia
610
550
  raise ArgumentError, "Parameter `index` is required when calling `get_searches_count`."
611
551
  end
612
552
 
613
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
614
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
615
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_count, must conform to the pattern #{pattern}."
616
- end
617
-
618
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
619
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
620
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_count, must conform to the pattern #{pattern}."
621
- end
622
-
623
553
  path = '/2/searches/count'
624
554
  query_params = {}
625
555
  query_params[:index] = index
@@ -647,9 +577,9 @@ module Algolia
647
577
  #
648
578
  # Required API Key ACLs:
649
579
  # - analytics
650
- # @param index [String] Index name to target. (required)
651
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
652
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
580
+ # @param index [String] Index name. (required)
581
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
582
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
653
583
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
654
584
  # @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)
655
585
  # @return [GetSearchesCountResponse]
@@ -662,11 +592,11 @@ module Algolia
662
592
  #
663
593
  # Required API Key ACLs:
664
594
  # - analytics
665
- # @param index [String] Index name to target. (required)
666
- # @param start_date [String] Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
667
- # @param end_date [String] End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
668
- # @param limit [Integer] Number of records to return (page size). (default to 10)
669
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
595
+ # @param index [String] Index name. (required)
596
+ # @param start_date [String] Start date (`YYYY-MM-DD`) of the period to analyze.
597
+ # @param end_date [String] End date (`YYYY-MM-DD`) of the period to analyze.
598
+ # @param limit [Integer] Number of items to return. (default to 10)
599
+ # @param offset [Integer] Position of the first item to return. (default to 0)
670
600
  # @param tags [String] Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
671
601
  # @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)
672
602
  # @return [Http::Response] the response
@@ -675,15 +605,8 @@ module Algolia
675
605
  if @api_client.config.client_side_validation && index.nil?
676
606
  raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_clicks`."
677
607
  end
678
-
679
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
680
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
681
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_no_clicks, must conform to the pattern #{pattern}."
682
- end
683
-
684
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
685
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
686
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_no_clicks, must conform to the pattern #{pattern}."
608
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
609
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_searches_no_clicks, must be greater than or equal to 0.'
687
610
  end
688
611
 
689
612
  path = '/2/searches/noClicks'
@@ -715,11 +638,11 @@ module Algolia
715
638
  #
716
639
  # Required API Key ACLs:
717
640
  # - analytics
718
- # @param index [String] Index name to target. (required)
719
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
720
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
721
- # @param limit [Integer] Number of records to return (page size). (default to 10)
722
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
641
+ # @param index [String] Index name. (required)
642
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
643
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
644
+ # @param limit [Integer] Number of items to return. (default to 10)
645
+ # @param offset [Integer] Position of the first item to return. (default to 0)
723
646
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
724
647
  # @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)
725
648
  # @return [GetSearchesNoClicksResponse]
@@ -732,11 +655,11 @@ module Algolia
732
655
  #
733
656
  # Required API Key ACLs:
734
657
  # - analytics
735
- # @param index [String] Index name to target. (required)
736
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
737
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
738
- # @param limit [Integer] Number of records to return (page size). (default to 10)
739
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
658
+ # @param index [String] Index name. (required)
659
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
660
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
661
+ # @param limit [Integer] Number of items to return. (default to 10)
662
+ # @param offset [Integer] Position of the first item to return. (default to 0)
740
663
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
741
664
  # @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)
742
665
  # @return [Http::Response] the response
@@ -745,15 +668,8 @@ module Algolia
745
668
  if @api_client.config.client_side_validation && index.nil?
746
669
  raise ArgumentError, "Parameter `index` is required when calling `get_searches_no_results`."
747
670
  end
748
-
749
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
750
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
751
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_searches_no_results, must conform to the pattern #{pattern}."
752
- end
753
-
754
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
755
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
756
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_searches_no_results, must conform to the pattern #{pattern}."
671
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
672
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_searches_no_results, must be greater than or equal to 0.'
757
673
  end
758
674
 
759
675
  path = '/2/searches/noResults'
@@ -785,11 +701,11 @@ module Algolia
785
701
  #
786
702
  # Required API Key ACLs:
787
703
  # - analytics
788
- # @param index [String] Index name to target. (required)
789
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
790
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
791
- # @param limit [Integer] Number of records to return (page size). (default to 10)
792
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
704
+ # @param index [String] Index name. (required)
705
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
706
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
707
+ # @param limit [Integer] Number of items to return. (default to 10)
708
+ # @param offset [Integer] Position of the first item to return. (default to 0)
793
709
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
794
710
  # @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)
795
711
  # @return [GetSearchesNoResultsResponse]
@@ -802,7 +718,7 @@ module Algolia
802
718
  #
803
719
  # Required API Key ACLs:
804
720
  # - analytics
805
- # @param index [String] Index name to target. (required)
721
+ # @param index [String] Index name. (required)
806
722
  # @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)
807
723
  # @return [Http::Response] the response
808
724
  def get_status_with_http_info(index, request_options = {})
@@ -835,7 +751,7 @@ module Algolia
835
751
  #
836
752
  # Required API Key ACLs:
837
753
  # - analytics
838
- # @param index [String] Index name to target. (required)
754
+ # @param index [String] Index name. (required)
839
755
  # @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)
840
756
  # @return [GetStatusResponse]
841
757
  def get_status(index, request_options = {})
@@ -847,11 +763,11 @@ module Algolia
847
763
  #
848
764
  # Required API Key ACLs:
849
765
  # - analytics
850
- # @param index [String] Index name to target. (required)
851
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
852
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
853
- # @param limit [Integer] Number of records to return (page size). (default to 10)
854
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
766
+ # @param index [String] Index name. (required)
767
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
768
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
769
+ # @param limit [Integer] Number of items to return. (default to 10)
770
+ # @param offset [Integer] Position of the first item to return. (default to 0)
855
771
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
856
772
  # @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)
857
773
  # @return [Http::Response] the response
@@ -860,15 +776,8 @@ module Algolia
860
776
  if @api_client.config.client_side_validation && index.nil?
861
777
  raise ArgumentError, "Parameter `index` is required when calling `get_top_countries`."
862
778
  end
863
-
864
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
865
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
866
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_countries, must conform to the pattern #{pattern}."
867
- end
868
-
869
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
870
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
871
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_countries, must conform to the pattern #{pattern}."
779
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
780
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_countries, must be greater than or equal to 0.'
872
781
  end
873
782
 
874
783
  path = '/2/countries'
@@ -900,11 +809,11 @@ module Algolia
900
809
  #
901
810
  # Required API Key ACLs:
902
811
  # - analytics
903
- # @param index [String] Index name to target. (required)
904
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
905
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
906
- # @param limit [Integer] Number of records to return (page size). (default to 10)
907
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
812
+ # @param index [String] Index name. (required)
813
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
814
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
815
+ # @param limit [Integer] Number of items to return. (default to 10)
816
+ # @param offset [Integer] Position of the first item to return. (default to 0)
908
817
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
909
818
  # @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)
910
819
  # @return [GetTopCountriesResponse]
@@ -917,12 +826,12 @@ module Algolia
917
826
  #
918
827
  # Required API Key ACLs:
919
828
  # - analytics
920
- # @param index [String] Index name to target. (required)
829
+ # @param index [String] Index name. (required)
921
830
  # @param search [String] User query.
922
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
923
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
924
- # @param limit [Integer] Number of records to return (page size). (default to 10)
925
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
831
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
832
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
833
+ # @param limit [Integer] Number of items to return. (default to 10)
834
+ # @param offset [Integer] Position of the first item to return. (default to 0)
926
835
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
927
836
  # @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)
928
837
  # @return [Http::Response] the response
@@ -931,15 +840,8 @@ module Algolia
931
840
  if @api_client.config.client_side_validation && index.nil?
932
841
  raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_attributes`."
933
842
  end
934
-
935
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
936
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
937
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filter_attributes, must conform to the pattern #{pattern}."
938
- end
939
-
940
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
941
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
942
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filter_attributes, must conform to the pattern #{pattern}."
843
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
844
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_filter_attributes, must be greater than or equal to 0.'
943
845
  end
944
846
 
945
847
  path = '/2/filters'
@@ -972,12 +874,12 @@ module Algolia
972
874
  #
973
875
  # Required API Key ACLs:
974
876
  # - analytics
975
- # @param index [String] Index name to target. (required)
877
+ # @param index [String] Index name. (required)
976
878
  # @param search [String] User query.
977
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
978
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
979
- # @param limit [Integer] Number of records to return (page size). (default to 10)
980
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
879
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
880
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
881
+ # @param limit [Integer] Number of items to return. (default to 10)
882
+ # @param offset [Integer] Position of the first item to return. (default to 0)
981
883
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
982
884
  # @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)
983
885
  # @return [GetTopFilterAttributesResponse]
@@ -991,12 +893,12 @@ module Algolia
991
893
  # Required API Key ACLs:
992
894
  # - analytics
993
895
  # @param attribute [String] Attribute name. (required)
994
- # @param index [String] Index name to target. (required)
896
+ # @param index [String] Index name. (required)
995
897
  # @param search [String] User query.
996
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
997
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
998
- # @param limit [Integer] Number of records to return (page size). (default to 10)
999
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
898
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
899
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
900
+ # @param limit [Integer] Number of items to return. (default to 10)
901
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1000
902
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1001
903
  # @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)
1002
904
  # @return [Http::Response] the response
@@ -1009,15 +911,8 @@ module Algolia
1009
911
  if @api_client.config.client_side_validation && index.nil?
1010
912
  raise ArgumentError, "Parameter `index` is required when calling `get_top_filter_for_attribute`."
1011
913
  end
1012
-
1013
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1014
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
1015
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filter_for_attribute, must conform to the pattern #{pattern}."
1016
- end
1017
-
1018
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1019
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
1020
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filter_for_attribute, must conform to the pattern #{pattern}."
914
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
915
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_filter_for_attribute, must be greater than or equal to 0.'
1021
916
  end
1022
917
 
1023
918
  path = '/2/filters/{attribute}'.sub('{' + 'attribute' + '}', Transport.encode_uri(attribute.to_s))
@@ -1051,12 +946,12 @@ module Algolia
1051
946
  # Required API Key ACLs:
1052
947
  # - analytics
1053
948
  # @param attribute [String] Attribute name. (required)
1054
- # @param index [String] Index name to target. (required)
949
+ # @param index [String] Index name. (required)
1055
950
  # @param search [String] User query.
1056
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1057
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1058
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1059
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
951
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
952
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
953
+ # @param limit [Integer] Number of items to return. (default to 10)
954
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1060
955
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1061
956
  # @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)
1062
957
  # @return [GetTopFilterForAttributeResponse]
@@ -1069,12 +964,12 @@ module Algolia
1069
964
  #
1070
965
  # Required API Key ACLs:
1071
966
  # - analytics
1072
- # @param index [String] Index name to target. (required)
967
+ # @param index [String] Index name. (required)
1073
968
  # @param search [String] User query.
1074
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1075
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1076
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1077
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
969
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
970
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
971
+ # @param limit [Integer] Number of items to return. (default to 10)
972
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1078
973
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1079
974
  # @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)
1080
975
  # @return [Http::Response] the response
@@ -1083,15 +978,8 @@ module Algolia
1083
978
  if @api_client.config.client_side_validation && index.nil?
1084
979
  raise ArgumentError, "Parameter `index` is required when calling `get_top_filters_no_results`."
1085
980
  end
1086
-
1087
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1088
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
1089
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_filters_no_results, must conform to the pattern #{pattern}."
1090
- end
1091
-
1092
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1093
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
1094
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_filters_no_results, must conform to the pattern #{pattern}."
981
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
982
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_filters_no_results, must be greater than or equal to 0.'
1095
983
  end
1096
984
 
1097
985
  path = '/2/filters/noResults'
@@ -1124,12 +1012,12 @@ module Algolia
1124
1012
  #
1125
1013
  # Required API Key ACLs:
1126
1014
  # - analytics
1127
- # @param index [String] Index name to target. (required)
1015
+ # @param index [String] Index name. (required)
1128
1016
  # @param search [String] User query.
1129
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1130
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1131
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1132
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
1017
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1018
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1019
+ # @param limit [Integer] Number of items to return. (default to 10)
1020
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1133
1021
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1134
1022
  # @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)
1135
1023
  # @return [GetTopFiltersNoResultsResponse]
@@ -1142,13 +1030,13 @@ module Algolia
1142
1030
  #
1143
1031
  # Required API Key ACLs:
1144
1032
  # - analytics
1145
- # @param index [String] Index name to target. (required)
1033
+ # @param index [String] Index name. (required)
1146
1034
  # @param search [String] User query.
1147
1035
  # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1148
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1149
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1150
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1151
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
1036
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1037
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1038
+ # @param limit [Integer] Number of items to return. (default to 10)
1039
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1152
1040
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1153
1041
  # @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)
1154
1042
  # @return [Http::Response] the response
@@ -1157,15 +1045,8 @@ module Algolia
1157
1045
  if @api_client.config.client_side_validation && index.nil?
1158
1046
  raise ArgumentError, "Parameter `index` is required when calling `get_top_hits`."
1159
1047
  end
1160
-
1161
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1162
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
1163
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_hits, must conform to the pattern #{pattern}."
1164
- end
1165
-
1166
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1167
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
1168
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_hits, must conform to the pattern #{pattern}."
1048
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1049
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_hits, must be greater than or equal to 0.'
1169
1050
  end
1170
1051
 
1171
1052
  path = '/2/hits'
@@ -1199,13 +1080,13 @@ module Algolia
1199
1080
  #
1200
1081
  # Required API Key ACLs:
1201
1082
  # - analytics
1202
- # @param index [String] Index name to target. (required)
1083
+ # @param index [String] Index name. (required)
1203
1084
  # @param search [String] User query.
1204
1085
  # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1205
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1206
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1207
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1208
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
1086
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1087
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1088
+ # @param limit [Integer] Number of items to return. (default to 10)
1089
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1209
1090
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1210
1091
  # @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)
1211
1092
  # @return [GetTopHitsResponse]
@@ -1218,14 +1099,14 @@ module Algolia
1218
1099
  #
1219
1100
  # Required API Key ACLs:
1220
1101
  # - analytics
1221
- # @param index [String] Index name to target. (required)
1102
+ # @param index [String] Index name. (required)
1222
1103
  # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1223
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1224
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1104
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1105
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1225
1106
  # @param order_by [OrderBy] Reorder the results. (default to 'searchCount')
1226
1107
  # @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
1227
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1228
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
1108
+ # @param limit [Integer] Number of items to return. (default to 10)
1109
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1229
1110
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1230
1111
  # @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)
1231
1112
  # @return [Http::Response] the response
@@ -1235,15 +1116,8 @@ module Algolia
1235
1116
  if @api_client.config.client_side_validation && index.nil?
1236
1117
  raise ArgumentError, "Parameter `index` is required when calling `get_top_searches`."
1237
1118
  end
1238
-
1239
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1240
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
1241
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_top_searches, must conform to the pattern #{pattern}."
1242
- end
1243
-
1244
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1245
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
1246
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_top_searches, must conform to the pattern #{pattern}."
1119
+ if @api_client.config.client_side_validation && !offset.nil? && offset < 0
1120
+ raise ArgumentError, 'invalid value for ""offset"" when calling AnalyticsClient.get_top_searches, must be greater than or equal to 0.'
1247
1121
  end
1248
1122
 
1249
1123
  path = '/2/searches'
@@ -1278,14 +1152,14 @@ module Algolia
1278
1152
  #
1279
1153
  # Required API Key ACLs:
1280
1154
  # - analytics
1281
- # @param index [String] Index name to target. (required)
1155
+ # @param index [String] Index name. (required)
1282
1156
  # @param click_analytics [Boolean] Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search. (default to false)
1283
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1284
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1157
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1158
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1285
1159
  # @param order_by [OrderBy] Reorder the results. (default to 'searchCount')
1286
1160
  # @param direction [Direction] Sorting direction of the results: ascending or descending. (default to 'asc')
1287
- # @param limit [Integer] Number of records to return (page size). (default to 10)
1288
- # @param offset [Integer] Position of the starting record. Used for paging. 0 is the first record. (default to 0)
1161
+ # @param limit [Integer] Number of items to return. (default to 10)
1162
+ # @param offset [Integer] Position of the first item to return. (default to 0)
1289
1163
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1290
1164
  # @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)
1291
1165
  # @return [GetTopSearchesResponse]
@@ -1299,9 +1173,9 @@ module Algolia
1299
1173
  #
1300
1174
  # Required API Key ACLs:
1301
1175
  # - analytics
1302
- # @param index [String] Index name to target. (required)
1303
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1304
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1176
+ # @param index [String] Index name. (required)
1177
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1178
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1305
1179
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1306
1180
  # @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)
1307
1181
  # @return [Http::Response] the response
@@ -1311,16 +1185,6 @@ module Algolia
1311
1185
  raise ArgumentError, "Parameter `index` is required when calling `get_users_count`."
1312
1186
  end
1313
1187
 
1314
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1315
- if @api_client.config.client_side_validation && !start_date.nil? && start_date !~ pattern
1316
- raise ArgumentError, "invalid value for '\"start_date\"' when calling AnalyticsClient.get_users_count, must conform to the pattern #{pattern}."
1317
- end
1318
-
1319
- pattern = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/
1320
- if @api_client.config.client_side_validation && !end_date.nil? && end_date !~ pattern
1321
- raise ArgumentError, "invalid value for '\"end_date\"' when calling AnalyticsClient.get_users_count, must conform to the pattern #{pattern}."
1322
- end
1323
-
1324
1188
  path = '/2/users/count'
1325
1189
  query_params = {}
1326
1190
  query_params[:index] = index
@@ -1348,9 +1212,9 @@ module Algolia
1348
1212
  #
1349
1213
  # Required API Key ACLs:
1350
1214
  # - analytics
1351
- # @param index [String] Index name to target. (required)
1352
- # @param start_date [String] Start date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1353
- # @param end_date [String] End date (a string in the format &#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1215
+ # @param index [String] Index name. (required)
1216
+ # @param start_date [String] Start date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1217
+ # @param end_date [String] End date (&#x60;YYYY-MM-DD&#x60;) of the period to analyze.
1354
1218
  # @param tags [String] Filter analytics on the [&#x60;analyticsTags&#x60;](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1355
1219
  # @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)
1356
1220
  # @return [GetUsersCountResponse]