import { CustomTemplateData } from '.'; import { NotificationFormData } from '../forms'; import { BaseUpdatableNotificationOptions } from './BaseUpdatableNotificationOptions'; /** * Default markdown template update. */ export interface UpdatableNotificationTemplateMarkdown extends Omit, 'template'> { template?: 'markdown'; body?: string; form?: NotificationFormData | null; } /** * Simple template that can render a list of name-value pairs. */ export interface UpdatableNotificationTemplateList extends BaseUpdatableNotificationOptions<'list'> { /** * Notification list template data. */ list?: Record; } /** * Update Payload for Custom Template Notification. * This will let you update the template data associated with the existing template * composition of the notification template. */ export interface UpdatableNotificationTemplateCustom extends BaseUpdatableNotificationOptions<'custom'> { /** * Data associated with the custom notification template's presentation fragments. */ templateData?: CustomTemplateData; form?: NotificationFormData | null; } export type UpdatableNotificationOptions = UpdatableNotificationTemplateMarkdown | UpdatableNotificationTemplateList | UpdatableNotificationTemplateCustom;