import { CDNSettings } from '../../browser'; import { JSONObject, JSONValue } from '../../core/events'; import { Plugin, InternalPluginWithAddMiddleware } from '../../core/plugin'; import { DestinationMiddlewareFunction } from '../middleware'; import { Context } from '../../core/context'; import { Analytics, InitOptions } from '../../core/analytics'; import { IntegrationsInitOptions } from '../../browser/settings'; export interface RemotePlugin { /** The name of the remote plugin */ name: string; /** The creation name of the remote plugin */ creationName: string; /** The url of the javascript file to load */ url: string; /** The UMD/global name the plugin uses. Plugins are expected to exist here with the `PluginFactory` method signature */ libraryName: string; /** The settings related to this plugin. */ settings: JSONObject; } export declare class ActionDestination implements InternalPluginWithAddMiddleware { name: string; version: string; /** * The lifecycle name of the wrapped plugin. * This does not need to be 'destination', and can be 'enrichment', etc. */ type: Plugin['type']; alternativeNames: string[]; private loadPromise; middleware: DestinationMiddlewareFunction[]; action: Plugin; constructor(name: string, action: Plugin); addMiddleware(...fn: DestinationMiddlewareFunction[]): void; private transform; private _createMethod; alias: (ctx: Context) => Promise; group: (ctx: Context) => Promise; identify: (ctx: Context) => Promise; page: (ctx: Context) => Promise; screen: (ctx: Context) => Promise; track: (ctx: Context) => Promise; isLoaded(): boolean; ready(): Promise; load(ctx: Context, analytics: Analytics): Promise; unload(ctx: Context, analytics: Analytics): Promise | unknown; } export type PluginFactory = { (settings: JSONValue): Plugin | Plugin[] | Promise; pluginName: string; }; export declare function remoteLoader(settings: CDNSettings, integrations: IntegrationsInitOptions, mergedIntegrations: Record, options?: InitOptions, routingMiddleware?: DestinationMiddlewareFunction, pluginSources?: PluginFactory[]): Promise; //# sourceMappingURL=index.d.ts.map