Skip to content

Commit b69c3c8

Browse files
fix(specs): saveRule response type [skip-bc] (#4170) (generated) [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent afd94fa commit b69c3c8

File tree

28 files changed

+43
-1294
lines changed

28 files changed

+43
-1294
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,8 +1494,8 @@ public partial interface ISearchClient
14941494
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
14951495
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
14961496
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1497-
/// <returns>Task of UpdatedRuleResponse</returns>
1498-
Task<UpdatedRuleResponse> SaveRuleAsync(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1497+
/// <returns>Task of UpdatedAtResponse</returns>
1498+
Task<UpdatedAtResponse> SaveRuleAsync(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default);
14991499

15001500
/// <summary>
15011501
/// If a rule with the specified object ID doesn't exist, it's created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules). (Synchronous version)
@@ -1512,8 +1512,8 @@ public partial interface ISearchClient
15121512
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
15131513
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
15141514
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
1515-
/// <returns>UpdatedRuleResponse</returns>
1516-
UpdatedRuleResponse SaveRule(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1515+
/// <returns>UpdatedAtResponse</returns>
1516+
UpdatedAtResponse SaveRule(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default);
15171517

15181518
/// <summary>
15191519
/// Create or update multiple rules. If a rule with the specified object ID doesn't exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
@@ -3032,7 +3032,7 @@ public SaveObjectResponse SaveObject(string indexName, object body, RequestOptio
30323032

30333033

30343034
/// <inheritdoc />
3035-
public async Task<UpdatedRuleResponse> SaveRuleAsync(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default)
3035+
public async Task<UpdatedAtResponse> SaveRuleAsync(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default)
30363036
{
30373037

30383038
if (indexName == null)
@@ -3053,12 +3053,12 @@ public async Task<UpdatedRuleResponse> SaveRuleAsync(string indexName, string ob
30533053

30543054
requestOptions.AddQueryParameter("forwardToReplicas", forwardToReplicas);
30553055
requestOptions.Data = rule;
3056-
return await _transport.ExecuteRequestAsync<UpdatedRuleResponse>(new HttpMethod("PUT"), "/1/indexes/{indexName}/rules/{objectID}", requestOptions, cancellationToken).ConfigureAwait(false);
3056+
return await _transport.ExecuteRequestAsync<UpdatedAtResponse>(new HttpMethod("PUT"), "/1/indexes/{indexName}/rules/{objectID}", requestOptions, cancellationToken).ConfigureAwait(false);
30573057
}
30583058

30593059

30603060
/// <inheritdoc />
3061-
public UpdatedRuleResponse SaveRule(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3061+
public UpdatedAtResponse SaveRule(string indexName, string objectID, Rule rule, bool? forwardToReplicas = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
30623062
AsyncHelper.RunSync(() => SaveRuleAsync(indexName, objectID, rule, forwardToReplicas, options, cancellationToken));
30633063

30643064

clients/algoliasearch-client-csharp/algoliasearch/Models/Search/UpdatedRuleResponse.cs

Lines changed: 0 additions & 123 deletions
This file was deleted.

clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ export 'src/model/typo_tolerance_enum.dart';
155155
export 'src/model/update_api_key_response.dart';
156156
export 'src/model/updated_at_response.dart';
157157
export 'src/model/updated_at_with_object_id_response.dart';
158-
export 'src/model/updated_rule_response.dart';
159158
export 'src/model/user_highlight_result.dart';
160159
export 'src/model/user_hit.dart';
161160
export 'src/model/user_id.dart';

clients/algoliasearch-client-dart/packages/client_search/lib/src/api/search_client.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ import 'package:algolia_client_search/src/model/synonym_hit.dart';
6262
import 'package:algolia_client_search/src/model/update_api_key_response.dart';
6363
import 'package:algolia_client_search/src/model/updated_at_response.dart';
6464
import 'package:algolia_client_search/src/model/updated_at_with_object_id_response.dart';
65-
import 'package:algolia_client_search/src/model/updated_rule_response.dart';
6665
import 'package:algolia_client_search/src/model/user_id.dart';
6766

6867
final class SearchClient implements ApiClient {
@@ -1770,7 +1769,7 @@ final class SearchClient implements ApiClient {
17701769
/// * [rule]
17711770
/// * [forwardToReplicas] Whether changes are applied to replica indices.
17721771
/// * [requestOptions] additional request configuration.
1773-
Future<UpdatedRuleResponse> saveRule({
1772+
Future<UpdatedAtResponse> saveRule({
17741773
required String indexName,
17751774
required String objectID,
17761775
required Rule rule,
@@ -1801,9 +1800,9 @@ final class SearchClient implements ApiClient {
18011800
request: request,
18021801
options: requestOptions,
18031802
);
1804-
return deserialize<UpdatedRuleResponse, UpdatedRuleResponse>(
1803+
return deserialize<UpdatedAtResponse, UpdatedAtResponse>(
18051804
response,
1806-
'UpdatedRuleResponse',
1805+
'UpdatedAtResponse',
18071806
growable: true,
18081807
);
18091808
}

clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ import 'package:algolia_client_search/src/model/typo_tolerance_enum.dart';
148148
import 'package:algolia_client_search/src/model/update_api_key_response.dart';
149149
import 'package:algolia_client_search/src/model/updated_at_response.dart';
150150
import 'package:algolia_client_search/src/model/updated_at_with_object_id_response.dart';
151-
import 'package:algolia_client_search/src/model/updated_rule_response.dart';
152151
import 'package:algolia_client_search/src/model/user_highlight_result.dart';
153152
import 'package:algolia_client_search/src/model/user_hit.dart';
154153
import 'package:algolia_client_search/src/model/user_id.dart';
@@ -565,9 +564,6 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
565564
case 'UpdatedAtWithObjectIdResponse':
566565
return UpdatedAtWithObjectIdResponse.fromJson(
567566
value as Map<String, dynamic>) as ReturnType;
568-
case 'UpdatedRuleResponse':
569-
return UpdatedRuleResponse.fromJson(value as Map<String, dynamic>)
570-
as ReturnType;
571567
case 'UserHighlightResult':
572568
return UserHighlightResult.fromJson(value as Map<String, dynamic>)
573569
as ReturnType;

clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_rule_response.dart

Lines changed: 0 additions & 49 deletions
This file was deleted.

clients/algoliasearch-client-dart/packages/client_search/lib/src/model/updated_rule_response.g.dart

Lines changed: 0 additions & 29 deletions
This file was deleted.

clients/algoliasearch-client-go/algolia/search/api_search.go

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

0 commit comments

Comments
 (0)