algolia 3.25.0 → 3.26.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 +4 -4
- data/.github/workflows/issue.yml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/CHANGELOG.md +10 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/composition_client.rb +765 -0
- data/lib/algolia/api/ingestion_client.rb +15 -4
- data/lib/algolia/api/search_client.rb +4 -2
- data/lib/algolia/models/composition/action.rb +34 -0
- data/lib/algolia/models/composition/advanced_syntax_features.rb +34 -0
- data/lib/algolia/models/composition/alternatives_as_exact.rb +36 -0
- data/lib/algolia/models/composition/anchoring.rb +36 -0
- data/lib/algolia/models/composition/base_injection_query_parameters.rb +732 -0
- data/lib/algolia/models/composition/batch_composition_action.rb +109 -0
- data/lib/algolia/models/composition/batch_params.rb +213 -0
- data/lib/algolia/models/composition/boolean_string.rb +34 -0
- data/lib/algolia/models/composition/composition.rb +244 -0
- data/lib/algolia/models/composition/composition_behavior.rb +210 -0
- data/lib/algolia/models/composition/composition_rule.rb +280 -0
- data/lib/algolia/models/composition/composition_rule_consequence.rb +211 -0
- data/lib/algolia/models/composition/composition_rules_batch_params.rb +211 -0
- data/lib/algolia/models/composition/composition_source.rb +210 -0
- data/lib/algolia/models/composition/composition_source_search.rb +220 -0
- data/lib/algolia/models/composition/condition.rb +238 -0
- data/lib/algolia/models/composition/delete_composition_action.rb +212 -0
- data/lib/algolia/models/composition/delete_composition_rule_action.rb +212 -0
- data/lib/algolia/models/composition/distinct.rb +110 -0
- data/lib/algolia/models/composition/exact_on_single_word_query.rb +35 -0
- data/lib/algolia/models/composition/external.rb +226 -0
- data/lib/algolia/models/composition/external_ordering.rb +34 -0
- data/lib/algolia/models/composition/external_source.rb +211 -0
- data/lib/algolia/models/composition/get_task_response.rb +210 -0
- data/lib/algolia/models/composition/ignore_plurals.rb +111 -0
- data/lib/algolia/models/composition/injected_item.rb +253 -0
- data/lib/algolia/models/composition/injected_item_hits_metadata.rb +222 -0
- data/lib/algolia/models/composition/injected_item_metadata.rb +209 -0
- data/lib/algolia/models/composition/injected_item_source.rb +109 -0
- data/lib/algolia/models/composition/injection.rb +222 -0
- data/lib/algolia/models/composition/list_compositions_response.rb +261 -0
- data/lib/algolia/models/composition/main.rb +207 -0
- data/lib/algolia/models/composition/main_injection_query_parameters.rb +807 -0
- data/lib/algolia/models/composition/multiple_batch_request.rb +221 -0
- data/lib/algolia/models/composition/multiple_batch_response.rb +213 -0
- data/lib/algolia/models/composition/optional_words.rb +110 -0
- data/lib/algolia/models/composition/query_type.rb +35 -0
- data/lib/algolia/models/composition/remove_stop_words.rb +110 -0
- data/lib/algolia/models/composition/remove_words_if_no_results.rb +36 -0
- data/lib/algolia/models/composition/rules_batch_composition_action.rb +109 -0
- data/lib/algolia/models/composition/rules_multiple_batch_request.rb +221 -0
- data/lib/algolia/models/composition/rules_multiple_batch_response.rb +211 -0
- data/lib/algolia/models/composition/search.rb +217 -0
- data/lib/algolia/models/composition/search_composition_rules_params.rb +261 -0
- data/lib/algolia/models/composition/search_composition_rules_response.rb +249 -0
- data/lib/algolia/models/composition/search_source.rb +211 -0
- data/lib/algolia/models/composition/task_id_response.rb +211 -0
- data/lib/algolia/models/composition/task_status.rb +34 -0
- data/lib/algolia/models/composition/time_range.rb +219 -0
- data/lib/algolia/models/composition/typo_tolerance.rb +110 -0
- data/lib/algolia/models/composition/typo_tolerance_enum.rb +36 -0
- data/lib/algolia/version.rb +1 -1
- metadata +52 -1
@@ -2086,6 +2086,7 @@ module Algolia
|
|
2086
2086
|
# @param page [Integer] Page number of the paginated API response.
|
2087
2087
|
# @param sort [TransformationSortKeys] Property by which to sort the list of transformations. (default to 'createdAt')
|
2088
2088
|
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
|
2089
|
+
# @param type [TransformationType] Whether to filter the list of transformations by the type of transformation.
|
2089
2090
|
# @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)
|
2090
2091
|
# @return [Http::Response] the response
|
2091
2092
|
def list_transformations_with_http_info(
|
@@ -2093,6 +2094,7 @@ module Algolia
|
|
2093
2094
|
page = nil,
|
2094
2095
|
sort = nil,
|
2095
2096
|
order = nil,
|
2097
|
+
type = nil,
|
2096
2098
|
request_options = {}
|
2097
2099
|
)
|
2098
2100
|
path = "/1/transformations"
|
@@ -2101,6 +2103,7 @@ module Algolia
|
|
2101
2103
|
query_params[:page] = page unless page.nil?
|
2102
2104
|
query_params[:sort] = sort unless sort.nil?
|
2103
2105
|
query_params[:order] = order unless order.nil?
|
2106
|
+
query_params[:type] = type unless type.nil?
|
2104
2107
|
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
2105
2108
|
header_params = {}
|
2106
2109
|
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
@@ -2128,10 +2131,18 @@ module Algolia
|
|
2128
2131
|
# @param page [Integer] Page number of the paginated API response.
|
2129
2132
|
# @param sort [TransformationSortKeys] Property by which to sort the list of transformations. (default to 'createdAt')
|
2130
2133
|
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
|
2134
|
+
# @param type [TransformationType] Whether to filter the list of transformations by the type of transformation.
|
2131
2135
|
# @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)
|
2132
2136
|
# @return [ListTransformationsResponse]
|
2133
|
-
def list_transformations(
|
2134
|
-
|
2137
|
+
def list_transformations(
|
2138
|
+
items_per_page = nil,
|
2139
|
+
page = nil,
|
2140
|
+
sort = nil,
|
2141
|
+
order = nil,
|
2142
|
+
type = nil,
|
2143
|
+
request_options = {}
|
2144
|
+
)
|
2145
|
+
response = list_transformations_with_http_info(items_per_page, page, sort, order, type, request_options)
|
2135
2146
|
@api_client.deserialize(
|
2136
2147
|
response.body,
|
2137
2148
|
request_options[:debug_return_type] || "Ingestion::ListTransformationsResponse"
|
@@ -2206,7 +2217,7 @@ module Algolia
|
|
2206
2217
|
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::WatchResponse")
|
2207
2218
|
end
|
2208
2219
|
|
2209
|
-
# Pushes records through the
|
2220
|
+
# Pushes records through the pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints or the debugger dashboard to see the status of your task. If you want to transform your data before indexing, this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
|
2210
2221
|
#
|
2211
2222
|
# Required API Key ACLs:
|
2212
2223
|
# - addObject
|
@@ -2249,7 +2260,7 @@ module Algolia
|
|
2249
2260
|
@api_client.call_api(:POST, path, new_options)
|
2250
2261
|
end
|
2251
2262
|
|
2252
|
-
# Pushes records through the
|
2263
|
+
# Pushes records through the pipeline, directly to an index. You can make the call synchronous by providing the `watch` parameter, for asynchronous calls, you can use the observability endpoints or the debugger dashboard to see the status of your task. If you want to transform your data before indexing, this is the recommended way of ingesting your records. This method is similar to `push`, but requires a `taskID` instead of a `indexName`, which is useful when many `destinations` target the same `indexName`.
|
2253
2264
|
#
|
2254
2265
|
# Required API Key ACLs:
|
2255
2266
|
# - addObject
|
@@ -3272,7 +3272,8 @@ module Algolia
|
|
3272
3272
|
def browse_rules(index_name, search_rules_params = Search::SearchRulesParams.new, request_options = {}, &block)
|
3273
3273
|
search_rules_params = api_client.object_to_hash(search_rules_params)
|
3274
3274
|
|
3275
|
-
search_rules_params[:
|
3275
|
+
search_rules_params[:page] ||= 0
|
3276
|
+
search_rules_params[:hitsPerPage] ||= 1000
|
3276
3277
|
|
3277
3278
|
rules = []
|
3278
3279
|
loop do
|
@@ -3306,7 +3307,8 @@ module Algolia
|
|
3306
3307
|
)
|
3307
3308
|
search_synonyms_params = api_client.object_to_hash(search_synonyms_params)
|
3308
3309
|
|
3309
|
-
search_synonyms_params[:
|
3310
|
+
search_synonyms_params[:page] ||= 0
|
3311
|
+
search_synonyms_params[:hitsPerPage] ||= 1000
|
3310
3312
|
|
3311
3313
|
synonyms = []
|
3312
3314
|
loop do
|
@@ -0,0 +1,34 @@
|
|
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 Composition
|
10
|
+
class Action
|
11
|
+
UPSERT = "upsert".freeze
|
12
|
+
DELETE = "delete".freeze
|
13
|
+
|
14
|
+
def self.all_vars
|
15
|
+
@all_vars ||= [UPSERT, DELETE].freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
# Builds the enum from string
|
19
|
+
# @param [String] The enum value in the form of the string
|
20
|
+
# @return [String] The enum value
|
21
|
+
def self.build_from_hash(value)
|
22
|
+
new.build_from_hash(value)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def build_from_hash(value)
|
29
|
+
return value if Action.all_vars.include?(value)
|
30
|
+
raise "Invalid ENUM value #{value} for class #Action"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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 Composition
|
10
|
+
class AdvancedSyntaxFeatures
|
11
|
+
EXACT_PHRASE = "exactPhrase".freeze
|
12
|
+
EXCLUDE_WORDS = "excludeWords".freeze
|
13
|
+
|
14
|
+
def self.all_vars
|
15
|
+
@all_vars ||= [EXACT_PHRASE, EXCLUDE_WORDS].freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
# Builds the enum from string
|
19
|
+
# @param [String] The enum value in the form of the string
|
20
|
+
# @return [String] The enum value
|
21
|
+
def self.build_from_hash(value)
|
22
|
+
new.build_from_hash(value)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Builds the enum from string
|
26
|
+
# @param [String] The enum value in the form of the string
|
27
|
+
# @return [String] The enum value
|
28
|
+
def build_from_hash(value)
|
29
|
+
return value if AdvancedSyntaxFeatures.all_vars.include?(value)
|
30
|
+
raise "Invalid ENUM value #{value} for class #AdvancedSyntaxFeatures"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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 Composition
|
10
|
+
class AlternativesAsExact
|
11
|
+
IGNORE_PLURALS = "ignorePlurals".freeze
|
12
|
+
SINGLE_WORD_SYNONYM = "singleWordSynonym".freeze
|
13
|
+
MULTI_WORDS_SYNONYM = "multiWordsSynonym".freeze
|
14
|
+
IGNORE_CONJUGATIONS = "ignoreConjugations".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [IGNORE_PLURALS, SINGLE_WORD_SYNONYM, MULTI_WORDS_SYNONYM, IGNORE_CONJUGATIONS].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if AlternativesAsExact.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #AlternativesAsExact"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,36 @@
|
|
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 Composition
|
10
|
+
class Anchoring
|
11
|
+
IS = "is".freeze
|
12
|
+
STARTS_WITH = "startsWith".freeze
|
13
|
+
ENDS_WITH = "endsWith".freeze
|
14
|
+
CONTAINS = "contains".freeze
|
15
|
+
|
16
|
+
def self.all_vars
|
17
|
+
@all_vars ||= [IS, STARTS_WITH, ENDS_WITH, CONTAINS].freeze
|
18
|
+
end
|
19
|
+
|
20
|
+
# Builds the enum from string
|
21
|
+
# @param [String] The enum value in the form of the string
|
22
|
+
# @return [String] The enum value
|
23
|
+
def self.build_from_hash(value)
|
24
|
+
new.build_from_hash(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
return value if Anchoring.all_vars.include?(value)
|
32
|
+
raise "Invalid ENUM value #{value} for class #Anchoring"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|