algolia 3.5.0 → 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +17 -16
  5. data/lib/algolia/api/analytics_client.rb +173 -333
  6. data/lib/algolia/api/ingestion_client.rb +40 -200
  7. data/lib/algolia/api/insights_client.rb +18 -32
  8. data/lib/algolia/api/monitoring_client.rb +33 -25
  9. data/lib/algolia/api/personalization_client.rb +16 -8
  10. data/lib/algolia/api/query_suggestions_client.rb +17 -9
  11. data/lib/algolia/api/recommend_client.rb +17 -9
  12. data/lib/algolia/api/search_client.rb +63 -110
  13. data/lib/algolia/configuration.rb +16 -1
  14. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
  15. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  16. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  17. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  18. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  19. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  20. data/lib/algolia/models/abtesting/variant.rb +0 -20
  21. data/lib/algolia/models/analytics/click_position.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  23. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  24. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  25. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  26. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  27. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  28. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  29. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  30. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  31. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  32. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  33. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  34. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  35. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  36. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  37. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  38. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  39. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  40. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  41. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  42. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  43. data/lib/algolia/models/ingestion/event.rb +1 -25
  44. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  45. data/lib/algolia/models/ingestion/run.rb +0 -18
  46. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  47. data/lib/algolia/models/ingestion/task.rb +0 -18
  48. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  49. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  50. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  51. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  52. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  53. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  54. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  55. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  56. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  57. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  58. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  59. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  60. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  61. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  62. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  63. data/lib/algolia/models/insights/insights_events.rb +0 -18
  64. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  65. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  66. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  67. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  68. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  69. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  70. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  71. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  72. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  73. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  74. data/lib/algolia/models/recommend/banner_image.rb +4 -2
  75. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  76. data/lib/algolia/models/recommend/condition.rb +0 -15
  77. data/lib/algolia/models/recommend/consequence.rb +0 -28
  78. data/lib/algolia/models/recommend/fallback_params.rb +3 -95
  79. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  80. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  81. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  82. data/lib/algolia/models/recommend/recommend_hit.rb +0 -20
  83. data/lib/algolia/models/recommend/recommend_search_params.rb +3 -95
  84. data/lib/algolia/models/recommend/recommendations_results.rb +13 -61
  85. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  86. data/lib/algolia/models/recommend/related_query.rb +0 -36
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -52
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -20
  90. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
  91. data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
  92. data/lib/algolia/models/recommend/widgets.rb +5 -2
  93. data/lib/algolia/models/search/banner_image.rb +4 -2
  94. data/lib/algolia/models/search/browse_params_object.rb +1 -129
  95. data/lib/algolia/models/search/browse_response.rb +13 -61
  96. data/lib/algolia/models/search/condition.rb +0 -15
  97. data/lib/algolia/models/search/consequence.rb +0 -28
  98. data/lib/algolia/models/search/consequence_params.rb +1 -129
  99. data/lib/algolia/models/search/get_api_key_response.rb +2 -0
  100. data/lib/algolia/models/search/get_objects_response.rb +0 -2
  101. data/lib/algolia/models/search/index_settings.rb +3 -81
  102. data/lib/algolia/models/search/log.rb +0 -34
  103. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  104. data/lib/algolia/models/search/ranking_info.rb +0 -112
  105. data/lib/algolia/models/search/rule.rb +0 -18
  106. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  107. data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -15
  108. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  109. data/lib/algolia/models/search/search_for_facets.rb +1 -129
  110. data/lib/algolia/models/search/search_for_hits.rb +1 -129
  111. data/lib/algolia/models/search/search_params_object.rb +1 -129
  112. data/lib/algolia/models/search/search_response.rb +13 -61
  113. data/lib/algolia/models/search/search_rules_params.rb +2 -34
  114. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  115. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  116. data/lib/algolia/models/search/search_user_ids_response.rb +1 -33
  117. data/lib/algolia/models/search/settings_response.rb +3 -81
  118. data/lib/algolia/models/search/user_hit.rb +0 -15
  119. data/lib/algolia/models/search/user_id.rb +0 -15
  120. data/lib/algolia/models/search/widgets.rb +5 -2
  121. data/lib/algolia/user_agent.rb +8 -2
  122. data/lib/algolia/version.rb +1 -1
  123. metadata +2 -11
  124. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +0 -230
  125. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +0 -212
  126. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +0 -252
  127. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +0 -263
  128. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  129. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  130. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
  131. data/lib/algolia/models/recommend/banners.rb +0 -209
  132. data/lib/algolia/models/search/banners.rb +0 -209
