Skip to content

Releases: ressurectit/ng-rest

v13.0.1

25 Jul 12:49
Compare
Choose a tag to compare

Bug Fixes

  • fixed DisableMiddleware imports, which points to itself

v13.0.0

17 May 10:47
Compare
Choose a tag to compare

Features

  • updated ParameterTransformFunc interface
    • added new parameter args, used for passing all arguments from method
  • updated HeaderParameterMiddleware middleware
    • updated to use new handleHeaderParam function and to pass parameters args to transform function
  • updated PathParameterMiddleware middleware
    • updated to use new handlePathParam function and to pass parameters args to transform function
  • updated QueryObjectParameterMiddleware middleware
    • updated to use new handleQueryObjectParam function and to pass parameters args to transform function
  • updated QueryParameterMiddleware middleware
    • updated to use new handleQueryParam function and to pass parameters args to transform function
  • updated BodyParameterMiddleware middleware
    • updated to pass parameters args to transform function
  • updated ParameterTransform decorator
    • now passes args to transform functions

BREAKING CHANGES

  • updated handleQueryParam function
    • now requires 3rd parameter args, which contains all arguments passed to method
  • updated handleHeaderParam function
    • now requires 3rd parameter args, which contains all arguments passed to method
  • updated handlePathParam function
    • now requires 3rd parameter args, which contains all arguments passed to method
  • updated handleQueryObjectParam function
    • now requires 4th parameter args, which contains all arguments passed to method

v12.1.4

14 Oct 07:46
Compare
Choose a tag to compare

Bug Fixes

  • fixed ParamsDataIterator optional parameters are only with undefined value, null value is not considered optional
  • fixed handleQueryParam, now skips optional parameters (undefined and null)
  • fixed handleHeaderParam, now skips optional parameters (undefined and null)
  • fixed handlePathParam, optional parameters (undefined and null) are replaced by empty string

v12.1.3

10 Oct 10:41
Compare
Choose a tag to compare

Bug Fixes

  • fixed default value for CorrelationBodyProperty in WebSocketClient

v12.1.2

21 Sep 05:38
Compare
Choose a tag to compare

Bug Fixes

  • fixed problem with null or undefined parameters at start of params array in ParamsDataIterator

v12.1.1

14 Sep 07:06
Compare
Choose a tag to compare

Bug Fixes

  • fixed problem with missing transforms and getting param data from index out of array in ParamsDataIterator

v12.1.0

09 Sep 13:26
Compare
Choose a tag to compare

Features

  • new ParamsDataIterator class, that is iterator for params data
  • new ParamsDataIteratorItem interface, that represents item during iteration of params data
  • new handleQueryParam function, that handles query param and fills params dictionary
  • new handleHeaderParam function, that handles header param and fills headers dictionary
  • new handlePathParam function, that handles path param and return updated url
  • new handleQueryObjectParam function, that handles query object param and fills serialized query string array
  • new mergeQueryObjectParamsWithHttpParams function, that merges serialized query objects data with existing http params

v12.0.0

08 Jun 12:37
Compare
Choose a tag to compare

Features

  • all middlewares are now treeshakeable if not used
  • new middlewareTypes type, that contains array of middleware names that are built-in
  • new RestMiddlewareType type, that represents definition of type that implements RestMiddleware
  • new RestMiddlewareOrderType type, that represents definition of type that is used for definition of order of middlewares
  • updated BASIC_DEFAULT_REST_MIDDLEWARES_ORDER constant
    • now is treeshakable
    • contains all built-in middlewares
    • now is of type RestMiddlewareOrderType[]
  • updated REST_MIDDLEWARES_ORDER injection token
    • now injects type RestMiddlewareOrderType[]
  • updated AdvancedCacheMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated BodyParameterMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated CacheMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated ClearAdvancedCacheMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated HeaderParameterMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated HeadersMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated IgnoredInterceptorsMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated LoggerMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated MockLoggerMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated PathParameterMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated ProducesMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated ProgressIndicatorGroupMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated QueryObjectParameterMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated QueryParameterMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated ReportProgressMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated ResponseTransformMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • updated ResponseTypeMiddleware middleware, now middleware type has static id to correspond with RestMiddlewareType<RestMiddleware>
  • new @anglr/datetime dependency version 3.0.0
  • new @anglr/rest/datetime subpackage
  • subpackage @anglr/rest/datetime
    • new DatetimeRestDateApi service, that is RestDateApi implementation using @anglr/datetime
    • new DATETIME_REST_DATE_API injection token used as provider for RestDateApi using datetime

