import type { SubscriberToken } from './get-subscriber-token'; import type { Destination } from './destination-service-types'; import type { DestinationFetchOptions } from './destination-accessor-types'; import type { JwtPair } from '../jwt'; /** * 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. * @param options - Configuration for how to retrieve destinations from the destination service. * @returns A promise returning the requested destination on success. */ export declare function getDestinationFromDestinationService(options: DestinationFetchOptions): Promise; /** * @internal */ export declare class DestinationFromServiceRetriever { readonly subscriberToken: SubscriberToken | undefined; readonly providerServiceToken: JwtPair; static getDestinationFromDestinationService(options: DestinationFetchOptions): Promise; private static throwUserTokenMissing; private static checkDestinationForCustomJwt; private static isUserJwt; private options; private constructor(); private searchDestinationWithSelectionStrategyAndCache; private getExchangeTenant; private getAuthTokenForOAuth2ClientCredentials; private usesSystemUser; private getAuthTokenForOAuth2UserBasedTokenExchanges; private getAuthTokenForOAuth2RefreshToken; /** * @internal * This method calls the 'find destination by name' endpoint of the destination service using a client credentials grant. * For the find by name endpoint, the destination service will take care of OAuth flows and include the token in the destination. * @param destinationResult - Result of the getDestinations call for which the exchange flow is triggered. * @returns Destination containing the auth token. */ private fetchDestinationWithNonUserExchangeFlows; private fetchDestinationWithUserExchangeFlows; private fetchDestinationWithRefreshTokenFlow; private addProxyConfiguration; private updateDestinationCache; private getProviderDestinationService; private getProviderDestinationCache; private getSubscriberDestinationService; private getSubscriberDestinationCache; private isProviderNeeded; private isSubscriberNeeded; private searchProviderAccountForDestination; private searchSubscriberAccountForDestination; private addTrustStoreConfiguration; }