cloud-sdk-js

Use the SAP Cloud SDK for JavaScript / TypeScript to reduce development effort when building applications on SAP Business Technology Platform that communicate with SAP solutions and services such as SAP S/4HANA Cloud, SAP SuccessFactors, and many others.

APACHE-2.0 License

Downloads
1.2M
Stars
162
Committers
38

Bot releases are visible (Hide)

cloud-sdk-js - v2.5.0

Published by github-actions[bot] over 2 years ago

Compatibility Notes

  • [odata-common, generator] Change Edm.String, Edm.Boolean and Edm.Guid to be orderable to support lt/lessThan(), le/lessOrEqual(), gt/greaterThan(), and ge/greaterOrEqual operators. Re-generate odata services to adopt the changes. (c3166ff6)
  • [util] Stop using VCAP_SERVICES to determine the log format. Use setLogFormat and setGlobalLogFormat to specify the log format. By default, the log format is set to kibana for NODE_ENV=production and local otherwise. (89f1c423)
  • [http-client] Deprecate one overload of the executeHttpRequest function, that accepts HttpRequestConfigWithOrigin as a parameter. Use the new function executeHttpRequestWithOrigin as replacement. (9481ec69)

New Functionality

  • [http-client] Support defining header options and query parameter options with origins. (9481ec69)

Fixed Issues

  • [http-client] Fix the executeHttpRequest function, so it accepts the same parameters as in version 1. (9481ec69)
cloud-sdk-js - v1.54.2

Published by github-actions[bot] over 2 years ago

Improvements

  • [core] Remove the postinstall script.
cloud-sdk-js - v2.4.0

Published by florian-richter over 2 years ago

2.4.0

API Docs: https://sap.github.io/cloud-sdk/api/2.4.0

Compatibility Notes

  • [connectivity] Mark the function noDestinationErrorMessage as internal API. (0a008674)
  • [odata-v4] Mark the function uriConverter as internal API. (0a008674)
  • [eslint-config] Switch the following jsdoc related levels from warn to error:
    • jsdoc/check-param-names
    • jsdoc/require-description-complete-sentence
    • jsdoc/require-jsdoc
    • jsdoc/require-param
    • jsdoc/require-returns (0a008674)
  • [connectivity, http-client] Only log the successful retrieval of destinations on the info log level, log everything else as debug or warn. (04726a35)

New Functionality

  • [connectivity] Support self-signed certificate using the trustStore property of the destination object. (0a008674)

Improvements

  • [connectivity, http-client] Reduce default log output on the info level significantly. (04726a35)

Fixed Issues

  • [util] Fix a bug in the implementation of the trim method. (0a008674)
cloud-sdk-js - v2.3.0

Published by github-actions[bot] over 2 years ago

Compatibility Notes

  • [odata-common, odata-v2, odata-v4] Remove all $format=json query parameters since header Accept: application/json is sent by default.

New Functionality

  • [odata-common] Generate mandatory Content-Id headers for changeset parts in batch request payloads (see OData Spec).
  • [odata-common] Support transforming response data for function and action imports before deserialization. #682.

Improvements

  • [generator] Change log level from warn to error if service path cannot be determined from the service specification (VALUE_IS_UNDEFINED).
  • [generator] Reduce memory usage of schema in API classes (e.g., BusinessPartnerAPI).

Fixed Issues

  • [openapi-generator, openapi] Support path parameters that are not separated by '/', e.g., /path/{param}:{param}.
cloud-sdk-js - v2.2.0

Published by github-actions[bot] over 2 years ago

Compatibility Notes

  • [eslint-config] Replace valid-jsdoc with eslint-plugin-jsdoc plugin for checking JSDoc comments, since the valid-jsdoc rule is deprecated in ESLint. To stop your project from using a specific rule, turn it off by setting the rule ID to off under the rules key inside your configuration file.
  • [generator] Stop exporting service classes (e.g., BusinessPartnerService) from generated clients, use businessPartnerService() instead.
  • [generator] Stop exporting API classes (e.g., BusinessPartnerAPI) from generated clients, use businessPartnerService().businessPartnerApi instead.

New Functionality

  • [http-client] Introduce the parameterEncoder option to the request config of the http-client to allow custom parameter encoding.
  • [http-client] Remove method from defaultDisallowedKeys to not filter out custom http method when using filterCustomRequestConfig.
  • [odata-common] Support adding custom http method in addCustomRequestConfiguration to overwrite the default http method.
  • [openapi] Support adding custom http method in addCustomRequestConfiguration to overwrite the default http method.

Improvements

  • [generator] Remove unused imports (e.g, moment, bignumber.js and EdmTypeField) in API classes (e.g., BusinessPartnerAPI) to reduce memory usage.
  • [http-client] Introduce consistent query parameter encoding for all non custom parameters.
cloud-sdk-js - v2.1.0

Published by github-actions[bot] over 2 years ago

