Skip to content

Commit 8836bb5

Browse files
Merge branch 'main' into guides/push-setup-watcher (generated)
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 147e97f commit 8836bb5

File tree

33 files changed

+295
-283
lines changed

33 files changed

+295
-283
lines changed

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

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,8 +1281,8 @@ public interface IIngestionClient
12811281
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
12821282
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
12831283
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1284-
/// <returns>Task of RunResponse</returns>
1285-
Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1284+
/// <returns>Task of WatchResponse</returns>
1285+
Task<WatchResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
12861286

12871287
/// <summary>
12881288
/// Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints. (Synchronous version)
@@ -1300,8 +1300,8 @@ public interface IIngestionClient
13001300
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
13011301
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
13021302
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1303-
/// <returns>RunResponse</returns>
1304-
RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1303+
/// <returns>WatchResponse</returns>
1304+
WatchResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
13051305

13061306
/// <summary>
13071307
/// Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
@@ -1625,8 +1625,8 @@ public interface IIngestionClient
16251625
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
16261626
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
16271627
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1628-
/// <returns>Task of SourceWatchResponse</returns>
1629-
Task<SourceWatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);
1628+
/// <returns>Task of WatchResponse</returns>
1629+
Task<WatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);
16301630

16311631
/// <summary>
16321632
/// Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`. (Synchronous version)
@@ -1642,8 +1642,8 @@ public interface IIngestionClient
16421642
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
16431643
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
16441644
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1645-
/// <returns>SourceWatchResponse</returns>
1646-
SourceWatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);
1645+
/// <returns>WatchResponse</returns>
1646+
WatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);
16471647

16481648
/// <summary>
16491649
/// Try a transformation before creating it.
@@ -1915,8 +1915,8 @@ public interface IIngestionClient
19151915
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
19161916
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
19171917
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1918-
/// <returns>Task of SourceWatchResponse</returns>
1919-
Task<SourceWatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1918+
/// <returns>Task of WatchResponse</returns>
1919+
Task<WatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
19201920

19211921
/// <summary>
19221922
/// Validates a source payload to ensure it can be created and that the data source can be reached by Algolia. (Synchronous version)
@@ -1932,8 +1932,8 @@ public interface IIngestionClient
19321932
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
19331933
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
19341934
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1935-
/// <returns>SourceWatchResponse</returns>
1936-
SourceWatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1935+
/// <returns>WatchResponse</returns>
1936+
WatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
19371937

19381938
/// <summary>
19391939
/// Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
@@ -1950,8 +1950,8 @@ public interface IIngestionClient
19501950
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
19511951
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
19521952
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1953-
/// <returns>Task of SourceWatchResponse</returns>
1954-
Task<SourceWatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);
1953+
/// <returns>Task of WatchResponse</returns>
1954+
Task<WatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);
19551955

19561956
/// <summary>
19571957
/// Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia. (Synchronous version)
@@ -1968,8 +1968,8 @@ public interface IIngestionClient
19681968
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
19691969
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
19701970
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1971-
/// <returns>SourceWatchResponse</returns>
1972-
SourceWatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);
1971+
/// <returns>WatchResponse</returns>
1972+
WatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);
19731973

19741974
}
19751975

@@ -2804,7 +2804,7 @@ public ListTransformationsResponse ListTransformations(int? itemsPerPage = defau
28042804

28052805

28062806
/// <inheritdoc />
2807-
public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default)
2807+
public async Task<WatchResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default)
28082808
{
28092809

28102810
if (taskID == null)
@@ -2820,12 +2820,12 @@ public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload push
28202820

28212821
requestOptions.AddQueryParameter("watch", watch);
28222822
requestOptions.Data = pushTaskPayload;
2823-
return await _transport.ExecuteRequestAsync<RunResponse>(new HttpMethod("POST"), "/2/tasks/{taskID}/push", requestOptions, cancellationToken).ConfigureAwait(false);
2823+
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/2/tasks/{taskID}/push", requestOptions, cancellationToken).ConfigureAwait(false);
28242824
}
28252825

28262826

28272827
/// <inheritdoc />
2828-
public RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
2828+
public WatchResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
28292829
AsyncHelper.RunSync(() => PushTaskAsync(taskID, pushTaskPayload, watch, options, cancellationToken));
28302830

28312831

@@ -3011,7 +3011,7 @@ public List<Transformation> SearchTransformations(TransformationSearch transform
30113011

30123012

30133013
/// <inheritdoc />
3014-
public async Task<SourceWatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default)
3014+
public async Task<WatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default)
30153015
{
30163016

30173017
if (sourceID == null)
@@ -3021,12 +3021,12 @@ public async Task<SourceWatchResponse> TriggerDockerSourceDiscoverAsync(string s
30213021

30223022
requestOptions.PathParameters.Add("sourceID", QueryStringHelper.ParameterToString(sourceID));
30233023

3024-
return await _transport.ExecuteRequestAsync<SourceWatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/discover", requestOptions, cancellationToken).ConfigureAwait(false);
3024+
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/discover", requestOptions, cancellationToken).ConfigureAwait(false);
30253025
}
30263026

30273027

30283028
/// <inheritdoc />
3029-
public SourceWatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3029+
public WatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default) =>
30303030
AsyncHelper.RunSync(() => TriggerDockerSourceDiscoverAsync(sourceID, options, cancellationToken));
30313031

