Union type to represent all possible types of a field.
A union of all types that can be used for filtering.
Internal representation of all parameters of a function import as a map
A union of all types that can be used for ordering.
A union of all types that can be used as input for ordering.
Represents all selectables, i.e. everything that can be used in a .select
statement.
Given a destination and a JWT (required for subscriber destinations), this function will add a proxy configuration to a destination. See also ProxyConfiguration.
This function will reject if no connectivity service is bound, no XSUAA service with plan application is bound or the client credentials grant with the XSUAA service fails.
The destination to which the proxy configuration should be added.
The JWT of the current user.
A promise resolving to the destiation with the added proxy configuration.
Create a FilterList by combining Filterables with logical and
.
Example:
Entity.requestBuilder()
.getAll()
.filter(and(filterExp1, filterExp2));
Note that the GetAllRequestBuilder.filter method takes a rest parameter and thereby an array of filter expressions that are then combined conjunctively. As a consequence following is equivalent to the example above:
Entity.requestBuilder()
.getAll()
.filter(filterExp1, filterExp2);
Type of the entity to be filtered on
Filterables to be combined with logical and
The newly created FilterList
Create new Order by orderBy.fieldName
in ascending order.
Type of the entity to be ordered
Field or link to be ordered by
New order
Create object containing all headers, including custom headers for a given OData request configuration and destination. Custom headers override duplicate headers.
OData request configuration to create headers for
Key-value pairs where the key is the name of a header property and the value is the respective value
Executes a client credentials grant request against the given URI.
The URI of the XSUAA service
An instance of
A promise resolving to the response
Create new Order by orderBy.fieldName
in descending order.
Type of the entity to be ordered
Field or link to be ordered by
New order
Fetches a specific destination by name from the given URI, including authorization tokens. For destinations with authenticationType OAuth2SAMLBearerAssertion, this call will trigger the OAuth2SAMLBearerFlow against the target destination.
The URI of the destination service
The access token
The name of the desired destination
A Promise resolving to the destination
Fetches all instance destinations from the given URI.
The URI of the destination service
The access token
A promise resolving to a list of instance destinations
Fetches all subaccount destinations from the given URI.
The URI of the destination service
The access token
A promise resolving to a list of subaccount destinations
Retrieves a destination with the given name from the Cloud Foundry destination service. Returns null if no destination can be found. Requires the following service bindings: destination, XSUAA By default, selects subscriber over provider and instance over subaccount destinations.
If the destinations are read from the environment, the jwt will be ignored.
The name of the destination to be retrieved.
The options of the fetching query of the destination that include the JWT of the current request and the strategy for selecting a destination.
A promise returning the requested destination on success.
Get a destination from the environment variables by name. Throws an error if there are multiple destinations with the same name.
Name of the destination
The requested destination if existent, otherwise null
The name of the destination to be retrieved.
The options of the fetching query of the destination that include the JWT of the current request and the strategy for selecting a destination.
A promise returning the requested destination on success.
Get all destination from the environment variable.
A list of destinations
Get an object containing the given filter as query parameter, or an empty object if none was given.
Type of the entity to filter on
The filter to transform to a query parameter
Constructor type of the entity to filter on
} An object containing the query parameter or an empty object
Get an object containing the given order bys as query parameter, or an empty object if none was given.
Type of the entity to order
A list of orderables to get the query parameters for
} An object containing the query parameter or an empty object
Get an object containing the given Selectables as query parameter, or an empty object if none were given.
This retrieves where in addition to the selection (select
) there is also an expansion (expand
) needed.
Type of the entity to get the selection for
The list of selectables to be transformed to query parameters
An object containing the query parameters or an empty object
Get the resource path of an entity specified by key-value pairs.
Type of the entity to get the resource path for
Key-value pairs where the key is the name of a key property of the given entity and the value is the respective value
Constructor type of the entity to get the resource path for
The path to the resource
Create a FilterList by combining Filterables with logical or
.
Example:
Entity.requestBuilder()
.getAll()
.filter(or(filterExp1, filterExp2));
Type of the entity to be filtered on
Filterables to be combined with logical or
The newly created FilterList
Takes a JSON object returned by any of the calls to the destination service and returns an SDK compatible destination object.
A JSON object returned by the destination service.
An SDK compatible destination object.
Executes a refresh token grant request against the given URI.
The URI of the target XSUAA service instance.
The credentials (client_id, client_secret) if the target XSUAA service instance.
The refresh token that should be used to generate a new access token.
A promise resolving to the response of the XSUAA service.
Takes an existing or a parsed destination and returns an SDK compatible destination object.
A JSON object returned by the destination service.
An SDK compatible destination object.
Converts a string to the format used by properties. Use this for serialization in the VDM.
The string to be transformed.
The transformed string.
Converts a string to the case used by static helpers in the VDM. Use this for serialization in the VDM.
The string to be transformed.
The input string in the case used by static helpers in the VDM.
Converts a string to a human readable format, e.g. it transforms to_BusinessPartner
to To Business Partner
. Use this for serialization in the VDM.
The string to be transformed.
The transformed string.
Converts a string to the format used by properties. Use this for serialization in the VDM.
The string to be transformed.
The transformed string.
Returns the parameter if it is a destination, fetches one with the given name otherwise.
This requires:
If either of the prerequisites is not met or one of the services returns an error, this function will either throw an error or return a promise that rejects.
A destination or the necessary parameters to fetch one.
A promise resolving to the requested destination on success.
Executes a user token grant request against the given URI.
The URI of the target XSUAA service instance.
The JWT of the user on whose behalf the request is executed.
The client_id of the target XSUAA service instance.
A promise resolving to the response of the XSUAA service.
cloud-sdk-core
This is the core of the SAP Cloud SDK for JavaScript. It contains the core functionality for the Virtual Data Model (VDM) as well as the Cloud Platform abstractions.