These are the release notes of the SAP Cloud SDK for JavaScript / TypeScript. You may also be interested in the release notes of the SDK for Java.
Note: The SAP Cloud SDK was previously known as SAP S/4HANA Cloud SDK.
December 5, 2019 - JSDoc API documentation | > Release blog
entityConstructor
, linkedEntity
, fieldName
properties in generated entities to _entityConstructor
, _linkedEntity
, _fieldName
.setLogLevel()
.fieldName
is defined as the name of a property in an entity.esModuleInterop
compilation flag.contains()
function from filter expressions in the OData request builder.November 21, 2019 - JSDoc API documentation | > Release blog
@sap/cloud-sdk-analytics
to provide insights into the SDK usage for further improving the SDK in the future.EntityType_<number>
might now have a different name when regenerated./
.sanitizeDestination
led to an error when called multiple times on the same destination object.November 7, 2019 - JSDoc API documentation | > Release blog
@sap-cloud-sdk/cli
on the central registry npmjs.com. The CLI makes it easy to add the SAP Cloud SDK for JavaScript to an existing project and simplifies several other tasks when building applications on SAP Cloud Platform.npm install @sap-cloud-sdk/cli
).sap-cloud-sdk --help
after installing.OAuth2SAMLBearerAssertion
authentication type that include a property SystemUser
. The system user will be used instead of the currently logged in user to retrieve an access token to the destination. That is, no principal propagation takes place. As a consequence, no user JWT is required.DestinationOptions
in execute
method of OData VDM request builders. The type used previously was overly restrictive, which prevented passing of valid objects like a selectionStrategy
, even though the code actually handles it.systems.json
and credentials.json
files, respectively.October 24, 2019 - JSDoc API documentation | > Release blog
--generateCSN=true
. The default value is false.my-service
the CSN will be in my-service/my-service-csn.json
.October 10, 2019 - JSDoc API documentation | > Release blog
@sap/cloud-sdk-generator
) due to technical reasons. 1.10.0 remains the current version of the generator. As a consequence, the new features of the OData client mentioned below (batch and CSN files) are not yet available for custom OData clients generated by the generator.
Bearer
" was spelled in title case. Now, retrieveJwt
does a case insensitive check for "bearer
". That means, "bearer" and "Bearer" are now equally supported as correct authorization header.batch
that each module for a OData service exposes (see example for business partner service) to construct a batch request. Pass prepared query and by-key request builders as parameters to the method (instead of executing them), as well as change sets.changeset
that each module for a OData service exposes (see example for business partner service) to construct a change set. Pass prepared create, update, and delete request builders as parameters to the method (instead of executing them). Then, pass the constructed change set to the batch
method.execute
, which returns a promise of a list of BatchResponse
.BatchResponse
is a union type, representing the response of an indiviual retrieve request or change set that was passed to the batch request. Use isSuccess
to verify that the retrieve request or change set was successful. Then, use a type assertion like response as ReadResponse
based on your knowledge of the expected response to further work with the response.node_modules
after npm-installing an SDK module.verifyJwt
method, no action is required.fromJson
method of entity builders to properly parse a JSON in the notation used elsewhere in the SDK, with links and attributes in camel-case."strictNullChecks": true
is set in the tsconfig.json
file of the project.September 26, 2019 - JSDoc API documentation | > Release blog
Tenant
object from a JWT with the new method tenantFromJwt
.User
object from a JWT with the new method userFromJwt
.September 12, 2019 - JSDoc API documentation | > Release blog
ClientCertificateAuthentication
.replaceWholeEntityWithPut
method.GetByKeyRequestBuilder
).ignoreVersionIdentifier
method.x-csrf-token
header was ignored by the destination. Now, a warning will be logged instead and the execution continues to enable compatibility with more systems.set-cookie
header was expected but not returned by a destination. Now, a warning will be logged instead and the execution continues to enable compatibility with more systems.@sap/cloud-sdk-generator
) did not compile when "strict": true
is set in the project's tsconfig.json
.August 29, 2019 - JSDoc API documentation | > Release blog
alwaysProvider
) or in the subscriber account (alwaysSubscriber
). You pass the strategy to use as part of the DestinationOptions
when retrieving a destination, if you do not want to use the default, subscriberFirst
. All strategies are available from an object helper DestinationSelectionStrategies
.August 15, 2019 - JSDoc API documentation | > Release blog
@sap/cloud-sdk-vdm-outbound-delivery-service
has been removed from the SAP API Business Hub and, as a consequence, from the SDK. Use @sap/cloud-sdk-vdm-outbound-delivery-v2-service
instead.@sap/cloud-sdk-vdm-*
), new operations in previously existing services, and new entity types. The SDK supports all OData services listed in the SAP API Business Hub for SAP S/4HANA Cloud.asChildOf()
method in CreateRequestBuilder
class.August 1, 2019 - JSDoc API documentation | > Release blog
useOrFetchDestination
or getDestination
explicitly, service bindings represented as destinations now take precedence over querying the destination service. If you have a service binding with the same name as a destination configured in the SAP Cloud Platform cockpit, this will lead to different behavior in your application, because of the newly introduced support for service bindings. Therefore we recommend using unique names across destinations and service bindings.HttpReponse
. Use HttpResponse
instead.DestinationNameAndJwt
as well as in useOrFetchDestination
and getDestination
.destinationForServiceBinding
that accepts the name of a service (as string) and tries to find a service binding with the given name and builds a Destination
for that service.HttpReponse
interface to HttpResponse
.July 18, 2019 - JSDoc API documentation | > Release blog
createTimeSheetDataFields
have been deprecated in favor of explicit builder functions available from separate namespaces such as TimeSheetDataFields.build
.executeHttpRequest
with a destination and the HTTP request to simply send an HTTP request using axios as HTTP request library.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.addDestinationToRequestConfig
merges a given HTTP request object with such a minimal configuration.retrieveJwt
to read authentication tokens in JWT format from a request.verifyJwt
to verify a JWT while decoding it.ResilienceOptions
when executing an OData request or when fetching the destination.serializeEntity
and deserializeEntity
for (de)serializing an OData entity according to the OData v2 standard.JSON.stringify
.Edm.Float
type for ABAP CDS compatibility.and
or or
functions resulted in an empty filter query option string.build
function, such as TimeSheetDataFields.build
.http-proxy-agent
dependency.July 4, 2019 - JSDoc API documentation | > Release blog
withCustomHeaders
function were not used
for fetching csrf tokens.?
as postfix.June 20, 2019 - JSDoc API documentation | > Release blog
withCustomHeaders
function are not used for fetching CSRF tokens. This has been fixed in version 1.5.0.
getDestinations
and getDestinationByName
in
env-destination-accessor
have been deprecated in favor of getDestinationsFromEnv
and getDestinationFromEnvByName
to better reflect their purpose. This has no effect on functionality.axios
to 0.19.0 (from 0.18.0).fast-xml-parser
and others in @sap/cloud-sdk-generator
.
June 6, 2019 - JSDoc API documentation | > Release blog
@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.@sap/cloud-sdk-generator
package.@sap/cloud-sdk-generator
, use the command
generate-odata-client
.
For example, npx generate-odata-client --help
will print the usage instructions and available
options.Protocol "http:" not
supported. Expected "https:"
.HTTPAgent
is imported to ensure module interoperability.May 23, 2019 - JSDoc API documentation | > Release blog
@sap/cloud-sdk-vdm-kanban-control-cycle-service
has been renamed to @sap/cloud-sdk-vdm-kanban-control-cycle-v2-service
to reflect that this service refers to version 2 of that API.@sap/cloud-sdk-vdm-change-master-service
has been renamed to
@sap/cloud-sdk-vdm-change-master-v2-service
and @sap/cloud-sdk-vdm-inbound-delivery-service
to @sap/cloud-sdk-vdm-inbound-delivery-v2-service
.
@sap/cloud-sdk-vdm-*
),
new operations in previously existing services, and new entity types. The SDK supports all OData
services listed in the SAP API
Business Hub for SAP S/4HANA Cloud.
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.BusinessPartner
provide a method customField
to reference custom fields in select or filter query options.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.Edm.DateTime
were not
serialized or deserialized correctly. Now, timezone offsets are correctly taken into account.May 9, 2019 - JSDoc API documentation | > Release blog
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.mockAllTestDestinations
or mockTestDestination
.
Destinations defined in systems.json
together with a credentials.json
file for
credentials will be transparently mocked in all places that fetch
destinations by name.UnhandledPromiseRejections
.April 25, 2019 - JSDoc API documentation | > Release blog
getDestinationOptions
for accessing destinations with getDestination
and deprecate getDestinationOptions
.DestinationOrigin
, as it turned out to be unnecessary.cancel
in the material document service.ignoreVersionIdentifier
.
setVersionIdentifier
(example).
setVersionIdentifier
.
moment
,
BigNumber
) correctly.March 28, 2019 - JSDoc API documentation | > Release blog
@sap/cloud-sdk-vdm-business-partner-service
,
which contains all types and request builders representing the API.BusinessPartner.requestBuilder()
.
A request builder such as BusinessPartnerRequestBuilder
gives access to all operations supported on the entity type, for example, BusinessPartner.requestBuilder().getAll()
.
BusinessPartner
,
with all OData properties represented as properties such as BusinessPartner.lastName
.
BusinessPartner.builder()
.
BusinessPartner.LAST_NAME
for use in select
and filter
query options.Destination
,
possibly retrieved from the destination service on SAP Cloud Platform.
Destination
with URL and credentials when executing a OData VDM request.DestinationNameAndJwt
.
@sap/cloud-sdk-test-util
for loading
destinations of test systems and their credentials.