/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ConsumerChannel } from './ConsumerChannel'; import type { CoursesProgressFrequencyEnum } from './CoursesProgressFrequencyEnum'; import type { CoursesProgressLearnerScopeEnum } from './CoursesProgressLearnerScopeEnum'; import type { GradePostedNotifyModeEnum } from './GradePostedNotifyModeEnum'; import type { HumanSupportRecipientModeEnum } from './HumanSupportRecipientModeEnum'; import type { NullEnum } from './NullEnum'; import type { RecipientsRecipientModeEnum } from './RecipientsRecipientModeEnum'; import type { Spa } from './Spa'; import type { TypeF30Enum } from './TypeF30Enum'; /** * Serializer for detailed template view and editing */ export type NotificationTemplateDetail = { /** * Unique identifier for this notification template. */ readonly id: string; /** * Select the type of notification from the available options. * * * `ACTIVITY_COURSE_MILESTONE` - Activity Course Milestone * * `ACTIVITY_NEW_CONTENT` - Activity New Content * * `ADMIN_NOTIF_COURSE_ENROLLMENT` - Admin Notif Course Enrollment * * `APP_REGISTRATION` - App Registration * * `COURSE_INVITATION` - Course Invitation * * `COURSE_LICENSE_ASSIGNMENT` - Course License Assignment * * `COURSE_LICENSE_GROUP_ASSIGNMENT` - Course License Group Assignment * * `COURSE_SCHEDULE_CHANGE` - Course Schedule Change * * `CRM_DEAL_STAGE_CHANGED` - Crm Deal Stage Changed * * `CRM_PERSON_CREATED` - Crm Person Created * * `CRM_PERSON_LINKED_TO_USER` - Crm Person Linked To User * * `CUSTOM_NOTIFICATION` - Custom Notification * * `DEFAULT_TEMPLATE` - Default Template * * `HUMAN_SUPPORT_NOTIFICATION` - Human Support Notification * * `HUMAN_SUPPORT_TICKET_MESSAGE` - Human Support Ticket Message * * `PATHWAY_ENROLLMENT_CONFIRMATION` - Pathway Enrollment Confirmation * * `PLATFORM_APPLICATION_DECISION` - Platform Application Decision * * `PLATFORM_INVITATION` - Platform Invitation * * `POLICY_ASSIGNMENT` - Policy Assignment * * `PROACTIVE_LEARNER_NOTIFICATION` - Proactive Learner Notification * * `PROGRAM_ENROLLMENT_CONFIRMATION` - Program Enrollment Confirmation * * `PROGRAM_INVITATION` - Program Invitation * * `PROGRAM_LICENSE_ASSIGNMENT` - Program License Assignment * * `PROGRAM_LICENSE_GROUP_ASSIGNMENT` - Program License Group Assignment * * `REPORT_COMPLETED` - Report Completed * * `ROLE_CHANGE` - Role Change * * `SKILL_MASTERY_CHANGE` - Skill Mastery Change * * `SPEND_CAP_ALERT` - Spend Cap Alert * * `SUBSECTION_GRADE_UPDATE` - Subsection Grade Update * * `USER_LICENSE_ASSIGNMENT` - User License Assignment * * `USER_LICENSE_GROUP_ASSIGNMENT` - User License Group Assignment * * `USER_NOTIF_COURSE_COMPLETION` - User Notif Course Completion * * `USER_NOTIF_COURSE_ENROLLMENT` - User Notif Course Enrollment * * `USER_NOTIF_CREDENTIALS` - User Notif Credentials * * `USER_NOTIF_LEARNER_PROGRESS` - User Notif Learner Progress * * `USER_NOTIF_USER_INACTIVITY` - User Notif User Inactivity * * `USER_NOTIF_USER_REGISTRATION` - User Notif User Registration * * `COURSES_PROGRESS_SUMMARY` - User Progress Summary */ readonly type: (TypeF30Enum | NullEnum) | null; /** * Template display name */ name?: string | null; /** * Description of when this notification is sent */ description?: string; /** * Title for push/in-app notifications */ message_title?: string | null; /** * Body text (supports Django template syntax) */ message_body?: string; /** * Short version for SMS or preview */ short_message_body?: string; /** * Email subject line (supports {{ variables }}) */ email_subject?: string | null; /** * Sender email address */ email_from_address?: string | null; /** * HTML email body (supports Django template syntax) */ email_html_template?: string | null; /** * Watcher-variant email HTML template (e.g., 'Your child completed...'). Falls back to email_html_template if null. */ watcher_email_html_template?: string | null; /** * Watcher-variant email subject. Falls back to email_subject if null. */ watcher_email_subject?: string | null; /** * Free-form tags for categorization (e.g. ['activity', 'learning']) */ tags?: any; readonly spas_detail: Array; readonly allowed_channels_detail: Array; /** * IDs of SPAs that can use this template */ spa_ids?: Array; /** * IDs of delivery channels (email, push, etc.) */ channel_ids?: Array; /** * True if using main platform template (no platform override) */ readonly is_inherited: boolean; /** * True if notification is enabled for this platform */ readonly is_enabled: boolean; /** * Platform key of the template source */ readonly source_platform: string; /** * True if platform admin can edit template content */ readonly can_customize: boolean; /** * JSON config (periodic_config, policy_config, etc.) */ metadata?: any; /** * Context variables available for template rendering */ readonly available_context: string; /** * Context variables available in the watcher email variant (null for notification types without a watcher variant) */ readonly watcher_available_context: string; /** * Default prompt message for AI agent notifications */ proactive_prompt_message?: string | null; /** * Periodic report configuration (PROACTIVE_LEARNER_NOTIFICATION only) */ readonly periodic_config: string; /** * Which learners to include: ACTIVE_LEARNERS or ALL_LEARNERS * * * `ACTIVE_LEARNERS` - ACTIVE_LEARNERS * * `ALL_LEARNERS` - ALL_LEARNERS */ periodic_learner_scope?: CoursesProgressLearnerScopeEnum; /** * Number of days to include in the report period */ periodic_lookback_days?: number; /** * Deprecated: use periodic_lookback_days instead */ periodic_report_period_days?: number; /** * How often to send: DAILY, WEEKLY, MONTHLY, or CUSTOM * * * `DAILY` - DAILY * * `WEEKLY` - WEEKLY * * `MONTHLY` - MONTHLY * * `CUSTOM` - CUSTOM */ periodic_frequency?: CoursesProgressFrequencyEnum; /** * Custom interval in days (when frequency is CUSTOM) */ periodic_custom_interval_days?: number; /** * Time to run in HH:MM format (24-hour) */ periodic_execution_time?: string; /** * Timezone for execution time (e.g. America/New_York) */ periodic_timezone?: string; /** * List of agent configurations: [{"unique_id": "uuid", "prompt": "...", "name": "..."}] */ periodic_mentors?: Array>; /** * Policy assignment notification config (POLICY_ASSIGNMENT only) */ readonly policy_config: string; /** * Per-role config: [{"role_name": "Analytics Viewer", "enabled": True, "subject": "Custom subject for {{role_name}}"}, ...] */ policy_enabled_policies?: Array>; /** * Send notification when policy is assigned */ policy_notify_on_assignment?: boolean; /** * Send notification when policy is removed */ policy_notify_on_removal?: boolean; /** * Human support notification config (HUMAN_SUPPORT_NOTIFICATION only) */ readonly human_support_config: string; /** * Who receives human support ticket notifications * * * `platform_admins_and_mentor_owner` - platform_admins_and_mentor_owner * * `platform_admins_only` - platform_admins_only * * `mentor_owner_only` - mentor_owner_only * * `custom` - custom */ human_support_recipient_mode?: HumanSupportRecipientModeEnum; /** * Custom targets: user: {type, id}; user_group: {type, id}; rbac_policy: {type, policy_name} */ human_support_custom_recipients?: Array>; /** * Recipients config (recipient mode + optional custom targets) for notification types that opt into the generic recipients model (e.g. CRM_*). Null for types that do not. */ readonly recipients_config: string; /** * Who receives this notification: 'platform_admins_only', 'object_owner_only' (falls back to admins), 'object_owner_only_strict' (no fallback), 'platform_admins_and_object_owner' (default), or 'custom'. * * * `platform_admins_only` - platform_admins_only * * `object_owner_only` - object_owner_only * * `object_owner_only_strict` - object_owner_only_strict * * `platform_admins_and_object_owner` - platform_admins_and_object_owner * * `custom` - custom */ recipients_recipient_mode?: RecipientsRecipientModeEnum; /** * Custom recipient targets (used when recipient_mode='custom'): user: {type, id}; user_group: {type, id}; rbac_policy: {type, policy_name}. */ recipients_custom_recipients?: Array>; /** * New content notification config (ACTIVITY_NEW_CONTENT only) */ readonly new_content_config: string; /** * Block types to notify on (e.g. ["sequential", "vertical", "chapter"]) */ new_content_block_types?: Array; /** * Course milestone notification config (ACTIVITY_COURSE_MILESTONE only) */ readonly course_milestone_config: string; /** * Completion percentage thresholds (e.g. [25, 50, 75, 100]) */ course_milestone_milestones?: Array; /** * Skill mastery notification config (SKILL_MASTERY_CHANGE only) */ readonly skill_mastery_config: string; /** * Mastery band thresholds (e.g. [{"name": "Beginner", "min_points": 0}, {"name": "Intermediate", "min_points": 100}]) */ skill_mastery_thresholds?: Array>; /** * Schedule change notification config (COURSE_SCHEDULE_CHANGE only) */ readonly schedule_change_config: string; /** * Signal types to trigger notifications: ["course_overview.start_date_changed", "course_overview.pacing_changed", "course_overview.cert_date_changed"] */ schedule_change_enabled_signals?: Array; /** * User progress summary config (COURSES_PROGRESS_SUMMARY only). Includes available_data_points and available_learner_scopes — the permitted values for enabled_data_points and learner_scope. */ readonly user_progress_config: Record | null; /** * Who receives the report. ALL_LEARNERS (default) sends to every learner with an active enrollment, including those with no activity in the period; ACTIVE_LEARNERS sends only to learners whose progress moved during the period. * * * `ACTIVE_LEARNERS` - ACTIVE_LEARNERS * * `ALL_LEARNERS` - ALL_LEARNERS */ user_progress_learner_scope?: CoursesProgressLearnerScopeEnum; /** * Lookback window in days for the user progress summary */ user_progress_lookback_days?: number; /** * Data points to include: course_breakdown (per-course rows with topics and grade), course_grades (current grade per active enrollment), courses_progressed, courses_completed, credentials_earned, time_spent, active_days, mentors_accessed (AI agent activity), learning_insights (AI narrative summary of the period as {summary, watcher_summary}, written from the report's figures and the learner's agent conversations; one LLM call per learner with either) */ user_progress_enabled_data_points?: Array; /** * How often to send the user progress summary * * * `DAILY` - DAILY * * `WEEKLY` - WEEKLY * * `MONTHLY` - MONTHLY * * `CUSTOM` - CUSTOM */ user_progress_frequency?: CoursesProgressFrequencyEnum; /** * Custom interval in days (when frequency is CUSTOM) */ user_progress_custom_interval_days?: number; /** * Time of day to send (HH:MM format) */ user_progress_execution_time?: string; /** * Timezone for execution (e.g. America/New_York) */ user_progress_timezone?: string; /** * Deprecated alias of user_progress_config (COURSES_PROGRESS_SUMMARY only) */ readonly courses_progress_config: Record | null; /** * Deprecated alias of user_progress_learner_scope * * * `ACTIVE_LEARNERS` - ACTIVE_LEARNERS * * `ALL_LEARNERS` - ALL_LEARNERS */ courses_progress_learner_scope?: CoursesProgressLearnerScopeEnum; /** * Deprecated alias of user_progress_lookback_days */ courses_progress_lookback_days?: number; /** * Deprecated alias of user_progress_enabled_data_points */ courses_progress_enabled_data_points?: Array; /** * Deprecated alias of user_progress_frequency * * * `DAILY` - DAILY * * `WEEKLY` - WEEKLY * * `MONTHLY` - MONTHLY * * `CUSTOM` - CUSTOM */ courses_progress_frequency?: CoursesProgressFrequencyEnum; /** * Deprecated alias of user_progress_custom_interval_days */ courses_progress_custom_interval_days?: number; /** * Deprecated alias of user_progress_execution_time */ courses_progress_execution_time?: string; /** * Deprecated alias of user_progress_timezone */ courses_progress_timezone?: string; /** * Grade posted notification config (SUBSECTION_GRADE_UPDATE only) */ readonly grade_posted_config: Record | null; /** * Notification mode: 'every' (with debounce) or 'first_only' (once per subsection) * * * `every` - every * * `first_only` - first_only */ grade_posted_notify_mode?: GradePostedNotifyModeEnum; /** * Debounce window in seconds for 'every' mode (default 300) */ grade_posted_debounce_seconds?: number; /** * Timestamp when this template was created */ readonly created_at: string; /** * Timestamp when this template was last updated */ readonly updated_at: string; };