@@ -45,6 +45,14 @@ module Algolia
45
45
  # @return [void]
46
46
  def set_client_api_key(api_key)
47
47
  @api_client.set_client_api_key(api_key)
48
+
49
+ self
50
+ end
51
+
52
+ def add_user_agent_segment(segment, version = nil)
53
+ @api_client.config.add_user_agent_segment(segment, version)
54
+
55
+ self
48
56
  end
49
57
 
50
58
  # Creates a new authentication resource.
@@ -237,7 +245,7 @@ module Algolia
237
245
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskCreateResponse")
238
246
  end
239
247
 
240
- # Creates a new task using the v1 endpoint, please use `createTask` instead.
248
+ # Creates a new task using the v1 endpoint, please use `createTask` instead.
241
249
 
242
250
  # @param task_create [TaskCreateV1] Request body for creating a task. (required)
243
251
  # @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)
@@ -322,7 +330,7 @@ module Algolia
322
330
 
323
331
  # This method allow you to send requests to the Algolia REST API.
324
332
 
325
- # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
333
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
326
334
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
327
335
  # @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)
328
336
  # @return [Http::Response] the response
@@ -354,7 +362,7 @@ module Algolia
354
362
 
355
363
  # This method allow you to send requests to the Algolia REST API.
356
364
 
357
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
365
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
358
366
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
359
367
  # @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)
360
368
  # @return [Object]
@@ -365,7 +373,7 @@ module Algolia
365
373
 
366
374
  # This method allow you to send requests to the Algolia REST API.
367
375
 
368
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
376
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
369
377
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
370
378
  # @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)
371
379
  # @return [Http::Response] the response
@@ -397,7 +405,7 @@ module Algolia
397
405
 
398
406
  # This method allow you to send requests to the Algolia REST API.
399
407
 
400
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
408
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
401
409
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
402
410
  # @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)
403
411
  # @return [Object]
@@ -408,7 +416,7 @@ module Algolia
408
416
 
409
417
  # This method allow you to send requests to the Algolia REST API.
410
418
 
411
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
419
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
412
420
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
413
421
  # @param body [Object] Parameters to send with the custom request.
414
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)
@@ -441,7 +449,7 @@ module Algolia
441
449
 
442
450
  # This method allow you to send requests to the Algolia REST API.
443
451
 
444
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
452
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
445
453
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
446
454
  # @param body [Object] Parameters to send with the custom request.
447
455
  # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
@@ -453,7 +461,7 @@ module Algolia
453
461
 
454
462
  # This method allow you to send requests to the Algolia REST API.
455
463
 
456
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
464
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
457
465
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
458
466
  # @param body [Object] Parameters to send with the custom request.
459
467
  # @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)
@@ -486,7 +494,7 @@ module Algolia
486
494
 
487
495
  # This method allow you to send requests to the Algolia REST API.
488
496
 
489
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
497
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
490
498
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
491
499
  # @param body [Object] Parameters to send with the custom request.
492
500
  # @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)
@@ -496,7 +504,7 @@ module Algolia
496
504
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
497
505
  end
498
506
 
499
- # Deletes an authentication resource. You can&#39;t delete authentication resources that are used by a source or a destination.
507
+ # Deletes an authentication resource. You can't delete authentication resources that are used by a source or a destination.
500
508
  #
501
509
  # Required API Key ACLs:
502
510
  # - addObject
@@ -547,7 +555,7 @@ module Algolia
547
555
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
548
556
  end
549
557
 
550
- # Deletes a destination by its ID. You can&#39;t delete destinations that are referenced in tasks.
558
+ # Deletes a destination by its ID. You can't delete destinations that are referenced in tasks.
551
559
  #
