@dodgeball/trust-sdk-client
Version:
Dodgeball Client SDK
19 lines (18 loc) • 826 B
TypeScript
import { IDodgeballParentContext, ILibConfig, IntegrationPurpose } from "./types";
import Integration from "./Integration";
export interface IIntegrationLoaderProps {
requireSrc?: string;
parentContext: IDodgeballParentContext;
}
export default class IntegrationLoader {
parentContext: IDodgeballParentContext;
isRequireLoaded: boolean;
onRequireLoaded: any[];
loadedIntegrations: {
[key: string]: Integration;
};
constructor({ requireSrc, parentContext }: IIntegrationLoaderProps);
loadIntegrations(libs: ILibConfig[], requestId: string): Promise<Integration[]>;
loadIntegration(libConfig: ILibConfig, requestId: string): Promise<Integration | null>;
filterIntegrationsByPurpose(integrations: Integration[], purpose: IntegrationPurpose): Integration[];
}