import type { Contact } from '../contacts/types' import type { Schedule } from '../schedule/types' import type { User } from '../users/types' export type NotificationType = | 'schedule' | 'distribution' | 'info' | 'warn' | 'error' | 'announcement' | 'copilot' | 'undefined' | 'waba-health-warning' | 'waba-health-block' /** Present on pipeline-related notifications. */ export type NotificationConfig = { pipelineId: string pipelineAutomationId: string } export type Notification = { id: string text: string type: NotificationType | null read: boolean image: string | null label: string | null config: NotificationConfig | null attachedType: string | null contactId: string | null userId: string accountId: string scheduleId: string | null createdAt: string updatedAt: string deletedAt: string | null // relationships user?: User schedule?: Schedule | null contact?: Contact | null } export type NotificationRelationships = 'user' | 'schedule' | 'contact' export type CreateNotificationPayload = { text: string userId: string type?: NotificationType label?: string config?: NotificationConfig attachedType?: string contactId?: string scheduleId?: string } export type UpdateNotificationPayload = { text?: string read?: boolean label?: string | null }