cybertipline-tools 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/types/Constants.d.ts +135 -0
- package/dist/types/Constants.js +142 -0
- package/dist/types/Constants.js.map +1 -0
- package/dist/types/TypeUtils.d.ts +3 -0
- package/dist/types/TypeUtils.js +2 -0
- package/dist/types/TypeUtils.js.map +1 -0
- package/dist/types/common/Address.d.ts +26 -0
- package/dist/types/common/Address.js +9 -0
- package/dist/types/common/Address.js.map +1 -0
- package/dist/types/common/DeviceId.d.ts +26 -0
- package/dist/types/common/DeviceId.js +16 -0
- package/dist/types/common/DeviceId.js.map +1 -0
- package/dist/types/common/Email.d.ts +18 -0
- package/dist/types/common/Email.js +7 -0
- package/dist/types/common/Email.js.map +1 -0
- package/dist/types/common/EstimatedLocation.d.ts +15 -0
- package/dist/types/common/EstimatedLocation.js +2 -0
- package/dist/types/common/EstimatedLocation.js.map +1 -0
- package/dist/types/common/IpCapture.d.ts +24 -0
- package/dist/types/common/IpCapture.js +10 -0
- package/dist/types/common/IpCapture.js.map +1 -0
- package/dist/types/common/Person.d.ts +24 -0
- package/dist/types/common/Person.js +2 -0
- package/dist/types/common/Person.js.map +1 -0
- package/dist/types/common/Phone.d.ts +25 -0
- package/dist/types/common/Phone.js +10 -0
- package/dist/types/common/Phone.js.map +1 -0
- package/dist/types/fileDetails/FileDetails.d.ts +21 -0
- package/dist/types/fileDetails/FileDetails.js +9 -0
- package/dist/types/fileDetails/FileDetails.js.map +1 -0
- package/dist/types/fileDetails/OriginalFileHash.d.ts +19 -0
- package/dist/types/fileDetails/OriginalFileHash.js +9 -0
- package/dist/types/fileDetails/OriginalFileHash.js.map +1 -0
- package/dist/types/incidents/CellPhoneIncident.d.ts +18 -0
- package/dist/types/incidents/CellPhoneIncident.js +2 -0
- package/dist/types/incidents/CellPhoneIncident.js.map +1 -0
- package/dist/types/incidents/ChatImIncident.d.ts +15 -0
- package/dist/types/incidents/ChatImIncident.js +2 -0
- package/dist/types/incidents/ChatImIncident.js.map +1 -0
- package/dist/types/incidents/EmailIncident.d.ts +14 -0
- package/dist/types/incidents/EmailIncident.js +2 -0
- package/dist/types/incidents/EmailIncident.js.map +1 -0
- package/dist/types/incidents/NewsgroupIncident.d.ts +16 -0
- package/dist/types/incidents/NewsgroupIncident.js +2 -0
- package/dist/types/incidents/NewsgroupIncident.js.map +1 -0
- package/dist/types/incidents/NonInternetIncident.d.ts +15 -0
- package/dist/types/incidents/NonInternetIncident.js +2 -0
- package/dist/types/incidents/NonInternetIncident.js.map +1 -0
- package/dist/types/incidents/OnlineGamingIncident.d.ts +15 -0
- package/dist/types/incidents/OnlineGamingIncident.js +2 -0
- package/dist/types/incidents/OnlineGamingIncident.js.map +1 -0
- package/dist/types/incidents/Peer2peerIncident.d.ts +17 -0
- package/dist/types/incidents/Peer2peerIncident.js +2 -0
- package/dist/types/incidents/Peer2peerIncident.js.map +1 -0
- package/dist/types/incidents/WebPageIncident.d.ts +15 -0
- package/dist/types/incidents/WebPageIncident.js +2 -0
- package/dist/types/incidents/WebPageIncident.js.map +1 -0
- package/dist/types/reportDetails/IncidentSummary.d.ts +18 -0
- package/dist/types/reportDetails/IncidentSummary.js +2 -0
- package/dist/types/reportDetails/IncidentSummary.js.map +1 -0
- package/dist/types/reportDetails/IntendedRecipient.d.ts +46 -0
- package/dist/types/reportDetails/IntendedRecipient.js +2 -0
- package/dist/types/reportDetails/IntendedRecipient.js.map +1 -0
- package/dist/types/reportDetails/LawEnforcement.d.ts +23 -0
- package/dist/types/reportDetails/LawEnforcement.js +2 -0
- package/dist/types/reportDetails/LawEnforcement.js.map +1 -0
- package/dist/types/reportDetails/PersonOrUserReported.d.ts +39 -0
- package/dist/types/reportDetails/PersonOrUserReported.js +2 -0
- package/dist/types/reportDetails/PersonOrUserReported.js.map +1 -0
- package/dist/types/reportDetails/Reporter.d.ts +20 -0
- package/dist/types/reportDetails/Reporter.js +2 -0
- package/dist/types/reportDetails/Reporter.js.map +1 -0
- package/dist/types/reportDetails/Victim.d.ts +35 -0
- package/dist/types/reportDetails/Victim.js +2 -0
- package/dist/types/reportDetails/Victim.js.map +1 -0
- package/dist/types/transactions/CancelReport.d.ts +22 -0
- package/dist/types/transactions/CancelReport.js +2 -0
- package/dist/types/transactions/CancelReport.js.map +1 -0
- package/dist/types/transactions/FinishReport.d.ts +22 -0
- package/dist/types/transactions/FinishReport.js +2 -0
- package/dist/types/transactions/FinishReport.js.map +1 -0
- package/dist/types/transactions/Report.d.ts +49 -0
- package/dist/types/transactions/Report.js +2 -0
- package/dist/types/transactions/Report.js.map +1 -0
- package/dist/types/transactions/SubmitFileDetails.d.ts +56 -0
- package/dist/types/transactions/SubmitFileDetails.js +2 -0
- package/dist/types/transactions/SubmitFileDetails.js.map +1 -0
- package/dist/types/transactions/UploadFile.d.ts +28 -0
- package/dist/types/transactions/UploadFile.js +2 -0
- package/dist/types/transactions/UploadFile.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ResponseCode } from '../Constants.js';
|
|
2
|
+
import type { CellPhoneIncident } from '../incidents/CellPhoneIncident.js';
|
|
3
|
+
import type { ChatImIncident } from '../incidents/ChatImIncident.js';
|
|
4
|
+
import type { EmailIncident } from '../incidents/EmailIncident.js';
|
|
5
|
+
import type { NewsgroupIncident } from '../incidents/NewsgroupIncident.js';
|
|
6
|
+
import type { NonInternetIncident } from '../incidents/NonInternetIncident.js';
|
|
7
|
+
import type { OnlineGamingIncident } from '../incidents/OnlineGamingIncident.js';
|
|
8
|
+
import type { Peer2peerIncident } from '../incidents/Peer2peerIncident.js';
|
|
9
|
+
import type { WebPageIncident } from '../incidents/WebPageIncident.js';
|
|
10
|
+
import type { IncidentSummary } from '../reportDetails/IncidentSummary.js';
|
|
11
|
+
import type { IntendedRecipient } from '../reportDetails/IntendedRecipient.js';
|
|
12
|
+
import type { LawEnforcement } from '../reportDetails/LawEnforcement.js';
|
|
13
|
+
import type { PersonOrUserReported } from '../reportDetails/PersonOrUserReported.js';
|
|
14
|
+
import type { Reporter } from '../reportDetails/Reporter.js';
|
|
15
|
+
import type { Victim } from '../reportDetails/Victim.js';
|
|
16
|
+
/**
|
|
17
|
+
* Request properties for the Report endpoint.
|
|
18
|
+
*
|
|
19
|
+
* @see https://report.cybertip.org/ispws/documentation/index.html#report-details-types
|
|
20
|
+
*/
|
|
21
|
+
export interface Report {
|
|
22
|
+
/** General incident information. */
|
|
23
|
+
incidentSummary: IncidentSummary;
|
|
24
|
+
/** Details of an incident being reported. */
|
|
25
|
+
internetDetails?: Array<WebPageIncident | EmailIncident | NewsgroupIncident | ChatImIncident | OnlineGamingIncident | CellPhoneIncident | NonInternetIncident | Peer2peerIncident>;
|
|
26
|
+
/** Law enforcement contact information if the incident information has already been reported to law enforcement or if the request originated from law enforcement. */
|
|
27
|
+
lawEnforcement?: LawEnforcement;
|
|
28
|
+
/** Information related to the person or company reporting the incident. */
|
|
29
|
+
reporter: Reporter;
|
|
30
|
+
/** The reported user or person involved in the incident. This person will be displayed as the suspect. */
|
|
31
|
+
personOrUserReported?: PersonOrUserReported;
|
|
32
|
+
/** An intended recipient(s) involved in the incident. */
|
|
33
|
+
intendedRecipient?: Array<IntendedRecipient>;
|
|
34
|
+
/** The victim(s) of the incident. */
|
|
35
|
+
victim?: Array<Victim>;
|
|
36
|
+
/** Additional notes on this incident not covered by any other section. */
|
|
37
|
+
additionalInfo?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Response properties for the Report endpoint.
|
|
41
|
+
*/
|
|
42
|
+
export interface ReportResponse {
|
|
43
|
+
/** The response code returned from the submittal. Response code 0 indicates successful report submission, any non-zero number is an error code. */
|
|
44
|
+
responseCode: ResponseCode | number;
|
|
45
|
+
/** A description of the response code. */
|
|
46
|
+
responseDescription: string;
|
|
47
|
+
/** Report ID assigned to the submitted report. */
|
|
48
|
+
reportId: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Report.js","sourceRoot":"","sources":["../../../src/types/transactions/Report.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { FileAnnotations, FileRelevance, IndustryClassification, ResponseCode } from '../Constants.js';
|
|
2
|
+
import type { DeviceId } from '../common/DeviceId.js';
|
|
3
|
+
import type { IpCapture } from '../common/IpCapture.js';
|
|
4
|
+
import type { FileDetails } from '../fileDetails/FileDetails.js';
|
|
5
|
+
import type { OriginalFileHash } from '../fileDetails/OriginalFileHash.js';
|
|
6
|
+
/**
|
|
7
|
+
* POST properties for the Submit File Details endpoint.
|
|
8
|
+
*
|
|
9
|
+
* @interface SubmitFileDetails
|
|
10
|
+
* @see https://report.cybertip.org/ispws/documentation/index.html#submit-file-details
|
|
11
|
+
*/
|
|
12
|
+
export interface SubmitFileDetails {
|
|
13
|
+
/** The report ID to which the uploaded file is associated. */
|
|
14
|
+
reportId: number;
|
|
15
|
+
/** The ID of the file to which the annotations should be associated. */
|
|
16
|
+
fileId: string;
|
|
17
|
+
/** The stored name of the file. */
|
|
18
|
+
fileName?: string;
|
|
19
|
+
/** The original filename associated with the file when it was uploaded to the company's servers by the reported user or person. */
|
|
20
|
+
originalFileName?: string;
|
|
21
|
+
/** The URL where file was originally located. */
|
|
22
|
+
locationOfFile?: string;
|
|
23
|
+
/** Whether the reporting company viewed the entire contents of the file being reported to NCMEC. */
|
|
24
|
+
fileViewedByEsp?: boolean;
|
|
25
|
+
/** Whether the reporting company viewed the EXIF for the file being reported to NCMEC. */
|
|
26
|
+
exifViewedByEsp?: boolean;
|
|
27
|
+
/** Whether the entire contents of the file were publicly accessible to online users. */
|
|
28
|
+
publiclyAvailable?: boolean;
|
|
29
|
+
/** The relevance or relation of the file to the report. Unless specified otherwise, a file is "Reported" by default. */
|
|
30
|
+
fileRelevance?: FileRelevance;
|
|
31
|
+
/** Tags to describe the file. */
|
|
32
|
+
fileAnnotations?: Array<FileAnnotations>;
|
|
33
|
+
/** A categorization from the ESP-designated categorization scale. */
|
|
34
|
+
industryClassification?: IndustryClassification;
|
|
35
|
+
/** The original binary hash value of the file at the time it was uploaded by the reported user or person (prior to any potential modification by the reporter). */
|
|
36
|
+
originalFileHash?: Array<OriginalFileHash>;
|
|
37
|
+
/** An IP address associated with the file. */
|
|
38
|
+
ipCaptureEvent?: IpCapture;
|
|
39
|
+
/** IDs for devices associated with the file. */
|
|
40
|
+
deviceId?: Array<DeviceId>;
|
|
41
|
+
/** Metadata associated with the file. */
|
|
42
|
+
details?: Array<FileDetails>;
|
|
43
|
+
/** Additional information about this file not covered by any other section. */
|
|
44
|
+
additionalInfo?: Array<string>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Response properties for the Submit File Details endpoint.
|
|
48
|
+
*/
|
|
49
|
+
export interface SubmitFileDetailsResponse {
|
|
50
|
+
/** The response code returned from the submittal. 0 is success, any non-zero number is an error code. */
|
|
51
|
+
responseCode: ResponseCode | number;
|
|
52
|
+
/** A description of the response code. */
|
|
53
|
+
responseDescription: string;
|
|
54
|
+
/** The report ID to which this response is related. */
|
|
55
|
+
reportId: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubmitFileDetails.js","sourceRoot":"","sources":["../../../src/types/transactions/SubmitFileDetails.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ResponseCode } from '../Constants.js';
|
|
2
|
+
/**
|
|
3
|
+
* POST properties for the Upload File endpoint.
|
|
4
|
+
*
|
|
5
|
+
* @interface UploadFile
|
|
6
|
+
* @see https://report.cybertip.org/ispws/documentation/index.html#upload-a-file
|
|
7
|
+
*/
|
|
8
|
+
export interface UploadFile {
|
|
9
|
+
/** The report ID to which the uploaded file should be associated. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The actual file being uploaded */
|
|
12
|
+
file: File;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Response properties for the Upload File endpoint.
|
|
16
|
+
*/
|
|
17
|
+
export interface UploadFileResponse {
|
|
18
|
+
/** The response code returned from the submittal. 0 is success, any non-zero number is an error code. */
|
|
19
|
+
responseCode: ResponseCode | number;
|
|
20
|
+
/** A description of the response code. */
|
|
21
|
+
responseDescription: string;
|
|
22
|
+
/** The report ID to which this response is related. */
|
|
23
|
+
reportId: string;
|
|
24
|
+
/** If a file was successfully uploaded, the file ID for the file. */
|
|
25
|
+
fileId?: string;
|
|
26
|
+
/** If a file was successfully uploaded, the MD5 hash of the file. */
|
|
27
|
+
hash?: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadFile.js","sourceRoot":"","sources":["../../../src/types/transactions/UploadFile.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cybertipline-tools",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Unofficial Types and Utilities for working with the CyberTipline API",
|
|
5
|
+
"homepage": "https://github.com/Johannes-Andersen/Cybertipline-Tools",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/Johannes-Andersen/Cybertipline-Tools/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/Johannes-Andersen/Cybertipline-Tools.git"
|
|
12
|
+
},
|
|
13
|
+
"author": "Johannes Andersen (https://johand.dev)",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"cybertipline",
|
|
16
|
+
"NCMEC",
|
|
17
|
+
"utils"
|
|
18
|
+
],
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": "22.12.0",
|
|
27
|
+
"pnpm": "9"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@arethetypeswrong/cli": "0.17.0",
|
|
31
|
+
"@biomejs/biome": "1.9.4",
|
|
32
|
+
"@changesets/cli": "2.27.10",
|
|
33
|
+
"typescript": "5.7.2"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc",
|
|
37
|
+
"changeset": "changeset",
|
|
38
|
+
"local-release": "changeset version && changeset publish",
|
|
39
|
+
"check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
|
|
40
|
+
"type-check": "tsc --noEmit",
|
|
41
|
+
"lint": "biome lint .",
|
|
42
|
+
"lint:fix": "biome lint --write .",
|
|
43
|
+
"format": "biome format .",
|
|
44
|
+
"format:fix": "biome format --write .",
|
|
45
|
+
"check": "biome check .",
|
|
46
|
+
"check:fix": "biome check --write ."
|
|
47
|
+
}
|
|
48
|
+
}
|