From ef58b7ac6c5022575db3ff20a14128ad98ad661c Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Wed, 25 Sep 2024 11:00:49 +0000 Subject: [PATCH] fix(specs): correct query params for ingestion [skip-bc] (generated) https://github.com/algolia/api-clients-automation/pull/3830 Co-authored-by: algolia-bot Co-authored-by: Pierre Millot Co-authored-by: shortcuts --- algoliasearch/ingestion/client.py | 134 ++++++++++++------ .../models/authentication_sort_keys.py | 4 +- ...rt_keys.py => transformation_sort_keys.py} | 8 +- 3 files changed, 92 insertions(+), 54 deletions(-) rename algoliasearch/ingestion/models/{sort_keys.py => transformation_sort_keys.py} (78%) diff --git a/algoliasearch/ingestion/client.py b/algoliasearch/ingestion/client.py index 99968abc6..f79cfac5e 100644 --- a/algoliasearch/ingestion/client.py +++ b/algoliasearch/ingestion/client.py @@ -83,7 +83,6 @@ from algoliasearch.ingestion.models.run_source_response import RunSourceResponse from algoliasearch.ingestion.models.run_status import RunStatus from algoliasearch.ingestion.models.run_type import RunType -from algoliasearch.ingestion.models.sort_keys import SortKeys from algoliasearch.ingestion.models.source import Source from algoliasearch.ingestion.models.source_create import SourceCreate from algoliasearch.ingestion.models.source_create_response import SourceCreateResponse @@ -109,6 +108,9 @@ TransformationCreateResponse, ) from algoliasearch.ingestion.models.transformation_search import TransformationSearch +from algoliasearch.ingestion.models.transformation_sort_keys import ( + TransformationSortKeys, +) from algoliasearch.ingestion.models.transformation_try import TransformationTry from algoliasearch.ingestion.models.transformation_try_response import ( TransformationTryResponse, @@ -1980,14 +1982,12 @@ async def list_authentications_with_http_info( platform: Annotated[ Optional[List[PlatformWithNone]], Field( - description="Ecommerce platform for which to retrieve authentication resources." + description="Ecommerce platform for which to retrieve authentications." ), ] = None, sort: Annotated[ Optional[AuthenticationSortKeys], - Field( - description="Property by which to sort the list of authentication resources." - ), + Field(description="Property by which to sort the list of authentications."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -2009,9 +2009,9 @@ async def list_authentications_with_http_info( :type page: int :param type: Type of authentication resource to retrieve. :type type: List[AuthenticationType] - :param platform: Ecommerce platform for which to retrieve authentication resources. + :param platform: Ecommerce platform for which to retrieve authentications. :type platform: List[PlatformWithNone] - :param sort: Property by which to sort the list of authentication resources. + :param sort: Property by which to sort the list of authentications. :type sort: AuthenticationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys @@ -2061,14 +2061,12 @@ async def list_authentications( platform: Annotated[ Optional[List[PlatformWithNone]], Field( - description="Ecommerce platform for which to retrieve authentication resources." + description="Ecommerce platform for which to retrieve authentications." ), ] = None, sort: Annotated[ Optional[AuthenticationSortKeys], - Field( - description="Property by which to sort the list of authentication resources." - ), + Field(description="Property by which to sort the list of authentications."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -2090,9 +2088,9 @@ async def list_authentications( :type page: int :param type: Type of authentication resource to retrieve. :type type: List[AuthenticationType] - :param platform: Ecommerce platform for which to retrieve authentication resources. + :param platform: Ecommerce platform for which to retrieve authentications. :type platform: List[PlatformWithNone] - :param sort: Property by which to sort the list of authentication resources. + :param sort: Property by which to sort the list of authentications. :type sort: AuthenticationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys @@ -2121,6 +2119,10 @@ async def list_destinations_with_http_info( Optional[List[StrictStr]], Field(description="Authentication ID used by destinations."), ] = None, + transformation_id: Annotated[ + Optional[StrictStr], + Field(description="Get the list of destinations used by a transformation."), + ] = None, sort: Annotated[ Optional[DestinationSortKeys], Field(description="Property by which to sort the destinations."), @@ -2147,6 +2149,8 @@ async def list_destinations_with_http_info( :type type: List[DestinationType] :param authentication_id: Authentication ID used by destinations. :type authentication_id: List[str] + :param transformation_id: Get the list of destinations used by a transformation. + :type transformation_id: str :param sort: Property by which to sort the destinations. :type sort: DestinationSortKeys :param order: Sort order of the response, ascending or descending. @@ -2165,6 +2169,8 @@ async def list_destinations_with_http_info( _query_parameters.append(("type", type)) if authentication_id is not None: _query_parameters.append(("authenticationID", authentication_id)) + if transformation_id is not None: + _query_parameters.append(("transformationID", transformation_id)) if sort is not None: _query_parameters.append(("sort", sort)) if order is not None: @@ -2197,6 +2203,10 @@ async def list_destinations( Optional[List[StrictStr]], Field(description="Authentication ID used by destinations."), ] = None, + transformation_id: Annotated[ + Optional[StrictStr], + Field(description="Get the list of destinations used by a transformation."), + ] = None, sort: Annotated[ Optional[DestinationSortKeys], Field(description="Property by which to sort the destinations."), @@ -2223,6 +2233,8 @@ async def list_destinations( :type type: List[DestinationType] :param authentication_id: Authentication ID used by destinations. :type authentication_id: List[str] + :param transformation_id: Get the list of destinations used by a transformation. + :type transformation_id: str :param sort: Property by which to sort the destinations. :type sort: DestinationSortKeys :param order: Sort order of the response, ascending or descending. @@ -2231,7 +2243,14 @@ async def list_destinations( :return: Returns the deserialized response in a 'ListDestinationsResponse' result object. """ resp = await self.list_destinations_with_http_info( - items_per_page, page, type, authentication_id, sort, order, request_options + items_per_page, + page, + type, + authentication_id, + transformation_id, + sort, + order, + request_options, ) return resp.deserialize(ListDestinationsResponse, resp.raw_data) @@ -2639,7 +2658,7 @@ async def list_sources_with_http_info( authentication_id: Annotated[ Optional[List[StrictStr]], Field( - description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. " + description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. " ), ] = None, sort: Annotated[ @@ -2666,7 +2685,7 @@ async def list_sources_with_http_info( :type page: int :param type: Source type. Some sources require authentication. :type type: List[SourceType] - :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. + :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. :type authentication_id: List[str] :param sort: Property by which to sort the list of sources. :type sort: SourceSortKeys @@ -2718,7 +2737,7 @@ async def list_sources( authentication_id: Annotated[ Optional[List[StrictStr]], Field( - description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. " + description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. " ), ] = None, sort: Annotated[ @@ -2745,7 +2764,7 @@ async def list_sources( :type page: int :param type: Source type. Some sources require authentication. :type type: List[SourceType] - :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. + :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. :type authentication_id: List[str] :param sort: Property by which to sort the list of sources. :type sort: SourceSortKeys @@ -3146,7 +3165,8 @@ async def list_transformations_with_http_info( Field(description="Page number of the paginated API response."), ] = None, sort: Annotated[ - Optional[SortKeys], Field(description="Property by which to sort the list.") + Optional[TransformationSortKeys], + Field(description="Property by which to sort the list of transformations."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -3166,8 +3186,8 @@ async def list_transformations_with_http_info( :type items_per_page: int :param page: Page number of the paginated API response. :type page: int - :param sort: Property by which to sort the list. - :type sort: SortKeys + :param sort: Property by which to sort the list of transformations. + :type sort: TransformationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys :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) @@ -3206,7 +3226,8 @@ async def list_transformations( Field(description="Page number of the paginated API response."), ] = None, sort: Annotated[ - Optional[SortKeys], Field(description="Property by which to sort the list.") + Optional[TransformationSortKeys], + Field(description="Property by which to sort the list of transformations."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -3226,8 +3247,8 @@ async def list_transformations( :type items_per_page: int :param page: Page number of the paginated API response. :type page: int - :param sort: Property by which to sort the list. - :type sort: SortKeys + :param sort: Property by which to sort the list of transformations. + :type sort: TransformationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys :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) @@ -6503,14 +6524,12 @@ def list_authentications_with_http_info( platform: Annotated[ Optional[List[PlatformWithNone]], Field( - description="Ecommerce platform for which to retrieve authentication resources." + description="Ecommerce platform for which to retrieve authentications." ), ] = None, sort: Annotated[ Optional[AuthenticationSortKeys], - Field( - description="Property by which to sort the list of authentication resources." - ), + Field(description="Property by which to sort the list of authentications."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -6532,9 +6551,9 @@ def list_authentications_with_http_info( :type page: int :param type: Type of authentication resource to retrieve. :type type: List[AuthenticationType] - :param platform: Ecommerce platform for which to retrieve authentication resources. + :param platform: Ecommerce platform for which to retrieve authentications. :type platform: List[PlatformWithNone] - :param sort: Property by which to sort the list of authentication resources. + :param sort: Property by which to sort the list of authentications. :type sort: AuthenticationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys @@ -6584,14 +6603,12 @@ def list_authentications( platform: Annotated[ Optional[List[PlatformWithNone]], Field( - description="Ecommerce platform for which to retrieve authentication resources." + description="Ecommerce platform for which to retrieve authentications." ), ] = None, sort: Annotated[ Optional[AuthenticationSortKeys], - Field( - description="Property by which to sort the list of authentication resources." - ), + Field(description="Property by which to sort the list of authentications."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -6613,9 +6630,9 @@ def list_authentications( :type page: int :param type: Type of authentication resource to retrieve. :type type: List[AuthenticationType] - :param platform: Ecommerce platform for which to retrieve authentication resources. + :param platform: Ecommerce platform for which to retrieve authentications. :type platform: List[PlatformWithNone] - :param sort: Property by which to sort the list of authentication resources. + :param sort: Property by which to sort the list of authentications. :type sort: AuthenticationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys @@ -6644,6 +6661,10 @@ def list_destinations_with_http_info( Optional[List[StrictStr]], Field(description="Authentication ID used by destinations."), ] = None, + transformation_id: Annotated[ + Optional[StrictStr], + Field(description="Get the list of destinations used by a transformation."), + ] = None, sort: Annotated[ Optional[DestinationSortKeys], Field(description="Property by which to sort the destinations."), @@ -6670,6 +6691,8 @@ def list_destinations_with_http_info( :type type: List[DestinationType] :param authentication_id: Authentication ID used by destinations. :type authentication_id: List[str] + :param transformation_id: Get the list of destinations used by a transformation. + :type transformation_id: str :param sort: Property by which to sort the destinations. :type sort: DestinationSortKeys :param order: Sort order of the response, ascending or descending. @@ -6688,6 +6711,8 @@ def list_destinations_with_http_info( _query_parameters.append(("type", type)) if authentication_id is not None: _query_parameters.append(("authenticationID", authentication_id)) + if transformation_id is not None: + _query_parameters.append(("transformationID", transformation_id)) if sort is not None: _query_parameters.append(("sort", sort)) if order is not None: @@ -6720,6 +6745,10 @@ def list_destinations( Optional[List[StrictStr]], Field(description="Authentication ID used by destinations."), ] = None, + transformation_id: Annotated[ + Optional[StrictStr], + Field(description="Get the list of destinations used by a transformation."), + ] = None, sort: Annotated[ Optional[DestinationSortKeys], Field(description="Property by which to sort the destinations."), @@ -6746,6 +6775,8 @@ def list_destinations( :type type: List[DestinationType] :param authentication_id: Authentication ID used by destinations. :type authentication_id: List[str] + :param transformation_id: Get the list of destinations used by a transformation. + :type transformation_id: str :param sort: Property by which to sort the destinations. :type sort: DestinationSortKeys :param order: Sort order of the response, ascending or descending. @@ -6754,7 +6785,14 @@ def list_destinations( :return: Returns the deserialized response in a 'ListDestinationsResponse' result object. """ resp = self.list_destinations_with_http_info( - items_per_page, page, type, authentication_id, sort, order, request_options + items_per_page, + page, + type, + authentication_id, + transformation_id, + sort, + order, + request_options, ) return resp.deserialize(ListDestinationsResponse, resp.raw_data) @@ -7162,7 +7200,7 @@ def list_sources_with_http_info( authentication_id: Annotated[ Optional[List[StrictStr]], Field( - description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. " + description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. " ), ] = None, sort: Annotated[ @@ -7189,7 +7227,7 @@ def list_sources_with_http_info( :type page: int :param type: Source type. Some sources require authentication. :type type: List[SourceType] - :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. + :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. :type authentication_id: List[str] :param sort: Property by which to sort the list of sources. :type sort: SourceSortKeys @@ -7241,7 +7279,7 @@ def list_sources( authentication_id: Annotated[ Optional[List[StrictStr]], Field( - description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. " + description="Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. " ), ] = None, sort: Annotated[ @@ -7268,7 +7306,7 @@ def list_sources( :type page: int :param type: Source type. Some sources require authentication. :type type: List[SourceType] - :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication resource. + :param authentication_id: Authentication IDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. :type authentication_id: List[str] :param sort: Property by which to sort the list of sources. :type sort: SourceSortKeys @@ -7669,7 +7707,8 @@ def list_transformations_with_http_info( Field(description="Page number of the paginated API response."), ] = None, sort: Annotated[ - Optional[SortKeys], Field(description="Property by which to sort the list.") + Optional[TransformationSortKeys], + Field(description="Property by which to sort the list of transformations."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -7689,8 +7728,8 @@ def list_transformations_with_http_info( :type items_per_page: int :param page: Page number of the paginated API response. :type page: int - :param sort: Property by which to sort the list. - :type sort: SortKeys + :param sort: Property by which to sort the list of transformations. + :type sort: TransformationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys :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) @@ -7729,7 +7768,8 @@ def list_transformations( Field(description="Page number of the paginated API response."), ] = None, sort: Annotated[ - Optional[SortKeys], Field(description="Property by which to sort the list.") + Optional[TransformationSortKeys], + Field(description="Property by which to sort the list of transformations."), ] = None, order: Annotated[ Optional[OrderKeys], @@ -7749,8 +7789,8 @@ def list_transformations( :type items_per_page: int :param page: Page number of the paginated API response. :type page: int - :param sort: Property by which to sort the list. - :type sort: SortKeys + :param sort: Property by which to sort the list of transformations. + :type sort: TransformationSortKeys :param order: Sort order of the response, ascending or descending. :type order: OrderKeys :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) diff --git a/algoliasearch/ingestion/models/authentication_sort_keys.py b/algoliasearch/ingestion/models/authentication_sort_keys.py index 685c702e4..1bf834856 100644 --- a/algoliasearch/ingestion/models/authentication_sort_keys.py +++ b/algoliasearch/ingestion/models/authentication_sort_keys.py @@ -18,7 +18,7 @@ class AuthenticationSortKeys(str, Enum): """ - Property by which to sort the list of authentication resources. + Property by which to sort the list of authentications. """ """ @@ -26,7 +26,7 @@ class AuthenticationSortKeys(str, Enum): """ NAME = "name" - AUTH_TYPE = "auth_type" + TYPE = "type" PLATFORM = "platform" diff --git a/algoliasearch/ingestion/models/sort_keys.py b/algoliasearch/ingestion/models/transformation_sort_keys.py similarity index 78% rename from algoliasearch/ingestion/models/sort_keys.py rename to algoliasearch/ingestion/models/transformation_sort_keys.py index 1deddccfe..ea8d1b10b 100644 --- a/algoliasearch/ingestion/models/sort_keys.py +++ b/algoliasearch/ingestion/models/transformation_sort_keys.py @@ -16,9 +16,9 @@ from typing_extensions import Self -class SortKeys(str, Enum): +class TransformationSortKeys(str, Enum): """ - Property by which to sort the list. + Property by which to sort the list of transformations. """ """ @@ -26,13 +26,11 @@ class SortKeys(str, Enum): """ NAME = "name" - TYPE = "type" - UPDATEDAT = "updatedAt" CREATEDAT = "createdAt" @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of SortKeys from a JSON string""" + """Create an instance of TransformationSortKeys from a JSON string""" return cls(loads(json_str))