@sap-cloud-sdk/core
Version:
SAP Cloud SDK for JavaScript core
50 lines • 2.35 kB
TypeScript
import type { Destination } from './destination-service-types';
import type { DestinationOptions } from './destination-accessor';
/**
* Get all destinations from the environment variable "destinations".
* This is discouraged for productive use! Use [[useOrFetchDestination]] for fetching destinations from the Cloud Foundry destination service.
*
* @returns A list of destinations
*/
export declare function getDestinationsFromEnv(): Destination[];
/**
* @deprecated Since v1.4.2. Use [[getDestinationsFromEnv]] instead.
*
* Get all destinations from the environment variable "destinations".
* This is discouraged for productive use! Use destination-accessor/useOrFetchDestination for fetching destinations
* from the Cloud Foundry destination service.
*
* @returns A list of destinations
*/
export declare function getDestinations(): Destination[];
/**
* Get a destination from the environment variables by name. If there are multiple destinations with the same name the first one will be used.
* This is discouraged for productive use! Use destination-accessor/useOrFetchDestination for fetching destinations
* from the Cloud Foundry destination service.
* @param name - Name of the destination
* @returns The requested destination if existent, otherwise `null`
*/
export declare function getDestinationFromEnvByName(name: string): Destination | null;
/**
* @deprecated Since v1.4.2. Use [[getDestinationFromEnvByName]] instead.
*
* Get a destination from the environment variables by name. Throws an error if there are multiple destinations with the same name.
* This is discouraged for productive use! Use destination-accessor/useOrFetchDestination for fetching destinations
* from the Cloud Foundry destination service.
* @param name - Name of the destination
* @returns The requested destination if existent, otherwise `null`
*/
export declare function getDestinationByName(name: string): Destination | null;
/**
* @hidden
*/
export declare function getDestinationConfig(dest?: string | Destination): Destination | null;
/**
* @hidden
*/
export declare function getDestinationsEnvVariable(): string | undefined;
/**
* @hidden
*/
export declare function searchEnvVariablesForDestination(name: string, options?: DestinationOptions): Destination | undefined;
//# sourceMappingURL=destination-from-env.d.ts.map