Skip to content

Commit 5a3b331

Browse files
chore: noob (generated)
Co-authored-by: shortcuts <[email protected]>
1 parent e819fa1 commit 5a3b331

File tree

23 files changed

+614
-20
lines changed

23 files changed

+614
-20
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Clients/IngestionClient.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,13 +1275,14 @@ public interface IIngestionClient
12751275
/// - editSettings
12761276
/// <param name="taskID">Unique identifier of a task.</param>
12771277
/// <param name="pushTaskPayload">Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.</param>
1278+
/// <param name="watch">When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding. (optional)</param>
12781279
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
12791280
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
12801281
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
12811282
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
12821283
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
12831284
/// <returns>Task of RunResponse</returns>
1284-
Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default);
1285+
Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
12851286

12861287
/// <summary>
12871288
/// Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints. (Synchronous version)
@@ -1293,13 +1294,14 @@ public interface IIngestionClient
12931294
/// - editSettings
12941295
/// <param name="taskID">Unique identifier of a task.</param>
12951296
/// <param name="pushTaskPayload">Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.</param>
1297+
/// <param name="watch">When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding. (optional)</param>
12961298
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
12971299
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
12981300
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
12991301
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
13001302
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
13011303
/// <returns>RunResponse</returns>
1302-
RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default);
1304+
RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
13031305

13041306
/// <summary>
13051307
/// Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
@@ -2802,7 +2804,7 @@ public ListTransformationsResponse ListTransformations(int? itemsPerPage = defau
28022804

28032805

28042806
/// <inheritdoc />
2805-
public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default)
2807+
public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default)
28062808
{
28072809

28082810
if (taskID == null)
@@ -2816,14 +2818,15 @@ public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload push
28162818

28172819
requestOptions.PathParameters.Add("taskID", QueryStringHelper.ParameterToString(taskID));
28182820

2821+
requestOptions.AddQueryParameter("watch", watch);
28192822
requestOptions.Data = pushTaskPayload;
28202823
return await _transport.ExecuteRequestAsync<RunResponse>(new HttpMethod("POST"), "/2/tasks/{taskID}/push", requestOptions, cancellationToken).ConfigureAwait(false);
28212824
}
28222825

28232826

28242827
/// <inheritdoc />
2825-
public RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default) =>
2826-
AsyncHelper.RunSync(() => PushTaskAsync(taskID, pushTaskPayload, options, cancellationToken));
2828+
public RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
2829+
AsyncHelper.RunSync(() => PushTaskAsync(taskID, pushTaskPayload, watch, options, cancellationToken));
28272830

28282831

28292832
/// <inheritdoc />

clients/algoliasearch-client-go/algolia/ingestion/api_ingestion.go

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/api/IngestionClient.java

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,6 +2996,44 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
29962996
return this.listTransformationsAsync(null, null, null, null, null);
29972997
}
29982998

2999+
/**
3000+
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
3001+
* with the observability endpoints.
3002+
*
3003+
* @param taskID Unique identifier of a task. (required)
3004+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3005+
* Connectors pipeline. (required)
3006+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3007+
* the ingestion to be finished before responding. (optional)
3008+
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3009+
* the transporter requestOptions.
3010+
* @throws AlgoliaRuntimeException If it fails to process the API call
3011+
*/
3012+
public RunResponse pushTask(
3013+
@Nonnull String taskID,
3014+
@Nonnull PushTaskPayload pushTaskPayload,
3015+
Boolean watch,
3016+
RequestOptions requestOptions
3017+
) throws AlgoliaRuntimeException {
3018+
return LaunderThrowable.await(pushTaskAsync(taskID, pushTaskPayload, watch, requestOptions));
3019+
}
3020+
3021+
/**
3022+
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
3023+
* with the observability endpoints.
3024+
*
3025+
* @param taskID Unique identifier of a task. (required)
3026+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3027+
* Connectors pipeline. (required)
3028+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3029+
* the ingestion to be finished before responding. (optional)
3030+
* @throws AlgoliaRuntimeException If it fails to process the API call
3031+
*/
3032+
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
3033+
throws AlgoliaRuntimeException {
3034+
return this.pushTask(taskID, pushTaskPayload, watch, null);
3035+
}
3036+
29993037
/**
30003038
* Push a `batch` request payload through the Pipeline. You can check the status of task pushes
30013039
* with the observability endpoints.
@@ -3009,7 +3047,7 @@ public CompletableFuture<ListTransformationsResponse> listTransformationsAsync()
30093047
*/
30103048
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, RequestOptions requestOptions)
30113049
throws AlgoliaRuntimeException {
3012-
return LaunderThrowable.await(pushTaskAsync(taskID, pushTaskPayload, requestOptions));
3050+
return this.pushTask(taskID, pushTaskPayload, null, requestOptions);
30133051
}
30143052