BREAKING CHANGES

  • minimal supported version of @angular is 14.0.0
  • minimal supported version of @anglr/common is 11.2.0
  • dropped support of NodeJs version 12
  • removed subpackage @anglr/rest/date-fns in favor of @anglr/datetime
  • removed subpackage @anglr/rest/moment in favor of @anglr/datetime
  • removed date-fns dependency
  • removed moment dependency
  • updated REST_METHOD_MIDDLEWARES injection token
    • now injects type RestMiddlewareType<RestMiddleware>[]
  • updated BASIC_DEFAULT_REST_METHOD_MIDDLEWARES constant
    • now is of type RestMiddlewareType<RestMiddleware>[]
  • updated buildMiddlewares function, now using new middlewares and middlewareOrder types
  • updated not function, now using middleware type RestMiddlewareType<RestMiddleware>
  • updated getType function, now using middleware type RestMiddlewareType<RestMiddleware>
  • updated isNotType function, now using middleware type RestMiddlewareType<RestMiddleware>
  • updated DisableMiddleware decorator, now using middleware type RestMiddlewareType<RestMiddleware>
  • updated NotType class
    • new constructor type RestMiddlewareType
    • new generic constraint TType extends RestMiddleware
  • updated RestMethodMiddlewares interface
    • middlewareTypes is now of type RestMiddlewareType<RestMiddleware>[]
  • updated ParametersMiddlewaresMetadata interface
    • middlewareTypes is now of type RestMiddlewareType<RestMiddleware>[]
  • updated BuildMiddlewaresFn interface
    • parameter middlewares is now of type RestMiddlewareType<RestMiddleware>[]
    • parameter middlewaresOrder is now of type RestMiddlewareOrderType[]
  • updated RESTClient class
    • parameter methodMiddlewares is now of type RestMiddlewareType<RestMiddleware>[]
    • parameter middlewaresOrder is now of type RestMiddlewareOrderType[]

v11.2.0

29 Apr 06:57
Compare
Choose a tag to compare

Features

  • new REST_MOCK_LOGGER injection token used for injecting MockLogger used for logging responses for mocks
  • new MockLogger interface, that is service for logging mock responses
    • method logResponse logs mock response
  • new MockLoggerMiddleware middleware, that is used for logging responses for mock usages
  • new AdvancedCacheItem interface, that is advanced cache item
    • property response cached http response
    • property validUntil validity date for cache
  • new AdvancedCacheItemOptions type, that are options for advanced cache item
  • new AdvancedCacheService service, that allows advanced caching of http responses
    • method clearCache clears cache either for specified key, or whole cache
    • method add adds response to advanced cache
    • method get gets http response from cache, or null if it does not exists
    • method updateCache updates existing cache items, if not exists it does nothing
  • new RestAdvancedCaching interface, contains data that are used for advanced cache service
    • extends RestClearAdvancedCaching
    • property validUntil relative definition of 'date' for setting validity of cache, example +2d, +12h
  • new RestClearAdvancedCaching interface, contains data that are used for clearing advanced cache service
    • property key key to stored cache item
  • new AdvancedCache decorator, results of requests are cached in advanced cachce service
  • new AdvancedCacheMiddleware middleware, that is used for storing and restoring response from advanced cache service
  • new ClearAdvancedCacheMiddleware middleware, that is used for clearing advanced cache for specific key
  • new ClearAdvancedCache decorator, that clears advanced cache for key when call is successful
  • updated RestDateApi interface
    • method isBeforeNow tests whether tested date is before now
  • subpackage @anglr/rest/date-fns
    • updated DateFnsRestDateApi to correspond with new RestDateApi interface
  • subpackage @anglr/rest/moment
    • updated MomentRestDateApi to correspond with new RestDateApi interface

v11.1.0

27 Apr 10:27
Compare
Choose a tag to compare

Features

  • new DisableMiddleware decorator, that allows disabling of specified middleware