algolia 3.0.0.beta.3 → 3.0.0.beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/VERSION +1 -1
  3. data/CHANGELOG.md +16 -0
  4. data/Gemfile.lock +1 -1
  5. data/README.md +1 -1
  6. data/lib/algolia/api/ingestion_client.rb +424 -58
  7. data/lib/algolia/api/search_client.rb +148 -0
  8. data/lib/algolia/models/ingestion/authentication.rb +2 -2
  9. data/lib/algolia/models/ingestion/authentication_create_response.rb +1 -1
  10. data/lib/algolia/models/ingestion/authentication_update_response.rb +1 -1
  11. data/lib/algolia/models/ingestion/delete_response.rb +1 -1
  12. data/lib/algolia/models/ingestion/destination.rb +2 -2
  13. data/lib/algolia/models/ingestion/destination_create_response.rb +1 -1
  14. data/lib/algolia/models/ingestion/destination_update_response.rb +1 -1
  15. data/lib/algolia/models/ingestion/event.rb +1 -1
  16. data/lib/algolia/models/ingestion/list_transformations_response.rb +212 -0
  17. data/lib/algolia/models/ingestion/on_demand_date_utils_input.rb +2 -2
  18. data/lib/algolia/models/ingestion/on_demand_trigger.rb +1 -1
  19. data/lib/algolia/models/ingestion/run.rb +3 -3
  20. data/lib/algolia/models/ingestion/run_response.rb +1 -1
  21. data/lib/algolia/models/ingestion/schedule_trigger.rb +2 -2
  22. data/lib/algolia/models/ingestion/sort_keys.rb +35 -0
  23. data/lib/algolia/models/ingestion/source.rb +2 -2
  24. data/lib/algolia/models/ingestion/source_create_response.rb +1 -1
  25. data/lib/algolia/models/ingestion/source_update_response.rb +1 -1
  26. data/lib/algolia/models/ingestion/source_watch_response.rb +233 -0
  27. data/lib/algolia/models/ingestion/task.rb +13 -3
  28. data/lib/algolia/models/ingestion/task_create.rb +14 -4
  29. data/lib/algolia/models/ingestion/task_create_response.rb +1 -1
  30. data/lib/algolia/models/ingestion/task_update_response.rb +1 -1
  31. data/lib/algolia/models/ingestion/transformation.rb +257 -0
  32. data/lib/algolia/models/ingestion/transformation_create.rb +224 -0
  33. data/lib/algolia/models/ingestion/{docker_source_discover.rb → transformation_create_response.rb} +14 -13
  34. data/lib/algolia/models/ingestion/{docker_source_streams.rb → transformation_search.rb} +12 -12
  35. data/lib/algolia/models/ingestion/transformation_try.rb +211 -0
  36. data/lib/algolia/models/ingestion/transformation_try_response.rb +210 -0
  37. data/lib/algolia/models/ingestion/transformation_try_response_error.rb +208 -0
  38. data/lib/algolia/models/ingestion/transformation_update_response.rb +212 -0
  39. data/lib/algolia/models/ingestion/window.rb +2 -2
  40. data/lib/algolia/models/recommend/base_search_response.rb +2 -4
  41. data/lib/algolia/models/recommend/fallback_params.rb +3 -1
  42. data/lib/algolia/models/recommend/recommendations_results.rb +1 -1
  43. data/lib/algolia/models/recommend/search_params.rb +3 -1
  44. data/lib/algolia/models/recommend/search_params_object.rb +3 -1
  45. data/lib/algolia/models/recommend/trending_facets_query.rb +3 -1
  46. data/lib/algolia/models/search/base_index_settings.rb +2 -4
  47. data/lib/algolia/models/search/base_search_response.rb +2 -4
  48. data/lib/algolia/models/search/browse_params_object.rb +3 -1
  49. data/lib/algolia/models/search/browse_response.rb +1 -1
  50. data/lib/algolia/models/search/consequence_params.rb +3 -1
  51. data/lib/algolia/models/search/index_settings.rb +4 -2
  52. data/lib/algolia/models/search/search_for_facets.rb +3 -1
  53. data/lib/algolia/models/search/search_for_hits.rb +3 -1
  54. data/lib/algolia/models/search/search_params_object.rb +3 -1
  55. data/lib/algolia/models/search/search_response.rb +1 -1
  56. data/lib/algolia/models/search/secured_api_key_restrictions.rb +3 -3
  57. data/lib/algolia/transport/transport.rb +8 -8
  58. data/lib/algolia/version.rb +1 -1
  59. metadata +13 -4