Improvements

  • [connectivity] Add details to error message for missing "URL" properties in destinations.
  • [util] Add sanitizeRecord function to cloud-sdk-logger which replaces potentially sensitive information in a Record<string, any> based on a list of sensitive keys.
  • [generator] The new CLI option licenceInPackageJson offers the possibility to specify the license property in a generated package.json.

Fixed Issues

  • [openapi-generator] Add @sap-cloud-sdk/openapi as a dependency to the OpenAPI generator to fix errors during generation with --transpile enabled.
  • [connectivity] Fix an issue when using registering destinations with a JWT but without XSUAA service binding.
  • [connectivity] Fix a missing export DestinationSelectionStrategies.
  • [odata-common] Fix URL encoding for getByKey
cloud-sdk-js - v1.54.1

Published by github-actions[bot] over 2 years ago

Improvements

  • [core] Announce 2.0 release in the postinstall script.
cloud-sdk-js - v2.0.0

Published by github-actions[bot] over 2 years ago

We released version 2 🥳
Be mindful of breaking changes when upgrading. Enjoy multiple improvements and new features.
Check the upgrade doc.

Compatibility Notes

  • Upgrade the ES version to es2019.

New Functionality

  • [connectivity] Create a new package with minimal API.
  • [connectivity] Add registerDestination function to create destinations in the destinations environment variable.
  • [connectivity] Support the SamlAssertion flow in destination retrieval.
  • [http-client] Create a new package with minimal API.

Removed functionality

  • [generator] Remove the option: aggregatorDirectoryName and aggregatorNpmPackageName
  • [generator] Remove the option: generateTypedocJson
  • [generator] Remove packageJson function from aggregator-package
  • [core] Remove some functions
  • [analytics] Remove the @sap-cloud-sdk/analytics package

New module structure

  • [core] We have split the core package into smaller packages, so functions are moved to the target package.

Changed signatures

  • [core] EdmTypeField only support EDM types, no field types in generics

Changed implementation

  • [generator] changed the following implementations
    • ServiceNameFormatter deprecated constructor removed, reserverdName parameter from typeNameToFactoryName method removed
    • VdmNavigationpropety multiplicity, isMultiLink removed
    • VdmFunctionImportReturnType isMulti removed
  • [openapi] changed the following implementations
    • execute Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
    • executeRaw Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
  • [odata-common] changed the following implementations
    • ComplexTypeField deprecated constructors removed
    • Constructable Selectable removed
    • CreateRequestBuilderBase prepare removed
    • EntityBase getCurrentMapKey, initializeCustomFields removed
    • EnumField edmType removed
    • Filter _fieldName property removed
    • FilterFunction toString, transformParameter removed
    • Link clone, selects removed
    • MethodRequestBuilder withCustomHeaders, withCustomQueryParameters, withCustomServicePath removed, build protected
    • ODataRequestConfig contentType, deprecated constructor removed
    • ODataBatchRequestConfig batchId, content_type_prefix removed
    • OneToOneLink clone removed
    • UpdateRequestBuilderBase prepare, requiredFields, ignoredFields, withCustomVersionIdentifier removed
    • execute Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions..
    • executeRaw Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
  • [odata-v2] changed the following implementations
    • execute Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
    • executeRaw Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
  • [odata-v4] changed the following implementations
    • execute Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
    • executeRaw Request Builder APIs changed to use a single parameter, either a Destination or DestinationFetchOptions.
  • [connectivity] changed the following implementations
    • getDestination changed to use DestinationFetchOptions as single parameter.
    • getProxyRelatedAuthHeaders legacyNoAuthOnPremiseProxy case removed
    • serviceToken uses jwt instead of userJwt now.
    • jwtBearerToken uses jwt instead of userJwt now.
    • fetchVerificationKeys merged with executeFetchVerificationKeys, now only accepts url as parameter
  • [http-client] changed the following implementations
    • executeHttpRequest fetches CsrfToken for non-GET requests by default.
cloud-sdk-js - v1.54.0

Published by github-actions[bot] over 2 years ago

New Functionality

  • [core] A new proxy type PrivateLink is now supported. This proxy type is used when your destination represents a tunnel created via Private Link Service.
cloud-sdk-js - v1.53.1

Published by github-actions[bot] almost 3 years ago

Improvements

  • [generator] Update the version of @sap/edm-converters to make sure node 14 is supported.

Fixed Issues

  • [core] Fix OAuth2Password auth type for the missing token in the header.
cloud-sdk-js - v2.0.0-beta.1

Published by jjtang1985 almost 3 years ago

cloud-sdk-js - v1.53.0

Published by github-actions[bot] almost 3 years ago

Fixed Issues

  • [core] Fix parsing of batch response with HTTP 200 status code and containing empty body.
  • [core] Fix missing x-tenant and x-user-token header for multiple authorization flows.
cloud-sdk-js - v1.52.0

Published by github-actions[bot] almost 3 years ago

