Skip to content

Commit

Permalink
fix(specs): correct query params for ingestion [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3830

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
Co-authored-by: shortcuts <[email protected]>
  • Loading branch information
3 people committed Sep 25, 2024
1 parent 30546cf commit 250b0aa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
22 changes: 14 additions & 8 deletions lib/algolia/api/ingestion_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,8 @@ def get_transformation(transformation_id, request_options = {})
# @param items_per_page [Integer] Number of items per page. (default to 10)
# @param page [Integer] Page number of the paginated API response.
# @param type [Array<AuthenticationType>] Type of authentication resource to retrieve.
# @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentication resources.
# @param sort [AuthenticationSortKeys] Property by which to sort the list of authentication resources. (default to 'createdAt')
# @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentications.
# @param sort [AuthenticationSortKeys] Property by which to sort the list of authentications. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
# @return [Http::Response] the response
Expand Down Expand Up @@ -1441,8 +1441,8 @@ def list_authentications_with_http_info(
# @param items_per_page [Integer] Number of items per page. (default to 10)
# @param page [Integer] Page number of the paginated API response.
# @param type [Array<AuthenticationType>] Type of authentication resource to retrieve.
# @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentication resources.
# @param sort [AuthenticationSortKeys] Property by which to sort the list of authentication resources. (default to 'createdAt')
# @param platform [Array<PlatformWithNone>] Ecommerce platform for which to retrieve authentications.
# @param sort [AuthenticationSortKeys] Property by which to sort the list of authentications. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
# @return [ListAuthenticationsResponse]
Expand Down Expand Up @@ -1472,6 +1472,7 @@ def list_authentications(
# @param page [Integer] Page number of the paginated API response.
# @param type [Array<DestinationType>] Destination type.
# @param authentication_id [Array<String>] Authentication ID used by destinations.
# @param transformation_id [String] Get the list of destinations used by a transformation.
# @param sort [DestinationSortKeys] Property by which to sort the destinations. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
Expand All @@ -1481,6 +1482,7 @@ def list_destinations_with_http_info(
page = nil,
type = nil,
authentication_id = nil,
transformation_id = nil,
sort = nil,
order = nil,
request_options = {}
Expand Down Expand Up @@ -1515,6 +1517,7 @@ def list_destinations_with_http_info(
query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv)
end

query_params[:transformationID] = transformation_id unless transformation_id.nil?
query_params[:sort] = sort unless sort.nil?
query_params[:order] = order unless order.nil?
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
Expand Down Expand Up @@ -1544,6 +1547,7 @@ def list_destinations_with_http_info(
# @param page [Integer] Page number of the paginated API response.
# @param type [Array<DestinationType>] Destination type.
# @param authentication_id [Array<String>] Authentication ID used by destinations.
# @param transformation_id [String] Get the list of destinations used by a transformation.
# @param sort [DestinationSortKeys] Property by which to sort the destinations. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
Expand All @@ -1553,6 +1557,7 @@ def list_destinations(
page = nil,
type = nil,
authentication_id = nil,
transformation_id = nil,
sort = nil,
order = nil,
request_options = {}
Expand All @@ -1562,6 +1567,7 @@ def list_destinations(
page,
type,
authentication_id,
transformation_id,
sort,
order,
request_options
Expand Down Expand Up @@ -1829,7 +1835,7 @@ def list_runs(
# @param items_per_page [Integer] Number of items per page. (default to 10)
# @param page [Integer] Page number of the paginated API response.
# @param type [Array<SourceType>] Source type. Some sources require authentication.
# @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication resource.
# @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.
# @param sort [SourceSortKeys] Property by which to sort the list of sources. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
Expand Down Expand Up @@ -1901,7 +1907,7 @@ def list_sources_with_http_info(
# @param items_per_page [Integer] Number of items per page. (default to 10)
# @param page [Integer] Page number of the paginated API response.
# @param type [Array<SourceType>] Source type. Some sources require authentication.
# @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication resource.
# @param authentication_id [Array<String>] Authentication IDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.
# @param sort [SourceSortKeys] Property by which to sort the list of sources. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
Expand Down Expand Up @@ -2185,7 +2191,7 @@ def list_tasks_v1(
# - editSettings
# @param items_per_page [Integer] Number of items per page. (default to 10)
# @param page [Integer] Page number of the paginated API response.
# @param sort [SortKeys] Property by which to sort the list. (default to 'desc')
# @param sort [TransformationSortKeys] Property by which to sort the list of transformations. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
# @return [Http::Response] the response
Expand Down Expand Up @@ -2248,7 +2254,7 @@ def list_transformations_with_http_info(
# - editSettings
# @param items_per_page [Integer] Number of items per page. (default to 10)
# @param page [Integer] Page number of the paginated API response.
# @param sort [SortKeys] Property by which to sort the list. (default to 'desc')
# @param sort [TransformationSortKeys] Property by which to sort the list of transformations. (default to 'createdAt')
# @param order [OrderKeys] Sort order of the response, ascending or descending. (default to 'desc')
# @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)
# @return [ListTransformationsResponse]
Expand Down
4 changes: 2 additions & 2 deletions lib/algolia/models/ingestion/authentication_sort_keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ module Algolia
module Ingestion
class AuthenticationSortKeys
NAME = "name".freeze
AUTH_TYPE = "auth_type".freeze
TYPE = "type".freeze
PLATFORM = "platform".freeze
UPDATED_AT = "updatedAt".freeze
CREATED_AT = "createdAt".freeze

def self.all_vars
@all_vars ||= [NAME, AUTH_TYPE, PLATFORM, UPDATED_AT, CREATED_AT].freeze
@all_vars ||= [NAME, TYPE, PLATFORM, UPDATED_AT, CREATED_AT].freeze
end

# Builds the enum from string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

module Algolia
module Ingestion
class SortKeys
class TransformationSortKeys
NAME = "name".freeze
TYPE = "type".freeze
UPDATED_AT = "updatedAt".freeze
CREATED_AT = "createdAt".freeze

def self.all_vars
@all_vars ||= [NAME, TYPE, UPDATED_AT, CREATED_AT].freeze
@all_vars ||= [NAME, UPDATED_AT, CREATED_AT].freeze
end

# Builds the enum from string
Expand All @@ -26,8 +25,8 @@ def self.build_from_hash(value)
# @param [String] The enum value in the form of the string
# @return [String] The enum value
def build_from_hash(value)
return value if SortKeys.all_vars.include?(value)
raise "Invalid ENUM value #{value} for class #SortKeys"
return value if TransformationSortKeys.all_vars.include?(value)
raise "Invalid ENUM value #{value} for class #TransformationSortKeys"
end
end
end
Expand Down

0 comments on commit 250b0aa

Please sign in to comment.