2023-01-27 03:22:44 -08:00
|
|
|
import type { IDataObject } from 'n8n-workflow';
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum JobStatus {
|
2020-12-02 02:24:25 -08:00
|
|
|
WAITING = 'Waiting',
|
|
|
|
INPROGRESS = 'InProgress',
|
|
|
|
SUCCESS = 'Success',
|
|
|
|
FAILURE = 'Failure',
|
2020-12-02 02:54:10 -08:00
|
|
|
DELETED = 'Deleted',
|
2020-12-02 02:24:25 -08:00
|
|
|
}
|
|
|
|
|
2023-04-21 04:23:15 -07:00
|
|
|
export const enum TLP {
|
2020-12-02 02:54:10 -08:00
|
|
|
white,
|
|
|
|
green,
|
|
|
|
amber,
|
|
|
|
red,
|
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 IJob {
|
2020-12-02 02:24:25 -08:00
|
|
|
id?: string;
|
|
|
|
organization?: string;
|
|
|
|
analyzerDefinitionId?: string;
|
|
|
|
analyzerId?: string;
|
|
|
|
analyzerName?: string;
|
|
|
|
dataType?: ObservableDataType;
|
|
|
|
status?: JobStatus;
|
|
|
|
data?: string;
|
|
|
|
attachment?: IDataObject;
|
|
|
|
parameters?: IDataObject;
|
2020-12-02 02:54:10 -08:00
|
|
|
message?: string;
|
2020-12-02 02:24:25 -08:00
|
|
|
tlp?: TLP;
|
|
|
|
startDate?: Date;
|
|
|
|
endDate?: Date;
|
|
|
|
createdAt?: Date;
|
|
|
|
createdBy?: string;
|
|
|
|
updatedAt?: Date;
|
|
|
|
updatedBy?: Date;
|
|
|
|
report?: IDataObject | string;
|
|
|
|
}
|
2020-12-02 02:54:10 -08:00
|
|
|
export interface IAnalyzer {
|
2020-12-02 02:24:25 -08:00
|
|
|
id?: string;
|
|
|
|
analyzerDefinitionId?: string;
|
2020-12-02 02:54:10 -08:00
|
|
|
name?: string;
|
2020-12-02 02:24:25 -08:00
|
|
|
version?: string;
|
|
|
|
description?: string;
|
|
|
|
author?: string;
|
|
|
|
url?: string;
|
|
|
|
license?: string;
|
|
|
|
dataTypeList?: ObservableDataType[];
|
|
|
|
baseConfig?: string;
|
|
|
|
jobCache?: number;
|
|
|
|
rate?: number;
|
|
|
|
rateUnit?: string;
|
|
|
|
configuration?: IDataObject;
|
|
|
|
createdBy?: string;
|
|
|
|
updatedAt?: Date;
|
|
|
|
updatedBy?: Date;
|
|
|
|
}
|
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
export interface IResponder {
|
2020-12-02 02:24:25 -08:00
|
|
|
id?: string;
|
|
|
|
name?: string;
|
|
|
|
version?: string;
|
|
|
|
description?: string;
|
|
|
|
dataTypeList?: string[];
|
|
|
|
maxTlp?: number;
|
|
|
|
maxPap?: number;
|
|
|
|
cortexIds?: string[] | undefined;
|
|
|
|
}
|