Compatibility Notes

  • [core] Switch the default isolation strategy from IsolationStrategy.Tenant to IsolationStrategy.Tenant_User, when setting useCache to true for destination lookup functions like getDestination.

Fixed Issues

  • [core] Disable destination cache, when the JWT does not contain necessary information. For example, when using IsolationStrategy.Tenant_User, the JWT has to contain both tenant id and user id.
  • [core] Use provider token to retrieve destinations from cache.
  • [core] Overwrite default expiration time of the destination cache with the expiration time of its auth tokens, if available.
cloud-sdk-js - v1.51.0

Published by github-actions[bot] almost 3 years ago

Compatibility Notes

  • [core] Tighten the return type of the getAuthHeaders() and buildAuthorizationHeaders() functions.
  • [openapi-generator] The binary of the openapi-generator now calls ./dist/cli.js instead of ./bin/run. This will be handled automatically if you install or update the CLI via node or run it with npx.

Improvements

  • [openapi-generator] Replace oclif library with yargs. This is a refactoring without functional changes.

Fixed Issues

  • [odata] Fix parsing of Edm.Time when some parts of the time are missing, e.g. PT1H21S.
  • [util] setGlobalLogLevel(level) sets log levels of all existing loggers globally.
  • [util] Fix equal(item1, item2) method to return false when either object is null or undefined.
  • [openapi-generator] Existing options per service (--optionsPerService) are merged with new options instead of overwriting.
cloud-sdk-js - v1.50.0

Published by github-actions[bot] about 3 years ago

New Functionality

  • [connectivity] Allow token forwarding for local destination stored in the environment variables.

Improvements

  • [generator] Include and exclude options added to the transpileDirectory() method

Fixed Issues

  • [core] Fix a type error, when moment() is used in filtering an OData field of type Edm.DateTimeOffset
cloud-sdk-js - v1.49.0

Published by github-actions[bot] about 3 years ago

Compatibility Notes

  • [core] Stop using client credentials to fetch public keys for token verification.
  • [core] Replace own implementation for requesting user tokens and client credential tokens from the XSUAA service with the @sap/xssec library.

New Functionality

  • [core] Support authentication through client certificates (X.509) in client credentials grant requests.

Improvements

  • [core] Reduce the number of warnings when selecting an XSUAA instance.

Fixed Issues

  • [core] Fix verification key retrieval to match the given key id (kid).
  • [core] Fix the missing export for files under http-agent directory.
  • [core] Support using custom http(s)Agent when sending CSRF token requests.
  • [core] Fix URL encoding for $orderby query parameter of OData requests.
cloud-sdk-js - v1.48.1

Published by github-actions[bot] about 3 years ago

Compatibility Notes

  • [openapi-generator] Paths referenced in the options per service configuration now use POSIX-style separators (/) independent of the operating system. Existing configuration files generated on Windows contain Windows-style separators (\\) in the paths. Those paths will not be read correctly and should be updated manually to /.

Fixed Issues

  • [core] Fix failing destination retrieval for OnPremise proxy type and basic authentication.
  • [openapi-generator] Fix generation of options per service configuration files to always use POSIX-style file path separators independent of operating system.
cloud-sdk-js - v1.48.0

Published by github-actions[bot] about 3 years ago

Compatibility Notes

  • [generator] Consider the Nullable property on action and function import parameters and return types correctly.
    For parameters, this is uncritical because the type is extended from T to T | null if the property is nullable.
    For return types, the same extension could lead to compile errors after client regeneration because the is broadened including null.

New Functionality

  • [core] Support additional headers and query parameters, that are set on destinations.
  • [core] Support authentication type OAuth2Password.
  • [core] Support DestinationOptions on OpenAPI request builders.
  • [K8s] Support for Kubernetes, check our migration guide.

Improvements

  • [generator] Add underlying type and value information as part of the API documentation for enums.
  • [generator] Disallow invalid enum entries or random string parameters when building filters on enum properties.
  • [openapi-generator] Add additional information to the schema documentation, e.g. maxLength, minimum.

Fixed Issues

  • [core] Fix parsing of proxy environment variables to allow - in the hostname.
  • [core] Fix URL encoding for GetByKey, Update, and Delete request builders, when a key of the entity contains special characters like /.
  • [generator] Fix generation errors, when the Enum type field is used as a key of an entity.
  • [generator] Fix action and function import typing, when parameter or return types are nullable.
cloud-sdk-js - v1.47.1

Published by github-actions[bot] about 3 years ago

Improvements

  • [metadata] Adjust internal metadata generation.
cloud-sdk-js - v1.47.0

Published by github-actions[bot] about 3 years ago

New Functionality

  • [core] Support OAuth2JWTBearer authentication type.

Fixed Issues

  • [proxy] Fix destination service calls using web proxies.
  • [core] Fix type error to allow null values in filters for nullable properties.
  • [core] Fix OData filter runtime error, when using lambda expression with operands like or.