diff --git a/src/core/index.ts b/src/core/index.ts index 01808ae..9f8ccad 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,2 +1 @@ export * from './model'; -export * from './type'; diff --git a/src/core/model/PageParams.ts b/src/core/model/PageParams.ts index 9c6a908..ab5d0a6 100644 --- a/src/core/model/PageParams.ts +++ b/src/core/model/PageParams.ts @@ -1,6 +1,6 @@ export interface PageParams { - pageNo: number; - countPerPage: number; - sortCol: string; - sortDirection: string; + pageNo?: number; + countPerPage?: number; + sortCol?: string; + sortDirection?: string; } diff --git a/src/core/type/CryptoType.ts b/src/core/type/CryptoType.ts deleted file mode 100644 index d1de7d3..0000000 --- a/src/core/type/CryptoType.ts +++ /dev/null @@ -1 +0,0 @@ -export type CryptoType = "TLS"; diff --git a/src/core/type/PortType.ts b/src/core/type/PortType.ts deleted file mode 100644 index 5338af5..0000000 --- a/src/core/type/PortType.ts +++ /dev/null @@ -1 +0,0 @@ -export type PortType = 'TCP' | 'UDP' | 'TLS'; diff --git a/src/core/type/index.ts b/src/core/type/index.ts deleted file mode 100644 index d5e47d5..0000000 --- a/src/core/type/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './CryptoType'; -export * from './PortType'; diff --git a/src/model/alert/Alert.ts b/src/model/alert/Alert.ts deleted file mode 100644 index 12c23be..0000000 --- a/src/model/alert/Alert.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Alert { - created: string; - msg: string; -} \ No newline at end of file diff --git a/src/model/alert/AlertMetric.ts b/src/model/alert/AlertMetric.ts deleted file mode 100644 index e4e2e27..0000000 --- a/src/model/alert/AlertMetric.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Alert } from './Alert'; - -export interface AlertMetric extends Alert { - status: string; -} diff --git a/src/model/alert/AlertSystem.ts b/src/model/alert/AlertSystem.ts deleted file mode 100644 index 813c24a..0000000 --- a/src/model/alert/AlertSystem.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Alert } from './Alert'; - -export interface AlertSystem extends Alert { - status?: string; // test -} diff --git a/src/model/alert/index.ts b/src/model/alert/index.ts deleted file mode 100644 index b242f4e..0000000 --- a/src/model/alert/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './Alert'; -export * from './AlertMetric'; -export * from './AlertSystem'; diff --git a/src/model/auth/AuthCrawler.ts b/src/model/auth/AuthCrawler.ts deleted file mode 100644 index d064950..0000000 --- a/src/model/auth/AuthCrawler.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Target } from '../target'; -import { MetaCrawler } from '../meta'; - -export interface AuthCrawler { - id?: number; - metaCrawler?: MetaCrawler; - target?: Target; - authJson?: string; - createDate?: Date; -} diff --git a/src/model/auth/index.ts b/src/model/auth/index.ts deleted file mode 100644 index 51e5576..0000000 --- a/src/model/auth/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './AuthCrawler'; diff --git a/src/model/discovery/Host.ts b/src/model/discovery/Host.ts index 070c164..3e8731e 100644 --- a/src/model/discovery/Host.ts +++ b/src/model/discovery/Host.ts @@ -2,15 +2,10 @@ import { Zone } from './Zone'; import { Port } from './Port'; export interface Host { - id?: number; - ipv4?: string; - ipv6?: string; + metaIPTypeKey?: string; + address?: string; mac?: string; - os?: string; discoveredDate?: Date; zone?: Zone; - target?: boolean; - - ports?: Map | null; - portList?: Port[] | null; + portList?: Port[]; } diff --git a/src/model/discovery/Port.ts b/src/model/discovery/Port.ts index 6020684..59239e6 100644 --- a/src/model/discovery/Port.ts +++ b/src/model/discovery/Port.ts @@ -1,15 +1,10 @@ import { Host } from './Host'; import { Service } from './Service'; -import { PortType } from '../../core/type'; export interface Port { - id?: number; - portType?: PortType; + metaPortTypeKey?: string; portNumber?: number; discoveredDate?: Date; host?: Host; - target?: boolean; - - services?: Map | null; - serviceList?: Service[] | null; + serviceList?: Service[]; } diff --git a/src/model/discovery/Service.ts b/src/model/discovery/Service.ts index ac3a0c6..78c76fb 100644 --- a/src/model/discovery/Service.ts +++ b/src/model/discovery/Service.ts @@ -1,11 +1,8 @@ import { Port } from './Port'; -import { CryptoType } from '../../core/type'; export interface Service { - id?: number; - cryptoType?: CryptoType; - serviceName?: string; + metaCryptoTypeKey?: string; + name?: string; discoveredDate?: Date; port?: Port; - target?: boolean; } \ No newline at end of file diff --git a/src/model/discovery/Zone.ts b/src/model/discovery/Zone.ts index 7d4ba7a..8111daf 100644 --- a/src/model/discovery/Zone.ts +++ b/src/model/discovery/Zone.ts @@ -1,13 +1,10 @@ import { Host } from './Host'; export interface Zone { - id?: number; network?: string; - ipv4?: string; - ipv6?: string; iface?: string; + metaIPTypeKey?: string; + address?: string; mac?: string; discoveredDate?: Date; - - hosts: Map | null; } diff --git a/src/model/email/EmailAuth.ts b/src/model/email/EmailAuth.ts index c069602..2266f84 100644 --- a/src/model/email/EmailAuth.ts +++ b/src/model/email/EmailAuth.ts @@ -1,9 +1,14 @@ import { Member } from '../member'; +import { MetaHistoryType } from '../meta'; +import { Probe } from '../probe'; +import { Domain } from '../domain'; export interface EmailAuth { id?: number; - emailAuthKey?: string; createDate?: Date; - authConfirmDate?: Date; + metaHistoryType?: MetaHistoryType; + message?: string; + probe?: Probe; member?: Member; + domain?: Domain; } diff --git a/src/model/infra/Infra.ts b/src/model/infra/Infra.ts index 1b1488c..570db67 100644 --- a/src/model/infra/Infra.ts +++ b/src/model/infra/Infra.ts @@ -1,11 +1,9 @@ import { MetaInfraType } from '../meta'; import { Probe } from '../probe'; -import { Target } from '../target'; export interface Infra { id?: number; metaInfraType?: MetaInfraType; - createDate?: Date; probe?: Probe; - target?: Target; + createDate?: Date; } \ No newline at end of file diff --git a/src/model/infra/InfraHost.ts b/src/model/infra/InfraHost.ts index cb5d7e4..475b966 100644 --- a/src/model/infra/InfraHost.ts +++ b/src/model/infra/InfraHost.ts @@ -1,9 +1,20 @@ -import { InfraOS } from './InfraOS'; import { Infra } from './Infra'; +import { InfraZone } from './InfraZone'; +import { MetaTargetHostType } from '../meta/MetaTargetHostType'; +import { InfraHostMachine } from './InfraHostMachine'; +import { InfraHostOS } from './InfraHostOS'; +import { InfraHostPort } from './InfraHostPort'; +import { InfraHostApplication } from './InfraHostApplication'; +import { InfraHostDaemon } from './InfraHostDaemon'; +import { InfraHostIP } from './InfraHostIP'; export interface InfraHost extends Infra { - infraOS?: InfraOS; - ipv4?: string; - ipv6?: string; - mac?: string; + infraZone?: InfraZone; + metaTargetHostType?: MetaTargetHostType; + infraHostMachine?: InfraHostMachine; + infraHostOS?: InfraHostOS; + infraHostIPs?: InfraHostIP[]; + infraHostPorts?: InfraHostPort[]; + infraHostApplications?: InfraHostApplication[]; + infraHostDaemons?: InfraHostDaemon[]; } \ No newline at end of file diff --git a/src/model/infra/InfraHostApplication.ts b/src/model/infra/InfraHostApplication.ts new file mode 100644 index 0000000..bd765d4 --- /dev/null +++ b/src/model/infra/InfraHostApplication.ts @@ -0,0 +1,9 @@ +import { Infra } from './Infra'; +import { InfraHost } from './InfraHost'; + +export interface InfraHostApplication extends Infra { + id?: number; + infraHost?: InfraHost; + name?: string; + createDate?: Date; +} \ No newline at end of file diff --git a/src/model/infra/InfraHostDaemon.ts b/src/model/infra/InfraHostDaemon.ts new file mode 100644 index 0000000..7aa4ad3 --- /dev/null +++ b/src/model/infra/InfraHostDaemon.ts @@ -0,0 +1,9 @@ +import { Infra } from './Infra'; +import { InfraHost } from './InfraHost'; + +export interface InfraHostDaemon extends Infra { + id?: number; + infraHost?: InfraHost; + name?: string; + createDate?: Date; +} \ No newline at end of file diff --git a/src/model/infra/InfraHostIP.ts b/src/model/infra/InfraHostIP.ts new file mode 100644 index 0000000..802dfb6 --- /dev/null +++ b/src/model/infra/InfraHostIP.ts @@ -0,0 +1,12 @@ +import { Infra } from './Infra'; +import { InfraHost } from './InfraHost'; +import { MetaIPType } from '../meta/MetaIPType'; + +export interface InfraHostIP extends Infra { + id?: number; + infraHost?: InfraHost; + metaIPType?: MetaIPType; + address?: string; + mac?: string; + createDate?: Date; +} \ No newline at end of file diff --git a/src/model/infra/InfraHostMachine.ts b/src/model/infra/InfraHostMachine.ts new file mode 100644 index 0000000..6818944 --- /dev/null +++ b/src/model/infra/InfraHostMachine.ts @@ -0,0 +1,9 @@ +import { Infra } from './Infra'; +import { InfraHost } from './InfraHost'; + +export interface InfraHostMachine extends Infra { + id?: number; + infraHost?: InfraHost; + meta?: string; + createDate?: Date; +} diff --git a/src/model/infra/InfraHostOS.ts b/src/model/infra/InfraHostOS.ts new file mode 100644 index 0000000..a8e72fe --- /dev/null +++ b/src/model/infra/InfraHostOS.ts @@ -0,0 +1,16 @@ +import { Infra } from './Infra'; +import { InfraHost } from './InfraHost'; + +export interface InfraHostOS extends Infra { + id?: number; + infraHost?: InfraHost; + name?: string; + os?: string; + platform?: string; + platformFamily?: string; + platformVersion?: string; + kernelVersion?: string; + hostID?: string; + meta?: string; + createDate?: Date; +} \ No newline at end of file diff --git a/src/model/infra/InfraHostPort.ts b/src/model/infra/InfraHostPort.ts new file mode 100644 index 0000000..8b234da --- /dev/null +++ b/src/model/infra/InfraHostPort.ts @@ -0,0 +1,11 @@ +import { Infra } from './Infra'; +import { InfraHost } from './InfraHost'; +import { MetaPortType } from '../meta/MetaPortType'; + +export interface InfraHostPort extends Infra { + id?: number; + infraHost?: InfraHost; + metaPortType?: MetaPortType; + port?: number; + createDate?: Date; +} \ No newline at end of file diff --git a/src/model/infra/InfraMachine.ts b/src/model/infra/InfraMachine.ts deleted file mode 100644 index af4e7c1..0000000 --- a/src/model/infra/InfraMachine.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Infra } from './Infra'; - -export interface InfraMachine extends Infra { - meta?: string; -} diff --git a/src/model/infra/InfraOS.ts b/src/model/infra/InfraOS.ts deleted file mode 100644 index bc406cc..0000000 --- a/src/model/infra/InfraOS.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { InfraMachine } from './InfraMachine'; -import { Infra } from './Infra'; -import { MetaInfraVendor } from '../meta'; - -export interface InfraOS extends Infra { - infraMachine?: InfraMachine; - meta?: string; - metaInfraVendor?: MetaInfraVendor; -} \ No newline at end of file diff --git a/src/model/infra/InfraOSApplication.ts b/src/model/infra/InfraOSApplication.ts deleted file mode 100644 index 230953b..0000000 --- a/src/model/infra/InfraOSApplication.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InfraOS } from './InfraOS'; -import { Infra } from './Infra'; - -export interface InfraOSApplication extends Infra { - infraOS?: InfraOS; - name?: string; -} \ No newline at end of file diff --git a/src/model/infra/InfraOSDaemon.ts b/src/model/infra/InfraOSDaemon.ts deleted file mode 100644 index ce0a919..0000000 --- a/src/model/infra/InfraOSDaemon.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { InfraOS } from './InfraOS'; -import { Infra } from './Infra'; - -export interface InfraOSDaemon extends Infra { - infraOS?: InfraOS; - name?: string; -} \ No newline at end of file diff --git a/src/model/infra/InfraOSPort.ts b/src/model/infra/InfraOSPort.ts deleted file mode 100644 index 31f5972..0000000 --- a/src/model/infra/InfraOSPort.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { InfraOS } from './InfraOS'; -import { Infra } from './Infra'; -import { MetaInfraVendor } from '../meta'; - -export interface InfraOSPort extends Infra { - infraOS?: InfraOS; - port?: number; - portType?: string; - metaInfraVendor?: MetaInfraVendor; - tlsType?: boolean; -} \ No newline at end of file diff --git a/src/model/infra/InfraService.ts b/src/model/infra/InfraService.ts index f695ed6..5d7c10d 100644 --- a/src/model/infra/InfraService.ts +++ b/src/model/infra/InfraService.ts @@ -1,11 +1,12 @@ -import { InfraHost } from './InfraHost'; import { Infra } from './Infra'; -import { MetaInfraVendor } from '../meta'; +import { MetaTargetServiceType } from '../meta/MetaTargetServiceType'; +import { InfraHostIP } from './InfraHostIP'; +import { InfraHostPort } from './InfraHostPort'; +import { MetaCryptoType } from '../meta/MetaCryptoType'; export interface InfraService extends Infra { - infraHost?: InfraHost; - portType?: string; - port?: number; - metaInfraVendor?: MetaInfraVendor; - tlsType?: boolean; + metaTargetServiceType?: MetaTargetServiceType; + infraHostIP?: InfraHostIP; + infraHostPort?: InfraHostPort; + metaCryptoType?: MetaCryptoType; } \ No newline at end of file diff --git a/src/model/infra/InfraZone.ts b/src/model/infra/InfraZone.ts new file mode 100644 index 0000000..e3d7621 --- /dev/null +++ b/src/model/infra/InfraZone.ts @@ -0,0 +1,13 @@ +import { Infra } from './Infra'; +import { MetaTargetZoneType } from '../meta/MetaTargetZoneType'; +import { MetaIPType } from '../meta/MetaIPType'; + +export interface InfraZone extends Infra { + metaTargetZoneType?: MetaTargetZoneType; + network?: string; + iface?: string; + metaIPType?: MetaIPType; + address?: string; + mac?: string; + gateway?: string; +} \ No newline at end of file diff --git a/src/model/infra/index.ts b/src/model/infra/index.ts index 8219901..2a52367 100644 --- a/src/model/infra/index.ts +++ b/src/model/infra/index.ts @@ -1,8 +1,10 @@ export * from './Infra'; export * from './InfraHost'; -export * from './InfraMachine'; -export * from './InfraOS'; -export * from './InfraOSApplication'; -export * from './InfraOSDaemon'; -export * from './InfraOSPort'; +export * from './InfraHostApplication'; +export * from './InfraHostDaemon'; +export * from './InfraHostIP'; +export * from './InfraHostMachine'; +export * from './InfraHostOS'; +export * from './InfraHostPort'; export * from './InfraService'; +export * from './InfraZone'; diff --git a/src/model/meta/MetaCrawler.ts b/src/model/meta/MetaCrawler.ts index 4394023..2539b98 100644 --- a/src/model/meta/MetaCrawler.ts +++ b/src/model/meta/MetaCrawler.ts @@ -1,33 +1,7 @@ export interface MetaCrawler { id?: number; - createDate?: Date; + key?: string; name?: string; - description?: string; -} - -export enum MetaCrawlerEnum { - ACTIVEDIRECTORY_CRAWLER = 1, - CASSANDRA_CRAWLER = 2, - DHCP_CRAWLER = 3, - DNS_CRAWLER = 4, - FTP_CRAWLER = 5, - HTTP_CRAWLER = 6, - IMAP_CRAWLER = 7, - LDAP_CRAWLER = 8, - MONGODB_CRAWLER = 9, - MSSQL_CRAWLER = 10, - MYSQL_CRAWLER = 11, - NETBIOS_CRAWLER = 12, - ORACLE_CRAWLER = 13, - POP_CRAWLER = 14, - POSTGRESQL_CRAWLER = 15, - REDIS_CRAWLER = 16, - RMI_CRAWLER = 17, - SMB_CRAWLER = 18, - SMTP_CRAWLER = 19, - SNMP_CRAWLER = 20, - SSH_CRAWLER = 21, - TELNET_CRAWLER = 22, - WMI_CRAWLER = 23, - UNKNOWN_CRAWLER = 24, + createDate?: Date; + default?: boolean; } diff --git a/src/model/meta/MetaCrawlerInputItem.ts b/src/model/meta/MetaCrawlerInputItem.ts index 74cfe2f..8bb1d7f 100644 --- a/src/model/meta/MetaCrawlerInputItem.ts +++ b/src/model/meta/MetaCrawlerInputItem.ts @@ -3,14 +3,13 @@ import { MetaCrawler } from './MetaCrawler'; export interface MetaCrawlerInputItem { id?: number; + name?: string; metaInputType?: MetaInputType; metaCrawler?: MetaCrawler; - description?: string; - name?: string; - createDate?: Date; required?: boolean; defaultValue?: string; pattern?: string; keyName?: string; keyValue?: string; + createDate?: Date; } diff --git a/src/model/meta/MetaCrawlerMapping.ts b/src/model/meta/MetaCrawlerMapping.ts new file mode 100644 index 0000000..7f881eb --- /dev/null +++ b/src/model/meta/MetaCrawlerMapping.ts @@ -0,0 +1,9 @@ +import { MetaCrawler } from './MetaCrawler'; +import { MetaTargetType } from './MetaTargetType'; + +export interface MetaCrawlerMapping { + id?: number; + metaTargetType?: MetaTargetType; + metaCrawler?: MetaCrawler; + createDate?: Date; +} diff --git a/src/model/meta/MetaCryptoType.ts b/src/model/meta/MetaCryptoType.ts new file mode 100644 index 0000000..8607bc6 --- /dev/null +++ b/src/model/meta/MetaCryptoType.ts @@ -0,0 +1,6 @@ +export interface MetaCryptoType { + id?: number; + name?: string; + key?: string; + createDate?: Date; +} diff --git a/src/model/meta/MetaEmailType.ts b/src/model/meta/MetaEmailType.ts new file mode 100644 index 0000000..6dedecd --- /dev/null +++ b/src/model/meta/MetaEmailType.ts @@ -0,0 +1,6 @@ +export interface MetaEmailType { + id?: number; + name?: string; + key?: string; + createDate?: Date; +} diff --git a/src/model/meta/MetaHistoryType.ts b/src/model/meta/MetaHistoryType.ts index 62211e3..5ecf262 100644 --- a/src/model/meta/MetaHistoryType.ts +++ b/src/model/meta/MetaHistoryType.ts @@ -1,14 +1,7 @@ export interface MetaHistoryType { id?: number; + key?: string; name?: string; createDate?: Date; } -export enum MetaHistoryTypeEnum { - Member = 1, - Probe = 2, - Discovery = 3, - Target = 4, - Crawler = 5, - Sensor = 6, -} diff --git a/src/model/meta/MetaIPType.ts b/src/model/meta/MetaIPType.ts new file mode 100644 index 0000000..da572c7 --- /dev/null +++ b/src/model/meta/MetaIPType.ts @@ -0,0 +1,7 @@ +export interface MetaIPType { + id?: number; + key?: string; + name?: string; + createDate?: Date; +} + diff --git a/src/model/meta/MetaInfraType.ts b/src/model/meta/MetaInfraType.ts index bd8585f..7d8429a 100644 --- a/src/model/meta/MetaInfraType.ts +++ b/src/model/meta/MetaInfraType.ts @@ -1,16 +1,7 @@ export interface MetaInfraType { id?: number; + key?: string; name?: string; createDate?: Date; } - -export enum MetaInfraTypeEnum { - MACHINE = 1, - HOST = 2, - OS = 3, - OS_APPLICATION = 4, - OS_DAEMON = 5, - OS_PORT = 6, - OS_SERVICE = 7, -} diff --git a/src/model/meta/MetaInfraVendor.ts b/src/model/meta/MetaInfraVendor.ts deleted file mode 100644 index 414c22f..0000000 --- a/src/model/meta/MetaInfraVendor.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { MetaInfraType } from './MetaInfraType'; - -export interface MetaInfraVendor { - id?: number; - name?: string; - createDate?: Date; - metaInfraType?: MetaInfraType; -} - - -export enum MetaInfraVendor_Machine_ID { - APPLE = 1, - MICROSOFT = 2, - ASUS = 3, - HP = 4, - DELL = 5, - LENOVO = 6, - ACER = 7, - SAMSUNG = 8, - LG = 9, - CISCO = 10, -} - -export enum MetaInfraVendor_HOST_ID { - Windows = 11, - Linux = 12, - MacOS = 13, - Ubuntu = 14, - CentOS = 15, - Fedora = 16, - RedHat = 17, - Debian = 18, - SUSE = 19, - CoreOS = 20, - AmazonLinux = 21, - Kubernetes = 22, - Docker = 23, - iOS = 24, - Android = 25, -} - -export enum MetaInfraVendor_OS_ID { - Windows = 26, - MacOS = 27, - Ubuntu = 28, - CentOS = 29, - Fedora = 30, - RedHat = 31, - Debian = 32, - SUSE = 33, - CoreOS = 34, - AmazonLinux = 35, - Kubernetes = 36, - Docker = 37, - iOS = 38, - Android = 39, -} - -export enum MetaInfraVendor_SERVICE_ID { - MySql = 40, - PostgreSQL = 41, - WMI = 42, - SNMP_V2 = 43, - UNKNOWN = 44, -} diff --git a/src/model/meta/MetaInputType.ts b/src/model/meta/MetaInputType.ts index 5008fc3..7266f11 100644 --- a/src/model/meta/MetaInputType.ts +++ b/src/model/meta/MetaInputType.ts @@ -5,11 +5,3 @@ export interface MetaInputType { description?: string; createDate?: Date; } - -export enum MetaInputType_ID { - TEXT_TYPE = 1, - PASSWORD_TYPE = 2, - NUMBER_TYPE = 3, - BOOLEAN_TYPE = 4, - SELECT_TYPE = 5, -} diff --git a/src/model/meta/MetaMemberStatus.ts b/src/model/meta/MetaMemberStatus.ts index d85afef..3bbee0d 100644 --- a/src/model/meta/MetaMemberStatus.ts +++ b/src/model/meta/MetaMemberStatus.ts @@ -1,12 +1,14 @@ export interface MetaMemberStatus { id?: number; + key?: string; name?: string; + createDate?: Date; } -export enum MetaMemberStatusEnum { - NOAUTH = 1, - NORMAL = 2, - DIAPAUSE = 3, - WITHDRAWAL = 4, -} +// export enum MetaMemberStatusEnum { +// NOAUTH = 1, +// NORMAL = 2, +// DIAPAUSE = 3, +// WITHDRAWAL = 4, +// } diff --git a/src/model/meta/MetaNoAuthProbeStatus.ts b/src/model/meta/MetaNoAuthProbeStatus.ts index d93bbb1..5d44dcc 100644 --- a/src/model/meta/MetaNoAuthProbeStatus.ts +++ b/src/model/meta/MetaNoAuthProbeStatus.ts @@ -1,11 +1,13 @@ export interface MetaNoAuthProbeStatus { id?: number; + key?: string; name?: string; + createDate?: Date; } -export enum MetaNoAuthProbeStatusEnum { - ACCEPT = 1, - DENY = 2, - PROCESS = 3, -} +// export enum MetaNoAuthProbeStatusEnum { +// ACCEPT = 1, +// DENY = 2, +// PROCESS = 3, +// } diff --git a/src/model/meta/MetaNotification.ts b/src/model/meta/MetaNotification.ts deleted file mode 100644 index 971cd04..0000000 --- a/src/model/meta/MetaNotification.ts +++ /dev/null @@ -1,7 +0,0 @@ - -export interface MetaNotification { - id?: number; - createDate?: Date; - name?: string; - description?: string; -} diff --git a/src/model/meta/MetaPortType.ts b/src/model/meta/MetaPortType.ts new file mode 100644 index 0000000..9ebfe76 --- /dev/null +++ b/src/model/meta/MetaPortType.ts @@ -0,0 +1,8 @@ + +export interface MetaPortType { + id?: number; + key?: string; + name?: string; + createDate?: Date; +} + diff --git a/src/model/meta/MetaProbeArchitecture.ts b/src/model/meta/MetaProbeArchitecture.ts deleted file mode 100644 index 69fe965..0000000 --- a/src/model/meta/MetaProbeArchitecture.ts +++ /dev/null @@ -1,10 +0,0 @@ - -export interface MetaProbeArchitecture { - id?: number; - architecture?: string; - createDate?: Date; -} - -export enum MetaProbeArchitectureEnum { - x86_64bit = 1, -} diff --git a/src/model/meta/MetaProbeOs.ts b/src/model/meta/MetaProbeOs.ts deleted file mode 100644 index 2ddd275..0000000 --- a/src/model/meta/MetaProbeOs.ts +++ /dev/null @@ -1,13 +0,0 @@ - -export interface MetaProbeOs { - id?: number; - name?: string; - createDate?: Date; -} - -export enum MetaProbeOsEnum { - Windows = 1, - Debian = 2, - Ubuntu = 3, - Fedora = 4, -} diff --git a/src/model/meta/MetaProbePackage.ts b/src/model/meta/MetaProbePackage.ts deleted file mode 100644 index eb7f3c8..0000000 --- a/src/model/meta/MetaProbePackage.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { MetaProbeVersion } from './MetaProbeVersion'; -import { MetaProbeOs } from './MetaProbeOs'; -import { MetaProbeArchitecture } from './MetaProbeArchitecture'; - -export interface MetaProbePackage { - id?: number; - metaProbeVersion?: MetaProbeVersion; - metaProbeOs?: MetaProbeOs; - metaProbeArchitecture?: MetaProbeArchitecture; - createDate?: Date; -} diff --git a/src/model/meta/MetaProbeStatus.ts b/src/model/meta/MetaProbeStatus.ts index 648d3a4..582b39e 100644 --- a/src/model/meta/MetaProbeStatus.ts +++ b/src/model/meta/MetaProbeStatus.ts @@ -1,10 +1,12 @@ export interface MetaProbeStatus { id?: number; + key?: string; name?: string; + createDate?: Date; } -export enum MetaProbeStatusEnum { - INITIAL = 1, - NORMAL = 2, -} +// export enum MetaProbeStatusEnum { +// INITIAL = 1, +// NORMAL = 2, +// } diff --git a/src/model/meta/MetaProbeTaskType.ts b/src/model/meta/MetaProbeTaskType.ts deleted file mode 100644 index 41cb201..0000000 --- a/src/model/meta/MetaProbeTaskType.ts +++ /dev/null @@ -1,7 +0,0 @@ - -export interface MetaProbeTaskType { - id?: number; - name?: string; - description?: string; - createDate?: Date; -} diff --git a/src/model/meta/MetaProbeVersion.ts b/src/model/meta/MetaProbeVersion.ts deleted file mode 100644 index e819518..0000000 --- a/src/model/meta/MetaProbeVersion.ts +++ /dev/null @@ -1,6 +0,0 @@ - -export interface MetaProbeVersion { - id?: number; - version?: string; - createDate?: Date; -} diff --git a/src/model/meta/MetaSensorDisplayItem.ts b/src/model/meta/MetaSensorDisplayItem.ts index 5e00072..39fb0a6 100644 --- a/src/model/meta/MetaSensorDisplayItem.ts +++ b/src/model/meta/MetaSensorDisplayItem.ts @@ -6,11 +6,10 @@ import { MetaSensorItemType } from './MetaSensorItemType'; export interface MetaSensorDisplayItem { id?: number; key?: string; - displayName?: string; - description?: string; + name?: string; metaCrawler?: MetaCrawler; metaSensorItemUnit?: MetaSensorItemUnit; - createDate?: Date; metaSensorItemType?: MetaSensorItemType; + createDate?: Date; default?: boolean; } diff --git a/src/model/meta/MetaSensorDisplayMapping.ts b/src/model/meta/MetaSensorDisplayMapping.ts index ddf0f0d..cba746c 100644 --- a/src/model/meta/MetaSensorDisplayMapping.ts +++ b/src/model/meta/MetaSensorDisplayMapping.ts @@ -5,4 +5,5 @@ export interface MetaSensorDisplayMapping { id?: number; metaSensorDisplayItem?: MetaSensorDisplayItem; metaSensorItemKey?: MetaSensorItemKey; + createDate?: Date; } diff --git a/src/model/meta/MetaSensorItemKey.ts b/src/model/meta/MetaSensorItemKey.ts index 7c408e3..d999606 100644 --- a/src/model/meta/MetaSensorItemKey.ts +++ b/src/model/meta/MetaSensorItemKey.ts @@ -4,11 +4,12 @@ import { MetaSensorItemUnit } from './MetaSensorItemUnit'; export interface MetaSensorItemKey { id?: number; - metaSensorItem?: MetaSensorItem; key?: string; + name?: string; froms?: string; option?: string; + metaSensorItem?: MetaSensorItem; metaCrawler?: MetaCrawler; - createDate?: Date; metaSensorItemUnit?: MetaSensorItemUnit; + createDate?: Date; } diff --git a/src/model/meta/MetaSensorItemType.ts b/src/model/meta/MetaSensorItemType.ts index 297c335..8f229cb 100644 --- a/src/model/meta/MetaSensorItemType.ts +++ b/src/model/meta/MetaSensorItemType.ts @@ -1,7 +1,7 @@ export interface MetaSensorItemType { id?: number; + key?: string; name?: string; - description?: string; createDate?: Date; } diff --git a/src/model/meta/MetaSensorItemUnit.ts b/src/model/meta/MetaSensorItemUnit.ts index 822e5e6..3e4c260 100644 --- a/src/model/meta/MetaSensorItemUnit.ts +++ b/src/model/meta/MetaSensorItemUnit.ts @@ -1,7 +1,8 @@ export interface MetaSensorItemUnit { id?: number; + key?: string; unit?: string; - createDate?: Date; mark?: string; + createDate?: Date; } diff --git a/src/model/meta/MetaSensorStatus.ts b/src/model/meta/MetaSensorStatus.ts index df063f8..26bfe27 100644 --- a/src/model/meta/MetaSensorStatus.ts +++ b/src/model/meta/MetaSensorStatus.ts @@ -1,10 +1,8 @@ export interface MetaSensorStatus { id?: number; + key?: string; name?: string; + createDate?: Date; } -export enum MetaSensorStatusEnum { - RUNNING = 1, - STOPPED = 2, -} diff --git a/src/model/meta/MetaTargetCategory.ts b/src/model/meta/MetaTargetCategory.ts new file mode 100644 index 0000000..f67798a --- /dev/null +++ b/src/model/meta/MetaTargetCategory.ts @@ -0,0 +1,10 @@ +import { MetaInfraType } from "./MetaInfraType"; + +export interface MetaTargetCategory { + id?: number; + metaInfraType?: MetaInfraType; + key?: string; + name?: string; + createDate?: Date; +} + diff --git a/src/model/meta/MetaTargetHostType.ts b/src/model/meta/MetaTargetHostType.ts new file mode 100644 index 0000000..083c841 --- /dev/null +++ b/src/model/meta/MetaTargetHostType.ts @@ -0,0 +1,5 @@ +import { MetaTargetType } from "./MetaTargetType"; + +export interface MetaTargetHostType extends MetaTargetType { +} + diff --git a/src/model/meta/MetaTargetServiceType.ts b/src/model/meta/MetaTargetServiceType.ts new file mode 100644 index 0000000..cfece4a --- /dev/null +++ b/src/model/meta/MetaTargetServiceType.ts @@ -0,0 +1,5 @@ +import { MetaTargetType } from "./MetaTargetType"; + +export interface MetaTargetServiceType extends MetaTargetType { +} + diff --git a/src/model/meta/MetaTargetStatus.ts b/src/model/meta/MetaTargetStatus.ts new file mode 100644 index 0000000..7efbfcb --- /dev/null +++ b/src/model/meta/MetaTargetStatus.ts @@ -0,0 +1,7 @@ +export interface MetaTargetStatus { + id?: number; + key?: string; + name?: string; + createDate?: Date; +} + diff --git a/src/model/meta/MetaTargetType.ts b/src/model/meta/MetaTargetType.ts new file mode 100644 index 0000000..cb17334 --- /dev/null +++ b/src/model/meta/MetaTargetType.ts @@ -0,0 +1,11 @@ +import { MetaInfraType } from "./MetaInfraType"; + +export interface MetaTargetType { + id?: number; + metaInfraType?: MetaInfraType; + key?: string; + name?: string; + createDate?: Date; + supported?: boolean; +} + diff --git a/src/model/meta/MetaTargetTypeCategory.ts b/src/model/meta/MetaTargetTypeCategory.ts new file mode 100644 index 0000000..3f23ea6 --- /dev/null +++ b/src/model/meta/MetaTargetTypeCategory.ts @@ -0,0 +1,9 @@ +import { MetaInfraType } from "./MetaInfraType"; + +export interface MetaTargetTypeCategory { + id?: number; + metaInfraType?: MetaInfraType; + key?: string; + name?: string; + createDate?: Date; +} \ No newline at end of file diff --git a/src/model/meta/MetaTargetTypeCategoryMapping.ts b/src/model/meta/MetaTargetTypeCategoryMapping.ts new file mode 100644 index 0000000..f4847d5 --- /dev/null +++ b/src/model/meta/MetaTargetTypeCategoryMapping.ts @@ -0,0 +1,9 @@ +import { MetaTargetType } from "./MetaTargetType"; +import { MetaTargetTypeCategory } from "./MetaTargetTypeCategory"; + +export interface MetaTargetTypeCategoryMapping { + id?: number; + metaTargetTypeCategory?: MetaTargetTypeCategory; + metaTargetType?: MetaTargetType; + createDate?: Date; +} diff --git a/src/model/meta/MetaTargetZoneType.ts b/src/model/meta/MetaTargetZoneType.ts new file mode 100644 index 0000000..89ffac2 --- /dev/null +++ b/src/model/meta/MetaTargetZoneType.ts @@ -0,0 +1,5 @@ +import { MetaTargetType } from "./MetaTargetType"; + +export interface MetaTargetZoneType extends MetaTargetType { +} + diff --git a/src/model/meta/MetaVendorCrawler.ts b/src/model/meta/MetaVendorCrawler.ts deleted file mode 100644 index 81106f1..0000000 --- a/src/model/meta/MetaVendorCrawler.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { MetaCrawler } from './MetaCrawler'; -import { MetaInfraVendor } from './MetaInfraVendor'; - -export interface MetaVendorCrawler { - id?: number; - metaCrawler: MetaCrawler; - metaInfraVendor: MetaInfraVendor; - createDate: Date; -} diff --git a/src/model/meta/MetaVendorCrawlerSensorItem.ts b/src/model/meta/MetaVendorCrawlerSensorItem.ts deleted file mode 100644 index c7277bb..0000000 --- a/src/model/meta/MetaVendorCrawlerSensorItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { MetaSensorItem } from './MetaSensorItem'; -import { MetaInfraVendor } from './MetaInfraVendor'; - -export interface MetaVendorCrawlerSensorItem { - id?: number; - interval: string; - warnCondition: string; - createDate: Date; - metaSensorItem: MetaSensorItem; - metaInfraVendor: MetaInfraVendor; - crawlerId: number; -} diff --git a/src/model/meta/index.ts b/src/model/meta/index.ts index 5d4b8c5..8fe49dd 100644 --- a/src/model/meta/index.ts +++ b/src/model/meta/index.ts @@ -1,18 +1,16 @@ export * from './MetaCrawler'; export * from './MetaCrawlerInputItem'; +export * from './MetaCrawlerMapping'; +export * from './MetaCryptoType'; +export * from './MetaEmailType'; export * from './MetaHistoryType'; export * from './MetaInfraType'; -export * from './MetaInfraVendor'; export * from './MetaInputType'; +export * from './MetaIPType'; export * from './MetaMemberStatus'; export * from './MetaNoAuthProbeStatus'; -export * from './MetaNotification'; -export * from './MetaProbeArchitecture'; -export * from './MetaProbeOs'; -export * from './MetaProbePackage'; +export * from './MetaPortType'; export * from './MetaProbeStatus'; -export * from './MetaProbeTaskType'; -export * from './MetaProbeVersion'; export * from './MetaSensorDisplayItem'; export * from './MetaSensorDisplayMapping'; export * from './MetaSensorItem'; @@ -20,5 +18,11 @@ export * from './MetaSensorItemKey'; export * from './MetaSensorItemType'; export * from './MetaSensorItemUnit'; export * from './MetaSensorStatus'; -export * from './MetaVendorCrawler'; -export * from './MetaVendorCrawlerSensorItem'; +export * from './MetaTargetCategory'; +export * from './MetaTargetHostType'; +export * from './MetaTargetServiceType'; +export * from './MetaTargetStatus'; +export * from './MetaTargetType'; +export * from './MetaTargetTypeCategory'; +export * from './MetaTargetTypeCategoryMapping'; +export * from './MetaTargetZoneType'; diff --git a/src/model/noauth/NoAuthProbe.ts b/src/model/noauth/NoAuthProbe.ts index 9b3bb50..4bc9c91 100644 --- a/src/model/noauth/NoAuthProbe.ts +++ b/src/model/noauth/NoAuthProbe.ts @@ -1,18 +1,16 @@ import { MetaNoAuthProbeStatus } from '../meta'; import { Domain } from '../domain'; import { Probe } from '../probe'; -import { NoAuthProbeDescription } from './NoAuthProbeDescription'; export interface NoAuthProbe { id?: number; - description?: string; - descriptions?: NoAuthProbeDescription; - metaNoAuthProbeStatus?: MetaNoAuthProbeStatus; - tempProbeKey?: string; - createDate?: Date; - apiKey?: string; domain?: Domain; probe?: Probe; - connectAddress?: string; + metaNoAuthProbeStatus?: MetaNoAuthProbeStatus; + description?: string; + tempProbeKey?: string; + apiKey?: string; connectDate?: Date; + connectAddress?: string; + createDate?: Date; } diff --git a/src/model/noauth/NoAuthProbeDescription.ts b/src/model/noauth/NoAuthProbeDescription.ts index b360d8d..17551a6 100644 --- a/src/model/noauth/NoAuthProbeDescription.ts +++ b/src/model/noauth/NoAuthProbeDescription.ts @@ -1,7 +1,6 @@ -import { NoAuthProbeDescriptionHost } from './NoAuthProbeDescriptionHost'; -import { NoAuthProbeDescriptionNetwork } from './NoAuthProbeDescriptionNetwork'; +import { InfraHost, InfraZone } from "../infra"; export interface NoAuthProbeDescription { - host?: NoAuthProbeDescriptionHost; - network?: NoAuthProbeDescriptionNetwork + infraHost?: InfraHost; + infraZones?: InfraZone[]; } diff --git a/src/model/noauth/NoAuthProbeDescriptionHost.ts b/src/model/noauth/NoAuthProbeDescriptionHost.ts deleted file mode 100644 index e7cfefe..0000000 --- a/src/model/noauth/NoAuthProbeDescriptionHost.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface NoAuthProbeDescriptionHost { - name?: string; - os?: string; - platform?: string; - platformFamily?: string; - platformVersion?: string; - kernelVersion?: string; - hostID?: string; -} diff --git a/src/model/noauth/NoAuthProbeDescriptionNetwork.ts b/src/model/noauth/NoAuthProbeDescriptionNetwork.ts deleted file mode 100644 index 8d013a1..0000000 --- a/src/model/noauth/NoAuthProbeDescriptionNetwork.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface NoAuthProbeDescriptionNetwork { - name?: string; - address?: string; - gateway?: string; - macAddress?: string; -} diff --git a/src/model/noauth/index.ts b/src/model/noauth/index.ts index 7550332..922d8ec 100644 --- a/src/model/noauth/index.ts +++ b/src/model/noauth/index.ts @@ -1,4 +1,2 @@ export * from './NoAuthProbe'; export * from './NoAuthProbeDescription'; -export * from './NoAuthProbeDescriptionHost'; -export * from './NoAuthProbeDescriptionNetwork'; diff --git a/src/model/probe/Probe.ts b/src/model/probe/Probe.ts index f952bb3..e5232a9 100644 --- a/src/model/probe/Probe.ts +++ b/src/model/probe/Probe.ts @@ -10,7 +10,7 @@ export interface Probe { domain?: Domain; probeKey?: string; encryptionKey?: string; - displayName?: string; + name?: string; cidr?: string; authorizeDate?: Date; authorizeMember?: Member; diff --git a/src/model/probe/ProbeTask.ts b/src/model/probe/ProbeTask.ts deleted file mode 100644 index f64b42e..0000000 --- a/src/model/probe/ProbeTask.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Probe } from './Probe'; -import { MetaProbeTaskType } from '../meta'; - -export interface ProbeTask { - id?: number; - metaProbeTaskType?: MetaProbeTaskType; - probe?: Probe; - data?: string; - createDate?: Date; - sendDate?: Date; - startDate?: Date; - endDate?: Date; - succeed?: boolean; -} diff --git a/src/model/probe/index.ts b/src/model/probe/index.ts index 49cf0b5..7a8efe1 100644 --- a/src/model/probe/index.ts +++ b/src/model/probe/index.ts @@ -1,3 +1,2 @@ export * from './Probe'; export * from './ProbeHost'; -export * from './ProbeTask'; diff --git a/src/model/sensor-item/index.ts b/src/model/sensor-item/index.ts deleted file mode 100644 index 1b83bb5..0000000 --- a/src/model/sensor-item/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './SensorItem'; -export * from './SensorItemDependency'; diff --git a/src/model/sensor-item/SensorItem.ts b/src/model/sensor/SensorItem.ts similarity index 100% rename from src/model/sensor-item/SensorItem.ts rename to src/model/sensor/SensorItem.ts diff --git a/src/model/sensor-item/SensorItemDependency.ts b/src/model/sensor/SensorItemDependency.ts similarity index 100% rename from src/model/sensor-item/SensorItemDependency.ts rename to src/model/sensor/SensorItemDependency.ts diff --git a/src/model/sensor/SensorRegistInfo.ts b/src/model/sensor/SensorRegistInfo.ts deleted file mode 100644 index 16a5a73..0000000 --- a/src/model/sensor/SensorRegistInfo.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { MetaCrawler, MetaSensorDisplayItem } from '../meta'; -import { Infra } from '../infra'; - -export interface SensorRegistInfo { - sensorItemMap: Map>; - metaCrawler: MetaCrawler; - // targetId: number; - interval: number; - // type: string; - infra: Infra; - crawlerAuth: string; -} diff --git a/src/model/sensor/index.ts b/src/model/sensor/index.ts index c814e10..17578c2 100644 --- a/src/model/sensor/index.ts +++ b/src/model/sensor/index.ts @@ -1,2 +1,3 @@ export * from './Sensor'; -export * from './SensorRegistInfo'; +export * from './SensorItem'; +export * from './SensorItemDependency'; diff --git a/src/model/target/Target.ts b/src/model/target/Target.ts index c3e5b54..a25507b 100644 --- a/src/model/target/Target.ts +++ b/src/model/target/Target.ts @@ -1,9 +1,14 @@ import { Sensor } from '../sensor'; +import { Infra } from '../infra'; +import { MetaTargetType } from '../meta'; export interface Target { - id?: number; - createDate?: Date; - displayName?: string; - description?: string; - sensors?: Sensor[]; + id?: number; + infra?: Infra; + metaTargetType?: MetaTargetType; + name?: string; + description?: string; + sensorCount?: number; + createDate?: Date; + sensors?: Sensor[]; } diff --git a/tslint.json b/tslint.json deleted file mode 100644 index a36a2fe..0000000 --- a/tslint.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "rulesDirectory": [ - "node_modules/codelyzer" - ], - "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "eofline": true, - "forin": true, - "import-blacklist": [ - true, - "rxjs" - ], - "import-spacing": true, - "indent": [ - true, - "spaces" - ], - "interface-over-type-literal": true, - "label-position": true, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, - "no-empty": false, - "no-empty-interface": true, - "no-eval": true, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-misused-new": true, - "no-non-null-assertion": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-string-throw": true, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, - "no-use-before-define": ["error", { "functions": true, "classes": true }], - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "prefer-const": true, - "quotemark": [ - true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "typeof-compare": true, - "unified-signatures": true, - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], - "directive-selector": [ - true, - "attribute", - "of", - "camelCase" - ], - "component-selector": [ - true, - "element", - "of", - "kebab-case" - ], - "use-input-property-decorator": true, - "use-output-property-decorator": true, - "use-host-property-decorator": true, - "no-input-rename": true, - "no-output-rename": true, - "use-life-cycle-interface": true, - "use-pipe-transform-interface": true, - "component-class-suffix": true, - "directive-class-suffix": true - } -}