552
560
  # Required API Key ACLs:
553
561
  # - addObject
@@ -598,7 +606,7 @@ module Algolia
598
606
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
599
607
  end
600
608
 
601
- # Deletes a source by its ID. You can&#39;t delete sources that are referenced in tasks.
609
+ # Deletes a source by its ID. You can't delete sources that are referenced in tasks.
602
610
  #
603
611
  # Required API Key ACLs:
604
612
  # - addObject
@@ -686,7 +694,7 @@ module Algolia
686
694
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
687
695
  end
688
696
 
689
- # Deletes a task by its ID using the v1 endpoint, please use &#x60;deleteTask&#x60; instead.
697
+ # Deletes a task by its ID using the v1 endpoint, please use `deleteTask` instead.
690
698
 
691
699
  # @param task_id [String] Unique identifier of a task. (required)
692
700
  # @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)
@@ -817,7 +825,7 @@ module Algolia
817
825
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
818
826
  end
819
827
 
820
- # Disables a task using the v1 endpoint, please use &#x60;disableTask&#x60; instead.
828
+ # Disables a task using the v1 endpoint, please use `disableTask` instead.
821
829
  #
822
830
  # Required API Key ACLs:
823
831
  # - addObject
@@ -913,7 +921,7 @@ module Algolia
913
921
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
914
922
  end
915
923
 
916
- # Enables a task using the v1 endpoint, please use &#x60;enableTask&#x60; instead.
924
+ # Enables a task using the v1 endpoint, please use `enableTask` instead.
917
925
  #
918
926
  # Required API Key ACLs:
919
927
  # - addObject
@@ -1264,7 +1272,7 @@ module Algolia
1264
1272
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Task")
1265
1273
  end
1266
1274
 
1267
- # Retrieves a task by its ID using the v1 endpoint, please use &#x60;getTask&#x60; instead.
1275
+ # Retrieves a task by its ID using the v1 endpoint, please use `getTask` instead.
1268
1276
  #
1269
1277
  # Required API Key ACLs:
1270
1278
  # - addObject
@@ -1386,27 +1394,6 @@ module Algolia
1386
1394
  order = nil,
1387
1395
  request_options = {}
1388
1396
  )
1389
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1390
- raise(
1391
- ArgumentError,
1392
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_authentications, must be smaller than or equal to 100."
1393
- )
1394
- end
1395
-
1396
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1397
- raise(
1398
- ArgumentError,
1399
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_authentications, must be greater than or equal to 1."
1400
- )
1401
- end
1402
-
1403
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1404
- raise(
1405
- ArgumentError,
1406
- "invalid value for \"\"page\"\" when calling IngestionClient.list_authentications, must be greater than or equal to 1."
1407
- )
1408
- end
1409
-
1410
1397
  path = "/1/authentications"
1411
1398
  query_params = {}
1412
1399
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -1487,27 +1474,6 @@ module Algolia
1487
1474
  order = nil,
1488
1475
  request_options = {}
1489
1476
  )
1490
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1491
- raise(
1492
- ArgumentError,
1493
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_destinations, must be smaller than or equal to 100."
1494
- )
1495
- end
1496
-
1497
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1498
- raise(
1499
- ArgumentError,
1500
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_destinations, must be greater than or equal to 1."
1501
- )
1502
- end
1503
-
1504
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1505
- raise(
1506
- ArgumentError,
1507
- "invalid value for \"\"page\"\" when calling IngestionClient.list_destinations, must be greater than or equal to 1."
1508
- )
1509
- end
1510
-
1511
1477
  path = "/1/destinations"
1512
1478
  query_params = {}
1513
1479
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -1578,7 +1544,7 @@ module Algolia
1578
1544
  )
1579
1545
  end
1580
1546
 
1581
- # Retrieves a list of events for a task run, identified by it&#39;s ID.
1547
+ # Retrieves a list of events for a task run, identified by its ID.
1582
1548
  #
1583
1549
  # Required API Key ACLs:
1584
1550
  # - addObject
