algolia 3.33.0 → 3.34.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '038b9815e3e19a8df7af2d45f9479a21a50ec39fd9126a9faa6257cfce01a9d7'
4
- data.tar.gz: 40c503e65285a2ba1b6d65d95cfc63a1969eba47df7c7e94b156f7d83633f981
3
+ metadata.gz: 72b95250946c2ec0549f3ccb45bc8d6a19798fb718823f6785070670ab9dcb77
4
+ data.tar.gz: de2118558f108ca16cd821f7e22c616454bbb0fef657ef8768cc529891109b5b
5
5
  SHA512:
6
- metadata.gz: 5fe1da3a8c32637095019905d0efa909e9efb92c68029e9981a2dfc27d97c588c7ee958817c3afe7edaf84aa7007dc4a0c2635e4f23620d6c9e473a9544ec4e3
7
- data.tar.gz: 7f2497efdd53881975f361874a3a3de1790025b4e4e54bf4222a1f06fb539ee6fdfb80477e904ed0806958ae0b2b5adb39239b754737fb5cf077a96318b281ac
6
+ metadata.gz: f1c66a50bd34bd38336057f4d320f93e66502c4cfb0b108b524c6bb4dc0650fb5d33bcaa3cdf15c302d428b2242135c2e28b6a7a5ee6375404b3dcbd987e62a0
7
+ data.tar.gz: ab55900d51d0ed5e50236023a71d4b76db9a723584d62fc06eb76ac8f587134857b5bf07d39877a843538e460ce75393c835ef4368a9e75d9d49d1ae9b95c77c
@@ -36,16 +36,11 @@ jobs:
36
36
  id: '10001'
37
37
  },
38
38
  parent: {
39
- key: 'DI-3523'
39
+ key: 'API-1'
40
40
  },
41
41
  project: {
42
- id: '10118'
42
+ id: '11316'
43
43
  },
44
- components: [
45
- {
46
- id: '10872'
47
- }
48
- ],
49
44
  summary: `[GH-ISSUE] ${title}`
50
45
  },
51
46
  update: {}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [3.34.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.33.0...3.34.0)
