chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
[@redeye/parser-core](../index.md) / FileDisplay
|
||||
|
||||
# Interface: FileDisplay
|
||||
|
||||
## Table of contents
|
||||
|
||||
### Properties
|
||||
|
||||
- [editable](FileDisplay.md#editable)
|
||||
|
||||
## Properties
|
||||
|
||||
### editable
|
||||
|
||||
• **editable**: `boolean`
|
||||
|
||||
Whether the names of the servers inferred from the uploaded files are editable
|
||||
A user may want to change the name of a server to something more descriptive
|
||||
|
||||
#### Defined in
|
||||
|
||||
[upload-form.ts:85](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/upload-form.ts#L85)
|
||||
@@ -0,0 +1,70 @@
|
||||
[@redeye/parser-core](../index.md) / FileUpload
|
||||
|
||||
# Interface: FileUpload
|
||||
|
||||
## Table of contents
|
||||
|
||||
### Properties
|
||||
|
||||
- [description](FileUpload.md#description)
|
||||
- [example](FileUpload.md#example)
|
||||
- [type](FileUpload.md#type)
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
Describes what should be uploaded for the selected parser
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
description =
|
||||
'Upload a directory of files that are organized by server name and date in the format: <FOLDER_TO_UPLOAD>/<SERVER_NAME>/<YYYYMMDD>/';
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[file-upload.ts:9](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/file-upload.ts#L9)
|
||||
|
||||
---
|
||||
|
||||
### example
|
||||
|
||||
• `Optional` **example**: `string`
|
||||
|
||||
A string that will be displayed in the upload form as an example of the type of file or shape of directory to upload
|
||||
|
||||
**`Default`**
|
||||
|
||||
```ts
|
||||
undefined;
|
||||
```
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
`Campaign_Folder
|
||||
- Server_Folder_1
|
||||
- 200101
|
||||
- 200102
|
||||
- 200103`;
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[file-upload.ts:20](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/file-upload.ts#L20)
|
||||
|
||||
---
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `"File"` \| `"Directory"`
|
||||
|
||||
The type of upload, a selection of files or a directory
|
||||
|
||||
#### Defined in
|
||||
|
||||
[file-upload.ts:3](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/file-upload.ts#L3)
|
||||
@@ -0,0 +1,122 @@
|
||||
[@redeye/parser-core](../index.md) / ParserInfo
|
||||
|
||||
# Interface: ParserInfo
|
||||
|
||||
## Table of contents
|
||||
|
||||
### Properties
|
||||
|
||||
- [description](ParserInfo.md#description)
|
||||
- [id](ParserInfo.md#id)
|
||||
- [name](ParserInfo.md#name)
|
||||
- [uploadForm](ParserInfo.md#uploadform)
|
||||
- [version](ParserInfo.md#version)
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
An optional description of the parser
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
description = 'This parser is super cool and does all the things';
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:32](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/index.ts#L32)
|
||||
|
||||
---
|
||||
|
||||
### id
|
||||
|
||||
• **id**: `string`
|
||||
|
||||
ID for parser, should match the standard name of the binary file or command
|
||||
// The parser binary is named 'my-parser'
|
||||
id = 'my-parser'
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:19](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/index.ts#L19)
|
||||
|
||||
---
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
The display name of the parser
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
// The parser binary is named 'my-parser'
|
||||
name = 'My Super Cool Parser';
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:26](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/index.ts#L26)
|
||||
|
||||
---
|
||||
|
||||
### uploadForm
|
||||
|
||||
• **uploadForm**: [`UploadForm`](UploadForm.md)
|
||||
|
||||
An object that configures the upload form in RedEye's UI
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
// upload a directory of files that are organized by server name and date in the format: <FOLDER_TO_UPLOAD>/<SERVER_NAME>/<YYYYMMDD>/
|
||||
uploadForm = {
|
||||
tabTitle: '<C2_NAME>',
|
||||
enabledInBlueTeam: false,
|
||||
serverDelineation: ServerDelineationTypes.Folder,
|
||||
fileUpload: {
|
||||
type: UploadType.Directory,
|
||||
description:
|
||||
'Upload a directory of files that are organized by server name and date in the format: <FOLDER_TO_UPLOAD>/<SERVER_NAME>/<YYYYMMDD>/',
|
||||
example: `Campaign_Folder
|
||||
- Server_Folder_1
|
||||
- 200101
|
||||
- 200102
|
||||
- 200103`,
|
||||
validate: ValidationMode.Parser,
|
||||
},
|
||||
fileDisplay: {
|
||||
editable: true,
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:56](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/index.ts#L56)
|
||||
|
||||
---
|
||||
|
||||
### version
|
||||
|
||||
• **version**: `number`
|
||||
|
||||
The version of the RedEye parser config that the parser is compatible with
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
// RedEye parser schema was updated with new fields and commands, bumping from version 1 to 2
|
||||
version = 2;
|
||||
// If you haven't updated your parser to use the new fields and commands, you can still use the old version
|
||||
version = 1;
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[index.ts:13](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/index.ts#L13)
|
||||
@@ -0,0 +1,114 @@
|
||||
[@redeye/parser-core](../index.md) / UploadForm
|
||||
|
||||
# Interface: UploadForm
|
||||
|
||||
## Table of contents
|
||||
|
||||
### Properties
|
||||
|
||||
- [enabledInBlueTeam](UploadForm.md#enabledinblueteam)
|
||||
- [fileDisplay](UploadForm.md#filedisplay)
|
||||
- [fileUpload](UploadForm.md#fileupload)
|
||||
- [serverDelineation](UploadForm.md#serverdelineation)
|
||||
- [tabTitle](UploadForm.md#tabtitle)
|
||||
|
||||
## Properties
|
||||
|
||||
### enabledInBlueTeam
|
||||
|
||||
• **enabledInBlueTeam**: `boolean`
|
||||
|
||||
Whether the parser is enabled in blue team mode
|
||||
This should be false unless the parser is intended to be used by a blue team
|
||||
The Blue team mode is intended to be a read only mode
|
||||
|
||||
#### Defined in
|
||||
|
||||
[upload-form.ts:15](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/upload-form.ts#L15)
|
||||
|
||||
---
|
||||
|
||||
### fileDisplay
|
||||
|
||||
• **fileDisplay**: [`FileDisplay`](FileDisplay.md)
|
||||
|
||||
An object that configures the list of servers/files after upload
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
// server names are editable
|
||||
fileDisplay = { editable: true };
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[upload-form.ts:47](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/upload-form.ts#L47)
|
||||
|
||||
---
|
||||
|
||||
### fileUpload
|
||||
|
||||
• **fileUpload**: `Object`
|
||||
|
||||
An object that configures the file upload portion of the upload form
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
// upload a directory of files that are organized by server name and date in the format: <FOLDER_TO_UPLOAD>/<SERVER_NAME>/<YYYYMMDD>/
|
||||
fileUpload = {
|
||||
type: UploadType.Directory,
|
||||
description:
|
||||
'Upload a directory of files that are organized by server name and date in the format: <FOLDER_TO_UPLOAD>/<SERVER_NAME>/<YYYYMMDD>/',
|
||||
example: `Campaign_Folder
|
||||
- Server_Folder_1
|
||||
- 200101
|
||||
- 200102
|
||||
- 200103`,
|
||||
validate: ValidationMode.Parser,
|
||||
};
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[upload-form.ts:40](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/upload-form.ts#L40)
|
||||
|
||||
---
|
||||
|
||||
### serverDelineation
|
||||
|
||||
• **serverDelineation**: `"Folder"` \| `"Database"`
|
||||
|
||||
The type of server delineation used by the parser
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
// server data is seperated into distinct folders like 'CAMPAIGN_FOLDER/SERVER_FOLDER/DATE_FOLDER'
|
||||
serverDelineation = ServerDelineationTypes.Folder;
|
||||
// server data is not in any particular file/folder structure
|
||||
serverDelineation = ServerDelineationTypes.Database;
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[upload-form.ts:24](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/upload-form.ts#L24)
|
||||
|
||||
---
|
||||
|
||||
### tabTitle
|
||||
|
||||
• **tabTitle**: `string`
|
||||
|
||||
The title of the tab in the upload form
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
tabTitle = '<C2_NAME>';
|
||||
```
|
||||
|
||||
#### Defined in
|
||||
|
||||
[upload-form.ts:9](https://github.com/cisagov/RedEye/blob/bd5dfc45/parsers/parser-core/src/parser-info/upload-form.ts#L9)
|
||||
Reference in New Issue
Block a user