@@ -411,7 +411,9 @@ module Algolia
411
411
 
412
412
  # List of attributes with nullable: true
413
413
  def self.openapi_nullable
414
- Set.new([])
414
+ Set.new([
415
+ :re_ranking_apply_filter
416
+ ])
415
417
  end
416
418
 
417
419
  # List of class defined in allOf (OpenAPI v3)
@@ -79,7 +79,9 @@ module Algolia
79
79
 
80
80
  # List of attributes with nullable: true
81
81
  def self.openapi_nullable
82
- Set.new([])
82
+ Set.new([
83
+ :facet_name
84
+ ])
83
85
  end
84
86
 
85
87
  # List of class defined in allOf (OpenAPI v3)
@@ -48,7 +48,7 @@ module Algolia
48
48
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
49
49
  attr_accessor :searchable_attributes
50
50
 
51
- # An object with custom data. You can store up to 32 kB as custom data.
51
+ # An object with custom data. You can store up to 32kB as custom data.
52
52
  attr_accessor :user_data
53
53
 
54
54
  # Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
@@ -110,9 +110,7 @@ module Algolia
110
110
 
111
111
  # List of attributes with nullable: true
112
112
  def self.openapi_nullable
113
- Set.new([
114
- :user_data
115
- ])
113
+ Set.new([])
116
114
  end
117
115
 
118
116
  # Initializes the object
@@ -81,7 +81,7 @@ module Algolia
81
81
  # Host name of the server that processed the request.
82
82
  attr_accessor :server_used
83
83
 
84
- # An object with custom data. You can store up to 32 kB as custom data.
84
+ # An object with custom data. You can store up to 32kB as custom data.
85
85
  attr_accessor :user_data
86
86
 
87
87
  # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
@@ -164,9 +164,7 @@ module Algolia
164
164
 
165
165
  # List of attributes with nullable: true
166
166
  def self.openapi_nullable
167
- Set.new([
168
- :user_data
169
- ])
167
+ Set.new([])
170
168
  end
171
169
 
172
170
  # Initializes the object
@@ -415,7 +415,9 @@ module Algolia
415
415
 
416
416
  # List of attributes with nullable: true
417
417
  def self.openapi_nullable
418
- Set.new([])
418
+ Set.new([
419
+ :re_ranking_apply_filter
420
+ ])
419
421
  end
420
422
 
421
423
  # List of class defined in allOf (OpenAPI v3)
@@ -81,7 +81,7 @@ module Algolia
81
81
  # Host name of the server that processed the request.
82
82
  attr_accessor :server_used
83
83
 
84
- # An object with custom data. You can store up to 32 kB as custom data.
84
+ # An object with custom data. You can store up to 32kB as custom data.
85
85
  attr_accessor :user_data
86
86
 
87
87
  # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
@@ -417,7 +417,9 @@ module Algolia
417
417
 
418
418
  # List of attributes with nullable: true
419
419
  def self.openapi_nullable
420
- Set.new([])
420
+ Set.new([
421
+ :re_ranking_apply_filter
422
+ ])
421
423
  end
422
424
 
423
425
  # List of class defined in allOf (OpenAPI v3)
@@ -49,7 +49,7 @@ module Algolia
49
49
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
50
50
  attr_accessor :searchable_attributes
51
51
 
52
- # An object with custom data. You can store up to 32 kB as custom data.
52
+ # An object with custom data. You can store up to 32kB as custom data.
53
53
  attr_accessor :user_data
54
54
 
55
55
  # Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
@@ -342,7 +342,9 @@ module Algolia
342
342
 
