Skip to content

Commit

Permalink
Merge branch 'main' into fix/run-type (generated)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Aug 27, 2024
1 parent 51c85e0 commit 3ba60f4
Show file tree
Hide file tree
Showing 44 changed files with 253 additions and 103 deletions.
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
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
}

21 changes: 21 additions & 0 deletions clients/algoliasearch-client-go/algolia/ingestion/api_ingestion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,7 @@ public CompletableFuture<ListEventsResponse> listEventsAsync(@Nonnull String run
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param status Run status for filtering the list of task runs. (optional)
* @param type Run type for filtering the list of task runs. (optional)
* @param taskID Task ID for filtering the list of task runs. (optional)
* @param sort Property by which to sort the list of task runs. (optional, default to createdAt)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
Expand All @@ -2247,14 +2248,15 @@ public RunListResponse listRuns(
Integer itemsPerPage,
Integer page,
List<RunStatus> status,
List<RunType> type,
String taskID,
RunSortKeys sort,
OrderKeys order,
String startDate,
String endDate,
RequestOptions requestOptions
) throws AlgoliaRuntimeException {
return LaunderThrowable.await(listRunsAsync(itemsPerPage, page, status, taskID, sort, order, startDate, endDate, requestOptions));
return LaunderThrowable.await(listRunsAsync(itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate, requestOptions));
}

/**
Expand All @@ -2263,6 +2265,7 @@ public RunListResponse listRuns(
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param status Run status for filtering the list of task runs. (optional)
* @param type Run type for filtering the list of task runs. (optional)
* @param taskID Task ID for filtering the list of task runs. (optional)
* @param sort Property by which to sort the list of task runs. (optional, default to createdAt)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
Expand All @@ -2276,13 +2279,14 @@ public RunListResponse listRuns(
Integer itemsPerPage,
Integer page,
List<RunStatus> status,
List<RunType> type,
String taskID,
RunSortKeys sort,
OrderKeys order,
String startDate,
String endDate
) throws AlgoliaRuntimeException {
return this.listRuns(itemsPerPage, page, status, taskID, sort, order, startDate, endDate, null);
return this.listRuns(itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate, null);
}

/**
Expand All @@ -2293,7 +2297,7 @@ public RunListResponse listRuns(
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public RunListResponse listRuns(RequestOptions requestOptions) throws AlgoliaRuntimeException {
return this.listRuns(null, null, null, null, null, null, null, null, requestOptions);
return this.listRuns(null, null, null, null, null, null, null, null, null, requestOptions);
}

/**
Expand All @@ -2302,7 +2306,7 @@ public RunListResponse listRuns(RequestOptions requestOptions) throws AlgoliaRun
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public RunListResponse listRuns() throws AlgoliaRuntimeException {
return this.listRuns(null, null, null, null, null, null, null, null, null);
return this.listRuns(null, null, null, null, null, null, null, null, null, null);
}

/**
Expand All @@ -2311,6 +2315,7 @@ public RunListResponse listRuns() throws AlgoliaRuntimeException {
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param status Run status for filtering the list of task runs. (optional)
* @param type Run type for filtering the list of task runs. (optional)
* @param taskID Task ID for filtering the list of task runs. (optional)
* @param sort Property by which to sort the list of task runs. (optional, default to createdAt)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
Expand All @@ -2326,6 +2331,7 @@ public CompletableFuture<RunListResponse> listRunsAsync(
Integer itemsPerPage,
Integer page,
List<RunStatus> status,
List<RunType> type,
String taskID,
RunSortKeys sort,
OrderKeys order,
Expand All @@ -2339,6 +2345,7 @@ public CompletableFuture<RunListResponse> listRunsAsync(
.addQueryParameter("itemsPerPage", itemsPerPage)
.addQueryParameter("page", page)
.addQueryParameter("status", status)
.addQueryParameter("type", type)
.addQueryParameter("taskID", taskID)
.addQueryParameter("sort", sort)
.addQueryParameter("order", order)
Expand All @@ -2354,6 +2361,7 @@ public CompletableFuture<RunListResponse> listRunsAsync(
* @param itemsPerPage Number of items per page. (optional, default to 10)
* @param page Page number of the paginated API response. (optional)
* @param status Run status for filtering the list of task runs. (optional)
* @param type Run type for filtering the list of task runs. (optional)
* @param taskID Task ID for filtering the list of task runs. (optional)
* @param sort Property by which to sort the list of task runs. (optional, default to createdAt)
* @param order Sort order of the response, ascending or descending. (optional, default to desc)
Expand All @@ -2367,13 +2375,14 @@ public CompletableFuture<RunListResponse> listRunsAsync(
Integer itemsPerPage,
Integer page,
List<RunStatus> status,
List<RunType> type,
String taskID,
RunSortKeys sort,
OrderKeys order,
String startDate,
String endDate
) throws AlgoliaRuntimeException {
return this.listRunsAsync(itemsPerPage, page, status, taskID, sort, order, startDate, endDate, null);
return this.listRunsAsync(itemsPerPage, page, status, type, taskID, sort, order, startDate, endDate, null);
}

/**
Expand All @@ -2384,7 +2393,7 @@ public CompletableFuture<RunListResponse> listRunsAsync(
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<RunListResponse> listRunsAsync(RequestOptions requestOptions) throws AlgoliaRuntimeException {
return this.listRunsAsync(null, null, null, null, null, null, null, null, requestOptions);
return this.listRunsAsync(null, null, null, null, null, null, null, null, null, requestOptions);
}

/**
Expand All @@ -2393,7 +2402,7 @@ public CompletableFuture<RunListResponse> listRunsAsync(RequestOptions requestOp
* @throws AlgoliaRuntimeException If it fails to process the API call
*/
public CompletableFuture<RunListResponse> listRunsAsync() throws AlgoliaRuntimeException {
return this.listRunsAsync(null, null, null, null, null, null, null, null, null);
return this.listRunsAsync(null, null, null, null, null, null, null, null, null, null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ public enum RunType {

UPDATE("update"),

DISCOVER("discover");
DISCOVER("discover"),

VALIDATE("validate"),

PUSH("push");

private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import type { PlatformWithNone } from './platformWithNone';
import type { RunSortKeys } from './runSortKeys';
import type { RunSourcePayload } from './runSourcePayload';
import type { RunStatus } from './runStatus';
import type { RunType } from './runType';
import type { SortKeys } from './sortKeys';
import type { SourceSortKeys } from './sourceSortKeys';
import type { SourceType } from './sourceType';
Expand Down Expand Up @@ -393,6 +394,10 @@ export type ListRunsProps = {
* Run status for filtering the list of task runs.
*/
status?: RunStatus[];
/**
* Run type for filtering the list of task runs.
*/
type?: RunType[];
/**
* Task ID for filtering the list of task runs.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/**
* Task run type.
*/
export type RunType = 'discover' | 'reindex' | 'update';
export type RunType = 'discover' | 'push' | 'reindex' | 'update' | 'validate';
Loading

0 comments on commit 3ba60f4

Please sign in to comment.