import type { NormalizedSuperJsonDocument, ProfileDocumentNode, SecurityValues } from '@superfaceai/ast'; import type { IConfig, ICrypto, IFileSystem, ILogger, ITimers } from '../../interfaces'; import type { ISandbox } from '../../interfaces/sandbox'; import type { Events, Interceptable } from '../events'; import type { AuthCache, IFetch } from '../interpreter'; import type { ProviderConfiguration } from '../provider'; import type { IBoundProfileProvider } from './bound-profile-provider'; import { BoundProfileProvider } from './bound-profile-provider'; import type { ProfileProviderConfiguration } from './profile-provider-configuration'; export declare function bindProfileProvider(profile: ProfileDocumentNode, profileProviderConfig: ProfileProviderConfiguration, providerConfig: ProviderConfiguration, superJson: NormalizedSuperJsonDocument | undefined, config: IConfig, sandbox: ISandbox, events: Events, timers: ITimers, fileSystem: IFileSystem, crypto: ICrypto, fetchInstance: IFetch & Interceptable & AuthCache, logger?: ILogger): Promise<{ provider: IBoundProfileProvider; expiresAt: number; }>; export declare type BindConfiguration = { security?: SecurityValues[]; }; export declare class ProfileProvider { readonly superJson: NormalizedSuperJsonDocument | undefined; /** profile ast node */ private profile; /** provider configuration instance */ private providerConfig; private profileProviderConfig; private config; private sandbox; private events; private readonly fileSystem; private readonly crypto; private readonly fetchInstance; private readonly logger?; private profileId; private providerJson?; private readonly providersCachePath; private readonly log; constructor(superJson: NormalizedSuperJsonDocument | undefined, /** profile ast node */ profile: ProfileDocumentNode, /** provider configuration instance */ providerConfig: ProviderConfiguration, profileProviderConfig: ProfileProviderConfiguration, config: IConfig, sandbox: ISandbox, events: Events, fileSystem: IFileSystem, crypto: ICrypto, fetchInstance: IFetch & Interceptable & AuthCache, logger?: ILogger | undefined); /** * Binds the provider. * * This fetches the unspecified data (provider information and map ast) from registry. */ bind(configuration?: BindConfiguration): Promise; private cacheProviderInfo; private writeProviderCache; /** * Resolves auth variables by applying the provided overlay over the base variables. * * The base variables come from super.json */ private resolveSecurityValues; }