343
343
  # List of attributes with nullable: true
344
344
  def self.openapi_nullable
345
- Set.new([])
345
+ Set.new([
346
+ :re_ranking_apply_filter
347
+ ])
346
348
  end
347
349
 
348
350
  # List of class defined in allOf (OpenAPI v3)
@@ -434,7 +434,9 @@ module Algolia
434
434
 
435
435
  # List of attributes with nullable: true
436
436
  def self.openapi_nullable
437
- Set.new([])
437
+ Set.new([
438
+ :re_ranking_apply_filter
439
+ ])
438
440
  end
439
441
 
440
442
  # List of class defined in allOf (OpenAPI v3)
@@ -424,7 +424,9 @@ module Algolia
424
424
 
425
425
  # List of attributes with nullable: true
426
426
  def self.openapi_nullable
427
- Set.new([])
427
+ Set.new([
428
+ :re_ranking_apply_filter
429
+ ])
428
430
  end
429
431
 
430
432
  # List of class defined in allOf (OpenAPI v3)
@@ -411,7 +411,9 @@ module Algolia
411
411
 
412
412
  # List of attributes with nullable: true
413
413
  def self.openapi_nullable
414
- Set.new([])
414
+ Set.new([
415
+ :re_ranking_apply_filter
416
+ ])
415
417
  end
416
418
 
417
419
  # List of class defined in allOf (OpenAPI v3)
@@ -81,7 +81,7 @@ module Algolia
81
81
  # Host name of the server that processed the request.
82
82
  attr_accessor :server_used
83
83
 
84
- # An object with custom data. You can store up to 32 kB as custom data.
84
+ # An object with custom data. You can store up to 32kB as custom data.
85
85
  attr_accessor :user_data
86
86
 
87
87
  # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
@@ -5,7 +5,7 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Search
8
- class SecuredAPIKeyRestrictions
8
+ class SecuredApiKeyRestrictions
9
9
  attr_accessor :search_params
10
10
 
11
11
  # Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`.
@@ -61,14 +61,14 @@ module Algolia
61
61
  # @param [Hash] attributes Model attributes in the form of hash
62
62
  def initialize(attributes = {})
63
63
  unless attributes.is_a?(Hash)
64
- raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::SecuredAPIKeyRestrictions` initialize method"
64
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::SecuredApiKeyRestrictions` initialize method"
65
65
  end
66
66
 
67
67
  # check to see if the attribute exists and convert string to symbol for hash key
68
68
  attributes = attributes.each_with_object({}) do |(k, v), h|
69
69
  unless self.class.attribute_map.key?(k.to_sym)
70
70
  raise ArgumentError,
