/** * Base Alert Model * * Pure data model with no API calls. * Provides type-safe access to common alert properties. */ import type { Alert as AlertSchema, BaseAlert, EmbeddedTag } from "@artu-ai/shared"; import { AlertStatus } from "@artu-ai/shared"; import { BaseModel } from "./base"; /** * Alert data as returned from the API. */ export type AlertData = AlertSchema; /** * Base Alert Model. * * Pure data model with no API calls. * Extended by scope-specific models (MexAlert, etc.). * * @example * ```typescript * const alert = await sdk.alerts.retrieve("alert_123"); * console.log(alert.status); * ``` */ export declare class Alert extends BaseModel { /** * Unique identifier */ get id(): string; /** * Organization ID */ get organizationId(): string; /** * Environment (test or live) */ get environment(): "test" | "live"; /** * Alert lifecycle status */ get status(): AlertStatus; /** * Number of items in the alert */ get itemCount(): number; /** * Whether the alert is in the initial `new` state (just created, untouched by analyst) */ get isNew(): boolean; /** * Whether an analyst has opened / claimed the alert */ get isInReview(): boolean; /** * Whether the alert is in the reporting lane with no validation result yet */ get isReportDraft(): boolean; /** * Whether the alert is currently being validated (transient) */ get isReportValidating(): boolean; /** * Whether the latest generated report passed validation */ get isReportValid(): boolean; /** * Whether the latest generated report failed validation */ get isReportInvalid(): boolean; /** * Whether the alert has been filed (terminal state) */ get isFiled(): boolean; /** * Whether the alert has been resolved without filing (terminal state) */ get isResolved(): boolean; /** * Whether the alert has been dismissed (terminal state) */ get isDismissed(): boolean; /** * Whether the alert is in a terminal state (Filed, Resolved, or Dismissed) */ get isTerminal(): boolean; /** * Whether the alert can be edited. * Editable states: New, InReview, ReportDraft, ReportInvalid, ReportValid. */ get canEdit(): boolean; /** * Whether the alert can be validated/generated. * True for: New, InReview, ReportDraft, ReportInvalid, ReportValid. */ get canGenerate(): boolean; /** * ISO datetime when the alert was filed, or null if not filed */ get filedAt(): string | null; /** * ID of the report that was filed, or null if not filed */ get filedReportId(): string | null; /** * Scope this alert belongs to */ get scope(): string; /** * Tags applied to this alert. */ get tags(): EmbeddedTag[]; /** * Raw scope data object */ get scopeData(): BaseAlert["scopeData"]; /** * External ID for integration with other systems */ get externalId(): string | undefined; /** * Alert name (auto-generated from scope if not provided) */ get name(): string | undefined; /** * Alert description */ get description(): string | undefined; /** * Custom metadata */ get metadata(): Record | undefined; /** * ID of the workflow that created this alert, if any */ get createdByWorkflowId(): string | undefined; /** * When the alert was created */ get createdAt(): Date; /** * When the alert was last updated */ get updatedAt(): Date; toString(): string; } /** * Check if value is any type of Alert model */ export declare function isAlert(value: unknown): value is Alert;