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 - v1.46.0

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

Compatibility Notes

  • [core] Deprecate JWT related interfaces in favor of the interfaces provided by the jsonwebtoken library.
    The following interfaces were deprecated:

    • JWTHeader (use JwtHeader instead, the property typ is now optional)
    • JWTPayload (use JwtPayload instead)
    • CompleteDecodedJWT (use Jwt instead)
    • RegisteredJWTClaims
    • RegisteredJWTClaimsBasic
    • RegisteredJWTClaimsTenant
    • RegisteredJWTClaimsUser
  • [openapi-generator] Change the basis for directory, package, and service names, when generating clients. If not specified otherwise, the default is based on the directory name instead of the service name.

  • [eslint-config] Remove brace-style rule for compatibility with Prettier 2.3.

New Functionality

  • [openapi-generator] Add the -c/--config command line option to specify options through a configuration file instead of on the command line.

Improvements

  • [core] Support setting custom SAP-Connectivity-Authentication headers for Principal Propagation.
  • [core] Improve types in convenience functions for JWT access. See "Compatibility Notes" for details.
  • [openapi-generator] Improve the error message for invalid or unsupported path patterns.
  • [openapi-generator] Improve the error message when detecting invalid Swagger 2.0 specification files.

Fixed Issues

  • [core] Fix type error to allow filtering on one-to-many navigation properties in lambda expressions.
  • [openapi-generator] Base uniqueness check for directory names on directory names in optionsPerService instead of the human readable service name.
cloud-sdk-js - v1.45.0

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

Fixed Issues

  • [core] Re-enable the circuit breakers for the destination and XSUAA services.
  • [odata] Fix encoding of filter strings.
  • [core] Add or overwrite the content length header for CSRF fetch requests. As those are always HEAD requests, the content length is always set to 0.

API Docs

cloud-sdk-js - v1.44.0

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

Improvements

  • [odata-generator][openapi-generator] Update typescript version to ~4.1.2 in the package.json of the clients.
cloud-sdk-js - v1.43.0

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

New Functionality

  • [odata] Support appending path to the request URL built by the request builders through the appendPath method. It can be used for unsupported OData functionality like querying navigation properties.

Fixed Issues

  • [PROXY] Consider the web proxy also in the service call to BTP services like XSUAA and destination service.
cloud-sdk-js - v1.42.0

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

Compatibility Notes

  • [core] Use HEAD instead of GET when fetching CSRF tokens. Change the URL for CSRF token fetching in OData requests from the service URL to the request URL.
  • [test-util] Use HEAD for mockHeaderRequest() to align with the core behaviour.
  • [core] Remove experimental Exclude type, which was accidentally exposed as non-experimental.
  • [openapi-generator] Rename the CLI generator command from generate-openapi-client to openapi-generator.
  • [openapi-generator] Rename some generator options and default behavior of those options (details).

New Functionality

  • [openapi-generator] Release the SAP Cloud SDK OpenAPI generator.
  • [core] Support custom axios options for all request builders.
  • [core] Support disabling csrf token request as an option for all request builders.
  • [odata] Support unary operator not in the filter() of OData request builders.

Improvements

  • [odata] Allow using filter functions with boolean return types directly in the filter() of OData request builders without equals(true).
  • [odata-generator] Disable the execute function, when an entity type is shared by multiple entity sets and is used as the return type of function/action imports.
  • [openapi-generator] Introduce verbose option to enable verbose logging.
  • [openapi-generator] Introduce overwrite option to allow overwriting of existing files.
  • [openapi-generator] Introduce include option to allow copying files to the generated clients.
cloud-sdk-js - v1.41.0

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

Compatibility Notes

  • [core] Deprecated userApprovedServiceToken, refreshTokenGrant and userTokenGrant.
  • [openapi-generator] Replace the underlying Java-based OpenAPI generator with a custom implementation.
  • [odata-generator] The type of one-to-one navigation properties is now optional.

New Functionality

  • [core] Added support for jwtBearerToken and jwtBearerTokenGrant authorization.
  • [http-client] Add a fetchCsrfToken option to executeHttpRequest to allow automatic fetching of CSRF tokens for write operations.
  • [openapi-generator] Fetch CSRF tokens for write operations automatically.

