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

20 lines (19 loc) 1.28 kB
import { Creative } from '../../../api/core/creative'; import { PluginProperty } from '../../../api/core/plugin/PluginPropertyInterface'; import { EmailRendererPluginResponse } from '../../../api/plugin/emailtemplaterenderer/EmailRendererPluginResponse'; import { EmailRenderRequest } from '../../../api/plugin/emailtemplaterenderer/EmailRendererRequestInterface'; import { BasePlugin, PropertiesWrapper } from '../../common'; export interface EmailRendererBaseInstanceContext { creative: Creative; properties: PropertiesWrapper; } export declare abstract class EmailRendererPlugin<T extends EmailRendererBaseInstanceContext = EmailRendererBaseInstanceContext> extends BasePlugin<T> { instanceContext: Promise<T>; constructor(enableThrottling?: boolean); fetchCreative(id: string, forceReload?: boolean): Promise<Creative>; fetchCreativeProperties(id: string, forceReload?: boolean): Promise<PluginProperty[]>; protected instanceContextBuilder(creativeId: string, forceReload?: boolean): Promise<T>; protected getInstanceContext(creativeId: string, forceReload?: boolean): Promise<T>; protected abstract onEmailContents(request: EmailRenderRequest, instanceContext: T): Promise<EmailRendererPluginResponse>; private initEmailContents; }