2
+
3
+ - [5335918a5](https://github.com/algolia/api-clients-automation/commit/5335918a5) chore(scripts): update the jira action ([#5678](https://github.com/algolia/api-clients-automation/pull/5678)) by [@millotp](https://github.com/millotp/)
4
+ - [d6bde0f0c](https://github.com/algolia/api-clients-automation/commit/d6bde0f0c) chore(scripts): remove component from jira ticket ([#5680](https://github.com/algolia/api-clients-automation/pull/5680)) by [@millotp](https://github.com/millotp/)
5
+ - [fe6e82c11](https://github.com/algolia/api-clients-automation/commit/fe6e82c11) feat(specs): add sortBy query param and sortingStrategy ([#5686](https://github.com/algolia/api-clients-automation/pull/5686)) by [@ben-kalmus](https://github.com/ben-kalmus/)
6
+ - [cccfa9c86](https://github.com/algolia/api-clients-automation/commit/cccfa9c86) feat(specs): add `sortBy` trigger on Composition Rules ([#5707](https://github.com/algolia/api-clients-automation/pull/5707)) by [@ClaraMuller](https://github.com/ClaraMuller/)
7
+ - [260d8102c](https://github.com/algolia/api-clients-automation/commit/260d8102c) docs(abtests): Added documentation for featureFilters configuration i… ([#5688](https://github.com/algolia/api-clients-automation/pull/5688)) by [@samykettani](https://github.com/samykettani/)
8
+
1
9
  ## [3.33.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.32.0...3.33.0)
2
10
 
3
11
  - [6a48ef151a](https://github.com/algolia/api-clients-automation/commit/6a48ef151a) feat(specs): allow `enablePersonalization` query parameter at run time for Composition API ([#5651](https://github.com/algolia/api-clients-automation/pull/5651)) by [@ClaraMuller](https://github.com/ClaraMuller/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.33.0)
4
+ algolia (3.34.0)
5
5
  base64 (>= 0.2.0, < 1)
6
6
  faraday (>= 1.0.1, < 3.0)
7
7
  faraday-net_http_persistent (>= 0.15, < 3)
@@ -947,5 +947,61 @@ module Algolia
947
947
  )
948
948
  end
949
949
 
950
+ # Updates the \"sortingStrategy\" field of an existing composition. This endpoint allows you to create a new sorting strategy mapping or replace the currently configured one. The provided sorting indices MUST be associated indices or replicas of the main targeted index. WARNING: This endpoint cannot validate if the sort index is related to the composition's main index. Validation will fail at runtime if the index you updated is not related! The update is applied to the specified composition within the current Algolia application and returns a taskID that can be used to track the operation’s completion.
951
+ #
952
+ # Required API Key ACLs:
953
+ # - editSettings
954
+ # @param composition_id [String] Unique Composition ObjectID. (required)
955
+ # @param request_body [Hash<String, String>] (required)
956
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
957
+ # @return [Http::Response] the response
958
+ def update_sorting_strategy_composition_with_http_info(composition_id, request_body, request_options = {})
959
+ # verify the required parameter 'composition_id' is set
960
+ if @api_client.config.client_side_validation && composition_id.nil?
961
+ raise(
962
+ ArgumentError,
963
+ "Parameter `composition_id` is required when calling `update_sorting_strategy_composition`."
964
+ )
965
+ end
966
+ # verify the required parameter 'request_body' is set
967
+ if @api_client.config.client_side_validation && request_body.nil?
968
+ raise ArgumentError, "Parameter `request_body` is required when calling `update_sorting_strategy_composition`."
969
+ end
970
+
971
+ path = "/1/compositions/{compositionID}/sortingStrategy".sub(
972
+ "{" + "compositionID" + "}",
973
+ Transport.encode_uri(composition_id.to_s)
974
+ )
975
+ query_params = {}
976
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
977
+ header_params = {}
978
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
979
+
980
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(request_body)
981
+
982
+ new_options = request_options.merge(
983
+ :operation => :"CompositionClient.update_sorting_strategy_composition",
984
+ :header_params => header_params,
985
+ :query_params => query_params,
986
+ :body => post_body,
987
+ :use_read_transporter => false
988
+ )
989
+
990
+ @api_client.call_api(:POST, path, new_options)
991
+ end
992
+
993
+ # Updates the \"sortingStrategy\" field of an existing composition. This endpoint allows you to create a new sorting strategy mapping or replace the currently configured one. The provided sorting indices MUST be associated indices or replicas of the main targeted index. WARNING: This endpoint cannot validate if the sort index is related to the composition's main index. Validation will fail at runtime if the index you updated is not related! The update is applied to the specified composition within the current Algolia application and returns a taskID that can be used to track the operation’s completion.
994
+ #
995
+ # Required API Key ACLs:
996
+ # - editSettings
997
+ # @param composition_id [String] Unique Composition ObjectID. (required)
998
+ # @param request_body [Hash<String, String>] (required)
999
+ # @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)
1000
+ # @return [TaskIDResponse]
1001
+ def update_sorting_strategy_composition(composition_id, request_body, request_options = {})
1002
+ response = update_sorting_strategy_composition_with_http_info(composition_id, request_body, request_options)
1003
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Composition::TaskIDResponse")
1004
+ end
1005
+
950
1006
  end
951
1007
  end
@@ -9,6 +9,8 @@ module Algolia
9
9
  module Abtesting
10
10
  # A/B test configuration.
11
11
  class ABTestConfiguration
12
+ attr_accessor :feature_filters
13
+
12
14
  attr_accessor :outliers
13
15
 
14
16
  attr_accessor :empty_search
@@ -18,6 +20,7 @@ module Algolia
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :feature_filters => :featureFilters,
21
24
  :outliers => :outliers,
22
25
  :empty_search => :emptySearch,
23
26
  :minimum_detectable_effect => :minimumDetectableEffect
@@ -27,6 +30,7 @@ module Algolia
27
30
  # Attribute type mapping.
28
31
  def self.types_mapping
29
32
  {
33
+ :feature_filters => :"FeatureFilters",
30
34
  :outliers => :"Outliers",
31
35
  :empty_search => :"EmptySearch",
32
36
  :minimum_detectable_effect => :"MinimumDetectableEffect"
@@ -63,6 +67,10 @@ module Algolia
63
67
  h[k.to_sym] = v
64
68
  }
65
69
 
70
+ if attributes.key?(:feature_filters)
71
+ self.feature_filters = attributes[:feature_filters]
72
+ end
73
+
66
74
  if attributes.key?(:outliers)
67
75
  self.outliers = attributes[:outliers]
68
76
  end
@@ -81,6 +89,7 @@ module Algolia
81
89
  def ==(other)
82
90
  return true if self.equal?(other)
83
91
  self.class == other.class &&
92
+ feature_filters == other.feature_filters &&
84
93
  outliers == other.outliers &&
85
94
  empty_search == other.empty_search &&
86
95
  minimum_detectable_effect == other.minimum_detectable_effect
@@ -95,7 +104,7 @@ module Algolia
95
104
  # Calculates hash code according to all attributes.
96
105
  # @return [Integer] Hash code
97
106
  def hash
98
- [outliers, empty_search, minimum_detectable_effect].hash
107
+ [feature_filters, outliers, empty_search, minimum_detectable_effect].hash
99
108
  end
100
109
 
101
110
  # Builds the object from hash
@@ -9,6 +9,8 @@ module Algolia
9
9
  module Abtesting
10
10
  # A/B test configuration for estimating the sample size and duration using minimum detectable effect.
11
11
  class EstimateConfiguration
12
+ attr_accessor :feature_filters
13
+
12
14
  attr_accessor :outliers
13
15
 
14
16
  attr_accessor :empty_search
@@ -18,6 +20,7 @@ module Algolia
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :feature_filters => :featureFilters,
21
24
  :outliers => :outliers,
22
25
  :empty_search => :emptySearch,
23
26
  :minimum_detectable_effect => :minimumDetectableEffect
@@ -27,6 +30,7 @@ module Algolia
27
30
  # Attribute type mapping.
28
31
  def self.types_mapping
29
32
  {
33
+ :feature_filters => :"FeatureFilters",
30
34
  :outliers => :"Outliers",
31
35
  :empty_search => :"EmptySearch",
32
36
  :minimum_detectable_effect => :"MinimumDetectableEffect"
@@ -63,6 +67,10 @@ module Algolia
63
67
  h[k.to_sym] = v
64
68
  }
65
69
 
70
+ if attributes.key?(:feature_filters)
71
+ self.feature_filters = attributes[:feature_filters]
72
+ end
73
+
66
74
  if attributes.key?(:outliers)
67
75
  self.outliers = attributes[:outliers]
68
76
  end
@@ -83,6 +91,7 @@ module Algolia
83
91
  def ==(other)
84
92
  return true if self.equal?(other)
85
93
  self.class == other.class &&
94
+ feature_filters == other.feature_filters &&
86
95
  outliers == other.outliers &&
87
96
  empty_search == other.empty_search &&
88
97
  minimum_detectable_effect == other.minimum_detectable_effect
@@ -97,7 +106,7 @@ module Algolia
97
106
  # Calculates hash code according to all attributes.
98
107
  # @return [Integer] Hash code
99
108
  def hash
100
- [outliers, empty_search, minimum_detectable_effect].hash
109
+ [feature_filters, outliers, empty_search, minimum_detectable_effect].hash
101
110
  end
102
111
 
103
112
  # Builds the object from hash
@@ -0,0 +1,228 @@
1
+ # frozen_string_literal: true
2
+
3
+ # 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.
4
+
5
+ require "date"
6
+ require "time"
7
+
8
+ module Algolia
9
+ module Abtesting
10
+ # Configuration of feature-based filters applied to the A/B test population.
11
+ class FeatureFilters
12
+ # Whether to apply Dynamic Re-Ranking feature filters.
13
+ attr_accessor :dynamic_re_ranking
14
+
15
+ # Whether to apply AI Personalization feature filters.
16
+ attr_accessor :ai_perso
17
+
18
+ # Whether to apply Multi-Signal Re-Ranking feature filters.
19
+ attr_accessor :multi_signal_ranking
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :dynamic_re_ranking => :dynamicReRanking,
25
+ :ai_perso => :aiPerso,
26
+ :multi_signal_ranking => :multiSignalRanking
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.types_mapping
32
+ {
33
+ :dynamic_re_ranking => :"Boolean",
34
+ :ai_perso => :"Boolean",
35
+ :multi_signal_ranking => :"Boolean"
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new(
42
+ []
43
+ )
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ raise(
51
+ ArgumentError,
52
+ "The input argument (attributes) must be a hash in `Algolia::FeatureFilters` initialize method"
53
+ )
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ raise(
60
+ ArgumentError,
61
+ "`#{k}` is not a valid attribute in `Algolia::FeatureFilters`. Please check the name to make sure it's valid. List of attributes: " +
62
+ self.class.attribute_map.keys.inspect
63
+ )
64
+ end
65
+
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:dynamic_re_ranking)
70
+ self.dynamic_re_ranking = attributes[:dynamic_re_ranking]
71
+ end
72
+
73
+ if attributes.key?(:ai_perso)
74
+ self.ai_perso = attributes[:ai_perso]
75
+ end
76
+
77
+ if attributes.key?(:multi_signal_ranking)
78
+ self.multi_signal_ranking = attributes[:multi_signal_ranking]
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(other)
85
+ return true if self.equal?(other)
86
+ self.class == other.class &&
87
+ dynamic_re_ranking == other.dynamic_re_ranking &&
88
+ ai_perso == other.ai_perso &&
89
+ multi_signal_ranking == other.multi_signal_ranking
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(other)
95
+ self == other
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ def hash
101
+ [dynamic_re_ranking, ai_perso, multi_signal_ranking].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def self.build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ attributes = attributes.transform_keys(&:to_sym)
110
+ transformed_hash = {}
111
+ types_mapping.each_pair do |key, type|
112
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
113
+ transformed_hash[key.to_sym] = nil
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[attribute_map[key]].is_a?(Array)
118
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
119
+ _deserialize(::Regexp.last_match(1), v)
120
+ }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def self._deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ # model
168
+ else
169
+ # models (e.g. Pet) or oneOf
170
+ klass = Algolia::Abtesting.const_get(type)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
172
+ .build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ def to_json(*_args)
189
+ to_hash.to_json
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to?(:to_hash)
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
@@ -19,13 +19,17 @@ module Algolia
19
19
 
20
20
  attr_accessor :behavior
21
21
 
22
+ # A mapping of sorting labels to the indices (or replicas) that implement those sorting rules. The sorting indices MUST be related to the associated main targeted index in the composition. Each key is the label your frontend sends at runtime (for example, \"Price (asc)\"), and each value is the name of the index that should be queried when that label is selected. When a request includes a \"sortBy\" parameter, the platform looks up the corresponding index in this mapping and uses it to execute the query. The main targeted index is replaced with the sorting strategy index it is mapped to. Up to 20 sorting strategies can be defined.
23
+ attr_accessor :sorting_strategy
24
+
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :algolia_object_id => :objectID,
26
29
  :name => :name,
27
30
  :description => :description,
28
- :behavior => :behavior
31
+ :behavior => :behavior,
32
+ :sorting_strategy => :sortingStrategy
29
33
  }
30
34
  end
31
35
 
@@ -35,7 +39,8 @@ module Algolia
35
39
  :algolia_object_id => :"String",
36
40
  :name => :"String",
37
41
  :description => :"String",
38
- :behavior => :"CompositionBehavior"
42
+ :behavior => :"CompositionBehavior",
43
+ :sorting_strategy => :"Hash<String, String>"
39
44
  }
40
45
  end
41
46
 
@@ -90,6 +95,12 @@ module Algolia
90
95
  else
91
96
  self.behavior = nil
92
97
  end
98
+
99
+ if attributes.key?(:sorting_strategy)
100
+ if (value = attributes[:sorting_strategy]).is_a?(Hash)
101
+ self.sorting_strategy = value
102
+ end
103
+ end
93
104
  end
94
105
 
95
106
  # Checks equality by comparing each attribute.
@@ -100,7 +111,8 @@ module Algolia
100
111
  algolia_object_id == other.algolia_object_id &&
101
112
  name == other.name &&
102
113
  description == other.description &&
103
- behavior == other.behavior
114
+ behavior == other.behavior &&
115
+ sorting_strategy == other.sorting_strategy
104
116
  end
105
117
 
106
118
  # @see the `==` method
@@ -112,7 +124,7 @@ module Algolia
112
124
  # Calculates hash code according to all attributes.
113
125
  # @return [Integer] Hash code
114
126
  def hash
115
- [algolia_object_id, name, description, behavior].hash
127
+ [algolia_object_id, name, description, behavior, sorting_strategy].hash
116
128
  end
117
129
 
118
130
  # Builds the object from hash
@@ -19,13 +19,17 @@ module Algolia
19
19
  # Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
20
20
  attr_accessor :filters
21
21
 
22
+ # Sort criteria that trigger the rule. You can trigger composition rules based on the selected sorting strategy set by the parameter `sortBy`. The rule will trigger if the value passed to `sortBy` matches the one defined in the condition.
23
+ attr_accessor :sort_by
24
+
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :pattern => :pattern,
26
29
  :anchoring => :anchoring,
27
30
  :context => :context,
28
- :filters => :filters
31
+ :filters => :filters,
32
+ :sort_by => :sortBy
29
33
  }
30
34
  end
31
35
 
@@ -35,7 +39,8 @@ module Algolia
35
39
  :pattern => :"String",
36
40
  :anchoring => :"Anchoring",
37
41
  :context => :"String",
38
- :filters => :"String"
42
+ :filters => :"String",
43
+ :sort_by => :"String"
39
44
  }
