message-template.interface.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import { ChannelCTATypeEnum, EnvironmentId, IEmailBlock, ITemplateVariable, OrganizationId, StepTypeEnum, TemplateVariableTypeEnum } from '../../types';
  2. import { IActor } from '../messages';
  3. export type MessageTemplateContentType = 'editor' | 'customHtml';
  4. export interface IMessageTemplate {
  5. id?: string;
  6. _id?: string;
  7. _environmentId?: EnvironmentId;
  8. _organizationId?: OrganizationId;
  9. _creatorId?: string;
  10. _feedId?: string;
  11. _layoutId?: string | null;
  12. _parentId?: string;
  13. subject?: string;
  14. name?: string;
  15. title?: string;
  16. type: StepTypeEnum;
  17. contentType?: MessageTemplateContentType;
  18. content: string | IEmailBlock[];
  19. variables?: ITemplateVariable[];
  20. cta?: {
  21. type: ChannelCTATypeEnum;
  22. data: {
  23. url?: string;
  24. };
  25. action?: any;
  26. };
  27. active?: boolean;
  28. preheader?: string;
  29. senderName?: string;
  30. actor?: IActor;
  31. createdAt?: string;
  32. updatedAt?: string;
  33. }
  34. export declare const TemplateSystemVariables: string[];
  35. export declare const SystemVariablesWithTypes: {
  36. subscriber: {
  37. firstName: string;
  38. lastName: string;
  39. email: string;
  40. phone: string;
  41. avatar: string;
  42. locale: string;
  43. subscriberId: string;
  44. };
  45. actor: {
  46. firstName: string;
  47. lastName: string;
  48. email: string;
  49. phone: string;
  50. avatar: string;
  51. locale: string;
  52. subscriberId: string;
  53. };
  54. step: {
  55. digest: string;
  56. events: string;
  57. total_count: string;
  58. };
  59. branding: {
  60. logo: string;
  61. color: string;
  62. };
  63. tenant: {
  64. name: string;
  65. data: string;
  66. };
  67. };
  68. export declare const TriggerReservedVariables: string[];
  69. export declare const ReservedVariablesMap: {
  70. tenant: {
  71. name: string;
  72. type: TemplateVariableTypeEnum;
  73. }[];
  74. actor: {
  75. name: string;
  76. type: TemplateVariableTypeEnum;
  77. }[];
  78. };
  79. //# sourceMappingURL=message-template.interface.d.ts.map