[connectivity] Remove destination cache in getDestinationFromServiceBinding() function to let cached destinations retrieved in getDestinationFromDestinationService() function be added with the proxyConfiguration property.
[connectivity] Add proxyConfiguration on the fly to avoid expired proxy authorization token in cached destination if it lives shorter than the token for destination service. (438ebd8)
[util] Stringify Axios response data object in the error stack of ErrorWithCause class. (782b3fd)
[openapi] Introduce setBasePath() method on the OpenAPI request builder, allowing a custom base path URL to be set for a single request. This base path is prepended to the API path parameter for that single request. (2943cd5)
[openapi, openapi-generator, util] Add basePath option in the options-per-service.json file in the OpenAPI generator. This option prepends the base URL path to the API path parameter for every request. (2943cd5)
[generator-common] Fix ESM client code compilation by allowing the module option to be set to nodenext or node16 in a custom tsconfig.json file. (745766e)
[mail-client] Fix mail client issue for port 465 with on-premise setup. (ea9b6b5)
[mail-client] Fix email sending functionality to ensure that emails are sent to all valid addresses. Previously, if an email failed, all subsequent emails were not sent.
[eslint-config] Add @typescript-eslint/consistent-type-imports to the ruleset. (252c338)
[openapi-generator] Add support for discriminator properties in schemas that include oneOf and anyOf. Also add support for incorrect usage of the discriminator property with schemas of type object. (d073a48)
[connectivity] Add convenience function transformServiceBindingToDestination() to create destination from service bindings.
The following service bindings are supported:
[openapi] Fix incorrect encoding of query parameters in OpenAPI requests. Query parameters (except for additional custom parameters) are now encoded by default. To change this behavior overwrite the parameterEncoder in the request options. (d6b1c5b)
[openapi-generator] Fix types in generated OpenAPI schemas to have proper types instead of type any. (6bbdd4d)
[mail-client] Fix "Hostname/IP does not match certificate's altnames" issues with "localhost" when sending e-mails OnPremise. Always pass the host and port of the MAIL destination explicitly to the underlying nodemailer instead of falling back to the default.
[connectivity] The SAP Cloud SDK used to get all subaccount and instance destinations, that are available with your JWT (without potentially required token retrieval), through two requests to the destination service (/subaccountDestinations and /instanceDestinations). While this approach can have advantages when caching, it can cause severe performance issues without caching. Therefore, from now on, only one destination is retrieved per requested destination through /destinations.
You can no longer rely on the SDK to automatically cache all destinations on the first request. If needed, you can call getAllDestinationsFromDestinationService() with cache enabled instead. (c721bbd)
[connectivity] Using Principal Propagation through authentication type NoAuthentication is no longer supported. This resulted in erroneous behavior for destinations with authentication type NoAuthentication. If you need to use Principal Propagation use authentication type PrincipalPropagation. (28c9cb7)
[connectivity] Retrieve only one destination per requested destination instead of all subaccount and instance destinations. (See compatibility notes.) (c721bbd)
[connectivity] Allow the use of authentication type NoAuthentication with proxy type OnPremise without requiring the SAP-Connectivity-Authentication header. (28c9cb7)
[odata-common, odata-v2, odata-v4, generator, generator-common] Do not send null values in the request payload for properties that are not set while creating or updating an entity.
[odata-common, odata-v2, odata-v4, generator, generator-common] Fix RangeError: Maximum call stack size exceeded error that occurs when updating an entity after calling getByKey. (bdcf14f85)
[connectivity] Proxy configuration is no longer realized through a proxy agent, but with the native axios proxy setting instead. (025b6aa2c)
[http-client, connectivity] When using proxies with @sap-cloud-sdk/connectivity@>=3.6.0, you must upgrade to @sap-cloud-sdk/http-client@>=3.6.0. Proxies in @sap-cloud-sdk/connectivity@>=3.6.0 are not compatible with @sap-cloud-sdk/http-client@<3.6.0. (025b6aa2c)
[connectivity] Compare selectionStrategy in DestinationFetchOptions based on value instead of reference. (7ed5ceb52)
[connectivity] Fix destination caching for destinations from service bindings. The destinations are not cached repeatedly. The function getDestinationFromServiceBinding() returns undefined for destinations which have expired JWTs. (bf54df09b)
[connectivity] Support destinations of type ClientCertificateAuthentication without password.
@sap-cloud-sdk/resilience@3.5.0
@sap-cloud-sdk/util@3.5.0 (2277f9443)
[odata-common, odata-v2, odata-v4] Fix OData v2 serialization for Edm.Decimal to serialize to string. (ee7477ce2)
[connectivity] Deprecate destinationForServiceBinding() and PartialDestinationFetchOptions. Use getDestinationFromServiceBinding() and ServiceBindingTransformOptions instead. (bde64634d)
[connectivity] Always add a name to destinations from service bindings created with getDestinationFromServiceBinding(). (db0780f1b)
[connectivity] Support forwarding of auth tokens for destinations from the destination service, service bindings and environment variables. (bde64634d)
[odata-common, odata-v4] Serialize properties of type "Edm.Decimal" to numbers when they are within the safe range and strings when they are not. (431d2a542)
[connectivity] Do not rely on XSUAA service when caching service tokens. Cache keys are now based on service credentials URL. (0583836bc)
[connectivity] Do not rely on the XSUAA service binding to retrieve tenant information when registering destinations. If tenant is unknown and no binding is found, set it to a default value ('tenant_id'). (8f54207b6)
[connectivity] Remove dependency to XSUAA service binding when checking whether a JWT was issued by XSUAA for destination retrieval. Now, the ext_attr.ehancer property is checked. (6b58354e8)
[http-client] Do not set default tenant ID in the context of middlewares, if the tenant ID is unknown. In those cases it will be undefined from now on. (8f54207b6)
[connectivity, http-client] Forward the user JWT irrespective of the destination authentication type when forwardAuthToken is set to true on a destination (56c3f70f4)
[http-client] Improve CSRF token fetching for large requests. (73ff0ab03)
[odata-common] Remove encoding of keys in the getEntityKeys() as it should only happen once in getResourcePathForKeys().Fixes the error value.format is not a function when executing requests for entities with Edm.Date type key property. (aa1a4bdb0)
[resilience] Fix parsing error when the last response in a chain of retries returned undefined.
[connectivity] The combination of iss and jwt is now supported when fetching destinations. When both properties are set, the iss property is no longer ignored. (28b7af86f)
[connectivity] Add support for authentication type NoAuthentication on-premise destinations. (039412e59)
[connectivity] Allow combination of iss an jwt when fetching a destination. In this case the iss URL will be used to fetch the destination service token and jwt will be used for the x-user-token header of user based authentication types. (28b7af86f)
[odata-common, odata-v2, odata-v4] The ActionFunctionImportRequestBuilderBase has an additional mandatory type parameter to pass the according (de-)serializer type. This was missing previously due to a bug. (2fa8c36a6)
[connectivity] Fix the The proxy configuration is undefined error for OnPrem MAIL destinations by removing the isHttpDestination check when adding proxyConfiguration to the destination object.
@sap-cloud-sdk/resilience@3.0.2
@sap-cloud-sdk/util@3.0.2 (47fc7278d)
[mail-client] Fix error Greeting never received when sending emails to On-Premise mail servers. The _readableListening property of socket is set to true to allow nodemailer to receive SMTP greeting messages. (47fc7278d)
[mail-client] Fix Invalid greeting error from nodemailer by removing the transport.verify function call. (be04dafc2)
[odata-common, odata-v2, odata-v4] Fix batch requests to accept only functions or actions. (2fa8c36a6)
[connectivity] The generic types of JwtKeyMapping is simplified so the second type argument JwtKeysT are always strings. (1b974095f)
[connectivity] The Protocol enum was replaced with a string literal union type. Now, instead of passing Protocol.HTTPS pass 'https'. (1b974095f)
[connectivity, http-client, openapi, odata-common, odata-v2, resilience] Remove the options timeout and enableCircuitBreaker from all BTP service interactions i.e. destination and token fetching. (1b974095f)
[connectivity, http-client, mail-client, openapi, odata-common, odata-v2, odata-v4, eslint-config, generator, test-util, util, openapi-generator, generator-common, temporal-de-serializers, resilience] Switch the compilerOptions.module to Node16 instead of CommonJS for better interoperability with ES modules. See the TypeScript handbook for technical details if needed. (1b974095f)
[connectivity] The enum IsolationStrategy was replaced with a string literal union type of the same name. Use 'tenant' and 'tenant-user' instead of IsolationStrategy.Tenant and IsolationStrategy.Tenant_User. (1b974095f)
[connectivity, http-client, odata-common] The url property in Destination is now optional as destinations of type MAIL do not have a URL. (1b974095f)
[http-client, openapi, odata-common] Remove timeout() method from the request builders and the timeout options from the executeHttpRequest() function.
Visit the documentation portal to see how to add a timeout using middlewares. (1b974095f)
[http-client] Removed overload of executeHttpRequest
The overload, that accepted HttpRequestConfigWithOrigin as a parameter, is removed and replaced by the function executeHttpRequestWithOrigin. (1b974095f)
[odata-common, generator, util] By default, generation of OData clients fails if a service path cannot be determined. Either provide servicePath value in the options-per-service.json or set skipValidation to true, in which case, / will be used. (1b974095f)
[odata-common] The constructor of ODataRequestConfig was changed so that the third parameter cannot be a string anymore.
Passing in a string which was then interpreted as the value for the Content-Type HTTP header was deprecated.
The type of the parameter is now Record<string, any>, and if only want to set the Content-Type HTTP header you can do so by passing {'content-type': 'some-value'} to the constructor. (1b974095f)
[odata-common] The constructor of the entity API is private to avoid accidental usage. Use the service object to get a API instance. (1b974095f)
[odata-common, generator, openapi-generator] The serviceMapping option of the OData generator has been renamed to optionsPerService. The mapping file, service-mapping.json has also been renamed to options-per-service.json. By default, an options file will not be generated. (1b974095f)
[odata-common] Setting custom fields in fromJson through the _customFields property has been removed.
Add custom properties to your JSON object instead. (1b974095f)
[generator] The options per service behavior is now the same as for the OpenApi generator.
For details on how to migrate and what has change look at the migration guide. (1b974095f)
[generator] The deprecated forceOverwrite option of the generator is removed. Use the overwrite option instead.
[generator] The deprecated generatePackageJson option of the generator is removed. Use the packageJson option instead.
[generator] The deprecated writeReadme option of the generator is removed. Use the readme option instead.
[generator] The deprecated processesJsGeneration option of the generator is removed. Use the transpilationProcesses option instead.
[generator] The internal options sdkAfterVersionScript, s4HanaCloud and packageVersion of the generator are removed.
These were hidden options never meant for external usage and there is no replacement.
[generator] The deprecated generateNpmrc option of the generator is removed. Use the include option to add a .npmrc to the generated code if needed. (1b974095f)
[generator] Add verbose generator option. By default, only error and warning logs will be displayed. If verbose is set to true, all logs will be displayed. (1b974095f)
[generator] The generateJs option has been replaced with the transpile option. Transpilation is not enabled by default. (1b974095f)
[generator] The command line argument inputDir of the OData generator is renamed to input.
The new input options accepts now also file paths and glob patterns. (1b974095f)
[generator] The OData generator won't automatically rename identifiers to avoid name conflicts.
The generation process will fail if identifiers have conflicting names.
Switch on the skipValidation flag if you want to generate despite name conflicts and are okay with changed identifier names to avoid conflicts. (1b974095f)
[generator, openapi-generator, generator-common] Removed the option versionInPackageJson from the OData and OpenAPI generator.
If the option packageJson is enabled now a package.json with a default version 1.0.0 is created.
If necessary use the include option to add a package.json with a custom value.
[generator, openapi-generator] Removed the option licenseInPackageJson from the OData and OpenAPI generator.
If the option packageJson is enabled now a package.json with a default license UNLICENSED is created.
If necessary use the include option to add a package.json with a custom value. (1b974095f)
[generator, openapi-generator] Rename servicePath to basePath. (1b974095f)
[generator] The option generateCSN is removed. There is no replacement. (1b974095f)
[generator] The type for paths in the GeneratorOptions is changed from fs.PathLike to string.
In case you passed a buffer object please resolve it to a string before passing it to the SAP Cloud SDK. (1b974095f)
[generator, openapi-generator, generator-common] The two generators use the same CLI parsing code now, aligning the way paths are resolved.
In case you experience problems with the new logic, enable the verbose flag to investigate the new paths. (1b974095f)
[util] The function variadicArgumentToArray is replaced by the function transformVariadicArgumentToArray. (1b974095f)
[util] The field logger on the interface LoggerOptions was not used and is removed from the interface. (1b974095f)
[openapi-generator] The internal option packageVersion of the OpenAPI generator is removed. (1b974095f)
[openapi-generator] tsConfig option has been renamed to tsconfig. (1b974095f)
[generator-common] The generator does not create d.ts.map files per default anymore. If you need them include a custom tsconfig.json.
[connectivity, http-client, mail-client, openapi, odata-common, odata-v2, odata-v4, eslint-config, generator, test-util, util, openapi-generator, generator-common, temporal-de-serializers, resilience] All SAP Cloud SDK packages ship without d.ts.map files from now on.
Modern IDEs don't require those files for code navigation, thus they are removed to decrease download size of the SDK. (1b974095f)
[connectivity] Support OAuth2RefreshToken authentication type (1b974095f)
[connectivity] Add a retry option in the DestinationFetchOption.
Enable this options if the token exchange done by the destination service is unstable. (1b974095f)
[connectivity, resilience] Add ResilienceOptions and resilience() function. The function returns an array of middlewares based on the provided options. (1b974095f)
[http-client, resilience] The request configuration used in the final request is now part of the middleware context.
User can implement middlewares to change request properties like headers using this reference in the middleware context.
The request configuration contains the url, headers and all other properties of the HTTP request. (1b974095f)
[http-client, openapi, odata-common] Introduce the middleware on the request builders and http-client.
Visit the documentation portal to see how to use middlewares. (1b974095f)
[generator, generator-common] Introduced options transpile and tsconfig to configure transpilation for generated OData clients. (1b974095f)