@@ -1612,27 +1578,6 @@ module Algolia
1612
1578
  raise ArgumentError, "Parameter `run_id` is required when calling `list_events`."
1613
1579
  end
1614
1580
 
1615
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1616
- raise(
1617
- ArgumentError,
1618
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_events, must be smaller than or equal to 100."
1619
- )
1620
- end
1621
-
1622
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1623
- raise(
1624
- ArgumentError,
1625
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_events, must be greater than or equal to 1."
1626
- )
1627
- end
1628
-
1629
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1630
- raise(
1631
- ArgumentError,
1632
- "invalid value for \"\"page\"\" when calling IngestionClient.list_events, must be greater than or equal to 1."
1633
- )
1634
- end
1635
-
1636
1581
  path = "/1/runs/{runID}/events".sub("{" + "runID" + "}", Transport.encode_uri(run_id.to_s))
1637
1582
  query_params = {}
1638
1583
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -1660,7 +1605,7 @@ module Algolia
1660
1605
  @api_client.call_api(:GET, path, new_options)
1661
1606
  end
1662
1607
 
1663
- # Retrieves a list of events for a task run, identified by it's ID.
1608
+ # Retrieves a list of events for a task run, identified by its ID.
1664
1609
  #
1665
1610
  # Required API Key ACLs:
1666
1611
  # - addObject
@@ -1733,27 +1678,6 @@ module Algolia
1733
1678
  end_date = nil,
1734
1679
  request_options = {}
1735
1680
  )
1736
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1737
- raise(
1738
- ArgumentError,
1739
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_runs, must be smaller than or equal to 100."
1740
- )
1741
- end
1742
-
1743
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1744
- raise(
1745
- ArgumentError,
1746
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_runs, must be greater than or equal to 1."
1747
- )
1748
- end
1749
-
1750
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1751
- raise(
1752
- ArgumentError,
1753
- "invalid value for \"\"page\"\" when calling IngestionClient.list_runs, must be greater than or equal to 1."
1754
- )
1755
- end
1756
-
1757
1681
  path = "/1/runs"
1758
1682
  query_params = {}
1759
1683
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -1835,7 +1759,7 @@ module Algolia
1835
1759
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1836
1760
  # @param page [Integer] Page number of the paginated API response.
1837
1761
  # @param type [Array<SourceType>] Source type. Some sources require authentication.
1838
- # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.
1762
+ # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication.
1839
1763
  # @param sort [SourceSortKeys] Property by which to sort the list of sources. (default to 'createdAt')
1840
1764
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1841
1765
  # @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)
@@ -1849,27 +1773,6 @@ module Algolia
1849
1773
  order = nil,
1850
1774
  request_options = {}
1851
1775
  )
1852
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1853
- raise(
1854
- ArgumentError,
1855
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_sources, must be smaller than or equal to 100."
1856
- )
1857
- end
1858
-
1859
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1860
- raise(
1861
- ArgumentError,
1862
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_sources, must be greater than or equal to 1."
1863
- )
1864
- end
1865
-
1866
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1867
- raise(
1868
- ArgumentError,
1869
- "invalid value for \"\"page\"\" when calling IngestionClient.list_sources, must be greater than or equal to 1."
1870
- )
1871
- end
1872
-
1873
1776
  path = "/1/sources"
1874
1777
  query_params = {}
1875
1778
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -1907,7 +1810,7 @@ module Algolia
1907
1810
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1908
1811
  # @param page [Integer] Page number of the paginated API response.
1909
1812
  # @param type [Array<SourceType>] Source type. Some sources require authentication.
1910
- # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.
1813
+ # @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication.
1911
1814
  # @param sort [SourceSortKeys] Property by which to sort the list of sources. (default to 'createdAt')
1912
1815
  # @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
1913
1816
  # @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)
@@ -1942,7 +1845,7 @@ module Algolia
1942
1845
  # @param items_per_page [Integer] Number of items per page. (default to 10)
1943
1846
  # @param page [Integer] Page number of the paginated API response.