40
45
  end
41
46
 
@@ -84,6 +89,10 @@ module Algolia
84
89
  if attributes.key?(:filters)
85
90
  self.filters = attributes[:filters]
86
91
  end
92
+
93
+ if attributes.key?(:sort_by)
94
+ self.sort_by = attributes[:sort_by]
95
+ end
87
96
  end
88
97
 
89
98
  # Checks equality by comparing each attribute.
@@ -94,7 +103,8 @@ module Algolia
94
103
  pattern == other.pattern &&
95
104
  anchoring == other.anchoring &&
96
105
  context == other.context &&
97
- filters == other.filters
106
+ filters == other.filters &&
107
+ sort_by == other.sort_by
98
108
  end
99
109
 
100
110
  # @see the `==` method
@@ -106,7 +116,7 @@ module Algolia
106
116
  # Calculates hash code according to all attributes.
107
117
  # @return [Integer] Hash code
108
118
  def hash
109
- [pattern, anchoring, context, filters].hash
119
+ [pattern, anchoring, context, filters, sort_by].hash
110
120
  end
111
121
 
112
122
  # Builds the object from hash
@@ -77,15 +77,18 @@ module Algolia
77
77
  # Search query.
78
78
  attr_accessor :query
79
79
 
80
- # Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
81
- attr_accessor :relevancy_strictness
82
-
83
80
  # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