Fixed Issues

  • [odata-generator] Fix a type error of one-to-one navigation properties, so they can set null as valid values.
  • [core] Fix a runtime error of fromJson function, when passing an object containing one-to-one navigation properties with null value.
  • [odata-batch] Fix wrong double encoding of filter values in batch requests.
  • [openapi-generator] Use string as default type for enums.
cloud-sdk-js - v1.40.0

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

Compatibility Notes

  • A mandatory property request is added to the HttpResponse.

New Functionality

  • [core] Support executeRaw in all RequestBuilder, which returns HttpResponse that contains the raw response and original request.

Improvements

  • [http-agent] Fix client certificate authentication in conjunction with proxies - depends on this PR.

Fixed Issues

  • [core] Fix parsing of empty bodies in batch responses.
cloud-sdk-js - v1.39.0

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

Compatibility Notes

  • [core] Deprecated _customFields in the fromJson method of the entity builders. Instead, add custom fields to the JSON objects directly.

New Functionality

  • [openapi-generator] Support custom API names and operation names by using OpenAPI extensions x-sap-cloud-sdk-api-name and x-sap-cloud-sdk-operation-name.

Fixed Issues

  • [core] Fix building of entities using fromJson with navigation properties.
  • [odata-generator] The exit code of the node process is set to 1 in cases of a generator error.
  • [odata-generator] Fix the false-positive warning message, when functions/actions are not used by any function/action imports.
cloud-sdk-js - v1.38.0

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

New Functionality

  • [openapi-generator] Generate multiple API objects based on tags instead of one API per API specification.
  • [openapi-generator] Add option writeReadme for generating readme files.
  • [openapi-generator] Support copying files from given paths via a new option additionalFiles.
  • [eslint-config] Release a recommended, shareable eslint configuration based on the SAP Cloud SDK's internal configuration as @sap-cloud-sdk/eslint-config. Follow the official guide for information how to use the config.

Improvements

  • [logger] The stack is included in the logs if logger.error is called with an error object.
cloud-sdk-js - v1.37.1

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

New Functionality

  • [openApi-generator] Support the generation of transpiled JavaScript OpenAPI clients with the new flags: generateJs and tsConfig.

Fixed Issues

  • [generator] Allow enhanced generation with OpenAPI files for all valid OData specification file endings (including e. g. .xml and .EDMX).
cloud-sdk-js - v1.37.0

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

Improvements

  • [openapi-generator] Improve generation for duplicate operation names and non existing operationIds.

Fixed Issues

  • [openapi-generator] Remove the copyright comments from the generated package.json.
  • [util] Don't fail on undefined template arguments when using codeBlock.
cloud-sdk-js - v1.36.1

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

Fixed Issues

  • [openapi-generator] Fix the error TypeError: Class constructor Command cannot be invoked without 'new' due to the incompatibility of ES5 and oclif.
cloud-sdk-js - v1.36.0

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

Compatibility Notes

  • [openapi-generator] The package.json is generated by default.

New Functionality

  • [openapi-generator] Support package.json generation and the service mapping configuration as CLI options.
  • [util] Expose UniqueNameGenerator class that stores used names and generates a unique name for each given string.
cloud-sdk-js - v1.35.0

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

Compatibility Notes

  • The return type of Entity.getUpdatedProperties was incorrect and was corrected to Record<string, any>.

Fixed Issues

  • Fix serialization of linked entities with custom fields.
  • Fix setting of remote state on entities to replace old state instead of merging with old state. This also fixes how custom fields are handled in the remote state.
  • Fix return type of Entity.getUpdatedProperties to Record<string, any>.
  • Ship templates files that are used in the OpenAPI generator.
cloud-sdk-js - v1.34.0

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

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.
cloud-sdk-js - v1.33.0

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

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.
cloud-sdk-js - v1.32.1

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

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
cloud-sdk-js - v1.32.0

Published by marikaner almost 4 years ago

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.
cloud-sdk-js - v1.31.0

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

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
cloud-sdk-js - v1.30.0

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

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.