1944
1847
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
1945
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1848
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
1946
1849
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
1947
1850
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
1948
1851
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -1962,27 +1865,6 @@ module Algolia
1962
1865
  order = nil,
1963
1866
  request_options = {}
1964
1867
  )
1965
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
1966
- raise(
1967
- ArgumentError,
1968
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks, must be smaller than or equal to 100."
1969
- )
1970
- end
1971
-
1972
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
1973
- raise(
1974
- ArgumentError,
1975
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks, must be greater than or equal to 1."
1976
- )
1977
- end
1978
-
1979
- if @api_client.config.client_side_validation && !page.nil? && page < 1
1980
- raise(
1981
- ArgumentError,
1982
- "invalid value for \"\"page\"\" when calling IngestionClient.list_tasks, must be greater than or equal to 1."
1983
- )
1984
- end
1985
-
1986
1868
  path = "/2/tasks"
1987
1869
  query_params = {}
1988
1870
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -2023,7 +1905,7 @@ module Algolia
2023
1905
  # @param items_per_page [Integer] Number of items per page. (default to 10)
2024
1906
  # @param page [Integer] Page number of the paginated API response.
2025
1907
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
2026
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1908
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
2027
1909
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
2028
1910
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
2029
1911
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -2058,7 +1940,7 @@ module Algolia
2058
1940
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::ListTasksResponse")
2059
1941
  end
2060
1942
 
2061
- # Retrieves a list of tasks using the v1 endpoint, please use &#x60;getTasks&#x60; instead.
1943
+ # Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
2062
1944
  #
2063
1945
  # Required API Key ACLs:
2064
1946
  # - addObject
@@ -2067,7 +1949,7 @@ module Algolia
2067
1949
  # @param items_per_page [Integer] Number of items per page. (default to 10)
2068
1950
  # @param page [Integer] Page number of the paginated API response.
2069
1951
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
2070
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
1952
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
2071
1953
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
2072
1954
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
2073
1955
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -2087,27 +1969,6 @@ module Algolia
2087
1969
  order = nil,
2088
1970
  request_options = {}
2089
1971
  )
2090
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
2091
- raise(
2092
- ArgumentError,
2093
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks_v1, must be smaller than or equal to 100."
2094
- )
2095
- end
2096
-
2097
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
2098
- raise(
2099
- ArgumentError,
2100
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_tasks_v1, must be greater than or equal to 1."
2101
- )
2102
- end
2103
-
2104
- if @api_client.config.client_side_validation && !page.nil? && page < 1
2105
- raise(
2106
- ArgumentError,
2107
- "invalid value for \"\"page\"\" when calling IngestionClient.list_tasks_v1, must be greater than or equal to 1."
2108
- )
2109
- end
2110
-
2111
1972
  path = "/1/tasks"
2112
1973
  query_params = {}
2113
1974
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -2148,7 +2009,7 @@ module Algolia
2148
2009
  # @param items_per_page [Integer] Number of items per page. (default to 10)
2149
2010
  # @param page [Integer] Page number of the paginated API response.
2150
2011
  # @param action [Array<ActionType>] Actions for filtering the list of tasks.
2151
- # @param enabled [Boolean] Whether to filter the list of tasks by the &#x60;enabled&#x60; status.
2012
+ # @param enabled [Boolean] Whether to filter the list of tasks by the `enabled` status.
2152
2013
  # @param source_id [Array<String>] Source IDs for filtering the list of tasks.
2153
2014
  # @param destination_id [Array<String>] Destination IDs for filtering the list of tasks.
2154
2015
  # @param trigger_type [Array<TriggerType>] Type of task trigger for filtering the list of tasks.
@@ -2202,27 +2063,6 @@ module Algolia
2202
2063
  order = nil,
2203
2064
  request_options = {}
2204
2065
  )
