2023-01-27 03:22:44 -08:00
|
|
|
import type { IDataObject } from 'n8n-workflow';
|
|
|
|
import type { TLP } from './AlertInterface';
|
2020-12-02 02:54:10 -08:00
|
|
|
export interface ICase {
|
|
|
|
// Required attributes
|
|
|
|
id?: string;
|
|
|
|
title?: string;
|
|
|
|
description?: string;
|
|
|
|
severity?: number;
|
|
|
|
startDate?: Date;
|
|
|
|
owner?: string;
|
|
|
|
flag?: boolean;
|
|
|
|
tlp?: TLP;
|
|
|
|
tags?: string[];
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
// Optional attributes
|
|
|
|
resolutionStatus?: CaseResolutionStatus;
|
|
|
|
impactStatus?: CaseImpactStatus;
|
|
|
|
summary?: string;
|
|
|
|
endDate?: Date;
|
|
|
|
metrics?: IDataObject;
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
// Backend generated attributes
|
|
|
|
status?: CaseStatus;
|
|
|
|
caseId?: number; // auto-generated attribute
|
|
|
|
mergeInto?: string;
|
|
|
|
mergeFrom?: string[];
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
createdBy?: string;
|
|
|
|
createdAt?: Date;
|
|
|
|
updatedBy?: string;
|
|
|
|
upadtedAt?: Date;
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
|
|
|
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum CaseStatus {
|
2020-12-02 02:54:10 -08:00
|
|
|
OPEN = 'Open',
|
|
|
|
RESOLVED = 'Resolved',
|
|
|
|
DELETED = 'Deleted',
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
|
|
|
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum CaseResolutionStatus {
|
2020-12-02 02:54:10 -08:00
|
|
|
INDETERMINATE = 'Indeterminate',
|
|
|
|
FALSEPOSITIVE = 'FalsePositive',
|
|
|
|
TRUEPOSITIVE = 'TruePositive',
|
|
|
|
OTHER = 'Other',
|
|
|
|
DUPLICATED = 'Duplicated',
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
|
|
|
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum CaseImpactStatus {
|
2020-12-02 02:54:10 -08:00
|
|
|
NOIMPACT = 'NoImpact',
|
|
|
|
WITHIMPACT = 'WithImpact',
|
|
|
|
NOTAPPLICABLE = 'NotApplicable',
|
|
|
|
}
|