30323032

@@ -3226,23 +3226,23 @@ public TransformationUpdateResponse UpdateTransformation(string transformationID
32263226

32273227

32283228
/// <inheritdoc />
3229-
public async Task<SourceWatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
3229+
public async Task<WatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
32303230
{
32313231
var requestOptions = new InternalRequestOptions(options);
32323232

32333233

32343234
requestOptions.Data = sourceCreate;
3235-
return await _transport.ExecuteRequestAsync<SourceWatchResponse>(new HttpMethod("POST"), "/1/sources/validate", requestOptions, cancellationToken).ConfigureAwait(false);
3235+
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/1/sources/validate", requestOptions, cancellationToken).ConfigureAwait(false);
32363236
}
32373237

32383238

32393239
/// <inheritdoc />
3240-
public SourceWatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3240+
public WatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
32413241
AsyncHelper.RunSync(() => ValidateSourceAsync(sourceCreate, options, cancellationToken));
32423242

32433243

32443244
/// <inheritdoc />
3245-
public async Task<SourceWatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default)
3245+
public async Task<WatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default)
32463246
{
32473247

32483248
if (sourceID == null)
@@ -3257,12 +3257,12 @@ public async Task<SourceWatchResponse> ValidateSourceBeforeUpdateAsync(string so
32573257
requestOptions.PathParameters.Add("sourceID", QueryStringHelper.ParameterToString(sourceID));
32583258

32593259
requestOptions.Data = sourceUpdate;
3260-
return await _transport.ExecuteRequestAsync<SourceWatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/validate", requestOptions, cancellationToken).ConfigureAwait(false);
3260+
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/validate", requestOptions, cancellationToken).ConfigureAwait(false);
32613261
}
32623262

32633263

32643264
/// <inheritdoc />
3265-
public SourceWatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3265+
public WatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default) =>
32663266
AsyncHelper.RunSync(() => ValidateSourceBeforeUpdateAsync(sourceID, sourceUpdate, options, cancellationToken));
32673267

32683268
}

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/SourceWatchResponse.cs renamed to clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/WatchResponse.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
namespace Algolia.Search.Models.Ingestion;
1313

1414
/// <summary>
15-
/// SourceWatchResponse
15+
/// WatchResponse
1616
/// </summary>
17-
public partial class SourceWatchResponse
17+
public partial class WatchResponse
1818
{
1919
/// <summary>
20-
/// Initializes a new instance of the SourceWatchResponse class.
20+
/// Initializes a new instance of the WatchResponse class.
2121
/// </summary>
2222
[JsonConstructor]
23-
public SourceWatchResponse() { }
23+
public WatchResponse() { }
2424
/// <summary>
25-
/// Initializes a new instance of the SourceWatchResponse class.
25+
/// Initializes a new instance of the WatchResponse class.
2626
/// </summary>
2727
/// <param name="message">a message describing the outcome of a validate run. (required).</param>
28-
public SourceWatchResponse(string message)
28+
public WatchResponse(string message)
2929
{
3030
Message = message ?? throw new ArgumentNullException(nameof(message));
3131
}
@@ -38,9 +38,9 @@ public SourceWatchResponse(string message)
3838
public string RunID { get; set; }
3939

4040
/// <summary>
41-
/// depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).
41+
/// when used with discovering or validating sources, the sampled data of your source is returned.
4242
/// </summary>
43-
/// <value>depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).</value>
43+
/// <value>when used with discovering or validating sources, the sampled data of your source is returned.</value>
4444
[JsonPropertyName("data")]
4545
public List<object> Data { get; set; }
4646

@@ -65,7 +65,7 @@ public SourceWatchResponse(string message)
6565
public override string ToString()
6666
{
6767
StringBuilder sb = new StringBuilder();
68-
sb.Append("class SourceWatchResponse {\n");
68+
sb.Append("class WatchResponse {\n");
6969
sb.Append(" RunID: ").Append(RunID).Append("\n");
7070
sb.Append(" Data: ").Append(Data).Append("\n");
7171
sb.Append(" Events: ").Append(Events).Append("\n");
@@ -90,7 +90,7 @@ public virtual string ToJson()
9090
/// <returns>Boolean</returns>
9191
public override bool Equals(object obj)
9292
{
93-
if (obj is not SourceWatchResponse input)
93+
if (obj is not WatchResponse input)
9494
{
9595
return false;
9696
}

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

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

0 commit comments

Comments
 (0)