30153053
/**
@@ -3022,7 +3060,7 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30223060
* @throws AlgoliaRuntimeException If it fails to process the API call
30233061
*/
30243062
public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload) throws AlgoliaRuntimeException {
3025-
return this.pushTask(taskID, pushTaskPayload, null);
3063+
return this.pushTask(taskID, pushTaskPayload, null, null);
30263064
}
30273065

30283066
/**
@@ -3032,13 +3070,16 @@ public RunResponse pushTask(@Nonnull String taskID, @Nonnull PushTaskPayload pus
30323070
* @param taskID Unique identifier of a task. (required)
30333071
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
30343072
* Connectors pipeline. (required)
3073+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3074+
* the ingestion to be finished before responding. (optional)
30353075
* @param requestOptions The requestOptions to send along with the query, they will be merged with
30363076
* the transporter requestOptions.
30373077
* @throws AlgoliaRuntimeException If it fails to process the API call
30383078
*/
30393079
public CompletableFuture<RunResponse> pushTaskAsync(
30403080
@Nonnull String taskID,
30413081
@Nonnull PushTaskPayload pushTaskPayload,
3082+
Boolean watch,
30423083
RequestOptions requestOptions
30433084
) throws AlgoliaRuntimeException {
30443085
Parameters.requireNonNull(taskID, "Parameter `taskID` is required when calling `pushTask`.");
@@ -3049,10 +3090,46 @@ public CompletableFuture<RunResponse> pushTaskAsync(
30493090
.setPath("/2/tasks/{taskID}/push", taskID)
30503091
.setMethod("POST")
30513092
.setBody(pushTaskPayload)
3093+
.addQueryParameter("watch", watch)
30523094
.build();
30533095
return executeAsync(request, requestOptions, new TypeReference<RunResponse>() {});
30543096
}
30553097

3098+
/**
3099+
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
3100+
* of task pushes with the observability endpoints.
3101+
*
3102+
* @param taskID Unique identifier of a task. (required)
3103+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3104+
* Connectors pipeline. (required)
3105+
* @param watch When provided, the push operation will be synchronous and the API will wait for
3106+
* the ingestion to be finished before responding. (optional)
3107+
* @throws AlgoliaRuntimeException If it fails to process the API call
3108+
*/
3109+
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload, Boolean watch)
3110+
throws AlgoliaRuntimeException {
3111+
return this.pushTaskAsync(taskID, pushTaskPayload, watch, null);
3112+
}
3113+
3114+
/**
3115+
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
3116+
* of task pushes with the observability endpoints.
3117+
*
3118+
* @param taskID Unique identifier of a task. (required)
3119+
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the
3120+
* Connectors pipeline. (required)
3121+
* @param requestOptions The requestOptions to send along with the query, they will be merged with
3122+
* the transporter requestOptions.
3123+
* @throws AlgoliaRuntimeException If it fails to process the API call
3124+
*/
3125+
public CompletableFuture<RunResponse> pushTaskAsync(
3126+
@Nonnull String taskID,
3127+
@Nonnull PushTaskPayload pushTaskPayload,
3128+
RequestOptions requestOptions
3129+
) throws AlgoliaRuntimeException {
3130+
return this.pushTaskAsync(taskID, pushTaskPayload, null, requestOptions);
3131+
}
3132+
30563133
/**
30573134
* (asynchronously) Push a `batch` request payload through the Pipeline. You can check the status
30583135
* of task pushes with the observability endpoints.
@@ -3064,7 +3141,7 @@ public CompletableFuture<RunResponse> pushTaskAsync(
30643141
*/
30653142
public CompletableFuture<RunResponse> pushTaskAsync(@Nonnull String taskID, @Nonnull PushTaskPayload pushTaskPayload)
30663143
throws AlgoliaRuntimeException {
3067-
return this.pushTaskAsync(taskID, pushTaskPayload, null);
3144+
return this.pushTaskAsync(taskID, pushTaskPayload, null, null);
30683145
}
30693146

