Skip to content

Commit

Permalink
fix(specs): filter run list by type (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3577

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Aug 27, 2024
1 parent 82cade4 commit 7f3960e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
15 changes: 10 additions & 5 deletions algoliasearch/Clients/IngestionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ public interface IIngestionClient
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
/// <param name="page">Page number of the paginated API response. (optional)</param>
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
Expand All @@ -858,14 +859,15 @@ public interface IIngestionClient
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of RunListResponse</returns>
Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieve a list of task runs. (Synchronous version)
/// </summary>
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
/// <param name="page">Page number of the paginated API response. (optional)</param>
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
Expand All @@ -877,7 +879,7 @@ public interface IIngestionClient
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>RunListResponse</returns>
RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Retrieves a list of sources.
Expand Down Expand Up @@ -3153,6 +3155,7 @@ public ListEventsResponse ListEvents(string runID, int? itemsPerPage = default,
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
/// <param name="page">Page number of the paginated API response. (optional)</param>
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
Expand All @@ -3164,14 +3167,15 @@ public ListEventsResponse ListEvents(string runID, int? itemsPerPage = default,
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of RunListResponse</returns>
public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
{
var requestOptions = new InternalRequestOptions(options);


requestOptions.AddQueryParameter("itemsPerPage", itemsPerPage);
requestOptions.AddQueryParameter("page", page);
requestOptions.AddQueryParameter("status", status);
requestOptions.AddQueryParameter("type", type);
requestOptions.AddQueryParameter("taskID", taskID);
requestOptions.AddQueryParameter("sort", sort);
requestOptions.AddQueryParameter("order", order);
Expand All @@ -3192,6 +3196,7 @@ public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, in
/// <param name="itemsPerPage">Number of items per page. (optional, default to 10)</param>
/// <param name="page">Page number of the paginated API response. (optional)</param>
/// <param name="status">Run status for filtering the list of task runs. (optional)</param>
/// <param name="type">Run type for filtering the list of task runs. (optional)</param>
/// <param name="taskID">Task ID for filtering the list of task runs. (optional)</param>
/// <param name="sort">Property by which to sort the list of task runs. (optional)</param>
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
Expand All @@ -3203,8 +3208,8 @@ public async Task<RunListResponse> ListRunsAsync(int? itemsPerPage = default, in
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>RunListResponse</returns>
public RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => ListRunsAsync(itemsPerPage, page, status, taskID, sort, order, startDate, endDate, options, cancellationToken));
public RunListResponse ListRuns(int? itemsPerPage = default, int? page = default, List<RunStatus> status = default, List<RunType> type = default, string taskID = default, RunSortKeys? sort = default, OrderKeys? order = default, string startDate = default, string endDate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => ListRunsAsync(itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate, options, cancellationToken));


/// <summary>
Expand Down
14 changes: 13 additions & 1 deletion algoliasearch/Models/Ingestion/RunType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ public enum RunType
/// Enum Discover for value: discover
/// </summary>
[JsonPropertyName("discover")]
Discover = 3
Discover = 3,

/// <summary>
/// Enum Validate for value: validate
/// </summary>
[JsonPropertyName("validate")]
Validate = 4,

/// <summary>
/// Enum Push for value: push
/// </summary>
[JsonPropertyName("push")]
Push = 5
}

0 comments on commit 7f3960e

Please sign in to comment.