2022-08-17 08:50:24 -07:00
|
|
|
import { TLP } from './AlertInterface';
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
export enum ObservableStatus {
|
|
|
|
OK = 'Ok',
|
|
|
|
DELETED = 'Deleted',
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
2020-12-02 02:54:10 -08:00
|
|
|
export enum ObservableDataType {
|
|
|
|
'domain' = 'domain',
|
|
|
|
'file' = 'file',
|
|
|
|
'filename' = 'filename',
|
|
|
|
'fqdn' = 'fqdn',
|
|
|
|
'hash' = 'hash',
|
|
|
|
'ip' = 'ip',
|
|
|
|
'mail' = 'mail',
|
|
|
|
'mail_subject' = 'mail_subject',
|
|
|
|
'other' = 'other',
|
|
|
|
'regexp' = 'regexp',
|
|
|
|
'registry' = 'registry',
|
|
|
|
'uri_path' = 'uri_path',
|
|
|
|
'url' = 'url',
|
|
|
|
'user-agent' = 'user-agent',
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
export interface IAttachment {
|
|
|
|
name?: string;
|
|
|
|
size?: number;
|
|
|
|
id?: string;
|
|
|
|
contentType?: string;
|
|
|
|
hashes: string[];
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
2020-12-02 02:54:10 -08:00
|
|
|
export interface IObservable {
|
|
|
|
// Required attributes
|
|
|
|
id?: string;
|
|
|
|
data?: string;
|
|
|
|
attachment?: IAttachment;
|
|
|
|
dataType?: ObservableDataType;
|
|
|
|
message?: string;
|
|
|
|
startDate?: Date;
|
|
|
|
tlp?: TLP;
|
|
|
|
ioc?: boolean;
|
|
|
|
status?: ObservableStatus;
|
|
|
|
// Optional attributes
|
|
|
|
tags: string[];
|
|
|
|
// Backend generated attributes
|
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
|
|
|
}
|