template-for-typescript-projects
    Preparing search index...
    • Reconstructs a domain Alert from a persistence document.

      Parameters

      • doc: {
            _id: string;
            createdAt: NativeDate;
            details?:
                | {
                    detectedValue: number;
                    limitValue: number;
                    periodType?: string
                    | null;
                    thresholdId: string;
                    thresholdName: string;
                    thresholdType: string;
                    utilityType: string;
                }
                | null;
            failReason?: string
            | null;
            readAt?: NativeDate | null;
            sentAt?: NativeDate | null;
            status: AlertStatus;
        }

        The persisted alert document.

      Returns Alert

      The restored Alert instance.

      When required details are missing from the document.