2205
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page > 100
2206
- raise(
2207
- ArgumentError,
2208
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_transformations, must be smaller than or equal to 100."
2209
- )
2210
- end
2211
-
2212
- if @api_client.config.client_side_validation && !items_per_page.nil? && items_per_page < 1
2213
- raise(
2214
- ArgumentError,
2215
- "invalid value for \"\"items_per_page\"\" when calling IngestionClient.list_transformations, must be greater than or equal to 1."
2216
- )
2217
- end
2218
-
2219
- if @api_client.config.client_side_validation && !page.nil? && page < 1
2220
- raise(
2221
- ArgumentError,
2222
- "invalid value for \"\"page\"\" when calling IngestionClient.list_transformations, must be greater than or equal to 1."
2223
- )
2224
- end
2225
-
2226
2066
  path = "/1/transformations"
2227
2067
  query_params = {}
2228
2068
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
@@ -2266,14 +2106,14 @@ module Algolia
2266
2106
  )
2267
2107
  end
2268
2108
 
2269
- # Push a &#x60;batch&#x60; request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
2109
+ # Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.
2270
2110
  #
2271
2111
  # Required API Key ACLs:
2272
2112
  # - addObject
2273
2113
  # - deleteIndex
2274
2114
  # - editSettings
2275
2115
  # @param task_id [String] Unique identifier of a task. (required)
2276
- # @param push_task_payload [PushTaskPayload] Request body of a Search API &#x60;batch&#x60; request that will be pushed in the Connectors pipeline. (required)
2116
+ # @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
2277
2117
  # @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)
2278
2118
  # @return [Http::Response] the response
2279
2119
  def push_task_with_http_info(task_id, push_task_payload, request_options = {})
@@ -2312,7 +2152,7 @@ module Algolia
2312
2152
  # - deleteIndex
2313
2153
  # - editSettings
2314
2154
  # @param task_id [String] Unique identifier of a task. (required)
2315
- # @param push_task_payload [PushTaskPayload] Request body of a Search API &#x60;batch&#x60; request that will be pushed in the Connectors pipeline. (required)
2155
+ # @param push_task_payload [PushTaskPayload] Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
2316
2156
  # @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)
2317
2157
  # @return [RunResponse]
2318
2158
  def push_task(task_id, push_task_payload, request_options = {})
@@ -2418,7 +2258,7 @@ module Algolia
2418
2258
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
2419
2259
  end
2420
2260
 
2421
- # Runs a task using the v1 endpoint, please use &#x60;runTask&#x60; instead. You can check the status of task runs with the observability endpoints.
2261
+ # Runs a task using the v1 endpoint, please use `runTask` instead. You can check the status of task runs with the observability endpoints.
2422
2262
  #
2423
2263
  # Required API Key ACLs:
2424
2264
  # - addObject
@@ -2658,7 +2498,7 @@ module Algolia
2658
2498
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Task>")
2659
2499
  end
2660
2500
 
2661
- # Searches for tasks using the v1 endpoint, please use &#x60;searchTasks&#x60; instead.
2501
+ # Searches for tasks using the v1 endpoint, please use `searchTasks` instead.
2662
2502
  #
2663
2503
  # Required API Key ACLs:
2664
2504
  # - addObject
@@ -2754,7 +2594,7 @@ module Algolia
2754
2594
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Transformation>")
2755
2595
  end
2756
2596
 
2757
- # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with &#x60;type: docker&#x60; and &#x60;imageType: singer&#x60;.
2597
+ # Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`.
2758
2598
  #
2759
2599
  # Required API Key ACLs:
2760
2600
  # - addObject
@@ -3139,7 +2979,7 @@ module Algolia
3139
2979
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
3140
2980
  end
3141
2981
 
3142
- # Updates a task by its ID using the v1 endpoint, please use &#x60;updateTask&#x60; instead.
2982
+ # Updates a task by its ID using the v1 endpoint, please use `updateTask` instead.
3143
2983
 
3144
2984
  # @param task_id [String] Unique identifier of a task. (required)
3145
2985
  # @param task_update [TaskUpdateV1] (required)
@@ -45,11 +45,19 @@ module Algolia
45
45
  # @return [void]
46
46
  def set_client_api_key(api_key)
47
47
  @api_client.set_client_api_key(api_key)
48
+
49
+ self
50
+ end
51
+
52
+ def add_user_agent_segment(segment, version = nil)
53
+ @api_client.config.add_user_agent_segment(segment, version)
54
+
55
+ self
48
56
  end
