2023-01-27 03:22:44 -08:00
|
|
|
import type { TLP } from './AlertInterface';
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum ObservableStatus {
|
2020-12-02 02:54:10 -08:00
|
|
|
OK = 'Ok',
|
|
|
|
DELETED = 'Deleted',
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum ObservableDataType {
|
2024-09-17 05:10:22 -07:00
|
|
|
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',
|
2020-12-02 02:54:10 -08:00
|
|
|
'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
|
|
|
}
|