UNPKG

@mediarithmics/plugins-nodejs-sdk

Version:

This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate

17 lines (16 loc) 1.16 kB
import { PluginProperty } from '../../api/core/plugin/PluginPropertyInterface'; import { BasePlugin, PropertiesWrapper } from '../common/BasePlugin'; import { ActivityAnalyzer, ActivityAnalyzerPluginResponse, ActivityAnalyzerRequest } from './ActivityAnalyzerInterface'; export interface ActivityAnalyzerBaseInstanceContext { properties: PropertiesWrapper; activityAnalyzer: ActivityAnalyzer; } export declare abstract class ActivityAnalyzerPlugin extends BasePlugin<ActivityAnalyzerBaseInstanceContext> { constructor(enableThrottling?: boolean); fetchActivityAnalyzer(activityAnalyzerId: string): Promise<ActivityAnalyzer>; fetchActivityAnalyzerProperties(activityAnalyzerId: string): Promise<PluginProperty[]>; protected instanceContextBuilder(activityAnalyzerId: string): Promise<ActivityAnalyzerBaseInstanceContext>; protected getInstanceContext(activityAnalyzerId: string): Promise<ActivityAnalyzerBaseInstanceContext>; protected abstract onActivityAnalysis(request: ActivityAnalyzerRequest, instanceContext: ActivityAnalyzerBaseInstanceContext): Promise<ActivityAnalyzerPluginResponse>; private initActivityAnalysis; }