84
81
  attr_accessor :query_languages
85
82
 
83
+ # Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
84
+ attr_accessor :relevancy_strictness
85
+
86
86
  # Assigns a rule context to the run query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
87
87
  attr_accessor :rule_contexts
88
88
 
89
+ # Indicates which sorting strategy to apply for the request. The value must match one of the labels defined in the \"sortingStrategy\" mapping. For example, \"Price (asc)\", see Upsert Composition. At runtime, this label is used to look up the corresponding index or replica configured in \"sortingStrategy\", and the query is executed using that index instead of main's. In addition to \"sortingStrategy\", this parameter is also used to apply a matching Composition Rule that contains a condition defined to trigger on \"sortBy\", see Composition Rules. If no value is provided or an invalid value, no sorting strategy is applied.
90
+ attr_accessor :sort_by
91
+
89
92
  # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
90
93
  attr_accessor :user_token
91
94
 
@@ -117,9 +120,10 @@ module Algolia
117
120
  :optional_filters => :optionalFilters,
118
121
  :page => :page,
119
122
  :query => :query,
120
- :relevancy_strictness => :relevancyStrictness,
121
123
  :query_languages => :queryLanguages,
124
+ :relevancy_strictness => :relevancyStrictness,
122
125
  :rule_contexts => :ruleContexts,