30703147
/**

clients/algoliasearch-client-javascript/packages/ingestion/model/clientMethodProps.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,10 @@ export type PushTaskProps = {
588588
* Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
589589
*/
590590
pushTaskPayload: PushTaskPayload;
591+
/**
592+
* When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
593+
*/
594+
watch?: boolean;
591595
};
592596

593597
/**

clients/algoliasearch-client-javascript/packages/ingestion/src/ingestionClient.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1691,9 +1691,10 @@ export function createIngestionClient({
16911691
* @param pushTask - The pushTask object.
16921692
* @param pushTask.taskID - Unique identifier of a task.
16931693
* @param pushTask.pushTaskPayload - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
1694+
* @param pushTask.watch - When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
16941695
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
16951696
*/
1696-
pushTask({ taskID, pushTaskPayload }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse> {
1697+
pushTask({ taskID, pushTaskPayload, watch }: PushTaskProps, requestOptions?: RequestOptions): Promise<RunResponse> {
16971698
if (!taskID) {
16981699
throw new Error('Parameter `taskID` is required when calling `pushTask`.');
16991700
}
@@ -1713,6 +1714,10 @@ export function createIngestionClient({
17131714
const headers: Headers = {};
17141715
const queryParameters: QueryParameters = {};
17151716

1717+
if (watch !== undefined) {
1718+
queryParameters['watch'] = watch.toString();
1719+
}
1720+
17161721
const request: Request = {
17171722
method: 'POST',
17181723
path: requestPath,

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/api/IngestionClient.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,17 @@ public class IngestionClient(
922922
* - editSettings
923923
* @param taskID Unique identifier of a task.
924924
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
925+
* @param watch When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
925926
* @param requestOptions additional request configuration.
926927
*/
927-
public suspend fun pushTask(taskID: String, pushTaskPayload: PushTaskPayload, requestOptions: RequestOptions? = null): RunResponse {
928+
public suspend fun pushTask(taskID: String, pushTaskPayload: PushTaskPayload, watch: Boolean? = null, requestOptions: RequestOptions? = null): RunResponse {
928929
require(taskID.isNotBlank()) { "Parameter `taskID` is required when calling `pushTask`." }
929930
val requestConfig = RequestConfig(
930931
method = RequestMethod.POST,
931932
path = listOf("2", "tasks", "$taskID", "push"),
933+
query = buildMap {
934+
watch?.let { put("watch", it) }
935+
},
932936
body = pushTaskPayload,
933937
)
934938
return requester.execute(

clients/algoliasearch-client-php/lib/Api/IngestionClient.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,11 +1756,12 @@ public function listTransformations($itemsPerPage = null, $page = null, $sort =
17561756
*
17571757
* @see PushTaskPayload
17581758
*
1759+
* @param bool $watch When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding. (optional)
17591760
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
17601761
*
17611762
* @return \Algolia\AlgoliaSearch\Model\Ingestion\RunResponse|array<string, mixed>
17621763
*/
1763-
public function pushTask($taskID, $pushTaskPayload, $requestOptions = [])
1764+
public function pushTask($taskID, $pushTaskPayload, $watch = null, $requestOptions = [])
17641765
{
17651766
// verify the required parameter 'taskID' is set
17661767
if (!isset($taskID)) {
@@ -1780,6 +1781,10 @@ public function pushTask($taskID, $pushTaskPayload, $requestOptions = [])
17801781
$headers = [];
17811782
$httpBody = $pushTaskPayload;
17821783

1784+
if (null !== $watch) {
1785+
$queryParameters['watch'] = $watch;
1786+
}
1787+
17831788
// path params
17841789
if (null !== $taskID) {
17851790
$resourcePath = str_replace(

0 commit comments

Comments
 (0)