import { type Destination } from '@sap-ux/btp-utils'; import type { AxiosRequestConfig } from 'axios'; import { type HttpsProxyAgentOptions, HttpsProxyAgent } from 'https-proxy-agent'; import { AbapServiceProvider } from './abap'; import type { RefreshTokenChanged, ServiceInfo } from './auth'; import type { ODataService } from './base/odata-service'; import type { ProviderConfiguration } from './base/service-provider'; import { ServiceProvider } from './base/service-provider'; /** * PatchedHttpsProxyAgent is a custom implementation of HttpsProxyAgent that allows to pass additional options, currently not supported by the original implementation when calling tls.connect */ export declare class PatchedHttpsProxyAgent extends HttpsProxyAgent { private readonly extraOptions; /** * Extension of the base constructor. * * @param proxy * @param opts */ constructor(proxy: Uri | URL, opts?: HttpsProxyAgentOptions); /** * Performs transparent encryption of written data and all required TLS negotiation. * * @param req * @param opts * @returns {Promise} */ connect(req: any, opts: any): Promise; } /** * Create an instance of a basic service provider. * * @param config axios config with additional extension specific properties * @returns instance of the basic service provider */ export declare function create(config: string | (AxiosRequestConfig & Partial)): ServiceProvider; /** * Create an instance of an ABAP service provider. * * @param config axios config with additional extension specific properties * @returns instance of an ABAP service provider */ export declare function createForAbap(config: AxiosRequestConfig & Partial): AbapServiceProvider; /** Supported ABAP environments on the cloud */ export declare enum AbapCloudEnvironment { Standalone = "Standalone", EmbeddedSteampunk = "EmbeddedSteampunk" } /** Cloud Foundry OAuth 2.0 options */ export interface CFAOauthOptions { service: ServiceInfo; refreshToken?: string; refreshTokenChangedCb?: RefreshTokenChanged; } export interface ReentranceTicketOptions { /** Backend API hostname */ url: string; } /** Options for an ABAP Standalone Cloud system (ABAP on BTP) */ export interface AbapCloudStandaloneOptions extends CFAOauthOptions { environment: AbapCloudEnvironment.Standalone; } /** Options for an ABAP Embedded Steampunk system */ export interface AbapEmbeddedSteampunkOptions extends ReentranceTicketOptions { environment: AbapCloudEnvironment.EmbeddedSteampunk; } /** Discriminated union of supported environments - {@link AbapCloudStandaloneOptions} and {@link AbapEmbeddedSteampunkOptions} */ export type AbapCloudOptions = AbapCloudStandaloneOptions | AbapEmbeddedSteampunkOptions; /** * Create an instance of an ABAP service provider for a Cloud ABAP system. * * @param options {@link AbapCloudOptions} * @returns instance of an {@link AbapServiceProvider} */ export declare function createForAbapOnCloud(options: AbapCloudOptions & Partial): AbapServiceProvider; /** * To create a destination provider only the destination name is absolutely required. */ export type MinimalDestinationConfig = Pick & Partial; /** * Create an instance of a service provider for the given destination. * * @param options axios config with additional extension specific properties * @param destination destination config * @param destinationServiceInstance optional id of a destination service instance providing the destination * @returns instance of a service provider */ export declare function createForDestination(options: AxiosRequestConfig & Partial, destination: MinimalDestinationConfig, destinationServiceInstance?: string): ServiceProvider; /** * Create an instance of a basic service provider and then generate an extension for a service based on the given url. * * @param url full url pointing to a service * @param config axios config with additional extension specific properties * @returns instance of a service */ export declare function createServiceForUrl(url: string, config?: AxiosRequestConfig & Partial): ODataService; //# sourceMappingURL=factory.d.ts.map