126
+ :sort_by => :sortBy,
123
127
  :user_token => :userToken
124
128
  }
125
129
  end
@@ -152,9 +156,10 @@ module Algolia
152
156
  :optional_filters => :"OptionalFilters",
153
157
  :page => :"Integer",
154
158
  :query => :"String",
155
- :relevancy_strictness => :"Integer",
156
159
  :query_languages => :"Array<SupportedLanguage>",
160
+ :relevancy_strictness => :"Integer",
157
161
  :rule_contexts => :"Array<String>",
162
+ :sort_by => :"String",
158
163
  :user_token => :"String"
159
164
  }
160
165
  end
@@ -298,22 +303,26 @@ module Algolia
298
303
  self.query = attributes[:query]
299
304
  end
300
305
 
301
- if attributes.key?(:relevancy_strictness)
302
- self.relevancy_strictness = attributes[:relevancy_strictness]
303
- end
304
-
305
306
  if attributes.key?(:query_languages)
306
307
  if (value = attributes[:query_languages]).is_a?(Array)
307
308
  self.query_languages = value
308
309
  end
309
310
  end
310
311
 
312
+ if attributes.key?(:relevancy_strictness)
313
+ self.relevancy_strictness = attributes[:relevancy_strictness]
314
+ end
315
+
311
316
  if attributes.key?(:rule_contexts)
