Skip to content

Commit

Permalink
chore: generated code for commit 072c38b9. [skip ci]
Browse files Browse the repository at this point in the history
algolia/api-clients-automation@072c38b

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Jun 11, 2024
1 parent f467930 commit ce6efbf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 179 deletions.
180 changes: 11 additions & 169 deletions algoliasearch/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,172 +1,14 @@
../Algolia.Search.sln
../global.json
.openapi-generator-ignore
Algolia.Search.csproj
Clients/SearchClient.cs
Clients/SearchConfiguration.cs
Models/Search/Acl.cs
Models/Search/Action.cs
Models/Search/AddApiKeyResponse.cs
Models/Search/AdvancedSyntaxFeatures.cs
Models/Search/AlternativesAsExact.cs
Models/Search/Anchoring.cs
Models/Search/ApiKey.cs
Models/Search/ApiKeyOperation.cs
Models/Search/AroundPrecision.cs
Models/Search/AroundPrecisionFromValueInner.cs
Models/Search/AroundRadius.cs
Models/Search/AroundRadiusAll.cs
Models/Search/AssignUserIdParams.cs
Models/Search/AttributeToUpdate.cs
Models/Search/AutomaticFacetFilter.cs
Models/Search/AutomaticFacetFilters.cs
Models/Search/BaseGetApiKeyResponse.cs
Models/Search/BaseIndexSettings.cs
Models/Search/BaseSearchParams.cs
Models/Search/BaseSearchParamsWithoutQuery.cs
Models/Search/BaseSearchResponse.cs
Models/Search/BatchAssignUserIdsParams.cs
Models/Search/BatchDictionaryEntriesParams.cs
Models/Search/BatchDictionaryEntriesRequest.cs
Models/Search/BatchParams.cs
Models/Search/BatchRequest.cs
Models/Search/BatchResponse.cs
Models/Search/BatchWriteParams.cs
Models/Search/BrowseParams.cs
Models/Search/BrowseParamsObject.cs
Models/Search/BrowseResponse.cs
Models/Search/BuiltInOperation.cs
Models/Search/BuiltInOperationType.cs
Models/Search/Condition.cs
Models/Search/Consequence.cs
Models/Search/ConsequenceHide.cs
Models/Search/ConsequenceParams.cs
Models/Search/ConsequenceQuery.cs
Models/Search/ConsequenceQueryObject.cs
Models/Search/CreatedAtResponse.cs
Models/Search/Cursor.cs
Models/Search/DeleteApiKeyResponse.cs
Models/Search/DeleteByParams.cs
Models/Search/DeleteSourceResponse.cs
Models/Search/DeletedAtResponse.cs
Models/Search/DictionaryAction.cs
Models/Search/DictionaryEntry.cs
Models/Search/DictionaryEntryState.cs
Models/Search/DictionaryLanguage.cs
Models/Search/DictionarySettingsParams.cs
Models/Search/DictionaryType.cs
Models/Search/Distinct.cs
Models/Search/Edit.cs
Models/Search/EditType.cs
Models/Search/ErrorBase.cs
Models/Search/ExactOnSingleWordQuery.cs
Models/Search/Exhaustive.cs
Models/Search/FacetFilters.cs
Models/Search/FacetHits.cs
Models/Search/FacetOrdering.cs
Models/Search/Facets.cs
Models/Search/FacetsStats.cs
Models/Search/FetchedIndex.cs
Models/Search/GetApiKeyResponse.cs
Models/Search/GetDictionarySettingsResponse.cs
Models/Search/GetLogsResponse.cs
Models/Search/GetObjectsParams.cs
Models/Search/GetObjectsRequest.cs
Models/Search/GetObjectsResponse.cs
Models/Search/GetTaskResponse.cs
Models/Search/GetTopUserIdsResponse.cs
Models/Search/HasPendingMappingsResponse.cs
Models/Search/HighlightResult.cs
Models/Search/HighlightResultOption.cs
Models/Search/Hit.cs
Models/Search/IgnorePlurals.cs
Models/Search/IndexSettings.cs
Models/Search/IndexSettingsAsSearchParams.cs
Models/Search/Languages.cs
Models/Search/ListApiKeysResponse.cs
Models/Search/ListClustersResponse.cs
Models/Search/ListIndicesResponse.cs
Models/Search/ListUserIdsResponse.cs
Models/Search/Log.cs
Models/Search/LogQuery.cs
Models/Search/LogType.cs
Models/Search/MatchLevel.cs
Models/Search/MatchedGeoLocation.cs
Models/Search/Mode.cs
Models/Search/MultipleBatchRequest.cs
Models/Search/MultipleBatchResponse.cs
Models/Search/NumericFilters.cs
Models/Search/OperationIndexParams.cs
Models/Search/OperationType.cs
Models/Search/OptionalFilters.cs
Models/Search/Params.cs
Models/Search/Personalization.cs
Models/Search/Promote.cs
Models/Search/PromoteObjectID.cs
Models/Search/PromoteObjectIDs.cs
Models/Search/QueryType.cs
Models/Search/RankingInfo.cs
Models/Search/ReRankingApplyFilter.cs
Models/Search/Redirect.cs
Models/Search/RedirectRuleIndexMetadata.cs
Models/Search/RedirectRuleIndexMetadataData.cs
Models/Search/RemoveStopWords.cs
Models/Search/RemoveUserIdResponse.cs
Models/Search/RemoveWordsIfNoResults.cs
Models/Search/RenderingContent.cs
Models/Search/ReplaceAllObjectsResponse.cs
Models/Search/ReplaceSourceResponse.cs
Models/Search/Rule.cs
Models/Search/SaveObjectResponse.cs
Models/Search/SaveSynonymResponse.cs
Models/Search/ScopeType.cs
Models/Search/SearchDictionaryEntriesParams.cs
Models/Search/SearchDictionaryEntriesResponse.cs
Models/Search/SearchForFacetValuesRequest.cs
Models/Search/SearchForFacetValuesResponse.cs
Models/Search/SearchForFacets.cs
Models/Search/SearchForFacetsOptions.cs
Models/Search/SearchForHits.cs
Models/Search/SearchForHitsOptions.cs
Models/Search/SearchHits.cs
Models/Search/SearchMethodParams.cs
Models/Search/SearchParams.cs
Models/Search/SearchParamsObject.cs
Models/Search/SearchParamsQuery.cs
Models/Search/SearchParamsString.cs
Models/Search/SearchQuery.cs
Models/Search/SearchResponse.cs
Models/Search/SearchResponses.cs
Models/Search/SearchResult.cs
Models/Search/SearchRulesParams.cs
Models/Search/SearchRulesResponse.cs
Models/Search/SearchStrategy.cs
Models/Search/SearchSynonymsParams.cs
Models/Search/SearchSynonymsResponse.cs
Models/Search/SearchTypeDefault.cs
Models/Search/SearchTypeFacet.cs
Models/Search/SearchUserIdsParams.cs
Models/Search/SearchUserIdsResponse.cs
Models/Search/SecuredAPIKeyRestrictions.cs
Models/Search/SemanticSearch.cs
Models/Search/SnippetResult.cs
Models/Search/SnippetResultOption.cs
Models/Search/SortRemainingBy.cs
Models/Search/Source.cs
Models/Search/StandardEntries.cs
Models/Search/SupportedLanguage.cs
Models/Search/SynonymHit.cs
Models/Search/SynonymType.cs
Models/Search/TagFilters.cs
Models/Search/TaskStatus.cs
Models/Search/TimeRange.cs
Models/Search/TypoTolerance.cs
Models/Search/TypoToleranceEnum.cs
Models/Search/UpdateApiKeyResponse.cs
Models/Search/UpdatedAtResponse.cs
Models/Search/UpdatedAtWithObjectIdResponse.cs
Models/Search/UpdatedRuleResponse.cs
Models/Search/UserHighlightResult.cs
Models/Search/UserHit.cs
Models/Search/UserId.cs
Models/Search/Value.cs
Clients/UsageClient.cs
Clients/UsageConfiguration.cs
Models/Usage/ErrorBase.cs
Models/Usage/GetUsage200Response.cs
Models/Usage/GetUsage200ResponseStatisticsInner.cs
Models/Usage/GetUsage400Response.cs
Models/Usage/GetUsage400ResponseError.cs
Models/Usage/GetUsage400ResponseErrorErrorsInner.cs
Models/Usage/Granularity.cs
Models/Usage/Statistic.cs
Models/Usage/StatisticValue.cs
14 changes: 4 additions & 10 deletions algoliasearch/Models/Recommend/RankingInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,26 @@ public RankingInfo() { }
/// <summary>
/// Initializes a new instance of the RankingInfo class.
/// </summary>
/// <param name="filters">Whether a filter matched the query. (required).</param>
/// <param name="firstMatchedWord">Position of the first matched word in the best matching attribute of the record. (required).</param>
/// <param name="geoDistance">Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). (required).</param>
/// <param name="nbExactWords">Number of exactly matched words. (required).</param>
/// <param name="nbTypos">Number of typos encountered when matching the record. (required).</param>
/// <param name="promoted">Whether the record was promoted by a rule. (required).</param>
/// <param name="userScore">Overall ranking of the record, expressed as a single integer. This attribute is internal. (required).</param>
/// <param name="words">Number of matched words. (required).</param>
public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExactWords, int nbTypos, bool promoted, int userScore, int words)
public RankingInfo(int firstMatchedWord, int geoDistance, int nbExactWords, int nbTypos, int userScore)
{
Filters = filters;
FirstMatchedWord = firstMatchedWord;
GeoDistance = geoDistance;
NbExactWords = nbExactWords;
NbTypos = nbTypos;
Promoted = promoted;
UserScore = userScore;
Words = words;
}

