import { TemplateVariableTypeEnum, } from '../../types'; import { TriggerContextTypeEnum } from '../notification-template'; export const TemplateSystemVariables = ['subscriber', 'step', 'branding', 'tenant', 'preheader', 'actor']; export const SystemVariablesWithTypes = { subscriber: { firstName: 'string', lastName: 'string', email: 'string', phone: 'string', avatar: 'string', locale: 'string', subscriberId: 'string', }, actor: { firstName: 'string', lastName: 'string', email: 'string', phone: 'string', avatar: 'string', locale: 'string', subscriberId: 'string', }, step: { digest: 'boolean', events: 'array', total_count: 'number', }, branding: { logo: 'string', color: 'string', }, tenant: { name: 'string', data: 'object', }, }; export const TriggerReservedVariables = ['tenant', 'actor']; export const ReservedVariablesMap = { [TriggerContextTypeEnum.TENANT]: [{ name: 'identifier', type: TemplateVariableTypeEnum.STRING }], [TriggerContextTypeEnum.ACTOR]: [{ name: 'subscriberId', type: TemplateVariableTypeEnum.STRING }], };