-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "@metlo/common", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsc", | ||
"watch": "tsc -w" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
export enum RestMethod { | ||
GET = "GET", | ||
HEAD = "HEAD", | ||
POST = "POST", | ||
PUT = "PUT", | ||
PATCH = "PATCH", | ||
DELETE = "DELETE", | ||
CONNECT = "CONNECT", | ||
OPTIONS = "OPTIONS", | ||
TRACE = "TRACE", | ||
} | ||
|
||
export enum DataClass { | ||
EMAIL = "Email", | ||
CREDIT_CARD = "Credit Card Number", | ||
SSN = "Social Security Number", | ||
PHONE_NUMBER = "Phone Number", | ||
IP_ADDRESS = "IP Address", | ||
COORDINATE = "Geographic Coordinates", | ||
VIN = "Vehicle Identification Number", | ||
ADDRESS = "Address", | ||
DOB = "Date of Birth", | ||
DL_NUMBER = "Driver License Number", | ||
} | ||
|
||
export enum RiskScore { | ||
LOW = "low", | ||
MEDIUM = "medium", | ||
HIGH = "high", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { RestMethod } from "./enums"; | ||
|
||
export interface Meta { | ||
incoming: boolean; | ||
source: string; | ||
sourcePort: string; | ||
destination: string; | ||
destinationPort: string; | ||
environment: string; | ||
} | ||
|
||
export interface PairObject { | ||
name: string; | ||
value: string; | ||
} | ||
|
||
export interface Url { | ||
host: string; | ||
path: string; | ||
parameters: PairObject[]; | ||
} | ||
|
||
export interface Request { | ||
url: Url; | ||
headers: PairObject[]; | ||
body: string; | ||
method: RestMethod; | ||
} | ||
|
||
export interface Response { | ||
status: number; | ||
headers: PairObject[]; | ||
body: string; | ||
} | ||
|
||
export interface TraceParams { | ||
request: Request; | ||
response: Response; | ||
meta: Meta; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"target": "es6", | ||
"lib": ["dom", "es6", "es2017", "esnext.asynciterable"], | ||
"allowSyntheticDefaultImports": true, | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs", | ||
"pretty": true, | ||
"sourceMap": true, | ||
"declaration": true, | ||
"outDir": "dist", | ||
"allowJs": true, | ||
"noEmit": false, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"importHelpers": true, | ||
"baseUrl": "src" | ||
}, | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules"] | ||
} |