Skip to content

Releases: bgmulinari/B1SLayer

2.1.0

02 Dec 20:18
Compare
Choose a tag to compare

Distributed cache support

  • Added support for distributed cache for session management
    • For session management, B1SLayer will now use an in-memory cache implementation by default. Optionally, you can specify other implementations of IDistributedCache of your choosing, like in the example below:
using Microsoft.Extensions.Caching.Redis;

// Configures B1SLayer to use Redis as its distributed cache storage.
// This should be done on application startup before creating any SLConnection instances.
var redisCache = new RedisCache(new RedisCacheOptions
{
    Configuration = "myRedisServer:6379"
});

B1SLayerSettings.DistributedCache = redisCache;

Breaking changes

  • The method LoginAsync from SLConnection no longer has the optional parameter forceLogin. Instead, a login request will always be performed when this method is called, regardless of the current session state.

Non-breaking changes

  • Fixed an issue with the Ping request (#82)
  • Added dependency on Microsoft.Extensions.Caching.Abstractions
  • Added dependency on Microsoft.Extensions.Caching.Memory
  • Added a direct reference to System.Text.Json version 6.0.11 to circumvent an existing vulnerability in version 6.0.4 (referenced by Flurl.Http)

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/2.1.0

Full Changelog: 2.0.0...2.1.0

B1SLayer 2.0.0

05 Sep 15:00
1014e78
Compare
Choose a tag to compare

This is the first major release of B1SLayer, which brings some breaking changes. Although the usability remains mostly unchanged, a lot of B1SLayer has changed under the hood, mainly due to the update to Flurl 4.0, which brought significant changes.

Breaking changes

  • Updated Flurl.Http to version 4.0.2, which removed the dependency on Newtonsoft.Json in favor of System.Text.Json
  • Removed all dynamic-returning request methods (not supported in System.Text.Json)
  • Method WithJsonSerializerSettings renamed to WithJsonSerializerOptions in SLRequestExtensions
    • Parameter type changed from Newtonsoft.Json.JsonSerializerSettings to System.Text.Json.JsonSerializerOptions
  • Property JsonSerializerSettings renamed to JsonSerializerOptions in SLBatchRequest
    • Type changed from Newtonsoft.Json.JsonSerializerSettings to System.Text.Json.JsonSerializerOptions

Non-breaking changes

  • Moved from a clientless usage of Flurl to a explicit FlurlClient instance. This should avoid conflicts when managing multiple instances of SLConnection
    • The FlurlClient is accessible through the public property Client in the SLConnection instance
  • The HTTP error codes to be considered for a request reattempt are now accessible through the public property HttpStatusCodesToRetry in the SLConnection instance
  • Removed dependency on Microsoft.AspNet.WebApi.Client in favor of own implementation to handle multipart requests
  • Fixed a small issue with the exception throwing logic (#70)
  • Added some unit tests
  • Added symbol package (.snupkg)
  • Added Source Link support
  • Added documentation comments that were absent to several publicly visible members

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/2.0.0

B1SLayer 1.3.2

10 Aug 16:32
Compare
Choose a tag to compare
  • Fixed an issue with the session management logic (#46)

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/1.3.2

B1SLayer 1.3.1

27 Jul 15:38
Compare
Choose a tag to compare
  • Added new request method GetWithInlineCountAsync (#33)
  • Added a 1 minute grace period for the session check to avoid requests with an invalid session (#31)
  • Documentation improvements (#43)

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/1.3.1

B1SLayer 1.3.0

20 Jan 16:06
Compare
Choose a tag to compare
  • Added support for Single Sign-On (SSO) authentication, allowing the integration with UI API for SAP Business One add-ons (#14)
  • Added the ability to add HTTP headers to SLBatchRequest instances through its extension methods
  • Added the ability to set the timeout value for batch requests through the new BatchRequestTimeout property in the SLConnection class
  • The Data property from the SLBatchRequest class now also accepts JSON strings as the request body (#13)
  • Added new PostReceiveStringAsync request method (#28)
  • Updated Flurl.Http to version 3.2.4
  • Updated Microsoft.AspNet.WebApi.Client to version 5.2.9

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/1.3.0

B1SLayer 1.2.1

26 Oct 18:37
Compare
Choose a tag to compare
  • Added a new property HttpVersion to the SLBatchRequest class, allowing you to specify the HTTP message version to be used. Version 1.1 will now always be used by default.

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/1.2.1

B1SLayer 1.2.0

23 Mar 17:19
Compare
Choose a tag to compare
  • Updated Flurl.Http to version 3.2.2
  • Added new method GetAllAsync, allowing to obtain all entities in a collection without having to loop requests yourself
  • Added new PostBatchAsync method overload, allowing to send a variable number of batch requests without needing to put them in a list
  • Fixed an issue related to the "Content-ID" with batch requests when using OData v4 (b1s/v2), as reported in issue #8
  • Fixed an issue related to the error response deserialization when using OData v4
  • Fixed an issue where the multipart reading of the response of a batch request would fail when using OData v4

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/1.2.0

B1SLayer 1.1.0

22 Jul 18:58
Compare
Choose a tag to compare
  • Added new methods BeforeCall, AfterCall and OnError to the SLConnection class, allowing for request monitoring and logging
  • Added new request methods PostStringAsync, PatchStringAsync and PutStringAsync
  • Updated Flurl.Http to version 3.2.0
  • Some other minor improvements

Get it on NuGet: https://www.nuget.org/packages/B1SLayer/1.1.0

B1SLayer 1.0.3

16 Apr 18:15
Compare
Choose a tag to compare
  • Added the new request method PatchWithFileAsync, allowing the upload of Item Images
  • Added additional overloads for POST request methods, in order to cover every scenario available in Service Layer
  • Renamed the methods Login and Logout to LoginAsync and LogoutAsync respectively
  • Some other minor improvements

B1SLayer 1.0.2

25 Jan 15:30
Compare
Choose a tag to compare
  • Improved session management in multi-threaded scenarios
  • Removed the loginNow parameter from the SLConnection constructors as the current implementation was not ideal and could cause a deadlock
  • Alternativaly, the Login method was made public in case it's really needed to be called manually in some specific scenario
  • Fixed an issue with the exception handling in cases of a timeout
  • Added a new request method: GetAnonymousTypeAsync
  • Added a PostAsync overload without a parameter for cases when a POST request is made without a JSON body, e.g. when closing an order
  • Added the optional parameter unwrapCollection (default true) to the method GetAsync<T> in case the default behavior is not intended
  • Added some XML comments that were missing