/// <summary>
/// Whether a filter matched the query.
/// </summary>
/// <value>Whether a filter matched the query.</value>
[JsonPropertyName("filters")]
public int Filters { get; set; }
public int? Filters { get; set; }

/// <summary>
/// Position of the first matched word in the best matching attribute of the record.
Expand Down Expand Up @@ -103,7 +97,7 @@ public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExa
/// </summary>
/// <value>Whether the record was promoted by a rule.</value>
[JsonPropertyName("promoted")]
public bool Promoted { get; set; }
public bool? Promoted { get; set; }

/// <summary>
/// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
Expand All @@ -124,7 +118,7 @@ public RankingInfo(int filters, int firstMatchedWord, int geoDistance, int nbExa
/// </summary>
/// <value>Number of matched words.</value>
[JsonPropertyName("words")]
public int Words { get; set; }
public int? Words { get; set; }

/// <summary>
/// Whether the record is re-ranked.
Expand Down
27 changes: 27 additions & 0 deletions algoliasearch/Utils/SearchClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,33 @@ public GetTaskResponse WaitForTask(string indexName, long taskId, int maxRetries
Func<int, int> timeout = null, RequestOptions requestOptions = null, CancellationToken ct = default) =>
AsyncHelper.RunSync(() => WaitForTaskAsync(indexName, taskId, maxRetries, timeout, requestOptions, ct));

/// <summary>
/// Wait for an application-level task to complete with `taskID`.
/// </summary>
/// <param name="taskId">The `taskID` returned in the method response.</param>
/// <param name="maxRetries">The maximum number of retry. 50 by default. (optional)</param>
/// <param name="timeout">The function to decide how long to wait between retries. Math.Min(retryCount * 200, 5000) by default. (optional)</param>
/// <param name="requestOptions">The requestOptions to send along with the query, they will be merged with the transporter requestOptions. (optional)</param>
/// <param name="ct">Cancellation token (optional)</param>
public async Task<GetTaskResponse> WaitForAppTaskAsync(long taskId, int maxRetries = DefaultMaxRetries,
Func<int, int> timeout = null, RequestOptions requestOptions = null, CancellationToken ct = default)
{
return await RetryUntil(async () => await GetAppTaskAsync(taskId, requestOptions, ct),
resp => resp.Status == Models.Search.TaskStatus.Published, maxRetries, timeout, ct).ConfigureAwait(false);
}

/// <summary>
/// Wait for an application-level task to complete with `taskID`. (Synchronous version)
/// </summary>
/// <param name="taskId">The `taskID` returned in the method response.</param>
/// <param name="maxRetries">The maximum number of retry. 50 by default. (optional)</param>
/// <param name="timeout">The function to decide how long to wait between retries. Math.Min(retryCount * 200, 5000) by default. (optional)</param>
/// <param name="requestOptions">The requestOptions to send along with the query, they will be merged with the transporter requestOptions. (optional)</param>
/// <param name="ct">Cancellation token (optional)</param>
public GetTaskResponse WaitForAppTask(long taskId, int maxRetries = DefaultMaxRetries,
Func<int, int> timeout = null, RequestOptions requestOptions = null, CancellationToken ct = default) =>
AsyncHelper.RunSync(() => WaitForAppTaskAsync(taskId, maxRetries, timeout, requestOptions, ct));

/// <summary>
/// Helper method that waits for an API key task to be processed.
/// </summary>
Expand Down

0 comments on commit ce6efbf

Please sign in to comment.