71
- "`#{k}` is not a valid attribute in `Algolia::SecuredAPIKeyRestrictions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ "`#{k}` is not a valid attribute in `Algolia::SecuredApiKeyRestrictions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
72
  end
73
73
 
74
74
  h[k.to_sym] = v
@@ -9,6 +9,13 @@ module Algolia
9
9
  CGI.escape(uri).gsub('+', '%20')
10
10
  end
11
11
 
12
+ def self.stringify_query_params(query_params)
13
+ query_params.to_h do |key, value|
14
+ value = value.join(',') if value.is_a?(Array)
15
+ [encode_uri(key.to_s).to_sym, encode_uri(value.to_s)]
16
+ end
17
+ end
18
+
12
19
  class Transport
13
20
  include RetryOutcomeType
14
21
  include CallType
@@ -79,7 +86,7 @@ module Algolia
79
86
  request[:method] = method.downcase
80
87
  request[:path] = path
81
88
  request[:body] = build_body(body, request_options)
82
- request[:query_params] = stringify_query_params(request_options.query_params)
89
+ request[:query_params] = Algolia::Transport.stringify_query_params(request_options.query_params)
83
90
  request[:header_params] = generate_header_params(body, request_options)
84
91
  request[:timeout] = request_options.timeout
85
92
  request[:connect_timeout] = request_options.connect_timeout
@@ -128,13 +135,6 @@ module Algolia
128
135
  @config.write_timeout
129
136
  end
130
137
  end
131
-
132
- def stringify_query_params(query_params)
133
- query_params.to_h do |key, value|
134
- value = value.join(',') if value.is_a?(Array)
135
- [Algolia::Transport.encode_uri(key.to_s).to_sym, Algolia::Transport.encode_uri(value.to_s)]
136
- end
137
- end
138
138
  end
139
139
  end
140
140
  end
@@ -1,5 +1,5 @@
1
1
  # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  module Algolia
4
- VERSION = '3.0.0.beta.3'.freeze
4
+ VERSION = '3.0.0.beta.5'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta.3
4
+ version: 3.0.0.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2024-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -256,8 +256,6 @@ files:
256
256
  - lib/algolia/models/ingestion/destination_update_response.rb
257
257
  - lib/algolia/models/ingestion/docker_image_type.rb
258
258
  - lib/algolia/models/ingestion/docker_registry.rb
259
- - lib/algolia/models/ingestion/docker_source_discover.rb
260
- - lib/algolia/models/ingestion/docker_source_streams.rb
261
259
  - lib/algolia/models/ingestion/error_base.rb
262
260
  - lib/algolia/models/ingestion/event.rb
263
261
  - lib/algolia/models/ingestion/event_sort_keys.rb
@@ -268,6 +266,7 @@ files:
268
266
  - lib/algolia/models/ingestion/list_events_response.rb
269
267
  - lib/algolia/models/ingestion/list_sources_response.rb
270
268
  - lib/algolia/models/ingestion/list_tasks_response.rb
269
+ - lib/algolia/models/ingestion/list_transformations_response.rb
271
270
  - lib/algolia/models/ingestion/mapping_field_directive.rb
272
271
  - lib/algolia/models/ingestion/mapping_format_schema.rb
273
272
  - lib/algolia/models/ingestion/mapping_input.rb
@@ -300,6 +299,7 @@ files:
300
299
  - lib/algolia/models/ingestion/shopify_input.rb
301
300
  - lib/algolia/models/ingestion/shopify_market.rb
302
301
  - lib/algolia/models/ingestion/shopify_metafield.rb
302
+ - lib/algolia/models/ingestion/sort_keys.rb
303
303
  - lib/algolia/models/ingestion/source.rb
304
304
  - lib/algolia/models/ingestion/source_big_commerce.rb
305
305
  - lib/algolia/models/ingestion/source_big_query.rb
@@ -322,6 +322,7 @@ files:
322
322
  - lib/algolia/models/ingestion/source_update_input.rb
323
323
  - lib/algolia/models/ingestion/source_update_response.rb
324
324
  - lib/algolia/models/ingestion/source_update_shopify.rb
325
+ - lib/algolia/models/ingestion/source_watch_response.rb
325
326
  - lib/algolia/models/ingestion/streaming_trigger.rb
326
327
  - lib/algolia/models/ingestion/streaming_trigger_type.rb
327
328
  - lib/algolia/models/ingestion/streaming_utils_input.rb
@@ -336,6 +337,14 @@ files:
336
337
  - lib/algolia/models/ingestion/task_sort_keys.rb
337
338
  - lib/algolia/models/ingestion/task_update.rb
338
339
  - lib/algolia/models/ingestion/task_update_response.rb
340
+ - lib/algolia/models/ingestion/transformation.rb
341
+ - lib/algolia/models/ingestion/transformation_create.rb
342
+ - lib/algolia/models/ingestion/transformation_create_response.rb
343
+ - lib/algolia/models/ingestion/transformation_search.rb
344
+ - lib/algolia/models/ingestion/transformation_try.rb
345
+ - lib/algolia/models/ingestion/transformation_try_response.rb
346
+ - lib/algolia/models/ingestion/transformation_try_response_error.rb
347
+ - lib/algolia/models/ingestion/transformation_update_response.rb
339
348
  - lib/algolia/models/ingestion/trigger.rb
340
349
  - lib/algolia/models/ingestion/trigger_type.rb
341
350
  - lib/algolia/models/ingestion/trigger_update_input.rb