312
317
  if (value = attributes[:rule_contexts]).is_a?(Array)
313
318
  self.rule_contexts = value
314
319
  end
315
320
  end
316
321
 
322
+ if attributes.key?(:sort_by)
323
+ self.sort_by = attributes[:sort_by]
324
+ end
325
+
317
326
  if attributes.key?(:user_token)
318
327
  self.user_token = attributes[:user_token]
319
328
  end
@@ -349,9 +358,10 @@ module Algolia
349
358
  optional_filters == other.optional_filters &&
350
359
  page == other.page &&
351
360
  query == other.query &&
352
- relevancy_strictness == other.relevancy_strictness &&
353
361
  query_languages == other.query_languages &&
362
+ relevancy_strictness == other.relevancy_strictness &&
354
363
  rule_contexts == other.rule_contexts &&
364
+ sort_by == other.sort_by &&
355
365
  user_token == other.user_token
356
366
  end
357
367
 
@@ -390,9 +400,10 @@ module Algolia
390
400
  optional_filters,
391
401
  page,
392
402
  query,
393
- relevancy_strictness,
394
403
  query_languages,
404
+ relevancy_strictness,
395
405
  rule_contexts,
406
+ sort_by,
396
407
  user_token
397
408
  ].hash
398
409
  end
@@ -3,5 +3,5 @@
3
3
  # 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.
4
4
 
5
5
  module Algolia
6
- VERSION = "3.33.0"
6
+ VERSION = "3.34.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.33.0
4
+ version: 3.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
@@ -191,6 +191,7 @@ files:
191
191
  - lib/algolia/models/abtesting/estimate_ab_test_request.rb
192
192
  - lib/algolia/models/abtesting/estimate_ab_test_response.rb
193
193
  - lib/algolia/models/abtesting/estimate_configuration.rb
194
+ - lib/algolia/models/abtesting/feature_filters.rb
194
195
  - lib/algolia/models/abtesting/filter_effects.rb
195
196
  - lib/algolia/models/abtesting/list_ab_tests_response.rb
196
197
  - lib/algolia/models/abtesting/minimum_detectable_effect.rb