49
57
 
50
58
  # This method allow you to send requests to the Algolia REST API.
51
59
 
52
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
60
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
53
61
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
54
62
  # @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)
55
63
  # @return [Http::Response] the response
@@ -81,7 +89,7 @@ module Algolia
81
89
 
82
90
  # This method allow you to send requests to the Algolia REST API.
83
91
 
84
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
92
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
85
93
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
86
94
  # @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)
87
95
  # @return [Object]
@@ -92,7 +100,7 @@ module Algolia
92
100
 
93
101
  # This method allow you to send requests to the Algolia REST API.
94
102
 
95
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
103
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
96
104
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
97
105
  # @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)
98
106
  # @return [Http::Response] the response
@@ -124,7 +132,7 @@ module Algolia
124
132
 
125
133
  # This method allow you to send requests to the Algolia REST API.
126
134
 
127
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
135
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
128
136
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
129
137
  # @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)
130
138
  # @return [Object]
@@ -135,7 +143,7 @@ module Algolia
135
143
 
136
144
  # This method allow you to send requests to the Algolia REST API.
137
145
 
138
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
146
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
139
147
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
140
148
  # @param body [Object] Parameters to send with the custom request.
141
149
  # @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)
@@ -168,7 +176,7 @@ module Algolia
168
176
 
169
177
  # This method allow you to send requests to the Algolia REST API.
170
178
 
171
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
179
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
172
180
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
173
181
  # @param body [Object] Parameters to send with the custom request.
174
182
  # @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)
@@ -180,7 +188,7 @@ module Algolia
180
188
 
181
189
  # This method allow you to send requests to the Algolia REST API.
182
190
 
183
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
191
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
184
192
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
185
193
  # @param body [Object] Parameters to send with the custom request.
186
194
  # @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)
@@ -213,7 +221,7 @@ module Algolia
213
221
 
214
222
  # This method allow you to send requests to the Algolia REST API.
215
223
 
216
- # @param path [String] Path of the endpoint, anything after \&quot;/1\&quot; must be specified. (required)
224
+ # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required)
217
225
  # @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
218
226
  # @param body [Object] Parameters to send with the custom request.
219
227
  # @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)
@@ -223,7 +231,7 @@ module Algolia
223
231
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
224
232
  end
225
233
 
226
- # Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see &#x60;Delete a user profile&#x60; in the Personalization API.
234
+ # Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see `Delete a user profile` in the Personalization API.
227
235
 
228
236
  # @param user_token [String] User token for which to delete all associated events. (required)
229
237
  # @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)
@@ -234,28 +242,6 @@ module Algolia
234
242
  raise ArgumentError, "Parameter `user_token` is required when calling `delete_user_token`."
235
243
  end
236
244
 
237
- if @api_client.config.client_side_validation && user_token.to_s.length > 129
238
- raise(
239
- ArgumentError,
240
- "invalid value for \"user_token\" when calling InsightsClient.delete_user_token, the character length must be smaller than or equal to 129."
241
- )
242
- end
243
-
244
- if @api_client.config.client_side_validation && user_token.to_s.length < 1
245
- raise(
246
- ArgumentError,
247
- "invalid value for \"user_token\" when calling InsightsClient.delete_user_token, the character length must be great than or equal to 1."
248
- )
249
- end
250
-
251
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
252
- if @api_client.config.client_side_validation && user_token !~ pattern
253
- raise(
254
- ArgumentError,
255
- "invalid value for 'user_token' when calling InsightsClient.delete_user_token, must conform to the pattern #{pattern}."
256
- )
257
- end
258
-
259
245
  path = "/1/usertokens/{userToken}".sub("{" + "userToken" + "}", Transport.encode_uri(user_token.to_s))
260
246
  query_params = {}
261
247
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
@@ -285,7 +271,7 @@ module Algolia
285
271
  nil
286
272
  end
287
273
 
288
- # Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&amp;nbsp;MB.
274
+ # Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
289
275
 
290
276
  # @param insights_events [InsightsEvents] (required)
291
277
  # @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)