Previously existing functions to create instances of complex types from JSON such as createTimeSheetDataFields have been deprecated in favor of explicit builder functions available from separate namespaces such as TimeSheetDataFields.build.
Build and execute generic HTTP requests against a given destination, taking care of interacting with the destination service and any authentication flow.
Call executeHttpRequest with a destination and the HTTP request to simply send an HTTP request using axios as HTTP request library.
If you need more control, you can use buildHttpRequest to create an object with the minimal configuration for an HTTP request after resolving the destination and applying authentication. The returned object can be used as basis for an Axios request, or inspected manually.
Provide convenience function retrieveJwt to read authentication tokens in JWT format from a request.
Provide convenience function verifyJwt to verify a JWT while decoding it.
Automatically apply the circuit breaker design pattern to provide resilience out-of-the-box while calling remote services such as destination and XSUAA service. You can disable this by passing ResilienceOptions when executing an OData request or when fetching the destination.
OData client: Provide direct access to methods serializeEntity and deserializeEntity for (de)serializing an OData entity according to the OData v2 standard.
OData client generator: Fix name clashes between names of function imports and complex types instances builders. To create a complex type instance from JSON, use the separately provided build function, such as TimeSheetDataFields.build.
Add missing types for the http-proxy-agent dependency.
Transparently support destinations with authentication typeOAuth2ClientCredentials on SAP Cloud Platform Cloud Foundry. The SDK will automatically apply the client credentials flow for such destinations.
The dependency of the new module @sap/cloud-sdk-generator to fast-xml-parser
is not properly defined, leading to errors such as Cannot find module 'fast-xml-parser' when
calling the generator.
This has been fixed in version 1.4.2.
This allows generating a client library for custom OData services that simplifies accessing OData
for SAP S/4HANA Cloud OData services.
After installing the package @sap/cloud-sdk-generator, use the command
For example, npx generate-odata-client --help will print the usage instructions and available
Fix an issue where destinations with protocol HTTP led to an error like Protocol "http:" not
supported. Expected "https:".
Fix an issue where deserialization of certain entities failed due to cyclic dependencies across linked
entities that caused entities to be undefined.
Fix how HTTPAgent is imported to ensure module interoperability.
OData VDM: Support custom fields of OData entities. Custom fields are properties that are not part
of the standard API but added, for example, via in-app extensions in SAP S/4HANA.
Deserialize custom fields when retrieved via an OData service request and serialize custom fields on
create and update requests.
Offer methods getCustomField for retrieving and setCustomField for setting a
specific custom field on an entity, as well as getCustomFields for retrieving all custom
fields and hasCustomField for checking if a custom field exists.
OData VDM: Provide a static representation (for example, BusinessPartner.ALL_FIELDS)
on each entity type for all fields of that entity. This representation can used in select query options to
retrieve all fields when also expanding navigation properties.
OData VDM: fix an issue where OData properties of type Edm.DateTime were not
serialized or deserialized correctly. Now, timezone offsets are correctly taken into account.
OData VDM: fix an issue when expanding navigation properties where selecting all fields of
associated entities (without specifying specific fields to select) did not work.
The SAP S/4HANA Cloud SDK has been renamed to
SAP Cloud SDK. For now, technical artifact names on source code level remain unchanged. You do not
need to change your source code or dependencies.
Connect to SAP S/4HANA on-premise via the Cloud Connector and SAP Cloud Platform connectivity service.
No code change is necessary to use this feature. On-premise connections are handled transparently by the
SAP Cloud SDK where configured.
The SDK will proxy requests to destinations with proxy type OnPremise through the cloud
connector if an instance of the connectivity service is bound to the application. Only the necessary setup
is required as described in the documentation
for on-premise connectivity.