brows3r — TypeScript API
    Preparing search index...

    Interface NotificationsState

    interface NotificationsState {
        entries: {
            category: "userInitiated" | "background";
            details: unknown;
            id: string;
            message: string;
            operation: string | null;
            resource: string | null;
            severity: "info" | "warning" | "error" | "success";
            timestamp: number;
            title: string;
        }[];
        add(
            n: {
                category: "userInitiated" | "background";
                details: unknown;
                id: string;
                message: string;
                operation: string | null;
                resource: string | null;
                severity: "info" | "warning" | "error" | "success";
                timestamp: number;
                title: string;
            },
        ): void;
        bySeverity(
            sev: "info" | "warning" | "error" | "success",
        ): {
            category: "userInitiated" | "background";
            details: unknown;
            id: string;
            message: string;
            operation: string | null;
            resource: string | null;
            severity: "info" | "warning" | "error" | "success";
            timestamp: number;
            title: string;
        }[];
        clearAll(): void;
        dismiss(id: string): void;
        unreadCount(): number;
    }
    Index

    Properties

    entries: {
        category: "userInitiated" | "background";
        details: unknown;
        id: string;
        message: string;
        operation: string | null;
        resource: string | null;
        severity: "info" | "warning" | "error" | "success";
        timestamp: number;
        title: string;
    }[]

    Methods

    • Append a new notification.

      Parameters

      • n: {
            category: "userInitiated" | "background";
            details: unknown;
            id: string;
            message: string;
            operation: string | null;
            resource: string | null;
            severity: "info" | "warning" | "error" | "success";
            timestamp: number;
            title: string;
        }

      Returns void

    • Filter entries by severity.

      Parameters

      • sev: "info" | "warning" | "error" | "success"

      Returns {
          category: "userInitiated" | "background";
          details: unknown;
          id: string;
          message: string;
          operation: string | null;
          resource: string | null;
          severity: "info" | "warning" | "error" | "success";
          timestamp: number;
          title: string;
      }[]

    • Count of all entries (used as "unread count" since we have no read flag).

      Returns number