import { NewNotification } from './NewNotification.js'; /** * A notification. * * @example * const notification = new Notification({ id }) * notification.fetch() */ export default class Notification { id?: string | null; title: string; content: string | null; category: string | null; actionUrl?: string | null; customAttributes: Record; readAt: number | null; seenAt: number | null; sentAt: number; deletedAt: number | null; private repo; constructor(attrs?: {}); static create(notificationContent: NewNotification): Promise; get seenAtDate(): import("dayjs").Dayjs; get sentAtDate(): import("dayjs").Dayjs; get readAtDate(): import("dayjs").Dayjs; get isRead(): boolean; set isRead(isRead: boolean); get isSeen(): boolean; set isSeen(isSeen: boolean); get sanitizedContent(): string; /** * Fetch the notification from the API server. */ fetch(): Promise; /** * Delete a notification from the API server. */ delete(): Promise; /** * Mark a notification as read. Sets the `readAt` attribute to the current unix * timestamp. It also marks the notification as seen. */ markAsRead(): Promise; /** * Mark a notification as unread. Sets the `readAt` attribute to null. */ markAsUnread(): Promise; set(json?: {}): void; private transformCustomAttributes; }