Fix lint issues, formatting and icons

This commit is contained in:
Jan Oberhauser
2020-12-02 11:54:10 +01:00
parent ea9f61089b
commit a38665e82c
24 changed files with 870 additions and 893 deletions

View File

@@ -1,44 +1,44 @@
import {
IDataObject
}from 'n8n-workflow'
export enum AlertStatus{
NEW="New",
UPDATED="Updated",
IGNORED="Ignored",
IMPORTED="Imported",
IDataObject,
} from 'n8n-workflow';
export enum AlertStatus {
NEW = 'New',
UPDATED = 'Updated',
IGNORED = 'Ignored',
IMPORTED = 'Imported',
}
export enum TLP{
white,
green,
amber,
red
export enum TLP {
white,
green,
amber,
red,
}
export interface IAlert{
// Required attributes
id?:string;
title?:string;
description?:string;
severity?:number;
date?:Date;
tags?:string[];
tlp?:TLP;
status?:AlertStatus;
type?:string;
source?:string;
sourceRef?:string;
artifacts?:IDataObject[];
follow?:boolean;
export interface IAlert {
// Required attributes
id?: string;
title?: string;
description?: string;
severity?: number;
date?: Date;
tags?: string[];
tlp?: TLP;
status?: AlertStatus;
type?: string;
source?: string;
sourceRef?: string;
artifacts?: IDataObject[];
follow?: boolean;
// Optional attributes
caseTemplate?:string;
// Optional attributes
caseTemplate?: string;
// Backend generated attributes
lastSyncDate?:Date;
case?:string;
// Backend generated attributes
lastSyncDate?: Date;
case?: string;
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
createdBy?: string;
createdAt?: Date;
updatedBy?: string;
upadtedAt?: Date;
}

View File

@@ -1,53 +1,53 @@
import { IDataObject } from "n8n-workflow";
import { IDataObject } from 'n8n-workflow';
import { TLP } from './AlertInterface';
export interface ICase{
// Required attributes
id?:string;
title?:string;
description?:string;
severity?:number;
startDate?:Date;
owner?:string;
flag?:boolean;
tlp?:TLP;
tags?:string[];
export interface ICase {
// Required attributes
id?: string;
title?: string;
description?: string;
severity?: number;
startDate?: Date;
owner?: string;
flag?: boolean;
tlp?: TLP;
tags?: string[];
// Optional attributes
resolutionStatus?:CaseResolutionStatus;
impactStatus?:CaseImpactStatus;
summary?:string;
endDate?:Date;
metrics?:IDataObject;
// Optional attributes
resolutionStatus?: CaseResolutionStatus;
impactStatus?: CaseImpactStatus;
summary?: string;
endDate?: Date;
metrics?: IDataObject;
// Backend generated attributes
status?:CaseStatus;
caseId?:number; // auto-generated attribute
mergeInto?:string;
mergeFrom?:string[];
// Backend generated attributes
status?: CaseStatus;
caseId?: number; // auto-generated attribute
mergeInto?: string;
mergeFrom?: string[];
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
createdBy?: string;
createdAt?: Date;
updatedBy?: string;
upadtedAt?: Date;
}
export enum CaseStatus{
OPEN="Open",
RESOLVED="Resolved",
DELETED="Deleted",
export enum CaseStatus {
OPEN = 'Open',
RESOLVED = 'Resolved',
DELETED = 'Deleted',
}
export enum CaseResolutionStatus{
INDETERMINATE="Indeterminate",
FALSEPOSITIVE="FalsePositive",
TRUEPOSITIVE="TruePositive",
OTHER="Other",
DUPLICATED="Duplicated",
export enum CaseResolutionStatus {
INDETERMINATE = 'Indeterminate',
FALSEPOSITIVE = 'FalsePositive',
TRUEPOSITIVE = 'TruePositive',
OTHER = 'Other',
DUPLICATED = 'Duplicated',
}
export enum CaseImpactStatus{
NOIMPACT="NoImpact",
WITHIMPACT="WithImpact",
NOTAPPLICABLE="NotApplicable",
}
export enum CaseImpactStatus {
NOIMPACT = 'NoImpact',
WITHIMPACT = 'WithImpact',
NOTAPPLICABLE = 'NotApplicable',
}

View File

@@ -1,23 +1,22 @@
import { IDataObject } from "n8n-workflow";
import {IAttachment} from "./ObservableInterface";
export enum LogStatus{
OK="Ok",
DELETED="Deleted"
import { IAttachment } from './ObservableInterface';
export enum LogStatus {
OK = 'Ok',
DELETED = 'Deleted',
}
export interface ILog{
// Required attributes
id?:string;
message?:string;
startDate?:Date;
status?:LogStatus;
// Optional attributes
attachment?:IAttachment;
// Backend generated attributes
export interface ILog {
// Required attributes
id?: string;
message?: string;
startDate?: Date;
status?: LogStatus;
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
}
// Optional attributes
attachment?: IAttachment;
// Backend generated attributes
createdBy?: string;
createdAt?: Date;
updatedBy?: string;
upadtedAt?: Date;
}

View File

@@ -1,54 +1,52 @@
import {
TLP
}from './AlertInterface'
import { IDataObject } from 'n8n-workflow';
TLP
} from './AlertInterface';
export enum ObservableStatus{
OK="Ok",
DELETED="Deleted",
export enum ObservableStatus {
OK = 'Ok',
DELETED = 'Deleted',
}
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"
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',
}
export interface IAttachment{
name?:string;
size?:number;
id?:string;
contentType?:string;
hashes:string[];
export interface IAttachment {
name?: string;
size?: number;
id?: string;
contentType?: string;
hashes: string[];
}
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
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
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
createdBy?: string;
createdAt?: Date;
updatedBy?: string;
upadtedAt?: Date;
}

View File

@@ -1,25 +1,25 @@
export interface ITask{
// Required attributes
id?:string;
title?:string;
status?:TaskStatus;
flag?:boolean;
// Optional attributes
owner?:string;
description?:string;
startDate?:Date;
endDate?:Date;
// Backend generated attributes
export interface ITask {
// Required attributes
id?: string;
title?: string;
status?: TaskStatus;
flag?: boolean;
// Optional attributes
owner?: string;
description?: string;
startDate?: Date;
endDate?: Date;
// Backend generated attributes
createdBy?:string;
createdAt?:Date;
updatedBy?:string;
upadtedAt?:Date;
createdBy?: string;
createdAt?: Date;
updatedBy?: string;
upadtedAt?: Date;
}
export enum TaskStatus{
WAITING="Waiting",
INPROGRESS="InProgress",
COMPLETED="Completed",
CANCEL="Cancel",
export enum TaskStatus {
WAITING = 'Waiting',
INPROGRESS = 'InProgress',
COMPLETED = 'Completed',
CANCEL = 'Cancel',
}