algolia 3.0.0.beta.1 → 3.0.0.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile.lock +6 -6
  4. data/lib/algolia/models/abtesting/error_base.rb +2 -6
  5. data/lib/algolia/models/analytics/error_base.rb +2 -6
  6. data/lib/algolia/models/ingestion/error_base.rb +2 -6
  7. data/lib/algolia/models/insights/error_base.rb +2 -6
  8. data/lib/algolia/models/monitoring/error_base.rb +2 -6
  9. data/lib/algolia/models/personalization/error_base.rb +2 -6
  10. data/lib/algolia/models/query-suggestions/error_base.rb +2 -6
  11. data/lib/algolia/models/recommend/base_search_response.rb +2 -6
  12. data/lib/algolia/models/recommend/error_base.rb +2 -6
  13. data/lib/algolia/models/recommend/facet_filters.rb +1 -1
  14. data/lib/algolia/models/recommend/fallback_params.rb +1 -3
  15. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  16. data/lib/algolia/models/recommend/optional_filters.rb +1 -1
  17. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  18. data/lib/algolia/models/recommend/recommend_hit.rb +2 -6
  19. data/lib/algolia/models/recommend/search_params.rb +1 -3
  20. data/lib/algolia/models/recommend/search_params_object.rb +1 -3
  21. data/lib/algolia/models/recommend/tag_filters.rb +1 -1
  22. data/lib/algolia/models/search/base_search_response.rb +2 -6
  23. data/lib/algolia/models/search/browse_params_object.rb +1 -3
  24. data/lib/algolia/models/search/consequence_params.rb +1 -3
  25. data/lib/algolia/models/search/dictionary_entry.rb +2 -6
  26. data/lib/algolia/models/search/error_base.rb +2 -6
  27. data/lib/algolia/models/search/facet_filters.rb +1 -1
  28. data/lib/algolia/models/search/hit.rb +2 -6
  29. data/lib/algolia/models/search/index_settings.rb +1 -3
  30. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  31. data/lib/algolia/models/search/optional_filters.rb +1 -1
  32. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  33. data/lib/algolia/models/search/search_for_facet_values_response.rb +1 -1
  34. data/lib/algolia/models/search/search_for_facets.rb +1 -3
  35. data/lib/algolia/models/search/search_for_hits.rb +1 -3
  36. data/lib/algolia/models/search/search_hits.rb +2 -6
  37. data/lib/algolia/models/search/search_params_object.rb +1 -3
  38. data/lib/algolia/models/search/search_response.rb +2 -6
  39. data/lib/algolia/models/search/search_synonyms_response.rb +2 -6
  40. data/lib/algolia/models/search/tag_filters.rb +1 -1
  41. data/lib/algolia/models/usage/error_base.rb +2 -6
  42. data/lib/algolia/version.rb +1 -1
  43. metadata +2 -4
  44. data/lib/algolia/models/recommend/mixed_search_filters.rb +0 -96
  45. data/lib/algolia/models/search/mixed_search_filters.rb +0 -96
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0219c1fd0a686fb5e988fca7d690ee0a52831fa1612c924b93a9a3f566407f74'
4
- data.tar.gz: 31c4935fe0602a9ad6d4afbb5215c22089854a5e99c3ba1a3575c88d33101e7b
3
+ metadata.gz: ce6d6593d62ae959ce71401e5fc444b5c437ce4012214d537dd78ba0e8345155
4
+ data.tar.gz: c3b0076421efe15774ec8acb41f694a7c99b119d70cc7334eb9f436ca576ac7a
5
5
  SHA512:
6
- metadata.gz: 2b92fb39dcf9821d97049801b0229423bc83b49d0942fbe02e9e397c2b4153ff5fdec5273e03499decf8f757cc08392240159f6455aa330bb90d4e32732f308d
7
- data.tar.gz: 98d50e6633014e894788298491d4cd8fe4521f71b6e7f8ed733fcd58e67c2c5506639228a817fc66e61fc9a3c9c8849a6dab5da0237c5dc77b51e3a5f92370da
6
+ metadata.gz: b6b6d6ba1e60ca6fa73a8734f913b345af4a070b38d0e599b585221b39fa4d79a8f71cf7d739e4517a3e4677aea6521a08eb7defcdb93969e979290d886d11aa
7
+ data.tar.gz: abb19ef9c214cc448e08fe97b53c4205babff68745aa59e15fa30141a22b8230febf5517e215039b6cde468a3d5ebbd881fbb93d2a7457461907dba4936160f9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [3.0.0.beta.2](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.1...3.0.0.beta.2)
2
+
3
+ - [2b70d9ea5](https://github.com/algolia/api-clients-automation/commit/2b70d9ea5) fix(specs): exhaustiveFacetsCount is not deprecated for sffv ([#3089](https://github.com/algolia/api-clients-automation/pull/3089)) by [@kai687](https://github.com/kai687/)
4
+ - [1250c2b3c](https://github.com/algolia/api-clients-automation/commit/1250c2b3c) fix(specs): simplify filter types ([#3042](https://github.com/algolia/api-clients-automation/pull/3042)) by [@millotp](https://github.com/millotp/)
5
+
1
6
  ## [3.0.0.beta.1](https://github.com/algolia/algoliasearch-client-ruby/compare/3.0.0.beta.0...3.0.0.beta.1)
2
7
 
3
8
  - [b621988bc](https://github.com/algolia/api-clients-automation/commit/b621988bc) feat(specs): promote @kai687 to code owner ([#3014](https://github.com/algolia/api-clients-automation/pull/3014)) by [@Fluf22](https://github.com/Fluf22/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.0.0.beta.1)
4
+ algolia (3.0.0.beta.2)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-net_http_persistent (>= 0.15, < 3)
7
7
  net-http-persistent
@@ -25,15 +25,15 @@ GEM
25
25
  net-http-persistent (4.0.2)
26
26
  connection_pool (~> 2.2)
27
27
  parallel (1.24.0)
28
- parser (3.3.0.5)
28
+ parser (3.3.1.0)
29
29
  ast (~> 2.4.1)
30
30
  racc
31
31
  racc (1.7.3)
32
32
  rainbow (3.1.1)
33
33
  rake (13.2.1)
34
- regexp_parser (2.9.0)
34
+ regexp_parser (2.9.1)
35
35
  rexml (3.2.6)
36
- rubocop (1.63.1)
36
+ rubocop (1.63.5)
37
37
  json (~> 2.3)
38
38
  language_server-protocol (>= 3.17.0)
39
39
  parallel (~> 1.10)
@@ -44,8 +44,8 @@ GEM
44
44
  rubocop-ast (>= 1.31.1, < 2.0)
45
45
  ruby-progressbar (~> 1.7)
46
46
  unicode-display_width (>= 2.4.0, < 3.0)
47
- rubocop-ast (1.31.2)
48
- parser (>= 3.3.0.4)
47
+ rubocop-ast (1.31.3)
48
+ parser (>= 3.3.1.0)
49
49
  ruby-progressbar (1.13.0)
50
50
  unicode-display_width (2.5.0)
51
51
  uri (0.13.0)
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -439,12 +439,8 @@ module Algolia
439
439
  end
440
440
  end
441
441
 
442
- # merge additional_properties into transformed_hash
443
- unless @additional_properties.nil?
444
- @additional_properties.each_pair do |k, v|
445
- transformed_hash[k.to_sym] = v
446
- end
447
- end
442
+ # add extra attribute to transformed_hash
443
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
448
444
  new(transformed_hash)
449
445
  end
450
446
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<FacetFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -410,9 +410,7 @@ module Algolia
410
410
 
411
411
  # List of attributes with nullable: true
412
412
  def self.openapi_nullable
413
- Set.new([
414
- :re_ranking_apply_filter
415
- ])
413
+ Set.new([])
416
414
  end
417
415
 
418
416
  # List of class defined in allOf (OpenAPI v3)
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<NumericFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<OptionalFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<ReRankingApplyFilter>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -169,12 +169,8 @@ module Algolia
169
169
  end
170
170
  end
171
171
 
172
- # merge additional_properties into transformed_hash
173
- unless @additional_properties.nil?
174
- @additional_properties.each_pair do |k, v|
175
- transformed_hash[k.to_sym] = v
176
- end
177
- end
172
+ # add extra attribute to transformed_hash
173
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
178
174
  new(transformed_hash)
179
175
  end
180
176
 
@@ -410,9 +410,7 @@ module Algolia
410
410
 
411
411
  # List of attributes with nullable: true
412
412
  def self.openapi_nullable
413
- Set.new([
414
- :re_ranking_apply_filter
415
- ])
413
+ Set.new([])
416
414
  end
417
415
 
418
416
  # List of class defined in allOf (OpenAPI v3)
@@ -411,9 +411,7 @@ module Algolia
411
411
 
412
412
  # List of attributes with nullable: true
413
413
  def self.openapi_nullable
414
- Set.new([
415
- :re_ranking_apply_filter
416
- ])
414
+ Set.new([])
417
415
  end
418
416
 
419
417
  # List of class defined in allOf (OpenAPI v3)
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<TagFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -439,12 +439,8 @@ module Algolia
439
439
  end
440
440
  end
441
441
 
442
- # merge additional_properties into transformed_hash
443
- unless @additional_properties.nil?
444
- @additional_properties.each_pair do |k, v|
445
- transformed_hash[k.to_sym] = v
446
- end
447
- end
442
+ # add extra attribute to transformed_hash
443
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
448
444
  new(transformed_hash)
449
445
  end
450
446
 
@@ -415,9 +415,7 @@ module Algolia
415
415
 
416
416
  # List of attributes with nullable: true
417
417
  def self.openapi_nullable
418
- Set.new([
419
- :re_ranking_apply_filter
420
- ])
418
+ Set.new([])
421
419
  end
422
420
 
423
421
  # List of class defined in allOf (OpenAPI v3)
@@ -417,9 +417,7 @@ module Algolia
417
417
 
418
418
  # List of attributes with nullable: true
419
419
  def self.openapi_nullable
420
- Set.new([
421
- :re_ranking_apply_filter
422
- ])
420
+ Set.new([])
423
421
  end
424
422
 
425
423
  # List of class defined in allOf (OpenAPI v3)
@@ -173,12 +173,8 @@ module Algolia
173
173
  end
174
174
  end
175
175
 
176
- # merge additional_properties into transformed_hash
177
- unless @additional_properties.nil?
178
- @additional_properties.each_pair do |k, v|
179
- transformed_hash[k.to_sym] = v
180
- end
181
- end
176
+ # add extra attribute to transformed_hash
177
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
182
178
  new(transformed_hash)
183
179
  end
184
180
 
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<FacetFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -139,12 +139,8 @@ module Algolia
139
139
  end
140
140
  end
141
141
 
142
- # merge additional_properties into transformed_hash
143
- unless @additional_properties.nil?
144
- @additional_properties.each_pair do |k, v|
145
- transformed_hash[k.to_sym] = v
146
- end
147
- end
142
+ # add extra attribute to transformed_hash
143
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
148
144
  new(transformed_hash)
149
145
  end
150
146
 
@@ -342,9 +342,7 @@ module Algolia
342
342
 
343
343
  # List of attributes with nullable: true
344
344
  def self.openapi_nullable
345
- Set.new([
346
- :re_ranking_apply_filter
347
- ])
345
+ Set.new([])
348
346
  end
349
347
 
350
348
  # List of class defined in allOf (OpenAPI v3)
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<NumericFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<OptionalFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<ReRankingApplyFilter>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -9,7 +9,7 @@ module Algolia
9
9
  # Matching facet values.
10
10
  attr_accessor :facet_hits
11
11
 
12
- # See the `facetsCount` field of the `exhaustive` object in the response.
12
+ # Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
13
13
  attr_accessor :exhaustive_facets_count
14
14
 
15
15
  # Time the server took to process the request, in milliseconds.
@@ -434,9 +434,7 @@ module Algolia
434
434
 
435
435
  # List of attributes with nullable: true
436
436
  def self.openapi_nullable
437
- Set.new([
438
- :re_ranking_apply_filter
439
- ])
437
+ Set.new([])
440
438
  end
441
439
 
442
440
  # List of class defined in allOf (OpenAPI v3)
@@ -424,9 +424,7 @@ module Algolia
424
424
 
425
425
  # List of attributes with nullable: true
426
426
  def self.openapi_nullable
427
- Set.new([
428
- :re_ranking_apply_filter
429
- ])
427
+ Set.new([])
430
428
  end
431
429
 
432
430
  # List of class defined in allOf (OpenAPI v3)
@@ -122,12 +122,8 @@ module Algolia
122
122
  end
123
123
  end
124
124
 
125
- # merge additional_properties into transformed_hash
126
- unless @additional_properties.nil?
127
- @additional_properties.each_pair do |k, v|
128
- transformed_hash[k.to_sym] = v
129
- end
130
- end
125
+ # add extra attribute to transformed_hash
126
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
131
127
  new(transformed_hash)
132
128
  end
133
129
 
@@ -411,9 +411,7 @@ module Algolia
411
411
 
412
412
  # List of attributes with nullable: true
413
413
  def self.openapi_nullable
414
- Set.new([
415
- :re_ranking_apply_filter
416
- ])
414
+ Set.new([])
417
415
  end
418
416
 
419
417
  # List of class defined in allOf (OpenAPI v3)
@@ -483,12 +483,8 @@ module Algolia
483
483
  end
484
484
  end
485
485
 
486
- # merge additional_properties into transformed_hash
487
- unless @additional_properties.nil?
488
- @additional_properties.each_pair do |k, v|
489
- transformed_hash[k.to_sym] = v
490
- end
491
- end
486
+ # add extra attribute to transformed_hash
487
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
492
488
  new(transformed_hash)
493
489
  end
494
490
 
@@ -110,12 +110,8 @@ module Algolia
110
110
  end
111
111
  end
112
112
 
113
- # merge additional_properties into transformed_hash
114
- unless @additional_properties.nil?
115
- @additional_properties.each_pair do |k, v|
116
- transformed_hash[k.to_sym] = v
117
- end
118
- end
113
+ # add extra attribute to transformed_hash
114
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
119
115
  new(transformed_hash)
120
116
  end
121
117
 
@@ -11,7 +11,7 @@ module Algolia
11
11
  # List of class defined in oneOf (OpenAPI v3)
12
12
  def openapi_one_of
13
13
  [
14
- :'Array<MixedSearchFilters>',
14
+ :'Array<TagFilters>',
15
15
  :String
16
16
  ]
17
17
  end
@@ -94,12 +94,8 @@ module Algolia
94
94
  end
95
95
  end
96
96
 
97
- # merge additional_properties into transformed_hash
98
- unless @additional_properties.nil?
99
- @additional_properties.each_pair do |k, v|
100
- transformed_hash[k.to_sym] = v
101
- end
102
- end
97
+ # add extra attribute to transformed_hash
98
+ transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
103
99
  new(transformed_hash)
104
100
  end
105
101
 
@@ -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.1'.freeze
4
+ VERSION = '3.0.0.beta.2'.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.1
4
+ version: 3.0.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-23 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -450,7 +450,6 @@ files:
450
450
  - lib/algolia/models/recommend/looking_similar_query.rb
451
451
  - lib/algolia/models/recommend/match_level.rb
452
452
  - lib/algolia/models/recommend/matched_geo_location.rb
453
- - lib/algolia/models/recommend/mixed_search_filters.rb
454
453
  - lib/algolia/models/recommend/mode.rb
455
454
  - lib/algolia/models/recommend/numeric_filters.rb
456
455
  - lib/algolia/models/recommend/optional_filters.rb
@@ -590,7 +589,6 @@ files:
590
589
  - lib/algolia/models/search/log_type.rb
591
590
  - lib/algolia/models/search/match_level.rb
592
591
  - lib/algolia/models/search/matched_geo_location.rb
593
- - lib/algolia/models/search/mixed_search_filters.rb
594
592
  - lib/algolia/models/search/mode.rb
595
593
  - lib/algolia/models/search/multiple_batch_request.rb
596
594
  - lib/algolia/models/search/multiple_batch_response.rb
@@ -1,96 +0,0 @@
1
- # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
-
3
- require 'date'
4
- require 'time'
5
-
6
- module Algolia
7
- module Recommend
8
- module MixedSearchFilters
9
- class << self
10
- # List of class defined in oneOf (OpenAPI v3)
11
- def openapi_one_of
12
- [
13
- :'Array<String>',
14
- :String
15
- ]
16
- end
17
-
18
- # Builds the object
19
- # @param [Mixed] Data to be matched against the list of oneOf items
20
- # @return [Object] Returns the model or the data itself
21
- def build(data)
22
- # Go through the list of oneOf items and attempt to identify the appropriate one.
23
- # Note:
24
- # - We do not attempt to check whether exactly one item matches.
25
- # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
26
- # due to the way the deserialization is made in the base_object template (it just casts without verifying).
27
- # - TODO: scalar values are de facto behaving as if they were nullable.
28
- # - TODO: logging when debugging is set.
29
- openapi_one_of.each do |klass|
30
- next if klass == :AnyType # "nullable: true"
31
-
32
- typed_data = find_and_cast_into_type(klass, data)
33
- return typed_data if typed_data
34
- rescue # rescue all errors so we keep iterating even if the current item lookup raises
35
- end
36
-
37
- openapi_one_of.include?(:AnyType) ? data : nil
38
- end
39
-
40
- private
41
-
42
- SchemaMismatchError = Class.new(StandardError)
43
-
44
- # NOTE: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
45
- def find_and_cast_into_type(klass, data)
46
- return if data.nil?
47
-
48
- case klass.to_s
49
- when 'Boolean'
50
- return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
51
- when 'Float'
52
- return data if data.instance_of?(Float)
53
- when 'Integer'
54
- return data if data.instance_of?(Integer)
55
- when 'Time'
56
- return Time.parse(data)
57
- when 'Date'
58
- return Date.parse(data)
59
- when 'String'
60
- return data if data.instance_of?(String)
61
- when 'Object' # "type: object"
62
- return data if data.instance_of?(Hash)
63
- when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
64
- if data.instance_of?(Array)
65
- sub_type = Regexp.last_match[:sub_type]
66
- return data.map { |item| find_and_cast_into_type(sub_type, item) }
67
- end
68
- when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
69
- if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
70
- sub_type = Regexp.last_match[:sub_type]
71
- return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
72
- end
73
- else # model
74
- const = Algolia::Recommend.const_get(klass)
75
- if const
76
- if const.respond_to?(:openapi_one_of) # nested oneOf model
77
- model = const.build(data)
78
- else
79
- # raise if data contains keys that are not known to the model
80
- raise unless (data.keys - const.acceptable_attributes).empty?
81
-
82
- model = const.build_from_hash(data)
83
- end
84
-
85
- return model if model
86
- end
87
- end
88
-
89
- raise # if no match by now, raise
90
- rescue
91
- raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
92
- end
93
- end
94
- end
95
- end
96
- end
@@ -1,96 +0,0 @@
1
- # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
-
3
- require 'date'
4
- require 'time'
5
-
6
- module Algolia
7
- module Search
8
- module MixedSearchFilters
9
- class << self
10
- # List of class defined in oneOf (OpenAPI v3)
11
- def openapi_one_of
12
- [
13
- :'Array<String>',
14
- :String
15
- ]
16
- end
17
-
18
- # Builds the object
19
- # @param [Mixed] Data to be matched against the list of oneOf items
20
- # @return [Object] Returns the model or the data itself
21
- def build(data)
22
- # Go through the list of oneOf items and attempt to identify the appropriate one.
23
- # Note:
24
- # - We do not attempt to check whether exactly one item matches.
25
- # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
26
- # due to the way the deserialization is made in the base_object template (it just casts without verifying).
27
- # - TODO: scalar values are de facto behaving as if they were nullable.
28
- # - TODO: logging when debugging is set.
29
- openapi_one_of.each do |klass|
30
- next if klass == :AnyType # "nullable: true"
31
-
32
- typed_data = find_and_cast_into_type(klass, data)
33
- return typed_data if typed_data
34
- rescue # rescue all errors so we keep iterating even if the current item lookup raises
35
- end
36
-
37
- openapi_one_of.include?(:AnyType) ? data : nil
38
- end
39
-
40
- private
41
-
42
- SchemaMismatchError = Class.new(StandardError)
43
-
44
- # NOTE: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
45
- def find_and_cast_into_type(klass, data)
46
- return if data.nil?
47
-
48
- case klass.to_s
49
- when 'Boolean'
50
- return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
51
- when 'Float'
52
- return data if data.instance_of?(Float)
53
- when 'Integer'
54
- return data if data.instance_of?(Integer)
55
- when 'Time'
56
- return Time.parse(data)
57
- when 'Date'
58
- return Date.parse(data)
59
- when 'String'
60
- return data if data.instance_of?(String)
61
- when 'Object' # "type: object"
62
- return data if data.instance_of?(Hash)
63
- when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
64
- if data.instance_of?(Array)
65
- sub_type = Regexp.last_match[:sub_type]
66
- return data.map { |item| find_and_cast_into_type(sub_type, item) }
67
- end
68
- when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
69
- if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
70
- sub_type = Regexp.last_match[:sub_type]
71
- return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
72
- end
73
- else # model
74
- const = Algolia::Search.const_get(klass)
75
- if const
76
- if const.respond_to?(:openapi_one_of) # nested oneOf model
77
- model = const.build(data)
78
- else
79
- # raise if data contains keys that are not known to the model
80
- raise unless (data.keys - const.acceptable_attributes).empty?
81
-
82
- model = const.build_from_hash(data)
83
- end
84
-
85
- return model if model
86
- end
87
- end
88
-
89
- raise # if no match by now, raise
90
- rescue
91
- raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
92
- end
93
- end
94
- end
95
- end
96
- end