Skip to content

Releases: SAP/cloud-sdk-js

v1.34.0

22 Dec 17:35
Compare
Choose a tag to compare

Compatibility Notes

  • The methods refreshTokenGrant,userTokenGrant and clientCredentialsGrant of the xsuaa-service now accept a string or XsuaaServiceCredentials as first argument.
    In case it is a string it is treated as the URL to fetch the access token from.
    In case it is an object of type XsuaaServiceCredentials, the the URL is built by appending oauth/token to the .url of the given object.
    In the past this suffix was also appended to inputs of type string.

New Functionality

  • Add experimental support for client generation of OpenAPI services. All functionality related to the OpenAPI generator is subject to change.
  • Introduce ErrorWithCause for better analysis of errors, their causes and their root causes. All errors that have been caused by other errors through the SDK are based on this class.
  • Support Destinations with authentication type OAuth2UserTokenExchange.

Improvements

  • Unify naming of the request builder methods. See this adr for a list of the changed methods.

Fixed Issues

  • Stop appending oauth/token if the service token URL is given to clientCredentialsGrant().
    See related compatibility note above.

v1.33.0

10 Dec 14:03
Compare
Choose a tag to compare

Known Issues

  • [Generator] Using entity type as the parameter of function or action imports is not supported.

Compatibility Notes

  • [Generator] In order to support multi-schema generation, the edmx schema/namespace related types have been extended.
  • [Generator] The deprecated static property _serviceName will not be generated.

New Functionality

  • [Generator] Support parsing of multiple schemas in the edmx service specification.
  • [Util] Add string formatting functions.

Improvements

  • [Generator] Log warnings when generating code for function or action imports with unknown parameters, instead of throwing errors.

Fixed Issues

  • [Destination] Fix the authentication type OAuth2ClientCredentials to keep using the token url from the destination without adding the path /oauth/token to the end.
  • [Destination] Fix OAuth2SAMLBearerAssertion flow for technical users and subscriber account destinations.

v1.32.1

24 Nov 12:15
Compare
Choose a tag to compare

Compatibility Notes

  • Version 1.32.0 introduced a breaking change by removing the export of all generic HTTP client functionality. This version adds it again.

Fixed Issues

  • Add missing export for http-client

v1.32.0

24 Nov 09:17
Compare
Choose a tag to compare

Compatibility Notes

  • Batch ReadResponse.as does not parse errors anymore, but throws an error if the response in fact was an ErrorResponse. To avoid this check response.isSuccess() before casting.
  • Rename deprecated ODataRequestConfigs e.g. ODataCreateRequestConfig -> ODataCreateRequestConfigLegacy due to naming conflicts.

Improvements

  • Export the tenant interface from the scp-cf module.
  • Throw an error when attempting to parse a batch ReadResponse that in fact is an ErrorResponse.

Fixed Issues

  • [Generator] Fix the enum type (V4), when only one enum member is defined in the metadata.
  • [OData] Fix function imports with and without parameters using the OData V4 syntax.

v1.31.0

05 Nov 11:17
Compare
Choose a tag to compare

Compatibility Notes

  • [Generator] Paths referenced in configuration files for the generator are treated as relative to this file as stated in the documentation. Projects relying on the previous erroneous behavior might have to adjust their configuration.

New Functionality

  • Most public methods using variable arguments now also accept arrays as input.

Improvements

  • Remove the rambda library to save approx 2MB or 10% of the SDK size.
  • [Connectivity] Warn the user when using custom headers for executing http requests.
  • Pass through original error message in case of failure when fetching the csrf token.

Fixed Issues

  • [Generator] Fix function imports (OData V2 + V4) and action imports, where the return type is a primitive edm type like Edm.String.
  • [Generator] Fix path references in generator configuration file to be treated as relative to the configuration file.
  • [Core] Fix expiration times in the client credentials cache.
  • [Core] Fix csrf request redirects against On-Premise systems

v1.30.0

13 Oct 10:32
Compare
Choose a tag to compare

Compatibility Notes

  • Deprecate setting the content type header in the constructor of ODataRequests.
  • [Generator] Files with the same names, but different casing were previously not considered, e. g. when SomeEntity.ts and Someentity.ts were generated, the second generated file would overwrite the first. In these cases the generator now adds a suffix to the name, e. g. Someentity_1.ts.

New Functionality

  • [OData] Add withSubRequestType method to configure how batch sub requests are serialized.
  • [OData] Support batch requests for OData v4.

Improvements

  • Allow setting default headers in ODataRequests instead of the content type header only.

Fixed Issues

  • [OData] Fix wrong service paths for batch requests.
  • [Generator] Fix reference to execa dependency.
  • [Generator] Fix writing of files with the same names but different casing.
  • Fix url encoding in batch requests.

v1.29.0

06 Oct 16:20
Compare
Choose a tag to compare

Compatibility Notes

  • [Generator] The interface EnityTypeForceMandatory (e.g., BusinessPartnerTypeForceMandatory) is removed.

New Functionality

  • [OData] Support the usage of $count in getAll requests e.g.: Entity.requestBuilder().getAll().count().execute().

Improvements

  • [OData] Add warning for deep update attempts in OData v2.
  • [Generator] The transpiling after generation is done in chunks to avoid CPU overloads for high numbers of services.

Fixed Issues

  • [OData] Fix parsing the Etag returned from update requests.
  • [OData] Fix the entity builder so that it can set undefined/null for optional properties.

v1.28.2

24 Sep 12:07
Compare
Choose a tag to compare

New Functionality

  • [Util] Allow to mute and unmute loggers.

Improvements

  • [Generator] Generator will fail, when it generates .ts files that have compilation errors.

Fixed Issues

  • [OData] Fix deserialization of one to many links, where the navigation property is not wrapped in a result object.
  • [OData] Fix $orderby parameter in expanded subqueries.

v1.28.1

02 Sep 08:56
Compare
Choose a tag to compare

Improvements

  • Adjust the generation of the $filter parameter in URL so that parentheses are not removed even logically they are not needed.
    For example, now $filter=((filterA and filter B) and (filterC and filter D)) will not be flattened to $filter=(filterA and filter B and filterC and filter D).

Fixed Issues

  • [Generator] Remove Batch.ts from the index file when the file does not exist.

v1.28.0

31 Aug 15:17
Compare
Choose a tag to compare

New Functionality

  • Move OData v4 support from experimental to GA status.

Fixed Issues

  • [Generator] Skip generation of Batch.ts for services without entities.
  • [RequestBuilder] Fix serialization of "Edm.Time" fields in OData V4.