@sap-cloud-sdk/core
Version:
SAP Cloud SDK for JavaScript core
38 lines • 2.3 kB
TypeScript
import { ResilienceOptions } from '../resilience-options';
import { CachingOptions } from '../cache';
import { Destination } from './destination-service-types';
/**
* Fetches all instance destinations from the given URI.
* @param destinationServiceUri - The URI of the destination service
* @param jwt - The access token
* @param options - Options to use by retrieving destinations
* @returns A promise resolving to a list of instance destinations
*/
export declare function fetchInstanceDestinations(destinationServiceUri: string, jwt: string, options?: ResilienceOptions & CachingOptions): Promise<Destination[]>;
/**
* Fetches all subaccount destinations from the given URI.
* @param destinationServiceUri - The URI of the destination service
* @param jwt - The access token
* @param options - Options to use by retrieving destinations
* @returns A promise resolving to a list of subaccount destinations
*/
export declare function fetchSubaccountDestinations(destinationServiceUri: string, jwt: string, options?: ResilienceOptions & CachingOptions): Promise<Destination[]>;
export interface AuthAndExchangeTokens {
authHeaderJwt: string;
exchangeHeaderJwt?: string;
exchangeTenant?: string;
}
/**
* 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.
* In this pass the access token as string.
* Fetches a specific destination with authenticationType OAuth2UserTokenExchange by name from the given URI, including authorization tokens.
* @param destinationServiceUri - The URI of the destination service
* @param token - The access token or AuthAndExchangeTokens if you want to include the X-user-token for OAuth2UserTokenExchange.
* @param destinationName - The name of the desired destination
* @param options - Options to use by retrieving destinations
* @returns A Promise resolving to the destination
* @internal
*/
export declare function fetchDestination(destinationServiceUri: string, token: string | AuthAndExchangeTokens, destinationName: string, options?: ResilienceOptions & CachingOptions): Promise<Destination>;
//# sourceMappingURL=destination-service.d.ts.map