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

24 lines (23 loc) 1.13 kB
/// <reference types="node" /> import { AdRendererBasePlugin, TemplatingEngine, AdRendererTemplateInstanceContext } from "../../../index"; export declare abstract class AdRendererTemplatePlugin extends AdRendererBasePlugin<AdRendererTemplateInstanceContext> { /** * Helper to fetch the content of a template * @param templatePath The raw (e.g. non URL encoded) mics URI to the template file as a string. * @returns A Buffer with the file content in it. This have to be decoded with the proper encoding. */ fetchTemplateContent(templatePath: string): Promise<Buffer>; /** * Helper to fetch the properties of a template */ fetchTemplateProperties(organisationId: string, adLayoutId: string, versionId: string): Promise<any>; /** * The engineBuilder that can be used to compile the template * during the InstanceContext building * * Have to be overriden (see examples) */ protected engineBuilder: TemplatingEngine<any, any, any>; protected instanceContextBuilder(creativeId: string, template?: string): Promise<AdRendererTemplateInstanceContext>; constructor(); }