From ef9e4cf49265d2a277e8757d84d638d8584f1bd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 13:57:00 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../Recombee.AutoSDKHttpResponse.g.cs | 121 +++++++++ ...lient.CreateByDatabaseIdItemsByItemId.g.cs | 19 ++ ...iesClient.CreateByDatabaseIdMoreItems.g.cs | 22 ++ ...tabaseIdItemsPropertiesByPropertyName.g.cs | 14 ++ ...esClient.GetByDatabaseIdItemsByItemId.g.cs | 14 ++ ...tabaseIdItemsPropertiesByPropertyName.g.cs | 14 ++ ...nt.GetByDatabaseIdItemsPropertiesList.g.cs | 12 + ...tabaseIdItemsPropertiesByPropertyName.g.cs | 16 ++ ...lient.DeleteByDatabaseIdItemsByItemId.g.cs | 16 ++ ...emsClient.DeleteByDatabaseIdMoreItems.g.cs | 16 ++ ...IItemsClient.GetByDatabaseIdItemsList.g.cs | 22 ++ ...msClient.PutByDatabaseIdItemsByItemId.g.cs | 15 ++ ...laneousClient.CreateByDatabaseIdBatch.g.cs | 17 ++ ...iscellaneousClient.DeleteByDatabaseId.g.cs | 12 + ...aneousClient.GetByDatabaseIdScenarios.g.cs | 12 + ...nt.CreateByDatabaseIdRecommsComposite.g.cs | 32 +++ ...baseIdRecommsItemSegmentsItemSegments.g.cs | 22 ++ ...eByDatabaseIdRecommsItemSegmentsItems.g.cs | 22 ++ ...aseIdRecommsItemsByItemIdItemSegments.g.cs | 25 ++ ...ByDatabaseIdRecommsItemsByItemIdItems.g.cs | 22 ++ ...ByDatabaseIdRecommsItemsByItemIdUsers.g.cs | 19 ++ ...seIdRecommsNextItemSegmentsByRecommId.g.cs | 28 +++ ...yDatabaseIdRecommsNextItemsByRecommId.g.cs | 28 +++ ...aseIdRecommsUsersByUserIdItemSegments.g.cs | 25 ++ ...ByDatabaseIdRecommsUsersByUserIdItems.g.cs | 23 ++ ...ByDatabaseIdRecommsUsersByUserIdUsers.g.cs | 19 ++ ...baseIdSearchUsersByUserIdItemSegments.g.cs | 24 ++ ...eByDatabaseIdSearchUsersByUserIdItems.g.cs | 24 ++ ...lient.CreateByDatabaseIdSynonymsItems.g.cs | 18 ++ ...lient.DeleteByDatabaseIdSynonymsItems.g.cs | 12 + ...t.DeleteByDatabaseIdSynonymsItemsById.g.cs | 14 ++ ...chClient.GetByDatabaseIdSynonymsItems.g.cs | 16 ++ ...SegmentationsAutoReqlBySegmentationId.g.cs | 17 ++ ...gmentationsManualReqlBySegmentationId.g.cs | 17 ++ ...qlBySegmentationIdSegmentsBySegmentId.g.cs | 19 ++ ...ntationsPropertyBasedBySegmentationId.g.cs | 17 ++ ...tabaseIdSegmentationsBySegmentationId.g.cs | 14 ++ ...qlBySegmentationIdSegmentsBySegmentId.g.cs | 16 ++ ...ient.GetByDatabaseIdSegmentationsList.g.cs | 14 ++ ...seIdSegmentationsListBySegmentationId.g.cs | 14 ++ ...SegmentationsAutoReqlBySegmentationId.g.cs | 18 ++ ...gmentationsManualReqlBySegmentationId.g.cs | 18 ++ ...qlBySegmentationIdSegmentsBySegmentId.g.cs | 20 ++ ...ntationsPropertyBasedBySegmentationId.g.cs | 19 ++ ...eateByDatabaseIdSeriesBySeriesIdItems.g.cs | 17 ++ ...nt.DeleteByDatabaseIdSeriesBySeriesId.g.cs | 18 ++ ...leteByDatabaseIdSeriesBySeriesIdItems.g.cs | 17 ++ ....GetByDatabaseIdSeriesBySeriesIdItems.g.cs | 14 ++ ...eriesClient.GetByDatabaseIdSeriesList.g.cs | 12 + ...lient.PutByDatabaseIdSeriesBySeriesId.g.cs | 17 ++ ...onsClient.CreateByDatabaseIdBookmarks.g.cs | 15 ++ ...lient.CreateByDatabaseIdCartadditions.g.cs | 15 ++ ...sClient.CreateByDatabaseIdDetailviews.g.cs | 15 ++ ...onsClient.CreateByDatabaseIdPurchases.g.cs | 15 ++ ...tionsClient.CreateByDatabaseIdRatings.g.cs | 15 ++ ...Client.CreateByDatabaseIdViewportions.g.cs | 16 ++ ...onsClient.DeleteByDatabaseIdBookmarks.g.cs | 18 ++ ...lient.DeleteByDatabaseIdCartadditions.g.cs | 18 ++ ...sClient.DeleteByDatabaseIdDetailviews.g.cs | 18 ++ ...onsClient.DeleteByDatabaseIdPurchases.g.cs | 18 ++ ...tionsClient.DeleteByDatabaseIdRatings.g.cs | 18 ++ ...Client.DeleteByDatabaseIdViewportions.g.cs | 18 ++ ...GetByDatabaseIdItemsByItemIdBookmarks.g.cs | 14 ++ ...yDatabaseIdItemsByItemIdCartadditions.g.cs | 14 ++ ...tByDatabaseIdItemsByItemIdDetailviews.g.cs | 14 ++ ...GetByDatabaseIdItemsByItemIdPurchases.g.cs | 14 ++ ...t.GetByDatabaseIdItemsByItemIdRatings.g.cs | 14 ++ ...ByDatabaseIdItemsByItemIdViewportions.g.cs | 14 ++ ...GetByDatabaseIdUsersByUserIdBookmarks.g.cs | 14 ++ ...yDatabaseIdUsersByUserIdCartadditions.g.cs | 14 ++ ...tByDatabaseIdUsersByUserIdDetailviews.g.cs | 14 ++ ...GetByDatabaseIdUsersByUserIdPurchases.g.cs | 14 ++ ...t.GetByDatabaseIdUsersByUserIdRatings.g.cs | 14 ++ ...ByDatabaseIdUsersByUserIdViewportions.g.cs | 14 ++ ...lient.CreateByDatabaseIdUsersByUserId.g.cs | 19 ++ ...tabaseIdUsersPropertiesByPropertyName.g.cs | 14 ++ ...esClient.GetByDatabaseIdUsersByUserId.g.cs | 14 ++ ...tabaseIdUsersPropertiesByPropertyName.g.cs | 14 ++ ...nt.GetByDatabaseIdUsersPropertiesList.g.cs | 12 + ...tabaseIdUsersPropertiesByPropertyName.g.cs | 16 ++ ...lient.DeleteByDatabaseIdUsersByUserId.g.cs | 15 ++ ...IUsersClient.GetByDatabaseIdUsersList.g.cs | 22 ++ ...sersByTargetUserIdMergeBySourceUserId.g.cs | 21 ++ ...rsClient.PutByDatabaseIdUsersByUserId.g.cs | 14 ++ ...lient.CreateByDatabaseIdItemsByItemId.g.cs | 69 +++++- ...iesClient.CreateByDatabaseIdMoreItems.g.cs | 76 +++++- ...tabaseIdItemsPropertiesByPropertyName.g.cs | 57 ++++- ...esClient.GetByDatabaseIdItemsByItemId.g.cs | 63 ++++- ...tabaseIdItemsPropertiesByPropertyName.g.cs | 67 ++++- ...nt.GetByDatabaseIdItemsPropertiesList.g.cs | 64 ++++- ...tabaseIdItemsPropertiesByPropertyName.g.cs | 64 ++++- .../Recombee.ItemPropertiesClient.g.cs | 8 +- ...lient.DeleteByDatabaseIdItemsByItemId.g.cs | 59 ++++- ...emsClient.DeleteByDatabaseIdMoreItems.g.cs | 70 +++++- ....ItemsClient.GetByDatabaseIdItemsList.g.cs | 83 ++++++- ...msClient.PutByDatabaseIdItemsByItemId.g.cs | 58 ++++- .../Generated/Recombee.ItemsClient.g.cs | 8 +- ...laneousClient.CreateByDatabaseIdBatch.g.cs | 61 ++++- ...iscellaneousClient.DeleteByDatabaseId.g.cs | 54 +++- ...aneousClient.GetByDatabaseIdScenarios.g.cs | 64 ++++- .../Recombee.MiscellaneousClient.g.cs | 8 +- .../Generated/Recombee.OptionsSupport.g.cs | 231 +++++++++++++++++- .../Generated/Recombee.RecombeeClient.g.cs | 28 +-- ...nt.CreateByDatabaseIdRecommsComposite.g.cs | 86 ++++++- ...baseIdRecommsItemSegmentsItemSegments.g.cs | 76 +++++- ...eByDatabaseIdRecommsItemSegmentsItems.g.cs | 76 +++++- ...aseIdRecommsItemsByItemIdItemSegments.g.cs | 80 +++++- ...ByDatabaseIdRecommsItemsByItemIdItems.g.cs | 77 +++++- ...ByDatabaseIdRecommsItemsByItemIdUsers.g.cs | 74 +++++- ...seIdRecommsNextItemSegmentsByRecommId.g.cs | 83 ++++++- ...yDatabaseIdRecommsNextItemsByRecommId.g.cs | 83 ++++++- ...aseIdRecommsUsersByUserIdItemSegments.g.cs | 80 +++++- ...ByDatabaseIdRecommsUsersByUserIdItems.g.cs | 78 +++++- ...ByDatabaseIdRecommsUsersByUserIdUsers.g.cs | 74 +++++- .../Recombee.RecommendationsClient.g.cs | 8 +- ...baseIdSearchUsersByUserIdItemSegments.g.cs | 79 +++++- ...eByDatabaseIdSearchUsersByUserIdItems.g.cs | 79 +++++- ...lient.CreateByDatabaseIdSynonymsItems.g.cs | 72 +++++- ...lient.DeleteByDatabaseIdSynonymsItems.g.cs | 54 +++- ...t.DeleteByDatabaseIdSynonymsItemsById.g.cs | 57 ++++- ...chClient.GetByDatabaseIdSynonymsItems.g.cs | 74 +++++- .../Generated/Recombee.SearchClient.g.cs | 8 +- ...SegmentationsAutoReqlBySegmentationId.g.cs | 62 ++++- ...gmentationsManualReqlBySegmentationId.g.cs | 62 ++++- ...qlBySegmentationIdSegmentsBySegmentId.g.cs | 65 ++++- ...ntationsPropertyBasedBySegmentationId.g.cs | 62 ++++- ...tabaseIdSegmentationsBySegmentationId.g.cs | 57 ++++- ...qlBySegmentationIdSegmentsBySegmentId.g.cs | 60 ++++- ...ient.GetByDatabaseIdSegmentationsList.g.cs | 71 +++++- ...seIdSegmentationsListBySegmentationId.g.cs | 67 ++++- ...SegmentationsAutoReqlBySegmentationId.g.cs | 63 ++++- ...gmentationsManualReqlBySegmentationId.g.cs | 63 ++++- ...qlBySegmentationIdSegmentsBySegmentId.g.cs | 66 ++++- ...ntationsPropertyBasedBySegmentationId.g.cs | 64 ++++- ...ecombee.SegmentationsDefinitionClient.g.cs | 8 +- ...eateByDatabaseIdSeriesBySeriesIdItems.g.cs | 62 ++++- ...nt.DeleteByDatabaseIdSeriesBySeriesId.g.cs | 63 ++++- ...leteByDatabaseIdSeriesBySeriesIdItems.g.cs | 62 ++++- ....GetByDatabaseIdSeriesBySeriesIdItems.g.cs | 67 ++++- ...eriesClient.GetByDatabaseIdSeriesList.g.cs | 64 ++++- ...lient.PutByDatabaseIdSeriesBySeriesId.g.cs | 62 ++++- .../Generated/Recombee.SeriesClient.g.cs | 8 +- ...onsClient.CreateByDatabaseIdBookmarks.g.cs | 59 ++++- ...lient.CreateByDatabaseIdCartadditions.g.cs | 59 ++++- ...sClient.CreateByDatabaseIdDetailviews.g.cs | 59 ++++- ...onsClient.CreateByDatabaseIdPurchases.g.cs | 59 ++++- ...tionsClient.CreateByDatabaseIdRatings.g.cs | 59 ++++- ...Client.CreateByDatabaseIdViewportions.g.cs | 60 ++++- ...onsClient.DeleteByDatabaseIdBookmarks.g.cs | 67 ++++- ...lient.DeleteByDatabaseIdCartadditions.g.cs | 67 ++++- ...sClient.DeleteByDatabaseIdDetailviews.g.cs | 67 ++++- ...onsClient.DeleteByDatabaseIdPurchases.g.cs | 67 ++++- ...tionsClient.DeleteByDatabaseIdRatings.g.cs | 67 ++++- ...Client.DeleteByDatabaseIdViewportions.g.cs | 67 ++++- ...GetByDatabaseIdItemsByItemIdBookmarks.g.cs | 67 ++++- ...yDatabaseIdItemsByItemIdCartadditions.g.cs | 67 ++++- ...tByDatabaseIdItemsByItemIdDetailviews.g.cs | 67 ++++- ...GetByDatabaseIdItemsByItemIdPurchases.g.cs | 67 ++++- ...t.GetByDatabaseIdItemsByItemIdRatings.g.cs | 67 ++++- ...ByDatabaseIdItemsByItemIdViewportions.g.cs | 67 ++++- ...GetByDatabaseIdUsersByUserIdBookmarks.g.cs | 67 ++++- ...yDatabaseIdUsersByUserIdCartadditions.g.cs | 67 ++++- ...tByDatabaseIdUsersByUserIdDetailviews.g.cs | 67 ++++- ...GetByDatabaseIdUsersByUserIdPurchases.g.cs | 67 ++++- ...t.GetByDatabaseIdUsersByUserIdRatings.g.cs | 67 ++++- ...ByDatabaseIdUsersByUserIdViewportions.g.cs | 67 ++++- .../Recombee.UserItemInteractionsClient.g.cs | 8 +- ...lient.CreateByDatabaseIdUsersByUserId.g.cs | 69 +++++- ...tabaseIdUsersPropertiesByPropertyName.g.cs | 57 ++++- ...esClient.GetByDatabaseIdUsersByUserId.g.cs | 63 ++++- ...tabaseIdUsersPropertiesByPropertyName.g.cs | 67 ++++- ...nt.GetByDatabaseIdUsersPropertiesList.g.cs | 64 ++++- ...tabaseIdUsersPropertiesByPropertyName.g.cs | 64 ++++- .../Recombee.UserPropertiesClient.g.cs | 8 +- ...lient.DeleteByDatabaseIdUsersByUserId.g.cs | 58 ++++- ....UsersClient.GetByDatabaseIdUsersList.g.cs | 83 ++++++- ...sersByTargetUserIdMergeBySourceUserId.g.cs | 70 +++++- ...rsClient.PutByDatabaseIdUsersByUserId.g.cs | 57 ++++- .../Generated/Recombee.UsersClient.g.cs | 8 +- 179 files changed, 6840 insertions(+), 586 deletions(-) create mode 100644 src/libs/Recombee/Generated/Recombee.AutoSDKHttpResponse.g.cs diff --git a/src/libs/Recombee/Generated/Recombee.AutoSDKHttpResponse.g.cs b/src/libs/Recombee/Generated/Recombee.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..909dace --- /dev/null +++ b/src/libs/Recombee/Generated/Recombee.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Recombee +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs index 2aa0259..6942f61 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs @@ -19,6 +19,25 @@ public partial interface IItemPropertiesClient string databaseId, string itemId, + string request, + bool? cascadeCreate = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Item Values
+ /// Sets/updates (some) property values of the given item. The properties (columns) must be previously created by [Add item property](https://docs.recombee.com/api#add-item-property). + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + string request, bool? cascadeCreate = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs index 0fc339c..d818cf7 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs @@ -38,6 +38,28 @@ public partial interface IItemPropertiesClient /// ``` /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdMoreItemsAsResponseAsync( + string databaseId, + + global::Recombee.UpdateMoreItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update More Items
+ /// Updates (some) property values of all the items that pass the filter.
+ /// Example: *Setting all the items that are older than a week as unavailable*
+ /// ```json
+ /// {
+ /// "filter": "'releaseDate' < now() - 7*24*3600",
+ /// "changes": {"available": false}
+ /// }
+ /// ``` + ///
+ /// /// /// A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated. /// diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs index ef41072..6582d41 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs @@ -18,5 +18,19 @@ public partial interface IItemPropertiesClient string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Item Property
+ /// Deleting an item property is roughly equivalent to removing a column from the table of items. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs index f00e726..821ea55 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs @@ -18,5 +18,19 @@ public partial interface IItemPropertiesClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Item Values
+ /// Gets all the current property values of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs index 6da506e..c5168a6 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs @@ -18,5 +18,19 @@ public partial interface IItemPropertiesClient string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Item Property Info
+ /// Gets information about specified item property. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs index 0b9b6e8..bd732b4 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs @@ -16,5 +16,17 @@ public partial interface IItemPropertiesClient string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item Properties
+ /// Gets the list of all the item properties in your database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsPropertiesListAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs index b9963c6..7eb737a 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs @@ -20,5 +20,21 @@ public partial interface IItemPropertiesClient global::Recombee.PutItemsPropertiesType type, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Item Property
+ /// Adding an item property is somewhat equivalent to adding a column to the table of items. The items may be characterized by various properties of different types. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.PutItemsPropertiesType type, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs index db96263..041142c 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs @@ -20,5 +20,21 @@ public partial interface IItemsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Item
+ /// Deletes an item of the given `itemId` from the catalog.
+ /// If there are any *purchases*, *ratings*, *bookmarks*, *cart additions*, or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present.
+ /// If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdMoreItems.g.cs b/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdMoreItems.g.cs index b46de47..9474b56 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdMoreItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemsClient.DeleteByDatabaseIdMoreItems.g.cs @@ -26,6 +26,22 @@ public partial interface IItemsClient /// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> DeleteByDatabaseIdMoreItemsAsResponseAsync( + string databaseId, + + global::Recombee.DeleteMoreItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete More Items
+ /// Deletes all the items that pass the filter.
+ /// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely. + ///
+ /// /// /// A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated. /// diff --git a/src/libs/Recombee/Generated/Recombee.IItemsClient.GetByDatabaseIdItemsList.g.cs b/src/libs/Recombee/Generated/Recombee.IItemsClient.GetByDatabaseIdItemsList.g.cs index 4f86ff2..1547efd 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemsClient.GetByDatabaseIdItemsList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemsClient.GetByDatabaseIdItemsList.g.cs @@ -26,5 +26,27 @@ public partial interface IItemsClient global::System.Collections.Generic.IList? includedProperties = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Items
+ /// Gets a list of IDs of items currently present in the catalog. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsListAsResponseAsync( + string databaseId, + string? filter = default, + int? count = default, + int? offset = default, + bool? returnProperties = default, + global::System.Collections.Generic.IList? includedProperties = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IItemsClient.PutByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.IItemsClient.PutByDatabaseIdItemsByItemId.g.cs index 534a3d1..799e390 100644 --- a/src/libs/Recombee/Generated/Recombee.IItemsClient.PutByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IItemsClient.PutByDatabaseIdItemsByItemId.g.cs @@ -19,5 +19,20 @@ public partial interface IItemsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Item
+ /// Adds new item of the given `itemId` to the items catalog.
+ /// All the item properties for the newly created items are set to null. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.CreateByDatabaseIdBatch.g.cs b/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.CreateByDatabaseIdBatch.g.cs index 9b73662..01d745c 100644 --- a/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.CreateByDatabaseIdBatch.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.CreateByDatabaseIdBatch.g.cs @@ -28,6 +28,23 @@ public partial interface IMiscellaneousClient /// Using Batch requests is beneficial for example, when synchronizing the catalog of items or uploading historical interaction data, as sending the data in Batch is considerably faster than sending the individual requests (thanks to optimizations and reducing network and HTTPS overhead). /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdBatchAsResponseAsync( + string databaseId, + + global::Recombee.Batch request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Batch
+ /// Batch processing allows you to submit arbitrary sequence of requests within a single HTTPS request.
+ /// Any type of request from the above documentation may be used in the Batch, and the Batch may combine different types of requests arbitrarily as well.
+ /// Using Batch requests is beneficial for example, when synchronizing the catalog of items or uploading historical interaction data, as sending the data in Batch is considerably faster than sending the individual requests (thanks to optimizations and reducing network and HTTPS overhead). + ///
+ /// /// /// JSON array containing the requests. /// diff --git a/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.DeleteByDatabaseId.g.cs b/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.DeleteByDatabaseId.g.cs index 3d757a4..407e3e2 100644 --- a/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.DeleteByDatabaseId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.DeleteByDatabaseId.g.cs @@ -16,5 +16,17 @@ public partial interface IMiscellaneousClient string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Reset Database
+ /// Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request is never executed in the production environment! Resetting your database is irreversible. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.GetByDatabaseIdScenarios.g.cs b/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.GetByDatabaseIdScenarios.g.cs index 60e5975..b6d20bb 100644 --- a/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.GetByDatabaseIdScenarios.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IMiscellaneousClient.GetByDatabaseIdScenarios.g.cs @@ -16,5 +16,17 @@ public partial interface IMiscellaneousClient string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Scenarios
+ /// Get all [Scenarios](https://docs.recombee.com/scenarios) of the given database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdScenariosAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs index a816b14..b8a700f 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs @@ -58,6 +58,38 @@ public partial interface IRecommendationsClient /// See [this example](https://docs.recombee.com/api#composite-recommendation-example-setting-parameters-for-individual-stages) for more details. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsCompositeAsResponseAsync( + string databaseId, + + global::Recombee.CompositeRecommendationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Composite Recommendation
+ /// Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations)) and a list of related recommendations in a single response.
+ /// It is ideal for use cases such as personalized homepage sections (*Articles from <category>*), *Because You Watched <movie>*, or *Artists Related to Your Favorite Artist <artist>*.
+ /// See detailed **examples and configuration guidance** in the [Composite Scenarios documentation](https://docs.recombee.com/scenarios#composite-recommendations).
+ /// **Structure**
+ /// The endpoint operates in two stages:
+ /// 1. Recommends the *source* (e.g., an Item Segment or item) to the user.
+ /// 2. Recommends *results* (items or Item Segments) related to that *source*.
+ /// For example, *Articles from <category>* can be decomposed into:
+ /// - [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-item-segments-to-user) to find the category.
+ /// - [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) to recommend articles from that category.
+ /// Since the first step uses [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-items-to-user), you must include the `userId` parameter in the *Composite Recommendation* request.
+ /// Each *Composite Recommendation* counts as a single recommendation API request for billing.
+ /// **Stage-specific Parameters**
+ /// Additional parameters can be supplied via [sourceSettings](https://docs.recombee.com/api#composite-recommendation-param-sourceSettings) and [resultSettings](https://docs.recombee.com/api#composite-recommendation-param-resultSettings).
+ /// In the example above:
+ /// - `sourceSettings` may include any parameter valid for [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-items-to-user) (e.g., `filter`, `booster`).
+ /// - `resultSettings` may include any parameter valid for [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment).
+ /// See [this example](https://docs.recombee.com/api#composite-recommendation-example-setting-parameters-for-individual-stages) for more details. + ///
+ /// /// /// Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
/// You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs index 9c55b9d..583577f 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs @@ -38,6 +38,28 @@ public partial interface IRecommendationsClient /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemSegmentsItemSegmentsAsResponseAsync( + string databaseId, + + global::Recombee.RecommendItemSegmentsToItemSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Item Segments to Item Segment
+ /// Recommends Segments from a result [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular Segment from a context Segmentation.
+ /// Based on the used Segmentations, this endpoint can be used for example for:
+ /// - Recommending the related brands to particular brand
+ /// - Recommending the related brands to particular category
+ /// - Recommending the related artists to a particular genre (assuming songs are the Items)
+ /// You need to set the used context and result Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// /// /// ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs index fcf23f9..470d1ef 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs @@ -38,6 +38,28 @@ public partial interface IRecommendationsClient /// It is also possible to use the POST HTTP method (for example, in the case of a very long ReQL filter) — query parameters then become body parameters. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemSegmentsItemsAsResponseAsync( + string databaseId, + + global::Recombee.RecommendItemsToItemSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Items to Item Segment
+ /// Recommends Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations).
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Recommending articles related to a particular topic
+ /// - Recommending songs belonging to a particular genre
+ /// - Recommending products produced by a particular brand
+ /// You need to set the used context Segmentation in the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// It is also possible to use the POST HTTP method (for example, in the case of a very long ReQL filter) — query parameters then become body parameters. + ///
+ /// /// /// ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs index 940c9a8..68bc587 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs @@ -43,6 +43,31 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemsByItemIdItemSegmentsAsResponseAsync( + string databaseId, + string itemId, + + global::Recombee.RecommendItemSegmentsToItemParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Item Segments to Item
+ /// Recommends Segments from a [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular item.
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Recommending the related categories
+ /// - Recommending the related genres
+ /// - Recommending the related brands
+ /// - Recommending the related artists
+ /// You need to set the used Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// /// /// ID of the user who will see the recommendations.
/// Specifying the *targetUserId* is beneficial because:
diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs index 0b13fed..c764a73 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs @@ -37,6 +37,28 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemsByItemIdItemsAsResponseAsync( + string databaseId, + string itemId, + + global::Recombee.RecommendItemsToItemParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Items to Item
+ /// Recommends a set of items that are somehow related to one given item, *X*. A typical scenario is when the user *A* is viewing *X*. Then you may display items to the user that he might also be interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
+ /// - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
+ /// - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// /// /// ID of the user who will see the recommendations.
/// Specifying the *targetUserId* is beneficial because:
diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs index a674339..ccac02d 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs @@ -31,6 +31,25 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemsByItemIdUsersAsResponseAsync( + string databaseId, + string itemId, + + global::Recombee.RecommendUsersToItemParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Users to Item
+ /// Recommends users that are likely to be interested in the given item.
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
+ /// The returned users are sorted by predicted interest in the item (the first user being the most interested). + ///
+ /// + /// /// /// Number of users to be recommended (N for the top-N recommendation). /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs index dd70060..a6cdf70 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs @@ -49,6 +49,34 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsNextItemSegmentsByRecommIdAsResponseAsync( + string databaseId, + string recommId, + + global::Recombee.RecommendNextItemSegmentsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Next Item Segments
+ /// Returns [Item Segments](https://docs.recombee.com/segmentations) to be shown as the next recommendations when a user scrolls (e.g., within a carousel or feed of Item Segments such as brands, artists, topics, or categories).
+ /// The request requires the `recommId` of a base recommendation request and the number of Segments to return (`count`).
+ /// The base request can be one of:
+ /// - [Recommend Item Segments to Item](https://docs.recombee.com/api#recommend-item-segments-to-item)
+ /// - [Recommend Item Segments to User](https://docs.recombee.com/api#recommend-item-segments-to-user)
+ /// - [Recommend Item Segments to Item Segment](https://docs.recombee.com/api#recommend-item-segments-to-item-segment)
+ /// - [Search Item Segments](https://docs.recombee.com/api#search-item-segments)
+ /// All other parameters are inherited from the base request associated with the provided `recommId`.
+ /// This endpoint can be called multiple times for a single `recommId`. Each call returns different Item Segments that have not been recommended in previous calls.
+ /// The number of calls made so far is returned in the `numberNextRecommsCalls` field.
+ /// Requests can be made up to 30 minutes after the base request or the most recent Recommend Next Item Segments call.
+ /// For billing purposes, each call to this endpoint is counted as a separate recommendation request. + ///
+ /// + /// /// /// Number of item segments to be recommended /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs index abb8447..b54a3df 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs @@ -49,6 +49,34 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsNextItemsByRecommIdAsResponseAsync( + string databaseId, + string recommId, + + global::Recombee.RecommendNextItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Next Items
+ /// Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page.
+ /// It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`).
+ /// The base request can be one of:
+ /// - [Recommend Items to Item](https://docs.recombee.com/api#recommend-items-to-item)
+ /// - [Recommend Items to User](https://docs.recombee.com/api#recommend-items-to-user)
+ /// - [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment)
+ /// - [Search Items](https://docs.recombee.com/api#search-items)
+ /// All the other parameters are inherited from the base request.
+ /// *Recommend next items* can be called many times for a single `recommId` and each call returns different (previously not recommended) items.
+ /// The number of *Recommend next items* calls performed so far is returned in the `numberNextRecommsCalls` field.
+ /// *Recommend next items* can be requested up to 30 minutes after the base request or a previous *Recommend next items* call.
+ /// For billing purposes, each call to *Recommend next items* is counted as a separate recommendation request. + ///
+ /// + /// /// /// Number of items to be recommended /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs index 37263ce..96a405a 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs @@ -43,6 +43,31 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsUsersByUserIdItemSegmentsAsResponseAsync( + string databaseId, + string userId, + + global::Recombee.RecommendItemSegmentsToUserParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Item Segments to User
+ /// Recommends the top Segments from a [Segmentation](https://docs.recombee.com/segmentations) for a particular user, based on the user's past interactions.
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Recommending the top categories for the user
+ /// - Recommending the top genres for the user
+ /// - Recommending the top brands for the user
+ /// - Recommending the top artists for the user
+ /// You need to set the used Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// /// /// Number of item segments to be recommended (N for the top-N recommendation). /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs index 316363c..d5619ad 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs @@ -39,6 +39,29 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsUsersByUserIdItemsAsResponseAsync( + string databaseId, + string userId, + + global::Recombee.RecommendItemsToUserParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Items to User
+ /// Based on the user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for the given user.
+ /// The most typical use cases are recommendations on the homepage, in some "Picked just for you" section, or in email.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
+ /// - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
+ /// - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// /// /// Number of items to be recommended (N for the top-N recommendation). /// diff --git a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs index e9f257d..42d2725 100644 --- a/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IRecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs @@ -31,6 +31,25 @@ public partial interface IRecommendationsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsUsersByUserIdUsersAsResponseAsync( + string databaseId, + string userId, + + global::Recombee.RecommendUsersToUserParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Recommend Users to User
+ /// Gets users similar to the given user, based on the user's past interactions (purchases, ratings, etc.) and values of properties.
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
+ /// The returned users are sorted by similarity (the first user being the most similar). + ///
+ /// + /// /// /// Number of users to be recommended (N for the top-N recommendation). /// diff --git a/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs index e1fba8b..0f49f82 100644 --- a/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs @@ -41,6 +41,30 @@ public partial interface ISearchClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdSearchUsersByUserIdItemSegmentsAsResponseAsync( + string databaseId, + string userId, + + global::Recombee.SearchItemSegmentsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Search Item Segments
+ /// Full-text personalized search that returns Segments from a Segmentation. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.).
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Searching within categories or brands
+ /// - Searching within genres or artists
+ /// For example if the user is searching for "iPhone" this endpoint can return "cell phones" category.
+ /// You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// /// /// Search query provided by the user. It is used for the full-text search. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs index 3fe89fc..128728c 100644 --- a/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs @@ -41,6 +41,30 @@ public partial interface ISearchClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdSearchUsersByUserIdItemsAsResponseAsync( + string databaseId, + string userId, + + global::Recombee.SearchItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Search Items
+ /// Full-text personalized search. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.) with the items (items more suitable for the user are preferred in the results).
+ /// All the string and set item properties are indexed by the search engine.
+ /// This endpoint should be used in a search box on your website/app. It can be called multiple times as the user is typing the query in order to get the most viable suggestions based on the current state of the query, or once after submitting the whole query.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
+ /// - Let Recombee know that this search was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
+ /// - Get subsequent search results when the user scrolls down or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// /// /// Search query provided by the user. It is used for the full-text search. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSynonymsItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSynonymsItems.g.cs index 7c01c7d..cc5ec7b 100644 --- a/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSynonymsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISearchClient.CreateByDatabaseIdSynonymsItems.g.cs @@ -30,6 +30,24 @@ public partial interface ISearchClient /// An example of a synonym can be `science fiction` for the term `sci-fi`. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateByDatabaseIdSynonymsItemsAsResponseAsync( + string databaseId, + + global::Recombee.SearchSynonymParams request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Search Synonym
+ /// Adds a new synonym for the [Search items](https://docs.recombee.com/api#search-items).
+ /// When the `term` is used in the search query, the `synonym` is also used for the full-text search.
+ /// Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`).
+ /// An example of a synonym can be `science fiction` for the term `sci-fi`. + ///
+ /// /// /// A word to which the `synonym` is specified. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItems.g.cs index 668d75a..7f4d894 100644 --- a/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItems.g.cs @@ -16,5 +16,17 @@ public partial interface ISearchClient string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete All Search Synonyms
+ /// Deletes all synonyms defined in the database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdSynonymsItemsAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs b/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs index 69393f1..50a7156 100644 --- a/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs @@ -18,5 +18,19 @@ public partial interface ISearchClient string id, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Search Synonym
+ /// Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api#search-items). + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdSynonymsItemsByIdAsResponseAsync( + string databaseId, + string id, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISearchClient.GetByDatabaseIdSynonymsItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISearchClient.GetByDatabaseIdSynonymsItems.g.cs index 7e416e9..f42f6ab 100644 --- a/src/libs/Recombee/Generated/Recombee.ISearchClient.GetByDatabaseIdSynonymsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISearchClient.GetByDatabaseIdSynonymsItems.g.cs @@ -20,5 +20,21 @@ public partial interface ISearchClient int? offset = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Search Synonyms
+ /// Gives the list of synonyms defined in the database. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdSynonymsItemsAsResponseAsync( + string databaseId, + int? count = default, + int? offset = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs index bb51559..5b55bdd 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs @@ -27,6 +27,23 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + + global::Recombee.UpdateAutoReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Auto ReQL Segmentation
+ /// Update an existing Segmentation. + ///
+ /// + /// /// /// ReQL expression that returns for each item a set with IDs of segments to which the item belongs /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs index 20a19ee..fc120e1 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs @@ -27,6 +27,23 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + + global::Recombee.UpdateManualReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Manual ReQL Segmentation
+ /// Update an existing Segmentation. + ///
+ /// + /// /// /// Human-readable name that is shown in the Recombee Admin UI. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs index e46580f..cd0e89f 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs @@ -30,6 +30,25 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + string databaseId, + string segmentationId, + string segmentId, + + global::Recombee.ManualReQLSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Manual ReQL Segment
+ /// Update definition of the Segment. + ///
+ /// + /// + /// /// /// ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs index 27de5a3..75038d5 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs @@ -27,6 +27,23 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + + global::Recombee.UpdatePropertyBasedSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Property Based Segmentation
+ /// Updates a Property Based Segmentation + ///
+ /// + /// /// /// Name of the property on which the Segmentation should be based /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs index c90c2ae..09439b5 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs @@ -18,5 +18,19 @@ public partial interface ISegmentationsDefinitionClient string segmentationId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Segmentation
+ /// Delete existing Segmentation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdSegmentationsBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs index 83d77cd..8154f80 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs @@ -20,5 +20,21 @@ public partial interface ISegmentationsDefinitionClient string segmentId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Manual ReQL Segment
+ /// Delete a Segment from a Manual ReQL Segmentation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + string databaseId, + string segmentationId, + string segmentId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs index 5efdcb7..baa346d 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs @@ -18,5 +18,19 @@ public partial interface ISegmentationsDefinitionClient string sourceType, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Segmentations
+ /// Return all existing items Segmentations. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdSegmentationsListAsResponseAsync( + string databaseId, + string sourceType, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs index 280b0e5..0e2397d 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs @@ -18,5 +18,19 @@ public partial interface ISegmentationsDefinitionClient string segmentationId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Segmentation
+ /// Get existing Segmentation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdSegmentationsListBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs index 0547acb..5a6be4a 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs @@ -29,6 +29,24 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsAutoReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + + global::Recombee.CreateAutoReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Auto ReQL Segmentation
+ /// Segment the items using a [ReQL](https://docs.recombee.com/reql) expression.
+ /// For each item, the expression should return a set that contains IDs of segments to which the item belongs to. + ///
+ /// + /// /// /// What type of data should be segmented. Currently only `items` are supported. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs index 69c5b7d..6ab1957 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs @@ -29,6 +29,24 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsManualReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + + global::Recombee.CreateManualReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Manual ReQL Segmentation
+ /// Segment the items using multiple [ReQL](https://docs.recombee.com/reql) filters.
+ /// Use the Add Manual ReQL Items Segment endpoint to create the individual segments. + ///
+ /// + /// /// /// What type of data should be segmented. Currently only `items` are supported. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs index 62d2db3..0a7d8c3 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs @@ -32,6 +32,26 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + string databaseId, + string segmentationId, + string segmentId, + + global::Recombee.ManualReQLSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Manual ReQL Segment
+ /// Adds a new Segment into a Manual ReQL Segmentation.
+ /// The new Segment is defined by a [ReQL](https://docs.recombee.com/reql) filter that returns `true` for an item in case that this item belongs to the segment. + ///
+ /// + /// + /// /// /// ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs index ee7a523..b618b7d 100644 --- a/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs @@ -31,6 +31,25 @@ public partial interface ISegmentationsDefinitionClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + + global::Recombee.CreatePropertyBasedSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Property Based Segmentation
+ /// Creates a Segmentation that splits the items into segments based on values of a particular item property.
+ /// A segment is created for each unique value of the property.
+ /// In case of `set` properties, a segment is created for each value in the set. Item belongs to all these segments. + ///
+ /// + /// /// /// What type of data should be segmented. Currently only `items` are supported. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs index 21d30fe..3efc791 100644 --- a/src/libs/Recombee/Generated/Recombee.ISeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs @@ -27,6 +27,23 @@ public partial interface ISeriesClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + string databaseId, + string seriesId, + + global::Recombee.SeriesItem request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Insert to Series
+ /// Inserts an existing item/series into a series of the given seriesId at a position determined by time. + ///
+ /// + /// /// /// `item` iff the regular item from the catalog is to be inserted, `series` iff series is inserted as the item. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs b/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs index 30f2117..284279b 100644 --- a/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs @@ -29,6 +29,24 @@ public partial interface ISeriesClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdSeriesBySeriesIdAsResponseAsync( + string databaseId, + string seriesId, + + global::Recombee.DeleteSeries request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Series
+ /// Deletes the series of the given `seriesId` from the database.
+ /// Deleting a series will only delete assignment of items to it, not the items themselves! + ///
+ /// + /// /// /// If set to `true`, item with the same ID as seriesId will be also deleted. Default is `false`. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs index 50d5343..dc37613 100644 --- a/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs @@ -27,6 +27,23 @@ public partial interface ISeriesClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + string databaseId, + string seriesId, + + global::Recombee.RemoveSeriesItem request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove from Series
+ /// Removes an existing series item from the series. + ///
+ /// + /// /// /// Type of the item to be removed. /// diff --git a/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs index 8acda86..3ba8a7f 100644 --- a/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs @@ -18,5 +18,19 @@ public partial interface ISeriesClient string seriesId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Series Items
+ /// Lists all the items present in the given series, sorted according to their time index values. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + string databaseId, + string seriesId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesList.g.cs b/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesList.g.cs index 6cc06f8..30623fc 100644 --- a/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISeriesClient.GetByDatabaseIdSeriesList.g.cs @@ -16,5 +16,17 @@ public partial interface ISeriesClient string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Series
+ /// Gets the list of all the series currently present in the database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdSeriesListAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ISeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs b/src/libs/Recombee/Generated/Recombee.ISeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs index ae0efbb..aea0d40 100644 --- a/src/libs/Recombee/Generated/Recombee.ISeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ISeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs @@ -27,6 +27,23 @@ public partial interface ISeriesClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdSeriesBySeriesIdAsResponseAsync( + string databaseId, + string seriesId, + + global::Recombee.AddSeries request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Series
+ /// Creates a new series in the database. + ///
+ /// + /// /// /// If set to `true`, the item will be created with the same ID as the series. Default is `true`. /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs index 1e12756..f921f94 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs @@ -24,6 +24,21 @@ public partial interface IUserItemInteractionsClient /// Adds a bookmark of the given item made by the given user. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdBookmarksAsResponseAsync( + string databaseId, + + global::Recombee.Bookmark request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Bookmark
+ /// Adds a bookmark of the given item made by the given user. + ///
+ /// /// /// User who bookmarked the item /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs index b740caf..13b8d80 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs @@ -24,6 +24,21 @@ public partial interface IUserItemInteractionsClient /// Adds a cart addition of the given item made by the given user. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdCartadditionsAsResponseAsync( + string databaseId, + + global::Recombee.CartAddition request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Cart Addition
+ /// Adds a cart addition of the given item made by the given user. + ///
+ /// /// /// User who added the item to the cart /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs index 086bf35..6da2ed8 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs @@ -24,6 +24,21 @@ public partial interface IUserItemInteractionsClient /// Adds a detail view of the given item made by the given user. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdDetailviewsAsResponseAsync( + string databaseId, + + global::Recombee.DetailView request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Detail View
+ /// Adds a detail view of the given item made by the given user. + ///
+ /// /// /// User who viewed the item /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs index df8a672..c26dba9 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs @@ -24,6 +24,21 @@ public partial interface IUserItemInteractionsClient /// Adds a purchase of the given item made by the given user. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdPurchasesAsResponseAsync( + string databaseId, + + global::Recombee.Purchase request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Purchase
+ /// Adds a purchase of the given item made by the given user. + ///
+ /// /// /// User who purchased the item /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs index bab8cc2..4233c47 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs @@ -24,6 +24,21 @@ public partial interface IUserItemInteractionsClient /// Adds a rating of the given item made by the given user. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdRatingsAsResponseAsync( + string databaseId, + + global::Recombee.Rating request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Rating
+ /// Adds a rating of the given item made by the given user. + ///
+ /// /// /// User who submitted the rating /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs index be37d86..9474d39 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs @@ -26,6 +26,22 @@ public partial interface IUserItemInteractionsClient /// If you send a new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdViewportionsAsResponseAsync( + string databaseId, + + global::Recombee.ViewPortion request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set View Portion
+ /// Sets viewed portion of an item (for example a video or article) by a user (at a session).
+ /// If you send a new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated. + ///
+ /// /// /// User who viewed a portion of the item /// diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs index 898ae97..8c660d5 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs @@ -22,5 +22,23 @@ public partial interface IUserItemInteractionsClient double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Bookmark
+ /// Deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp` or all the bookmarks with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdBookmarksAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs index 299b7a0..439f11c 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs @@ -22,5 +22,23 @@ public partial interface IUserItemInteractionsClient double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Cart Addition
+ /// Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp` or all the cart additions with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdCartadditionsAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs index 0e66b1a..d066a76 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs @@ -22,5 +22,23 @@ public partial interface IUserItemInteractionsClient double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Detail View
+ /// Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`) or all the detail views with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdDetailviewsAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs index 267b09e..b0f2565 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs @@ -22,5 +22,23 @@ public partial interface IUserItemInteractionsClient double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Purchase
+ /// Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdPurchasesAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs index f89857b..6be672f 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs @@ -22,5 +22,23 @@ public partial interface IUserItemInteractionsClient double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Rating
+ /// Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdRatingsAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs index 5574161..67171a4 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs @@ -22,5 +22,23 @@ public partial interface IUserItemInteractionsClient string? sessionId = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete View Portion
+ /// Deletes an existing view portion specified by (`userId`, `itemId`, `sessionId`) from the database. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdViewportionsAsResponseAsync( + string databaseId, + string userId, + string itemId, + string? sessionId = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs index 739c0af..4e9a7a3 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item Bookmarks
+ /// Lists all the ever-made bookmarks of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdBookmarksAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs index 0fe4e01..1f19502 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item Cart Additions
+ /// Lists all the ever-made cart additions of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdCartadditionsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs index 91a89a4..9b8f841 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item Detail Views
+ /// Lists all the detail views of the given item ever made by different users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdDetailviewsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs index 9729fc5..aefa037 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item Purchases
+ /// Lists all the ever-made purchases of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdPurchasesAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs index 9cd45ac..28ed127 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item Ratings
+ /// Lists all the ratings of an item ever submitted by different users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdRatingsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs index a83d06e..00569c2 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Item View Portions
+ /// Lists all the view portions of an item ever submitted by different users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdViewportionsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs index c9ac3ac..58da587 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Bookmarks
+ /// Lists all the bookmarks ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdBookmarksAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs index 38ce68b..4026553 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Cart Additions
+ /// Lists all the cart additions ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdCartadditionsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs index 30268de..00bdcfa 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Detail Views
+ /// Lists all the detail views of different items ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdDetailviewsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs index cf548b1..2f21e84 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Purchases
+ /// Lists all the purchases ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdPurchasesAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs index e3a5708..8ada13e 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Ratings
+ /// Lists all the ratings ever submitted by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdRatingsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs index 4dc6853..fead347 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs @@ -18,5 +18,19 @@ public partial interface IUserItemInteractionsClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User View Portions
+ /// Lists all the view portions ever submitted by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdViewportionsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs index c402e61..d756e93 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs @@ -19,6 +19,25 @@ public partial interface IUserPropertiesClient string databaseId, string userId, + string request, + bool? cascadeCreate = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set User Values
+ /// Sets/updates (some) property values of the given user. The properties (columns) must be previously created by [Add user property](https://docs.recombee.com/api#add-user-property). + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + string request, bool? cascadeCreate = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, diff --git a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs index 50b5a62..51d5527 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs @@ -18,5 +18,19 @@ public partial interface IUserPropertiesClient string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete User Property
+ /// Deleting a user property is roughly equivalent to removing a column from the table of users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs index 62a273f..63cec5c 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs @@ -18,5 +18,19 @@ public partial interface IUserPropertiesClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get User Values
+ /// Gets all the current property values of the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs index 3475d64..049934b 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs @@ -18,5 +18,19 @@ public partial interface IUserPropertiesClient string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get User Property Info
+ /// Gets information about specified user property. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs index 72f928c..65ea546 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs @@ -16,5 +16,17 @@ public partial interface IUserPropertiesClient string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List User Properties
+ /// Gets the list of all the user properties in your database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersPropertiesListAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs index 47fd441..ed142c5 100644 --- a/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs @@ -20,5 +20,21 @@ public partial interface IUserPropertiesClient global::Recombee.PutUsersPropertiesType type, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add User Property
+ /// Adding a user property is somewhat equivalent to adding a column to the table of users. The users may be characterized by various properties of different types. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.PutUsersPropertiesType type, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUsersClient.DeleteByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.IUsersClient.DeleteByDatabaseIdUsersByUserId.g.cs index a971d63..ea4ef1a 100644 --- a/src/libs/Recombee/Generated/Recombee.IUsersClient.DeleteByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUsersClient.DeleteByDatabaseIdUsersByUserId.g.cs @@ -19,5 +19,20 @@ public partial interface IUsersClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete User
+ /// Deletes a user of the given *userId* from the database.
+ /// If there are any purchases, ratings, bookmarks, cart additions or detail views made by the user present in the database, they will be deleted in cascade as well. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUsersClient.GetByDatabaseIdUsersList.g.cs b/src/libs/Recombee/Generated/Recombee.IUsersClient.GetByDatabaseIdUsersList.g.cs index 9a1f830..05db5cf 100644 --- a/src/libs/Recombee/Generated/Recombee.IUsersClient.GetByDatabaseIdUsersList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUsersClient.GetByDatabaseIdUsersList.g.cs @@ -26,5 +26,27 @@ public partial interface IUsersClient global::System.Collections.Generic.IList? includedProperties = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Users
+ /// Gets a list of IDs of users currently present in the catalog. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersListAsResponseAsync( + string databaseId, + string? filter = default, + int? count = default, + int? offset = default, + bool? returnProperties = default, + global::System.Collections.Generic.IList? includedProperties = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs b/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs index f2785ed..af2f244 100644 --- a/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs @@ -25,5 +25,26 @@ public partial interface IUsersClient bool? cascadeCreate = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Merge Users
+ /// Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable.
+ /// Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**.
+ /// By default, the *Merge Users* request is only available from server-side integrations for security reasons, to prevent potential abuse.
+ /// If you need to call this request from a client-side environment (such as a web or mobile app), please contact our support and request access to enable this feature for your database. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdAsResponseAsync( + string databaseId, + string targetUserId, + string sourceUserId, + bool? cascadeCreate = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByUserId.g.cs index ddde4e6..fcbc554 100644 --- a/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.IUsersClient.PutByDatabaseIdUsersByUserId.g.cs @@ -18,5 +18,19 @@ public partial interface IUsersClient string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add User
+ /// Adds a new user to the database. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PutByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs index bab9652..bd53ff3 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdItemsByItemId.g.cs @@ -57,6 +57,36 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( string databaseId, string itemId, + string request, + bool? cascadeCreate = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdItemsByItemIdAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + + request: request, + cascadeCreate: cascadeCreate, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Set Item Values
+ /// Sets/updates (some) property values of the given item. The properties (columns) must be previously created by [Add item property](https://docs.recombee.com/api#add-item-property). + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + string request, bool? cascadeCreate = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, @@ -95,11 +125,12 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("cascadeCreate", cascadeCreate?.ToString().ToLowerInvariant()) + .AddOptionalParameter("cascadeCreate", cascadeCreate?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -180,6 +211,8 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -190,6 +223,11 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -207,6 +245,8 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -216,8 +256,7 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -226,6 +265,11 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -242,14 +286,15 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -289,6 +334,8 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -309,6 +356,8 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -395,6 +444,10 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -416,6 +469,10 @@ partial void ProcessCreateByDatabaseIdItemsByItemIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs index 6c5f43a..5b2fb23 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.CreateByDatabaseIdMoreItems.g.cs @@ -62,6 +62,39 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( public async global::System.Threading.Tasks.Task CreateByDatabaseIdMoreItemsAsync( string databaseId, + global::Recombee.UpdateMoreItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdMoreItemsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update More Items
+ /// Updates (some) property values of all the items that pass the filter.
+ /// Example: *Setting all the items that are older than a week as unavailable*
+ /// ```json
+ /// {
+ /// "filter": "'releaseDate' < now() - 7*24*3600",
+ /// "changes": {"available": false}
+ /// }
+ /// ``` + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdMoreItemsAsResponseAsync( + string databaseId, + global::Recombee.UpdateMoreItemsParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +130,7 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/more-items/", baseUri: HttpClient.BaseAddress); @@ -177,6 +211,8 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +223,11 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +245,8 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +256,7 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +265,11 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +286,15 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +334,8 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +356,8 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -396,9 +448,13 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.UpdateMoreItemsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.UpdateMoreItemsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -426,9 +482,13 @@ partial void ProcessCreateByDatabaseIdMoreItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.UpdateMoreItemsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.UpdateMoreItemsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs index ca2bde0..91caf78 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.DeleteByDatabaseIdItemsPropertiesByPropertyName.g.cs @@ -52,6 +52,28 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + databaseId: databaseId, + propertyName: propertyName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Item Property
+ /// Deleting an item property is roughly equivalent to removing a column from the table of items. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +104,7 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/properties/{propertyName}", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -371,6 +412,10 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -392,6 +437,10 @@ partial void ProcessDeleteByDatabaseIdItemsPropertiesByPropertyNameResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs index 9a2d0ca..9397985 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsByItemId.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Item Values
+ /// Gets all the current property values of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,7 +423,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -408,7 +455,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs index df67b7f..f1c5e46 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesByPropertyName.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + databaseId: databaseId, + propertyName: propertyName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Item Property Info
+ /// Gets information about specified item property. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/properties/{propertyName}", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.PropertyInfo.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.PropertyInfo.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsPropertiesByPropertyNameResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.PropertyInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.PropertyInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs index f56977a..1e06664 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.GetByDatabaseIdItemsPropertiesList.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsPropertiesListAsResponseAsync( + databaseId: databaseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item Properties
+ /// Gets the list of all the item properties in your database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsPropertiesListAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/properties/list/", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -341,9 +381,13 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -371,9 +415,13 @@ partial void ProcessGetByDatabaseIdItemsPropertiesListResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs index 531e66a..7c26db7 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.PutByDatabaseIdItemsPropertiesByPropertyName.g.cs @@ -56,6 +56,31 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( global::Recombee.PutItemsPropertiesType type, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + databaseId: databaseId, + propertyName: propertyName, + type: type, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Item Property
+ /// Adding an item property is somewhat equivalent to adding a column to the table of items. The items may be characterized by various properties of different types. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdItemsPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.PutItemsPropertiesType type, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +112,12 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/properties/{propertyName}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("type", type.ToValueString()) + .AddRequiredParameter("type", type.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -165,6 +191,8 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +203,11 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +225,8 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +236,7 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +245,11 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +266,15 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +314,8 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +336,8 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,6 +424,10 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -401,6 +449,10 @@ partial void ProcessPutByDatabaseIdItemsPropertiesByPropertyNameResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.g.cs b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.g.cs index 000c8c6..3e56bb1 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemPropertiesClient.g.cs @@ -72,10 +72,10 @@ public ItemPropertiesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ItemPropertiesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs index 696d746..de1ed6b 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdItemsByItemId.g.cs @@ -54,6 +54,30 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdItemsByItemIdAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Item
+ /// Deletes an item of the given `itemId` from the catalog.
+ /// If there are any *purchases*, *ratings*, *bookmarks*, *cart additions*, or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present.
+ /// If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -84,6 +108,7 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}", baseUri: HttpClient.BaseAddress); @@ -158,6 +183,8 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +195,11 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +217,8 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +228,7 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +237,11 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +258,15 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +306,8 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +328,8 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -373,6 +416,10 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -394,6 +441,10 @@ partial void ProcessDeleteByDatabaseIdItemsByItemIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdMoreItems.g.cs b/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdMoreItems.g.cs index 7033a7e..8d8f6b7 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdMoreItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemsClient.DeleteByDatabaseIdMoreItems.g.cs @@ -56,6 +56,33 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( public async global::System.Threading.Tasks.Task DeleteByDatabaseIdMoreItemsAsync( string databaseId, + global::Recombee.DeleteMoreItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeleteByDatabaseIdMoreItemsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Delete More Items
+ /// Deletes all the items that pass the filter.
+ /// If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> DeleteByDatabaseIdMoreItemsAsResponseAsync( + string databaseId, + global::Recombee.DeleteMoreItemsParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -91,6 +118,7 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/more-items/", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -357,9 +403,13 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.DeleteMoreItemsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.DeleteMoreItemsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +437,13 @@ partial void ProcessDeleteByDatabaseIdMoreItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.DeleteMoreItemsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.DeleteMoreItemsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemsClient.GetByDatabaseIdItemsList.g.cs b/src/libs/Recombee/Generated/Recombee.ItemsClient.GetByDatabaseIdItemsList.g.cs index 7987e5b..9d63af0 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemsClient.GetByDatabaseIdItemsList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemsClient.GetByDatabaseIdItemsList.g.cs @@ -73,6 +73,42 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( global::System.Collections.Generic.IList? includedProperties = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsListAsResponseAsync( + databaseId: databaseId, + filter: filter, + count: count, + offset: offset, + returnProperties: returnProperties, + includedProperties: includedProperties, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Items
+ /// Gets a list of IDs of items currently present in the catalog. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsListAsResponseAsync( + string databaseId, + string? filter = default, + int? count = default, + int? offset = default, + bool? returnProperties = default, + global::System.Collections.Generic.IList? includedProperties = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -107,15 +143,16 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/list/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("filter", filter) .AddOptionalParameter("count", count?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) .AddOptionalParameter("returnProperties", returnProperties?.ToString().ToLowerInvariant()) - .AddOptionalParameter("includedProperties", includedProperties, delimiter: ",", explode: false) + .AddOptionalParameter("includedProperties", includedProperties, delimiter: ",", explode: false) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -192,6 +229,8 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -202,6 +241,11 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -219,6 +263,8 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -228,8 +274,7 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -238,6 +283,11 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -254,14 +304,15 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -301,6 +352,8 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -321,6 +374,8 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -378,9 +433,13 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -408,9 +467,13 @@ partial void ProcessGetByDatabaseIdItemsListResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemsClient.PutByDatabaseIdItemsByItemId.g.cs b/src/libs/Recombee/Generated/Recombee.ItemsClient.PutByDatabaseIdItemsByItemId.g.cs index 5b802cf..dd310f1 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemsClient.PutByDatabaseIdItemsByItemId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemsClient.PutByDatabaseIdItemsByItemId.g.cs @@ -53,6 +53,29 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdItemsByItemIdAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Item
+ /// Adds new item of the given `itemId` to the items catalog.
+ /// All the item properties for the newly created items are set to null. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdItemsByItemIdAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,6 +106,7 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}", baseUri: HttpClient.BaseAddress); @@ -157,6 +181,8 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +193,11 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +215,8 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +226,7 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +235,11 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +256,15 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +304,8 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +326,8 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +414,10 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +439,10 @@ partial void ProcessPutByDatabaseIdItemsByItemIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.ItemsClient.g.cs b/src/libs/Recombee/Generated/Recombee.ItemsClient.g.cs index 8919ebe..cfeb0f9 100644 --- a/src/libs/Recombee/Generated/Recombee.ItemsClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.ItemsClient.g.cs @@ -72,10 +72,10 @@ public ItemsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ItemsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.CreateByDatabaseIdBatch.g.cs b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.CreateByDatabaseIdBatch.g.cs index 57999d6..ca6ebac 100644 --- a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.CreateByDatabaseIdBatch.g.cs +++ b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.CreateByDatabaseIdBatch.g.cs @@ -52,6 +52,32 @@ partial void ProcessCreateByDatabaseIdBatchResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdBatchAsync( string databaseId, + global::Recombee.Batch request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdBatchAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Batch
+ /// Batch processing allows you to submit arbitrary sequence of requests within a single HTTPS request.
+ /// Any type of request from the above documentation may be used in the Batch, and the Batch may combine different types of requests arbitrarily as well.
+ /// Using Batch requests is beneficial for example, when synchronizing the catalog of items or uploading historical interaction data, as sending the data in Batch is considerably faster than sending the individual requests (thanks to optimizations and reducing network and HTTPS overhead). + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdBatchAsResponseAsync( + string databaseId, + global::Recombee.Batch request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +113,7 @@ partial void ProcessCreateByDatabaseIdBatchResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/batch/", baseUri: HttpClient.BaseAddress); @@ -167,6 +194,8 @@ partial void ProcessCreateByDatabaseIdBatchResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +206,11 @@ partial void ProcessCreateByDatabaseIdBatchResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +228,8 @@ partial void ProcessCreateByDatabaseIdBatchResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +239,7 @@ partial void ProcessCreateByDatabaseIdBatchResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +248,11 @@ partial void ProcessCreateByDatabaseIdBatchResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +269,15 @@ partial void ProcessCreateByDatabaseIdBatchResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +317,8 @@ partial void ProcessCreateByDatabaseIdBatchResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +339,8 @@ partial void ProcessCreateByDatabaseIdBatchResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -415,6 +460,10 @@ partial void ProcessCreateByDatabaseIdBatchResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -436,6 +485,10 @@ partial void ProcessCreateByDatabaseIdBatchResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.DeleteByDatabaseId.g.cs b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.DeleteByDatabaseId.g.cs index be138d0..3086dee 100644 --- a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.DeleteByDatabaseId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.DeleteByDatabaseId.g.cs @@ -48,6 +48,25 @@ partial void ProcessDeleteByDatabaseIdResponse( string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdAsResponseAsync( + databaseId: databaseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Reset Database
+ /// Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request is never executed in the production environment! Resetting your database is irreversible. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +96,7 @@ partial void ProcessDeleteByDatabaseIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessDeleteByDatabaseIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessDeleteByDatabaseIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessDeleteByDatabaseIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessDeleteByDatabaseIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessDeleteByDatabaseIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessDeleteByDatabaseIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessDeleteByDatabaseIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessDeleteByDatabaseIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -299,6 +337,10 @@ partial void ProcessDeleteByDatabaseIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -320,6 +362,10 @@ partial void ProcessDeleteByDatabaseIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.GetByDatabaseIdScenarios.g.cs b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.GetByDatabaseIdScenarios.g.cs index b697e63..c13ec83 100644 --- a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.GetByDatabaseIdScenarios.g.cs +++ b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.GetByDatabaseIdScenarios.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdScenariosAsResponseAsync( + databaseId: databaseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Scenarios
+ /// Get all [Scenarios](https://docs.recombee.com/scenarios) of the given database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdScenariosAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/scenarios/", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -308,9 +348,13 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -338,9 +382,13 @@ partial void ProcessGetByDatabaseIdScenariosResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.g.cs b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.g.cs index 0934f59..d56697c 100644 --- a/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.MiscellaneousClient.g.cs @@ -72,10 +72,10 @@ public MiscellaneousClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public MiscellaneousClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.OptionsSupport.g.cs b/src/libs/Recombee/Generated/Recombee.OptionsSupport.g.cs index 203cad9..4a0cdca 100644 --- a/src/libs/Recombee/Generated/Recombee.OptionsSupport.g.cs +++ b/src/libs/Recombee/Generated/Recombee.OptionsSupport.g.cs @@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::Recombee.AutoSDKHookContext @@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +388,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::Recombee.AutoSDKClientOptions clientOptions, global::Recombee.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Recombee.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::Recombee.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/Recombee/Generated/Recombee.RecombeeClient.g.cs b/src/libs/Recombee/Generated/Recombee.RecombeeClient.g.cs index 75f62c2..5aea37c 100644 --- a/src/libs/Recombee/Generated/Recombee.RecombeeClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecombeeClient.g.cs @@ -45,7 +45,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public ItemPropertiesClient ItemProperties => new ItemPropertiesClient(HttpClient, authorizations: Authorizations, options: Options) + public ItemPropertiesClient ItemProperties => new ItemPropertiesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -54,7 +54,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public ItemsClient Items => new ItemsClient(HttpClient, authorizations: Authorizations, options: Options) + public ItemsClient Items => new ItemsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -63,7 +63,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public MiscellaneousClient Miscellaneous => new MiscellaneousClient(HttpClient, authorizations: Authorizations, options: Options) + public MiscellaneousClient Miscellaneous => new MiscellaneousClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -72,7 +72,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public RecommendationsClient Recommendations => new RecommendationsClient(HttpClient, authorizations: Authorizations, options: Options) + public RecommendationsClient Recommendations => new RecommendationsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -81,7 +81,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public SearchClient Search => new SearchClient(HttpClient, authorizations: Authorizations, options: Options) + public SearchClient Search => new SearchClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -90,7 +90,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public SegmentationsDefinitionClient SegmentationsDefinition => new SegmentationsDefinitionClient(HttpClient, authorizations: Authorizations, options: Options) + public SegmentationsDefinitionClient SegmentationsDefinition => new SegmentationsDefinitionClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -99,7 +99,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public SeriesClient Series => new SeriesClient(HttpClient, authorizations: Authorizations, options: Options) + public SeriesClient Series => new SeriesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -108,7 +108,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public UserItemInteractionsClient UserItemInteractions => new UserItemInteractionsClient(HttpClient, authorizations: Authorizations, options: Options) + public UserItemInteractionsClient UserItemInteractions => new UserItemInteractionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -117,7 +117,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public UserPropertiesClient UserProperties => new UserPropertiesClient(HttpClient, authorizations: Authorizations, options: Options) + public UserPropertiesClient UserProperties => new UserPropertiesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -126,7 +126,7 @@ public sealed partial class RecombeeClient : global::Recombee.IRecombeeClient, g /// /// /// - public UsersClient Users => new UsersClient(HttpClient, authorizations: Authorizations, options: Options) + public UsersClient Users => new UsersClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -165,10 +165,10 @@ public RecombeeClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RecombeeClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs index a39e693..27d0225 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsComposite.g.cs @@ -72,6 +72,49 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( public async global::System.Threading.Tasks.Task CreateByDatabaseIdRecommsCompositeAsync( string databaseId, + global::Recombee.CompositeRecommendationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsCompositeAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Composite Recommendation
+ /// Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations)) and a list of related recommendations in a single response.
+ /// It is ideal for use cases such as personalized homepage sections (*Articles from <category>*), *Because You Watched <movie>*, or *Artists Related to Your Favorite Artist <artist>*.
+ /// See detailed **examples and configuration guidance** in the [Composite Scenarios documentation](https://docs.recombee.com/scenarios#composite-recommendations).
+ /// **Structure**
+ /// The endpoint operates in two stages:
+ /// 1. Recommends the *source* (e.g., an Item Segment or item) to the user.
+ /// 2. Recommends *results* (items or Item Segments) related to that *source*.
+ /// For example, *Articles from <category>* can be decomposed into:
+ /// - [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-item-segments-to-user) to find the category.
+ /// - [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) to recommend articles from that category.
+ /// Since the first step uses [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-items-to-user), you must include the `userId` parameter in the *Composite Recommendation* request.
+ /// Each *Composite Recommendation* counts as a single recommendation API request for billing.
+ /// **Stage-specific Parameters**
+ /// Additional parameters can be supplied via [sourceSettings](https://docs.recombee.com/api#composite-recommendation-param-sourceSettings) and [resultSettings](https://docs.recombee.com/api#composite-recommendation-param-resultSettings).
+ /// In the example above:
+ /// - `sourceSettings` may include any parameter valid for [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-items-to-user) (e.g., `filter`, `booster`).
+ /// - `resultSettings` may include any parameter valid for [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment).
+ /// See [this example](https://docs.recombee.com/api#composite-recommendation-example-setting-parameters-for-individual-stages) for more details. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsCompositeAsResponseAsync( + string databaseId, + global::Recombee.CompositeRecommendationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -107,6 +150,7 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/composite/", baseUri: HttpClient.BaseAddress); @@ -187,6 +231,8 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -197,6 +243,11 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -214,6 +265,8 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -223,8 +276,7 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -233,6 +285,11 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -249,14 +306,15 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -296,6 +354,8 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -316,6 +376,8 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -406,9 +468,13 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.CompositeRecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.CompositeRecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -436,9 +502,13 @@ partial void ProcessCreateByDatabaseIdRecommsCompositeResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.CompositeRecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.CompositeRecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs index cf600b0..256ce8c 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItemSegments.g.cs @@ -62,6 +62,39 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon public async global::System.Threading.Tasks.Task CreateByDatabaseIdRecommsItemSegmentsItemSegmentsAsync( string databaseId, + global::Recombee.RecommendItemSegmentsToItemSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsItemSegmentsItemSegmentsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Item Segments to Item Segment
+ /// Recommends Segments from a result [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular Segment from a context Segmentation.
+ /// Based on the used Segmentations, this endpoint can be used for example for:
+ /// - Recommending the related brands to particular brand
+ /// - Recommending the related brands to particular category
+ /// - Recommending the related artists to a particular genre (assuming songs are the Items)
+ /// You need to set the used context and result Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemSegmentsItemSegmentsAsResponseAsync( + string databaseId, + global::Recombee.RecommendItemSegmentsToItemSegmentParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +130,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/item-segments/item-segments/", baseUri: HttpClient.BaseAddress); @@ -177,6 +211,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +223,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +245,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +256,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +265,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +286,15 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +334,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +356,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -396,9 +448,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -426,9 +482,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemSegmentsResponseCon #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs index c073137..3deec31 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemSegmentsItems.g.cs @@ -62,6 +62,39 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( public async global::System.Threading.Tasks.Task CreateByDatabaseIdRecommsItemSegmentsItemsAsync( string databaseId, + global::Recombee.RecommendItemsToItemSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsItemSegmentsItemsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Items to Item Segment
+ /// Recommends Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations).
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Recommending articles related to a particular topic
+ /// - Recommending songs belonging to a particular genre
+ /// - Recommending products produced by a particular brand
+ /// You need to set the used context Segmentation in the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// It is also possible to use the POST HTTP method (for example, in the case of a very long ReQL filter) — query parameters then become body parameters. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemSegmentsItemsAsResponseAsync( + string databaseId, + global::Recombee.RecommendItemsToItemSegmentParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +130,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/item-segments/items/", baseUri: HttpClient.BaseAddress); @@ -177,6 +211,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +223,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +245,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +256,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +265,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +286,15 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +334,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +356,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -396,9 +448,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -426,9 +482,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemSegmentsItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs index d38e29e..b44da96 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItemSegments.g.cs @@ -67,6 +67,43 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo string databaseId, string itemId, + global::Recombee.RecommendItemSegmentsToItemParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsItemsByItemIdItemSegmentsAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Item Segments to Item
+ /// Recommends Segments from a [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular item.
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Recommending the related categories
+ /// - Recommending the related genres
+ /// - Recommending the related brands
+ /// - Recommending the related artists
+ /// You need to set the used Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemsByItemIdItemSegmentsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.RecommendItemSegmentsToItemParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -103,6 +140,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/items/{itemId}/item-segments/", baseUri: HttpClient.BaseAddress); @@ -184,6 +222,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +234,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +256,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +267,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +276,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +297,15 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +345,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +367,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -403,9 +459,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -433,9 +493,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemSegmentsResponseCo #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs index 85dc53f..1a1f0bb 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdItems.g.cs @@ -64,6 +64,40 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( string databaseId, string itemId, + global::Recombee.RecommendItemsToItemParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsItemsByItemIdItemsAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Items to Item
+ /// Recommends a set of items that are somehow related to one given item, *X*. A typical scenario is when the user *A* is viewing *X*. Then you may display items to the user that he might also be interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
+ /// - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
+ /// - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemsByItemIdItemsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.RecommendItemsToItemParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -100,6 +134,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/items/{itemId}/items/", baseUri: HttpClient.BaseAddress); @@ -181,6 +216,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -191,6 +228,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -208,6 +250,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -217,8 +261,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -227,6 +270,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -243,14 +291,15 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -290,6 +339,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -310,6 +361,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -400,9 +453,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -430,9 +487,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs index e836a1b..7704872 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsItemsByItemIdUsers.g.cs @@ -61,6 +61,37 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( string databaseId, string itemId, + global::Recombee.RecommendUsersToItemParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsItemsByItemIdUsersAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Users to Item
+ /// Recommends users that are likely to be interested in the given item.
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
+ /// The returned users are sorted by predicted interest in the item (the first user being the most interested). + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsItemsByItemIdUsersAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.RecommendUsersToItemParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +128,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/items/{itemId}/users/", baseUri: HttpClient.BaseAddress); @@ -178,6 +210,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +222,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +244,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +255,7 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +264,11 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +285,15 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +333,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +355,8 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -397,9 +447,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -427,9 +481,13 @@ partial void ProcessCreateByDatabaseIdRecommsItemsByItemIdUsersResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs index 49156c4..a4389d6 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemSegmentsByRecommId.g.cs @@ -70,6 +70,46 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC string databaseId, string recommId, + global::Recombee.RecommendNextItemSegmentsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsNextItemSegmentsByRecommIdAsResponseAsync( + databaseId: databaseId, + recommId: recommId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Next Item Segments
+ /// Returns [Item Segments](https://docs.recombee.com/segmentations) to be shown as the next recommendations when a user scrolls (e.g., within a carousel or feed of Item Segments such as brands, artists, topics, or categories).
+ /// The request requires the `recommId` of a base recommendation request and the number of Segments to return (`count`).
+ /// The base request can be one of:
+ /// - [Recommend Item Segments to Item](https://docs.recombee.com/api#recommend-item-segments-to-item)
+ /// - [Recommend Item Segments to User](https://docs.recombee.com/api#recommend-item-segments-to-user)
+ /// - [Recommend Item Segments to Item Segment](https://docs.recombee.com/api#recommend-item-segments-to-item-segment)
+ /// - [Search Item Segments](https://docs.recombee.com/api#search-item-segments)
+ /// All other parameters are inherited from the base request associated with the provided `recommId`.
+ /// This endpoint can be called multiple times for a single `recommId`. Each call returns different Item Segments that have not been recommended in previous calls.
+ /// The number of calls made so far is returned in the `numberNextRecommsCalls` field.
+ /// Requests can be made up to 30 minutes after the base request or the most recent Recommend Next Item Segments call.
+ /// For billing purposes, each call to this endpoint is counted as a separate recommendation request. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsNextItemSegmentsByRecommIdAsResponseAsync( + string databaseId, + string recommId, + global::Recombee.RecommendNextItemSegmentsParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -106,6 +146,7 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/next/item-segments/{recommId}", baseUri: HttpClient.BaseAddress); @@ -187,6 +228,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -197,6 +240,11 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -214,6 +262,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -223,8 +273,7 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -233,6 +282,11 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -249,14 +303,15 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -296,6 +351,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -316,6 +373,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -406,9 +465,13 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -436,9 +499,13 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemSegmentsByRecommIdResponseC #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs index ac7bbc6..ad890f8 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsNextItemsByRecommId.g.cs @@ -70,6 +70,46 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( string databaseId, string recommId, + global::Recombee.RecommendNextItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsNextItemsByRecommIdAsResponseAsync( + databaseId: databaseId, + recommId: recommId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Next Items
+ /// Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page.
+ /// It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`).
+ /// The base request can be one of:
+ /// - [Recommend Items to Item](https://docs.recombee.com/api#recommend-items-to-item)
+ /// - [Recommend Items to User](https://docs.recombee.com/api#recommend-items-to-user)
+ /// - [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment)
+ /// - [Search Items](https://docs.recombee.com/api#search-items)
+ /// All the other parameters are inherited from the base request.
+ /// *Recommend next items* can be called many times for a single `recommId` and each call returns different (previously not recommended) items.
+ /// The number of *Recommend next items* calls performed so far is returned in the `numberNextRecommsCalls` field.
+ /// *Recommend next items* can be requested up to 30 minutes after the base request or a previous *Recommend next items* call.
+ /// For billing purposes, each call to *Recommend next items* is counted as a separate recommendation request. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsNextItemsByRecommIdAsResponseAsync( + string databaseId, + string recommId, + global::Recombee.RecommendNextItemsParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -106,6 +146,7 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/next/items/{recommId}", baseUri: HttpClient.BaseAddress); @@ -187,6 +228,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -197,6 +240,11 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -214,6 +262,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -223,8 +273,7 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -233,6 +282,11 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -249,14 +303,15 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -296,6 +351,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -316,6 +373,8 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -406,9 +465,13 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -436,9 +499,13 @@ partial void ProcessCreateByDatabaseIdRecommsNextItemsByRecommIdResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs index 00babc5..683acd2 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItemSegments.g.cs @@ -67,6 +67,43 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo string databaseId, string userId, + global::Recombee.RecommendItemSegmentsToUserParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsUsersByUserIdItemSegmentsAsResponseAsync( + databaseId: databaseId, + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Item Segments to User
+ /// Recommends the top Segments from a [Segmentation](https://docs.recombee.com/segmentations) for a particular user, based on the user's past interactions.
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Recommending the top categories for the user
+ /// - Recommending the top genres for the user
+ /// - Recommending the top brands for the user
+ /// - Recommending the top artists for the user
+ /// You need to set the used Segmentation the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsUsersByUserIdItemSegmentsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.RecommendItemSegmentsToUserParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -103,6 +140,7 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/users/{userId}/item-segments/", baseUri: HttpClient.BaseAddress); @@ -184,6 +222,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -194,6 +234,11 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -211,6 +256,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -220,8 +267,7 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -230,6 +276,11 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -246,14 +297,15 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -293,6 +345,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -313,6 +367,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -403,9 +459,13 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -433,9 +493,13 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemSegmentsResponseCo #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs index cf9d295..96cb354 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdItems.g.cs @@ -65,6 +65,41 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( string databaseId, string userId, + global::Recombee.RecommendItemsToUserParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsUsersByUserIdItemsAsResponseAsync( + databaseId: databaseId, + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Items to User
+ /// Based on the user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for the given user.
+ /// The most typical use cases are recommendations on the homepage, in some "Picked just for you" section, or in email.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
+ /// - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
+ /// - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsUsersByUserIdItemsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.RecommendItemsToUserParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -101,6 +136,7 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/users/{userId}/items/", baseUri: HttpClient.BaseAddress); @@ -182,6 +218,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -192,6 +230,11 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -209,6 +252,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -218,8 +263,7 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -228,6 +272,11 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -244,14 +293,15 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -291,6 +341,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -311,6 +363,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -401,9 +455,13 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -431,9 +489,13 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs index 0a9bb5b..4cefa5d 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.CreateByDatabaseIdRecommsUsersByUserIdUsers.g.cs @@ -61,6 +61,37 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( string databaseId, string userId, + global::Recombee.RecommendUsersToUserParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdRecommsUsersByUserIdUsersAsResponseAsync( + databaseId: databaseId, + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Recommend Users to User
+ /// Gets users similar to the given user, based on the user's past interactions (purchases, ratings, etc.) and values of properties.
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
+ /// The returned users are sorted by similarity (the first user being the most similar). + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdRecommsUsersByUserIdUsersAsResponseAsync( + string databaseId, + string userId, + global::Recombee.RecommendUsersToUserParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -97,6 +128,7 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/recomms/users/{userId}/users/", baseUri: HttpClient.BaseAddress); @@ -178,6 +210,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +222,11 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +244,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +255,7 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +264,11 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +285,15 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +333,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +355,8 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -397,9 +447,13 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.RecommendationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -427,9 +481,13 @@ partial void ProcessCreateByDatabaseIdRecommsUsersByUserIdUsersResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.RecommendationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.g.cs b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.g.cs index b182275..6b9668a 100644 --- a/src/libs/Recombee/Generated/Recombee.RecommendationsClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.RecommendationsClient.g.cs @@ -72,10 +72,10 @@ public RecommendationsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public RecommendationsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs index f8e0971..6b5be89 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItemSegments.g.cs @@ -66,6 +66,42 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon string databaseId, string userId, + global::Recombee.SearchItemSegmentsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdSearchUsersByUserIdItemSegmentsAsResponseAsync( + databaseId: databaseId, + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Search Item Segments
+ /// Full-text personalized search that returns Segments from a Segmentation. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.).
+ /// Based on the used Segmentation, this endpoint can be used for example for:
+ /// - Searching within categories or brands
+ /// - Searching within genres or artists
+ /// For example if the user is searching for "iPhone" this endpoint can return "cell phones" category.
+ /// You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
+ /// The returned segments are sorted by relevance (first segment being the most relevant).
+ /// It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdSearchUsersByUserIdItemSegmentsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.SearchItemSegmentsParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +138,7 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/search/users/{userId}/item-segments/", baseUri: HttpClient.BaseAddress); @@ -183,6 +220,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -193,6 +232,11 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -210,6 +254,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -219,8 +265,7 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -229,6 +274,11 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -245,14 +295,15 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -292,6 +343,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -312,6 +365,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -402,9 +457,13 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Recombee.SearchResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.SearchResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -432,9 +491,13 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemSegmentsResponseCon #endif ).ConfigureAwait(false); - return - await global::Recombee.SearchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.SearchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs index 3185bb4..653e17f 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSearchUsersByUserIdItems.g.cs @@ -66,6 +66,42 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( string databaseId, string userId, + global::Recombee.SearchItemsParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdSearchUsersByUserIdItemsAsResponseAsync( + databaseId: databaseId, + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Search Items
+ /// Full-text personalized search. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.) with the items (items more suitable for the user are preferred in the results).
+ /// All the string and set item properties are indexed by the search engine.
+ /// This endpoint should be used in a search box on your website/app. It can be called multiple times as the user is typing the query in order to get the most viable suggestions based on the current state of the query, or once after submitting the whole query.
+ /// The returned items are sorted by relevance (the first item being the most relevant).
+ /// Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
+ /// - Let Recombee know that this search was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
+ /// - Get subsequent search results when the user scrolls down or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
+ /// It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdSearchUsersByUserIdItemsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.SearchItemsParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -102,6 +138,7 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/search/users/{userId}/items/", baseUri: HttpClient.BaseAddress); @@ -183,6 +220,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -193,6 +232,11 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -210,6 +254,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -219,8 +265,7 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -229,6 +274,11 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -245,14 +295,15 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -292,6 +343,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -312,6 +365,8 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -402,9 +457,13 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.SearchResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.SearchResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -432,9 +491,13 @@ partial void ProcessCreateByDatabaseIdSearchUsersByUserIdItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.SearchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.SearchResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSynonymsItems.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSynonymsItems.g.cs index 93d2938..8d94b15 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSynonymsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.CreateByDatabaseIdSynonymsItems.g.cs @@ -58,6 +58,35 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( public async global::System.Threading.Tasks.Task CreateByDatabaseIdSynonymsItemsAsync( string databaseId, + global::Recombee.SearchSynonymParams request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateByDatabaseIdSynonymsItemsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Search Synonym
+ /// Adds a new synonym for the [Search items](https://docs.recombee.com/api#search-items).
+ /// When the `term` is used in the search query, the `synonym` is also used for the full-text search.
+ /// Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`).
+ /// An example of a synonym can be `science fiction` for the term `sci-fi`. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateByDatabaseIdSynonymsItemsAsResponseAsync( + string databaseId, + global::Recombee.SearchSynonymParams request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -93,6 +122,7 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/synonyms/items/", baseUri: HttpClient.BaseAddress); @@ -173,6 +203,8 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +215,11 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +237,8 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +248,7 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +257,11 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +278,15 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +326,8 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +348,8 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -392,9 +440,13 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.SearchSynonym.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.SearchSynonym.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -422,9 +474,13 @@ partial void ProcessCreateByDatabaseIdSynonymsItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.SearchSynonym.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.SearchSynonym.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItems.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItems.g.cs index b01ff09..90db836 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItems.g.cs @@ -48,6 +48,25 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdSynonymsItemsAsResponseAsync( + databaseId: databaseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete All Search Synonyms
+ /// Deletes all synonyms defined in the database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdSynonymsItemsAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +96,7 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/synonyms/items/", baseUri: HttpClient.BaseAddress); @@ -150,6 +170,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -160,6 +182,11 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -177,6 +204,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -186,8 +215,7 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -196,6 +224,11 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -212,14 +245,15 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -259,6 +293,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -279,6 +315,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -299,6 +337,10 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -320,6 +362,10 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs index 625d3d3..ea36481 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.DeleteByDatabaseIdSynonymsItemsById.g.cs @@ -52,6 +52,28 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( string id, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdSynonymsItemsByIdAsResponseAsync( + databaseId: databaseId, + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Search Synonym
+ /// Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api#search-items). + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdSynonymsItemsByIdAsResponseAsync( + string databaseId, + string id, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +104,7 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/synonyms/items/{id}", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -338,6 +379,10 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -359,6 +404,10 @@ partial void ProcessDeleteByDatabaseIdSynonymsItemsByIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.GetByDatabaseIdSynonymsItems.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.GetByDatabaseIdSynonymsItems.g.cs index 9e10cc1..f8b002d 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.GetByDatabaseIdSynonymsItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.GetByDatabaseIdSynonymsItems.g.cs @@ -61,6 +61,33 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( int? offset = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdSynonymsItemsAsResponseAsync( + databaseId: databaseId, + count: count, + offset: offset, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Search Synonyms
+ /// Gives the list of synonyms defined in the database. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdSynonymsItemsAsResponseAsync( + string databaseId, + int? count = default, + int? offset = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,12 +119,13 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/synonyms/items/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("count", count?.ToString()) - .AddOptionalParameter("offset", offset?.ToString()) + .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +199,8 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -324,9 +370,13 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.ListSearchSynonymsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.ListSearchSynonymsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +404,13 @@ partial void ProcessGetByDatabaseIdSynonymsItemsResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.ListSearchSynonymsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.ListSearchSynonymsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SearchClient.g.cs b/src/libs/Recombee/Generated/Recombee.SearchClient.g.cs index 3d2b122..6b348c2 100644 --- a/src/libs/Recombee/Generated/Recombee.SearchClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SearchClient.g.cs @@ -72,10 +72,10 @@ public SearchClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SearchClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs index f4ef91b..7e8a635 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs @@ -54,6 +54,33 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo string databaseId, string segmentationId, + global::Recombee.UpdateAutoReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update Auto ReQL Segmentation
+ /// Update an existing Segmentation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.UpdateAutoReQLSegmentationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +117,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/auto-reql/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -386,6 +432,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -407,6 +457,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsAutoReqlBySegmentationIdRespo try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs index bec284b..61cea90 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs @@ -54,6 +54,33 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes string databaseId, string segmentationId, + global::Recombee.UpdateManualReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update Manual ReQL Segmentation
+ /// Update an existing Segmentation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.UpdateManualReQLSegmentationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +117,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/manual-reql/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -386,6 +432,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -407,6 +457,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdRes try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs index 23f98f1..7a5a80d 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs @@ -58,6 +58,36 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg string segmentationId, string segmentId, + global::Recombee.ManualReQLSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + segmentId: segmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update Manual ReQL Segment
+ /// Update definition of the Segment. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + string databaseId, + string segmentationId, + string segmentId, + global::Recombee.ManualReQLSegmentParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -95,6 +125,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/manual-reql/{segmentationId}/segments/{segmentId}", baseUri: HttpClient.BaseAddress); @@ -177,6 +208,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -187,6 +220,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -204,6 +242,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -213,8 +253,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -223,6 +262,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -239,14 +283,15 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -286,6 +331,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -306,6 +353,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -392,6 +441,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -413,6 +466,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs index 101bb68..7f4f635 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs @@ -54,6 +54,33 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId string databaseId, string segmentationId, + global::Recombee.UpdatePropertyBasedSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Update Property Based Segmentation
+ /// Updates a Property Based Segmentation + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdSegmentationsPropertyBasedBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.UpdatePropertyBasedSegmentationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +117,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/property-based/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -386,6 +432,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -407,6 +457,10 @@ partial void ProcessCreateByDatabaseIdSegmentationsPropertyBasedBySegmentationId try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs index f53eedb..16550af 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsBySegmentationId.g.cs @@ -52,6 +52,28 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( string segmentationId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdSegmentationsBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Segmentation
+ /// Delete existing Segmentation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdSegmentationsBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +104,7 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -338,6 +379,10 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -359,6 +404,10 @@ partial void ProcessDeleteByDatabaseIdSegmentationsBySegmentationIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs index 428d5d5..0ae5387 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs @@ -56,6 +56,31 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg string segmentId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + segmentId: segmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Manual ReQL Segment
+ /// Delete a Segment from a Manual ReQL Segmentation. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + string databaseId, + string segmentationId, + string segmentId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +112,7 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/manual-reql/{segmentationId}/segments/{segmentId}", baseUri: HttpClient.BaseAddress); @@ -162,6 +188,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +200,11 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +222,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +233,7 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +242,11 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +263,15 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +311,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +333,8 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -377,6 +421,10 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -398,6 +446,10 @@ partial void ProcessDeleteByDatabaseIdSegmentationsManualReqlBySegmentationIdSeg try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs index 0cb1f93..38a73ee 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsList.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( string sourceType, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdSegmentationsListAsResponseAsync( + databaseId: databaseId, + sourceType: sourceType, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Segmentations
+ /// Return all existing items Segmentations. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdSegmentationsListAsResponseAsync( + string databaseId, + string sourceType, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +111,12 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/list/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("sourceType", sourceType) + .AddRequiredParameter("sourceType", sourceType) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -164,6 +189,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +201,11 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +223,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +234,7 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +243,11 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +264,15 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +312,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +334,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -317,9 +360,13 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.ListSegmentationsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.ListSegmentationsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +394,13 @@ partial void ProcessGetByDatabaseIdSegmentationsListResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.ListSegmentationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.ListSegmentationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs index 0ddb6d0..6098bfb 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.GetByDatabaseIdSegmentationsListBySegmentationId.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont string segmentationId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdSegmentationsListBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Segmentation
+ /// Get existing Segmentation. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdSegmentationsListBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/list/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -347,9 +390,13 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Recombee.Segmentation.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.Segmentation.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -377,9 +424,13 @@ partial void ProcessGetByDatabaseIdSegmentationsListBySegmentationIdResponseCont #endif ).ConfigureAwait(false); - return - await global::Recombee.Segmentation.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.Segmentation.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs index aef5052..29e7c2b 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsAutoReqlBySegmentationId.g.cs @@ -55,6 +55,34 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse string databaseId, string segmentationId, + global::Recombee.CreateAutoReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdSegmentationsAutoReqlBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Create Auto ReQL Segmentation
+ /// Segment the items using a [ReQL](https://docs.recombee.com/reql) expression.
+ /// For each item, the expression should return a set that contains IDs of segments to which the item belongs to. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsAutoReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.CreateAutoReQLSegmentationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -91,6 +119,7 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/auto-reql/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -172,6 +201,8 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +213,11 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +235,8 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +246,7 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +255,11 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +276,15 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +324,8 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +346,8 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +401,10 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +426,10 @@ partial void ProcessPutByDatabaseIdSegmentationsAutoReqlBySegmentationIdResponse try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs index 7a5ea6d..06def4a 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationId.g.cs @@ -55,6 +55,34 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon string databaseId, string segmentationId, + global::Recombee.CreateManualReQLSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdSegmentationsManualReqlBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Create Manual ReQL Segmentation
+ /// Segment the items using multiple [ReQL](https://docs.recombee.com/reql) filters.
+ /// Use the Add Manual ReQL Items Segment endpoint to create the individual segments. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsManualReqlBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.CreateManualReQLSegmentationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -91,6 +119,7 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/manual-reql/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -172,6 +201,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +213,11 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +235,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +246,7 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +255,11 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +276,15 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +324,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +346,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -354,6 +401,10 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -375,6 +426,10 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdRespon try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs index 8259e9a..5d55f21 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentId.g.cs @@ -59,6 +59,37 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen string segmentationId, string segmentId, + global::Recombee.ManualReQLSegmentParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + segmentId: segmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Manual ReQL Segment
+ /// Adds a new Segment into a Manual ReQL Segmentation.
+ /// The new Segment is defined by a [ReQL](https://docs.recombee.com/reql) filter that returns `true` for an item in case that this item belongs to the segment. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmentsBySegmentIdAsResponseAsync( + string databaseId, + string segmentationId, + string segmentId, + global::Recombee.ManualReQLSegmentParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -96,6 +127,7 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/manual-reql/{segmentationId}/segments/{segmentId}", baseUri: HttpClient.BaseAddress); @@ -178,6 +210,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -188,6 +222,11 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -205,6 +244,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -214,8 +255,7 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -224,6 +264,11 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -240,14 +285,15 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -287,6 +333,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -307,6 +355,8 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -393,6 +443,10 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -414,6 +468,10 @@ partial void ProcessPutByDatabaseIdSegmentationsManualReqlBySegmentationIdSegmen try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs index a6796aa..bdb86ef 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.PutByDatabaseIdSegmentationsPropertyBasedBySegmentationId.g.cs @@ -56,6 +56,35 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes string databaseId, string segmentationId, + global::Recombee.CreatePropertyBasedSegmentationParameters request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdAsResponseAsync( + databaseId: databaseId, + segmentationId: segmentationId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Create Property Based Segmentation
+ /// Creates a Segmentation that splits the items into segments based on values of a particular item property.
+ /// A segment is created for each unique value of the property.
+ /// In case of `set` properties, a segment is created for each value in the set. Item belongs to all these segments. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdAsResponseAsync( + string databaseId, + string segmentationId, + global::Recombee.CreatePropertyBasedSegmentationParameters request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -92,6 +121,7 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/segmentations/property-based/{segmentationId}", baseUri: HttpClient.BaseAddress); @@ -173,6 +203,8 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +215,11 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +237,8 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +248,7 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +257,11 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +278,15 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +326,8 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +348,8 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +436,10 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +461,10 @@ partial void ProcessPutByDatabaseIdSegmentationsPropertyBasedBySegmentationIdRes try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.g.cs b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.g.cs index 2732eee..7eef271 100644 --- a/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SegmentationsDefinitionClient.g.cs @@ -72,10 +72,10 @@ public SegmentationsDefinitionClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SegmentationsDefinitionClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs index fa81787..b01a007 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.CreateByDatabaseIdSeriesBySeriesIdItems.g.cs @@ -54,6 +54,33 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( string databaseId, string seriesId, + global::Recombee.SeriesItem request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + databaseId: databaseId, + seriesId: seriesId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Insert to Series
+ /// Inserts an existing item/series into a series of the given seriesId at a position determined by time. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + string databaseId, + string seriesId, + global::Recombee.SeriesItem request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +117,7 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/series/{seriesId}/items/", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -419,6 +465,10 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -440,6 +490,10 @@ partial void ProcessCreateByDatabaseIdSeriesBySeriesIdItemsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs index f6a82bd..2a32e56 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesId.g.cs @@ -55,6 +55,34 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( string databaseId, string seriesId, + global::Recombee.DeleteSeries request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdSeriesBySeriesIdAsResponseAsync( + databaseId: databaseId, + seriesId: seriesId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Series
+ /// Deletes the series of the given `seriesId` from the database.
+ /// Deleting a series will only delete assignment of items to it, not the items themselves! + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdSeriesBySeriesIdAsResponseAsync( + string databaseId, + string seriesId, + global::Recombee.DeleteSeries request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -91,6 +119,7 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/series/{seriesId}", baseUri: HttpClient.BaseAddress); @@ -172,6 +201,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +213,11 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +235,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +246,7 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +255,11 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +276,15 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +324,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +346,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -387,6 +434,10 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -408,6 +459,10 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs index 047ebb3..7e66f01 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.DeleteByDatabaseIdSeriesBySeriesIdItems.g.cs @@ -54,6 +54,33 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( string databaseId, string seriesId, + global::Recombee.RemoveSeriesItem request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + databaseId: databaseId, + seriesId: seriesId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove from Series
+ /// Removes an existing series item from the series. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + string databaseId, + string seriesId, + global::Recombee.RemoveSeriesItem request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +117,7 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/series/{seriesId}/items/", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -386,6 +432,10 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -407,6 +457,10 @@ partial void ProcessDeleteByDatabaseIdSeriesBySeriesIdItemsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs index ba2a7a6..ccc1878 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesBySeriesIdItems.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( string seriesId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + databaseId: databaseId, + seriesId: seriesId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Series Items
+ /// Lists all the items present in the given series, sorted according to their time index values. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdSeriesBySeriesIdItemsAsResponseAsync( + string databaseId, + string seriesId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/series/{seriesId}/items/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdSeriesBySeriesIdItemsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesList.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesList.g.cs index fb034da..5a1a8a1 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.GetByDatabaseIdSeriesList.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdSeriesListAsResponseAsync( + databaseId: databaseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Series
+ /// Gets the list of all the series currently present in the database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdSeriesListAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/series/list/", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -341,9 +381,13 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -371,9 +415,13 @@ partial void ProcessGetByDatabaseIdSeriesListResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs index 00725b4..4df8a0a 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.PutByDatabaseIdSeriesBySeriesId.g.cs @@ -54,6 +54,33 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( string databaseId, string seriesId, + global::Recombee.AddSeries request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdSeriesBySeriesIdAsResponseAsync( + databaseId: databaseId, + seriesId: seriesId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Series
+ /// Creates a new series in the database. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdSeriesBySeriesIdAsResponseAsync( + string databaseId, + string seriesId, + global::Recombee.AddSeries request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +117,7 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/series/{seriesId}", baseUri: HttpClient.BaseAddress); @@ -171,6 +199,8 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +211,11 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +233,8 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +244,7 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +253,11 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +274,15 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +322,8 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +344,8 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -386,6 +432,10 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -407,6 +457,10 @@ partial void ProcessPutByDatabaseIdSeriesBySeriesIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.SeriesClient.g.cs b/src/libs/Recombee/Generated/Recombee.SeriesClient.g.cs index 84645b9..b13cd77 100644 --- a/src/libs/Recombee/Generated/Recombee.SeriesClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.SeriesClient.g.cs @@ -72,10 +72,10 @@ public SeriesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SeriesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs index a82bfeb..5fc8e78 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdBookmarks.g.cs @@ -50,6 +50,30 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdBookmarksAsync( string databaseId, + global::Recombee.Bookmark request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdBookmarksAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Bookmark
+ /// Adds a bookmark of the given item made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdBookmarksAsResponseAsync( + string databaseId, + global::Recombee.Bookmark request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +109,7 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/bookmarks/", baseUri: HttpClient.BaseAddress); @@ -165,6 +190,8 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -413,6 +456,10 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -434,6 +481,10 @@ partial void ProcessCreateByDatabaseIdBookmarksResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs index a30bebf..f2ab673 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdCartadditions.g.cs @@ -50,6 +50,30 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdCartadditionsAsync( string databaseId, + global::Recombee.CartAddition request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdCartadditionsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Cart Addition
+ /// Adds a cart addition of the given item made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdCartadditionsAsResponseAsync( + string databaseId, + global::Recombee.CartAddition request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +109,7 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/cartadditions/", baseUri: HttpClient.BaseAddress); @@ -165,6 +190,8 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -413,6 +456,10 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -434,6 +481,10 @@ partial void ProcessCreateByDatabaseIdCartadditionsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs index 00c6a51..2db5803 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdDetailviews.g.cs @@ -50,6 +50,30 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdDetailviewsAsync( string databaseId, + global::Recombee.DetailView request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdDetailviewsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Detail View
+ /// Adds a detail view of the given item made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdDetailviewsAsResponseAsync( + string databaseId, + global::Recombee.DetailView request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +109,7 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/detailviews/", baseUri: HttpClient.BaseAddress); @@ -165,6 +190,8 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -413,6 +456,10 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -434,6 +481,10 @@ partial void ProcessCreateByDatabaseIdDetailviewsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs index 94823e6..59d0d0d 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdPurchases.g.cs @@ -50,6 +50,30 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdPurchasesAsync( string databaseId, + global::Recombee.Purchase request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdPurchasesAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Purchase
+ /// Adds a purchase of the given item made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdPurchasesAsResponseAsync( + string databaseId, + global::Recombee.Purchase request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +109,7 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/purchases/", baseUri: HttpClient.BaseAddress); @@ -165,6 +190,8 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -413,6 +456,10 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -434,6 +481,10 @@ partial void ProcessCreateByDatabaseIdPurchasesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs index b6c23e0..fea2537 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdRatings.g.cs @@ -50,6 +50,30 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdRatingsAsync( string databaseId, + global::Recombee.Rating request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdRatingsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Rating
+ /// Adds a rating of the given item made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdRatingsAsResponseAsync( + string databaseId, + global::Recombee.Rating request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +109,7 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/ratings/", baseUri: HttpClient.BaseAddress); @@ -165,6 +190,8 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +202,11 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +224,8 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +235,7 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +244,11 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +265,15 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +313,8 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +335,8 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -413,6 +456,10 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -434,6 +481,10 @@ partial void ProcessCreateByDatabaseIdRatingsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs index d007b71..81e8461 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.CreateByDatabaseIdViewportions.g.cs @@ -51,6 +51,31 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( public async global::System.Threading.Tasks.Task CreateByDatabaseIdViewportionsAsync( string databaseId, + global::Recombee.ViewPortion request, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdViewportionsAsResponseAsync( + databaseId: databaseId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Set View Portion
+ /// Sets viewed portion of an item (for example a video or article) by a user (at a session).
+ /// If you send a new request with the same (`userId`, `itemId`, `sessionId`), the portion gets updated. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdViewportionsAsResponseAsync( + string databaseId, + global::Recombee.ViewPortion request, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,6 +111,7 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/viewportions/", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -414,6 +458,10 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -435,6 +483,10 @@ partial void ProcessCreateByDatabaseIdViewportionsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs index f982778..917db0c 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdBookmarks.g.cs @@ -60,6 +60,34 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdBookmarksAsResponseAsync( + databaseId: databaseId, + userId: userId, + itemId: itemId, + timestamp: timestamp, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Bookmark
+ /// Deletes a bookmark uniquely specified by `userId`, `itemId`, and `timestamp` or all the bookmarks with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdBookmarksAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +120,14 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/bookmarks/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("userId", userId) .AddRequiredParameter("itemId", itemId) - .AddOptionalParameter("timestamp", timestamp?.ToString()) + .AddOptionalParameter("timestamp", timestamp?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +435,10 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +460,10 @@ partial void ProcessDeleteByDatabaseIdBookmarksResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs index a58693c..fbf55e9 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdCartadditions.g.cs @@ -60,6 +60,34 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdCartadditionsAsResponseAsync( + databaseId: databaseId, + userId: userId, + itemId: itemId, + timestamp: timestamp, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Cart Addition
+ /// Deletes an existing cart addition uniquely specified by `userId`, `itemId`, and `timestamp` or all the cart additions with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdCartadditionsAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +120,14 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/cartadditions/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("userId", userId) .AddRequiredParameter("itemId", itemId) - .AddOptionalParameter("timestamp", timestamp?.ToString()) + .AddOptionalParameter("timestamp", timestamp?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +435,10 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +460,10 @@ partial void ProcessDeleteByDatabaseIdCartadditionsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs index 1e17d1f..41aa133 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdDetailviews.g.cs @@ -60,6 +60,34 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdDetailviewsAsResponseAsync( + databaseId: databaseId, + userId: userId, + itemId: itemId, + timestamp: timestamp, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Detail View
+ /// Deletes an existing detail view uniquely specified by (`userId`, `itemId`, and `timestamp`) or all the detail views with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdDetailviewsAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +120,14 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/detailviews/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("userId", userId) .AddRequiredParameter("itemId", itemId) - .AddOptionalParameter("timestamp", timestamp?.ToString()) + .AddOptionalParameter("timestamp", timestamp?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +435,10 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +460,10 @@ partial void ProcessDeleteByDatabaseIdDetailviewsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs index 0da6aad..c203eed 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdPurchases.g.cs @@ -60,6 +60,34 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdPurchasesAsResponseAsync( + databaseId: databaseId, + userId: userId, + itemId: itemId, + timestamp: timestamp, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Purchase
+ /// Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdPurchasesAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +120,14 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/purchases/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("userId", userId) .AddRequiredParameter("itemId", itemId) - .AddOptionalParameter("timestamp", timestamp?.ToString()) + .AddOptionalParameter("timestamp", timestamp?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +435,10 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +460,10 @@ partial void ProcessDeleteByDatabaseIdPurchasesResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs index 1f40f0d..757d538 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdRatings.g.cs @@ -60,6 +60,34 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( double? timestamp = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdRatingsAsResponseAsync( + databaseId: databaseId, + userId: userId, + itemId: itemId, + timestamp: timestamp, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Rating
+ /// Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with the given `userId` and `itemId` if `timestamp` is omitted. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdRatingsAsResponseAsync( + string databaseId, + string userId, + string itemId, + double? timestamp = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +120,14 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/ratings/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("userId", userId) .AddRequiredParameter("itemId", itemId) - .AddOptionalParameter("timestamp", timestamp?.ToString()) + .AddOptionalParameter("timestamp", timestamp?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +435,10 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +460,10 @@ partial void ProcessDeleteByDatabaseIdRatingsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs index 2ad4b49..b63a7f3 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.DeleteByDatabaseIdViewportions.g.cs @@ -60,6 +60,34 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( string? sessionId = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdViewportionsAsResponseAsync( + databaseId: databaseId, + userId: userId, + itemId: itemId, + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete View Portion
+ /// Deletes an existing view portion specified by (`userId`, `itemId`, `sessionId`) from the database. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdViewportionsAsResponseAsync( + string databaseId, + string userId, + string itemId, + string? sessionId = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +120,14 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/viewportions/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("userId", userId) .AddRequiredParameter("itemId", itemId) - .AddOptionalParameter("sessionId", sessionId) + .AddOptionalParameter("sessionId", sessionId) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -388,6 +435,10 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -409,6 +460,10 @@ partial void ProcessDeleteByDatabaseIdViewportionsResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs index ccbb157..b486447 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdBookmarks.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdBookmarksAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item Bookmarks
+ /// Lists all the ever-made bookmarks of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdBookmarksAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}/bookmarks/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdBookmarksResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs index 13ef22d..904bb1a 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdCartadditions.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdCartadditionsAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item Cart Additions
+ /// Lists all the ever-made cart additions of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdCartadditionsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}/cartadditions/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdCartadditionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs index 9c65b20..8d182e0 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdDetailviews.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdDetailviewsAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item Detail Views
+ /// Lists all the detail views of the given item ever made by different users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdDetailviewsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}/detailviews/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdDetailviewsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs index 7c54ef1..1833712 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdPurchases.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdPurchasesAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item Purchases
+ /// Lists all the ever-made purchases of the given item. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdPurchasesAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}/purchases/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdPurchasesResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs index 4e73a42..95f8788 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdRatings.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdRatingsAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item Ratings
+ /// Lists all the ratings of an item ever submitted by different users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdRatingsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}/ratings/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdRatingsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs index 6b86b16..0b41f21 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdItemsByItemIdViewportions.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( string itemId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdItemsByItemIdViewportionsAsResponseAsync( + databaseId: databaseId, + itemId: itemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Item View Portions
+ /// Lists all the view portions of an item ever submitted by different users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdItemsByItemIdViewportionsAsResponseAsync( + string databaseId, + string itemId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/items/{itemId}/viewportions/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdItemsByItemIdViewportionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs index 819871a..4beff5e 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdBookmarks.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdBookmarksAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Bookmarks
+ /// Lists all the bookmarks ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdBookmarksAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}/bookmarks/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdBookmarksResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs index 377fb24..2e6960e 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdCartadditions.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdCartadditionsAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Cart Additions
+ /// Lists all the cart additions ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdCartadditionsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}/cartadditions/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdCartadditionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs index 4fbb94e..e6b9efd 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdDetailviews.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdDetailviewsAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Detail Views
+ /// Lists all the detail views of different items ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdDetailviewsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}/detailviews/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdDetailviewsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs index 5424bb2..f0469c5 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdPurchases.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdPurchasesAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Purchases
+ /// Lists all the purchases ever made by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdPurchasesAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}/purchases/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdPurchasesResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs index 7f766d2..9776e7f 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdRatings.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdRatingsAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Ratings
+ /// Lists all the ratings ever submitted by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdRatingsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}/ratings/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdRatingsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs index 1f98278..4fdb001 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.GetByDatabaseIdUsersByUserIdViewportions.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdViewportionsAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User View Portions
+ /// Lists all the view portions ever submitted by the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersByUserIdViewportionsAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}/viewportions/", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersByUserIdViewportionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.g.cs b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.g.cs index c9eb2d6..f022125 100644 --- a/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserItemInteractionsClient.g.cs @@ -72,10 +72,10 @@ public UserItemInteractionsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public UserItemInteractionsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs index f3daa8b..8be2c8e 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.CreateByDatabaseIdUsersByUserId.g.cs @@ -57,6 +57,36 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( string databaseId, string userId, + string request, + bool? cascadeCreate = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CreateByDatabaseIdUsersByUserIdAsResponseAsync( + databaseId: databaseId, + userId: userId, + + request: request, + cascadeCreate: cascadeCreate, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Set User Values
+ /// Sets/updates (some) property values of the given user. The properties (columns) must be previously created by [Add user property](https://docs.recombee.com/api#add-user-property). + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + string request, bool? cascadeCreate = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, @@ -95,11 +125,12 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("cascadeCreate", cascadeCreate?.ToString().ToLowerInvariant()) + .AddOptionalParameter("cascadeCreate", cascadeCreate?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -180,6 +211,8 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -190,6 +223,11 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -207,6 +245,8 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -216,8 +256,7 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -226,6 +265,11 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -242,14 +286,15 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -289,6 +334,8 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -309,6 +356,8 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -395,6 +444,10 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -416,6 +469,10 @@ partial void ProcessCreateByDatabaseIdUsersByUserIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs index fd0d5e4..9e96635 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.DeleteByDatabaseIdUsersPropertiesByPropertyName.g.cs @@ -52,6 +52,28 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + databaseId: databaseId, + propertyName: propertyName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete User Property
+ /// Deleting a user property is roughly equivalent to removing a column from the table of users. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +104,7 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/properties/{propertyName}", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -371,6 +412,10 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -392,6 +437,10 @@ partial void ProcessDeleteByDatabaseIdUsersPropertiesByPropertyNameResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs index a70ed19..866adac 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersByUserId.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersByUserIdAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get User Values
+ /// Gets all the current property values of the given user. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,7 +423,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -408,7 +455,11 @@ partial void ProcessGetByDatabaseIdUsersByUserIdResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs index f6c5a58..4969500 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesByPropertyName.g.cs @@ -57,6 +57,30 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( string propertyName, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + databaseId: databaseId, + propertyName: propertyName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get User Property Info
+ /// Gets information about specified user property. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +111,7 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/properties/{propertyName}", baseUri: HttpClient.BaseAddress); @@ -161,6 +186,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +198,11 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +220,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +231,7 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +240,11 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +261,15 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +331,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,9 +423,13 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Recombee.PropertyInfo.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Recombee.PropertyInfo.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -410,9 +457,13 @@ partial void ProcessGetByDatabaseIdUsersPropertiesByPropertyNameResponseContent( #endif ).ConfigureAwait(false); - return - await global::Recombee.PropertyInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Recombee.PropertyInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs index e13643e..b46a885 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.GetByDatabaseIdUsersPropertiesList.g.cs @@ -53,6 +53,27 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( string databaseId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersPropertiesListAsResponseAsync( + databaseId: databaseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List User Properties
+ /// Gets the list of all the user properties in your database. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersPropertiesListAsResponseAsync( + string databaseId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +103,7 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/properties/list/", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -341,9 +381,13 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -371,9 +415,13 @@ partial void ProcessGetByDatabaseIdUsersPropertiesListResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs index 98e7802..dc9bedb 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.PutByDatabaseIdUsersPropertiesByPropertyName.g.cs @@ -56,6 +56,31 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( global::Recombee.PutUsersPropertiesType type, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + databaseId: databaseId, + propertyName: propertyName, + type: type, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add User Property
+ /// Adding a user property is somewhat equivalent to adding a column to the table of users. The users may be characterized by various properties of different types. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdUsersPropertiesByPropertyNameAsResponseAsync( + string databaseId, + string propertyName, + global::Recombee.PutUsersPropertiesType type, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +112,12 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/properties/{propertyName}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("type", type.ToValueString()) + .AddRequiredParameter("type", type.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -165,6 +191,8 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -175,6 +203,11 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -192,6 +225,8 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -201,8 +236,7 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -211,6 +245,11 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -227,14 +266,15 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -274,6 +314,8 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -294,6 +336,8 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -380,6 +424,10 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -401,6 +449,10 @@ partial void ProcessPutByDatabaseIdUsersPropertiesByPropertyNameResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.g.cs b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.g.cs index 8227657..a7d9cac 100644 --- a/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UserPropertiesClient.g.cs @@ -72,10 +72,10 @@ public UserPropertiesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public UserPropertiesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Recombee/Generated/Recombee.UsersClient.DeleteByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.UsersClient.DeleteByDatabaseIdUsersByUserId.g.cs index 94d0d58..8cbfe94 100644 --- a/src/libs/Recombee/Generated/Recombee.UsersClient.DeleteByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UsersClient.DeleteByDatabaseIdUsersByUserId.g.cs @@ -53,6 +53,29 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteByDatabaseIdUsersByUserIdAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete User
+ /// Deletes a user of the given *userId* from the database.
+ /// If there are any purchases, ratings, bookmarks, cart additions or detail views made by the user present in the database, they will be deleted in cascade as well. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,6 +106,7 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}", baseUri: HttpClient.BaseAddress); @@ -157,6 +181,8 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +193,11 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +215,8 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +226,7 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +235,11 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +256,15 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +304,8 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +326,8 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -372,6 +414,10 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -393,6 +439,10 @@ partial void ProcessDeleteByDatabaseIdUsersByUserIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UsersClient.GetByDatabaseIdUsersList.g.cs b/src/libs/Recombee/Generated/Recombee.UsersClient.GetByDatabaseIdUsersList.g.cs index f7ddbcd..b728df9 100644 --- a/src/libs/Recombee/Generated/Recombee.UsersClient.GetByDatabaseIdUsersList.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UsersClient.GetByDatabaseIdUsersList.g.cs @@ -73,6 +73,42 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( global::System.Collections.Generic.IList? includedProperties = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetByDatabaseIdUsersListAsResponseAsync( + databaseId: databaseId, + filter: filter, + count: count, + offset: offset, + returnProperties: returnProperties, + includedProperties: includedProperties, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Users
+ /// Gets a list of IDs of users currently present in the catalog. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetByDatabaseIdUsersListAsResponseAsync( + string databaseId, + string? filter = default, + int? count = default, + int? offset = default, + bool? returnProperties = default, + global::System.Collections.Generic.IList? includedProperties = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -107,15 +143,16 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/list/", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("filter", filter) .AddOptionalParameter("count", count?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) .AddOptionalParameter("returnProperties", returnProperties?.ToString().ToLowerInvariant()) - .AddOptionalParameter("includedProperties", includedProperties, delimiter: ",", explode: false) + .AddOptionalParameter("includedProperties", includedProperties, delimiter: ",", explode: false) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -192,6 +229,8 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -202,6 +241,11 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -219,6 +263,8 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -228,8 +274,7 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -238,6 +283,11 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -254,14 +304,15 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -301,6 +352,8 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -321,6 +374,8 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -378,9 +433,13 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -408,9 +467,13 @@ partial void ProcessGetByDatabaseIdUsersListResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Recombee.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs b/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs index c1480c1..d00d6ce 100644 --- a/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserId.g.cs @@ -63,6 +63,37 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons bool? cascadeCreate = default, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdAsResponseAsync( + databaseId: databaseId, + targetUserId: targetUserId, + sourceUserId: sourceUserId, + cascadeCreate: cascadeCreate, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Merge Users
+ /// Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable.
+ /// Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**.
+ /// By default, the *Merge Users* request is only available from server-side integrations for security reasons, to prevent potential abuse.
+ /// If you need to call this request from a client-side environment (such as a web or mobile app), please contact our support and request access to enable this feature for your database. + ///
+ /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdAsResponseAsync( + string databaseId, + string targetUserId, + string sourceUserId, + bool? cascadeCreate = default, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -95,11 +126,12 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{targetUserId}/merge/{sourceUserId}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("cascadeCreate", cascadeCreate?.ToString().ToLowerInvariant()) + .AddOptionalParameter("cascadeCreate", cascadeCreate?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Recombee.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -174,6 +206,8 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +218,11 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +240,8 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +251,7 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +260,11 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +281,15 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +329,8 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +351,8 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -389,6 +439,10 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -410,6 +464,10 @@ partial void ProcessPutByDatabaseIdUsersByTargetUserIdMergeBySourceUserIdRespons try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByUserId.g.cs b/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByUserId.g.cs index d0eb570..0798438 100644 --- a/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByUserId.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UsersClient.PutByDatabaseIdUsersByUserId.g.cs @@ -52,6 +52,28 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( string userId, global::Recombee.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await PutByDatabaseIdUsersByUserIdAsResponseAsync( + databaseId: databaseId, + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add User
+ /// Adds a new user to the database. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PutByDatabaseIdUsersByUserIdAsResponseAsync( + string databaseId, + string userId, + global::Recombee.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -82,6 +104,7 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Recombee.PathBuilder( path: $"/{databaseId}/users/{userId}", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( __attempt < __maxAttempts && global::Recombee.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Recombee.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Recombee.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Recombee.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Recombee.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -371,6 +412,10 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -392,6 +437,10 @@ partial void ProcessPutByDatabaseIdUsersByUserIdResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Recombee.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Recombee.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Recombee/Generated/Recombee.UsersClient.g.cs b/src/libs/Recombee/Generated/Recombee.UsersClient.g.cs index d3c4e86..3fa9ee6 100644 --- a/src/libs/Recombee/Generated/Recombee.UsersClient.g.cs +++ b/src/libs/Recombee/Generated/Recombee.UsersClient.g.cs @@ -72,10 +72,10 @@ public UsersClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public UsersClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Recombee.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Recombee.AutoSDKClientOptions? options, bool disposeHttpClient = true) {