@indiciaosint/sdk 1.2.0 → 1.2.2
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/README.md +7 -1
- package/esm/funcs/infrastructure-virus-total-content.d.ts +18 -0
- package/esm/funcs/infrastructure-virus-total-content.d.ts.map +1 -0
- package/esm/funcs/infrastructure-virus-total-content.js +84 -0
- package/esm/funcs/infrastructure-virus-total-content.js.map +1 -0
- package/esm/funcs/intelligence-virus-total-intelligence.d.ts +18 -0
- package/esm/funcs/intelligence-virus-total-intelligence.d.ts.map +1 -0
- package/esm/funcs/intelligence-virus-total-intelligence.js +84 -0
- package/esm/funcs/intelligence-virus-total-intelligence.js.map +1 -0
- package/esm/funcs/socials-search-github.d.ts +3 -2
- package/esm/funcs/socials-search-github.d.ts.map +1 -1
- package/esm/funcs/socials-search-github.js +11 -3
- package/esm/funcs/socials-search-github.js.map +1 -1
- package/esm/funcs/socials-search-username.d.ts +3 -2
- package/esm/funcs/socials-search-username.d.ts.map +1 -1
- package/esm/funcs/socials-search-username.js +11 -3
- package/esm/funcs/socials-search-username.js.map +1 -1
- package/esm/funcs/tools-download-virus-total-file.d.ts +18 -0
- package/esm/funcs/tools-download-virus-total-file.d.ts.map +1 -0
- package/esm/funcs/tools-download-virus-total-file.js +84 -0
- package/esm/funcs/tools-download-virus-total-file.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/operations/download-virus-total-file.d.ts +34 -0
- package/esm/models/operations/download-virus-total-file.d.ts.map +1 -0
- package/esm/models/operations/download-virus-total-file.js +33 -0
- package/esm/models/operations/download-virus-total-file.js.map +1 -0
- package/esm/models/operations/get-activity.d.ts +3 -0
- package/esm/models/operations/get-activity.d.ts.map +1 -1
- package/esm/models/operations/get-activity.js +3 -0
- package/esm/models/operations/get-activity.js.map +1 -1
- package/esm/models/operations/get-info.d.ts +3 -0
- package/esm/models/operations/get-info.d.ts.map +1 -1
- package/esm/models/operations/get-info.js +3 -0
- package/esm/models/operations/get-info.js.map +1 -1
- package/esm/models/operations/index.d.ts +3 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +3 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/list-activities.d.ts +3 -0
- package/esm/models/operations/list-activities.d.ts.map +1 -1
- package/esm/models/operations/list-activities.js +3 -0
- package/esm/models/operations/list-activities.js.map +1 -1
- package/esm/models/operations/search-face.d.ts +4 -4
- package/esm/models/operations/search-face.d.ts.map +1 -1
- package/esm/models/operations/search-face.js +4 -5
- package/esm/models/operations/search-face.js.map +1 -1
- package/esm/models/operations/search-github.d.ts +69 -7
- package/esm/models/operations/search-github.d.ts.map +1 -1
- package/esm/models/operations/search-github.js +83 -9
- package/esm/models/operations/search-github.js.map +1 -1
- package/esm/models/operations/search-username.d.ts +429 -13
- package/esm/models/operations/search-username.d.ts.map +1 -1
- package/esm/models/operations/search-username.js +725 -13
- package/esm/models/operations/search-username.js.map +1 -1
- package/esm/models/operations/search-web-databases.d.ts +2 -2
- package/esm/models/operations/search-web-databases.js +2 -2
- package/esm/models/operations/search-web-databases.js.map +1 -1
- package/esm/models/operations/virus-total-content.d.ts +62 -0
- package/esm/models/operations/virus-total-content.d.ts.map +1 -0
- package/esm/models/operations/virus-total-content.js +89 -0
- package/esm/models/operations/virus-total-content.js.map +1 -0
- package/esm/models/operations/virus-total-intelligence.d.ts +75 -0
- package/esm/models/operations/virus-total-intelligence.d.ts.map +1 -0
- package/esm/models/operations/virus-total-intelligence.js +92 -0
- package/esm/models/operations/virus-total-intelligence.js.map +1 -0
- package/esm/sdk/infrastructure.d.ts +7 -0
- package/esm/sdk/infrastructure.d.ts.map +1 -1
- package/esm/sdk/infrastructure.js +10 -0
- package/esm/sdk/infrastructure.js.map +1 -1
- package/esm/sdk/intelligence.d.ts +7 -0
- package/esm/sdk/intelligence.d.ts.map +1 -1
- package/esm/sdk/intelligence.js +10 -0
- package/esm/sdk/intelligence.js.map +1 -1
- package/esm/sdk/socials.d.ts +5 -4
- package/esm/sdk/socials.d.ts.map +1 -1
- package/esm/sdk/socials.js +2 -2
- package/esm/sdk/socials.js.map +1 -1
- package/esm/sdk/tools.d.ts +7 -0
- package/esm/sdk/tools.d.ts.map +1 -1
- package/esm/sdk/tools.js +10 -0
- package/esm/sdk/tools.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/infrastructure-virus-total-content.ts +174 -0
- package/src/funcs/intelligence-virus-total-intelligence.ts +174 -0
- package/src/funcs/socials-search-github.ts +21 -6
- package/src/funcs/socials-search-username.ts +23 -6
- package/src/funcs/tools-download-virus-total-file.ts +174 -0
- package/src/lib/config.ts +2 -2
- package/src/models/operations/download-virus-total-file.ts +93 -0
- package/src/models/operations/get-activity.ts +3 -0
- package/src/models/operations/get-info.ts +3 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/list-activities.ts +3 -0
- package/src/models/operations/search-face.ts +15 -13
- package/src/models/operations/search-github.ts +225 -41
- package/src/models/operations/search-username.ts +1667 -77
- package/src/models/operations/search-web-databases.ts +2 -2
- package/src/models/operations/virus-total-content.ts +190 -0
- package/src/models/operations/virus-total-intelligence.ts +210 -0
- package/src/sdk/infrastructure.ts +18 -0
- package/src/sdk/intelligence.ts +18 -0
- package/src/sdk/socials.ts +5 -4
- package/src/sdk/tools.ts +18 -0
|
@@ -26,13 +26,13 @@ export type SearchWebDatabasesService = ClosedEnum<
|
|
|
26
26
|
>;
|
|
27
27
|
|
|
28
28
|
export const CloudsintType = {
|
|
29
|
+
Any: "any",
|
|
30
|
+
Domain: "domain",
|
|
29
31
|
Email: "email",
|
|
30
32
|
Ip: "ip",
|
|
31
33
|
Name: "name",
|
|
32
34
|
Password: "password",
|
|
33
35
|
Phone: "phone",
|
|
34
|
-
Steamid: "steamid",
|
|
35
|
-
Url: "url",
|
|
36
36
|
Username: "username",
|
|
37
37
|
} as const;
|
|
38
38
|
export type CloudsintType = ClosedEnum<typeof CloudsintType>;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type VirusTotalContentRequest = {
|
|
13
|
+
content: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type VirusTotalContentFile = {
|
|
17
|
+
id: string;
|
|
18
|
+
cleanCount?: number | undefined;
|
|
19
|
+
contentSnippet?: string | undefined;
|
|
20
|
+
detectionRatio?: string | undefined;
|
|
21
|
+
fileName?: string | undefined;
|
|
22
|
+
fileNames?: Array<string> | undefined;
|
|
23
|
+
fileSize?: number | undefined;
|
|
24
|
+
fileType?: string | undefined;
|
|
25
|
+
firstSubmissionDate?: string | undefined;
|
|
26
|
+
lastAnalysisDate?: string | undefined;
|
|
27
|
+
maliciousCount?: number | undefined;
|
|
28
|
+
md5?: string | undefined;
|
|
29
|
+
permalink?: string | undefined;
|
|
30
|
+
reputation?: string | undefined;
|
|
31
|
+
sha1?: string | undefined;
|
|
32
|
+
sha256?: string | undefined;
|
|
33
|
+
suspiciousCount?: number | undefined;
|
|
34
|
+
threatNames?: Array<string> | undefined;
|
|
35
|
+
totalEngines?: number | undefined;
|
|
36
|
+
undetectedCount?: number | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type VirusTotalContentData = {
|
|
40
|
+
files: Array<VirusTotalContentFile>;
|
|
41
|
+
searchQuery: string;
|
|
42
|
+
totalResults: number;
|
|
43
|
+
cleanFiles?: number | undefined;
|
|
44
|
+
contentType?: string | undefined;
|
|
45
|
+
maliciousFiles?: number | undefined;
|
|
46
|
+
suspiciousFiles?: number | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Search successful
|
|
51
|
+
*/
|
|
52
|
+
export type VirusTotalContentResponse = {
|
|
53
|
+
data: VirusTotalContentData;
|
|
54
|
+
success: boolean;
|
|
55
|
+
error?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type VirusTotalContentRequest$Outbound = {
|
|
60
|
+
content: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const VirusTotalContentRequest$outboundSchema: z.ZodMiniType<
|
|
65
|
+
VirusTotalContentRequest$Outbound,
|
|
66
|
+
VirusTotalContentRequest
|
|
67
|
+
> = z.object({
|
|
68
|
+
content: z.string(),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function virusTotalContentRequestToJSON(
|
|
72
|
+
virusTotalContentRequest: VirusTotalContentRequest,
|
|
73
|
+
): string {
|
|
74
|
+
return JSON.stringify(
|
|
75
|
+
VirusTotalContentRequest$outboundSchema.parse(virusTotalContentRequest),
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const VirusTotalContentFile$inboundSchema: z.ZodMiniType<
|
|
81
|
+
VirusTotalContentFile,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.pipe(
|
|
84
|
+
z.object({
|
|
85
|
+
id: types.string(),
|
|
86
|
+
clean_count: types.optional(types.number()),
|
|
87
|
+
content_snippet: types.optional(types.string()),
|
|
88
|
+
detection_ratio: types.optional(types.string()),
|
|
89
|
+
file_name: types.optional(types.string()),
|
|
90
|
+
file_names: types.optional(z.array(types.string())),
|
|
91
|
+
file_size: types.optional(types.number()),
|
|
92
|
+
file_type: types.optional(types.string()),
|
|
93
|
+
first_submission_date: types.optional(types.string()),
|
|
94
|
+
last_analysis_date: types.optional(types.string()),
|
|
95
|
+
malicious_count: types.optional(types.number()),
|
|
96
|
+
md5: types.optional(types.string()),
|
|
97
|
+
permalink: types.optional(types.string()),
|
|
98
|
+
reputation: types.optional(types.string()),
|
|
99
|
+
sha1: types.optional(types.string()),
|
|
100
|
+
sha256: types.optional(types.string()),
|
|
101
|
+
suspicious_count: types.optional(types.number()),
|
|
102
|
+
threat_names: types.optional(z.array(types.string())),
|
|
103
|
+
total_engines: types.optional(types.number()),
|
|
104
|
+
undetected_count: types.optional(types.number()),
|
|
105
|
+
}),
|
|
106
|
+
z.transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
"clean_count": "cleanCount",
|
|
109
|
+
"content_snippet": "contentSnippet",
|
|
110
|
+
"detection_ratio": "detectionRatio",
|
|
111
|
+
"file_name": "fileName",
|
|
112
|
+
"file_names": "fileNames",
|
|
113
|
+
"file_size": "fileSize",
|
|
114
|
+
"file_type": "fileType",
|
|
115
|
+
"first_submission_date": "firstSubmissionDate",
|
|
116
|
+
"last_analysis_date": "lastAnalysisDate",
|
|
117
|
+
"malicious_count": "maliciousCount",
|
|
118
|
+
"suspicious_count": "suspiciousCount",
|
|
119
|
+
"threat_names": "threatNames",
|
|
120
|
+
"total_engines": "totalEngines",
|
|
121
|
+
"undetected_count": "undetectedCount",
|
|
122
|
+
});
|
|
123
|
+
}),
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
export function virusTotalContentFileFromJSON(
|
|
127
|
+
jsonString: string,
|
|
128
|
+
): SafeParseResult<VirusTotalContentFile, SDKValidationError> {
|
|
129
|
+
return safeParse(
|
|
130
|
+
jsonString,
|
|
131
|
+
(x) => VirusTotalContentFile$inboundSchema.parse(JSON.parse(x)),
|
|
132
|
+
`Failed to parse 'VirusTotalContentFile' from JSON`,
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const VirusTotalContentData$inboundSchema: z.ZodMiniType<
|
|
138
|
+
VirusTotalContentData,
|
|
139
|
+
unknown
|
|
140
|
+
> = z.pipe(
|
|
141
|
+
z.object({
|
|
142
|
+
files: z.array(z.lazy(() => VirusTotalContentFile$inboundSchema)),
|
|
143
|
+
search_query: types.string(),
|
|
144
|
+
total_results: types.number(),
|
|
145
|
+
clean_files: types.optional(types.number()),
|
|
146
|
+
content_type: types.optional(types.string()),
|
|
147
|
+
malicious_files: types.optional(types.number()),
|
|
148
|
+
suspicious_files: types.optional(types.number()),
|
|
149
|
+
}),
|
|
150
|
+
z.transform((v) => {
|
|
151
|
+
return remap$(v, {
|
|
152
|
+
"search_query": "searchQuery",
|
|
153
|
+
"total_results": "totalResults",
|
|
154
|
+
"clean_files": "cleanFiles",
|
|
155
|
+
"content_type": "contentType",
|
|
156
|
+
"malicious_files": "maliciousFiles",
|
|
157
|
+
"suspicious_files": "suspiciousFiles",
|
|
158
|
+
});
|
|
159
|
+
}),
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
export function virusTotalContentDataFromJSON(
|
|
163
|
+
jsonString: string,
|
|
164
|
+
): SafeParseResult<VirusTotalContentData, SDKValidationError> {
|
|
165
|
+
return safeParse(
|
|
166
|
+
jsonString,
|
|
167
|
+
(x) => VirusTotalContentData$inboundSchema.parse(JSON.parse(x)),
|
|
168
|
+
`Failed to parse 'VirusTotalContentData' from JSON`,
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const VirusTotalContentResponse$inboundSchema: z.ZodMiniType<
|
|
174
|
+
VirusTotalContentResponse,
|
|
175
|
+
unknown
|
|
176
|
+
> = z.object({
|
|
177
|
+
data: z.lazy(() => VirusTotalContentData$inboundSchema),
|
|
178
|
+
success: types.boolean(),
|
|
179
|
+
error: types.optional(types.string()),
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
export function virusTotalContentResponseFromJSON(
|
|
183
|
+
jsonString: string,
|
|
184
|
+
): SafeParseResult<VirusTotalContentResponse, SDKValidationError> {
|
|
185
|
+
return safeParse(
|
|
186
|
+
jsonString,
|
|
187
|
+
(x) => VirusTotalContentResponse$inboundSchema.parse(JSON.parse(x)),
|
|
188
|
+
`Failed to parse 'VirusTotalContentResponse' from JSON`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export const Entity = {
|
|
14
|
+
Domains: "domains",
|
|
15
|
+
Files: "files",
|
|
16
|
+
Ips: "ips",
|
|
17
|
+
Urls: "urls",
|
|
18
|
+
} as const;
|
|
19
|
+
export type Entity = ClosedEnum<typeof Entity>;
|
|
20
|
+
|
|
21
|
+
export type VirusTotalIntelligenceRequest = {
|
|
22
|
+
entity: Entity;
|
|
23
|
+
query: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type VirusTotalIntelligenceFile = {
|
|
27
|
+
id: string;
|
|
28
|
+
cleanCount?: number | undefined;
|
|
29
|
+
detectionRatio?: string | undefined;
|
|
30
|
+
fileName?: string | undefined;
|
|
31
|
+
firstSubmissionDate?: string | undefined;
|
|
32
|
+
lastAnalysisDate?: string | undefined;
|
|
33
|
+
maliciousCount?: number | undefined;
|
|
34
|
+
permalink?: string | undefined;
|
|
35
|
+
reputation?: string | undefined;
|
|
36
|
+
sha256?: string | undefined;
|
|
37
|
+
suspiciousCount?: number | undefined;
|
|
38
|
+
totalEngines?: number | undefined;
|
|
39
|
+
undetectedCount?: number | undefined;
|
|
40
|
+
url?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type SearchStats = {
|
|
44
|
+
clean?: number | undefined;
|
|
45
|
+
malicious?: number | undefined;
|
|
46
|
+
suspicious?: number | undefined;
|
|
47
|
+
total?: number | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type VirusTotalIntelligenceData = {
|
|
51
|
+
entity: string;
|
|
52
|
+
files: Array<VirusTotalIntelligenceFile>;
|
|
53
|
+
query: string;
|
|
54
|
+
totalResults: number;
|
|
55
|
+
searchStats?: SearchStats | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Search successful
|
|
60
|
+
*/
|
|
61
|
+
export type VirusTotalIntelligenceResponse = {
|
|
62
|
+
data: VirusTotalIntelligenceData;
|
|
63
|
+
success: boolean;
|
|
64
|
+
error?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const Entity$outboundSchema: z.ZodMiniEnum<typeof Entity> = z.enum(
|
|
69
|
+
Entity,
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type VirusTotalIntelligenceRequest$Outbound = {
|
|
74
|
+
entity: string;
|
|
75
|
+
query: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const VirusTotalIntelligenceRequest$outboundSchema: z.ZodMiniType<
|
|
80
|
+
VirusTotalIntelligenceRequest$Outbound,
|
|
81
|
+
VirusTotalIntelligenceRequest
|
|
82
|
+
> = z.object({
|
|
83
|
+
entity: Entity$outboundSchema,
|
|
84
|
+
query: z.string(),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export function virusTotalIntelligenceRequestToJSON(
|
|
88
|
+
virusTotalIntelligenceRequest: VirusTotalIntelligenceRequest,
|
|
89
|
+
): string {
|
|
90
|
+
return JSON.stringify(
|
|
91
|
+
VirusTotalIntelligenceRequest$outboundSchema.parse(
|
|
92
|
+
virusTotalIntelligenceRequest,
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const VirusTotalIntelligenceFile$inboundSchema: z.ZodMiniType<
|
|
99
|
+
VirusTotalIntelligenceFile,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.pipe(
|
|
102
|
+
z.object({
|
|
103
|
+
id: types.string(),
|
|
104
|
+
clean_count: types.optional(types.number()),
|
|
105
|
+
detection_ratio: types.optional(types.string()),
|
|
106
|
+
file_name: types.optional(types.string()),
|
|
107
|
+
first_submission_date: types.optional(types.string()),
|
|
108
|
+
last_analysis_date: types.optional(types.string()),
|
|
109
|
+
malicious_count: types.optional(types.number()),
|
|
110
|
+
permalink: types.optional(types.string()),
|
|
111
|
+
reputation: types.optional(types.string()),
|
|
112
|
+
sha256: types.optional(types.string()),
|
|
113
|
+
suspicious_count: types.optional(types.number()),
|
|
114
|
+
total_engines: types.optional(types.number()),
|
|
115
|
+
undetected_count: types.optional(types.number()),
|
|
116
|
+
url: types.optional(types.string()),
|
|
117
|
+
}),
|
|
118
|
+
z.transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
"clean_count": "cleanCount",
|
|
121
|
+
"detection_ratio": "detectionRatio",
|
|
122
|
+
"file_name": "fileName",
|
|
123
|
+
"first_submission_date": "firstSubmissionDate",
|
|
124
|
+
"last_analysis_date": "lastAnalysisDate",
|
|
125
|
+
"malicious_count": "maliciousCount",
|
|
126
|
+
"suspicious_count": "suspiciousCount",
|
|
127
|
+
"total_engines": "totalEngines",
|
|
128
|
+
"undetected_count": "undetectedCount",
|
|
129
|
+
});
|
|
130
|
+
}),
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
export function virusTotalIntelligenceFileFromJSON(
|
|
134
|
+
jsonString: string,
|
|
135
|
+
): SafeParseResult<VirusTotalIntelligenceFile, SDKValidationError> {
|
|
136
|
+
return safeParse(
|
|
137
|
+
jsonString,
|
|
138
|
+
(x) => VirusTotalIntelligenceFile$inboundSchema.parse(JSON.parse(x)),
|
|
139
|
+
`Failed to parse 'VirusTotalIntelligenceFile' from JSON`,
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** @internal */
|
|
144
|
+
export const SearchStats$inboundSchema: z.ZodMiniType<SearchStats, unknown> = z
|
|
145
|
+
.object({
|
|
146
|
+
clean: types.optional(types.number()),
|
|
147
|
+
malicious: types.optional(types.number()),
|
|
148
|
+
suspicious: types.optional(types.number()),
|
|
149
|
+
total: types.optional(types.number()),
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
export function searchStatsFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<SearchStats, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => SearchStats$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'SearchStats' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const VirusTotalIntelligenceData$inboundSchema: z.ZodMiniType<
|
|
164
|
+
VirusTotalIntelligenceData,
|
|
165
|
+
unknown
|
|
166
|
+
> = z.pipe(
|
|
167
|
+
z.object({
|
|
168
|
+
entity: types.string(),
|
|
169
|
+
files: z.array(z.lazy(() => VirusTotalIntelligenceFile$inboundSchema)),
|
|
170
|
+
query: types.string(),
|
|
171
|
+
total_results: types.number(),
|
|
172
|
+
search_stats: types.optional(z.lazy(() => SearchStats$inboundSchema)),
|
|
173
|
+
}),
|
|
174
|
+
z.transform((v) => {
|
|
175
|
+
return remap$(v, {
|
|
176
|
+
"total_results": "totalResults",
|
|
177
|
+
"search_stats": "searchStats",
|
|
178
|
+
});
|
|
179
|
+
}),
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
export function virusTotalIntelligenceDataFromJSON(
|
|
183
|
+
jsonString: string,
|
|
184
|
+
): SafeParseResult<VirusTotalIntelligenceData, SDKValidationError> {
|
|
185
|
+
return safeParse(
|
|
186
|
+
jsonString,
|
|
187
|
+
(x) => VirusTotalIntelligenceData$inboundSchema.parse(JSON.parse(x)),
|
|
188
|
+
`Failed to parse 'VirusTotalIntelligenceData' from JSON`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export const VirusTotalIntelligenceResponse$inboundSchema: z.ZodMiniType<
|
|
194
|
+
VirusTotalIntelligenceResponse,
|
|
195
|
+
unknown
|
|
196
|
+
> = z.object({
|
|
197
|
+
data: z.lazy(() => VirusTotalIntelligenceData$inboundSchema),
|
|
198
|
+
success: types.boolean(),
|
|
199
|
+
error: types.optional(types.string()),
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
export function virusTotalIntelligenceResponseFromJSON(
|
|
203
|
+
jsonString: string,
|
|
204
|
+
): SafeParseResult<VirusTotalIntelligenceResponse, SDKValidationError> {
|
|
205
|
+
return safeParse(
|
|
206
|
+
jsonString,
|
|
207
|
+
(x) => VirusTotalIntelligenceResponse$inboundSchema.parse(JSON.parse(x)),
|
|
208
|
+
`Failed to parse 'VirusTotalIntelligenceResponse' from JSON`,
|
|
209
|
+
);
|
|
210
|
+
}
|
|
@@ -8,6 +8,7 @@ import { infrastructureSearchDns } from "../funcs/infrastructure-search-dns.js";
|
|
|
8
8
|
import { infrastructureSearchIpInfo } from "../funcs/infrastructure-search-ip-info.js";
|
|
9
9
|
import { infrastructureSearchShodan } from "../funcs/infrastructure-search-shodan.js";
|
|
10
10
|
import { infrastructureSearchWhois } from "../funcs/infrastructure-search-whois.js";
|
|
11
|
+
import { infrastructureVirusTotalContent } from "../funcs/infrastructure-virus-total-content.js";
|
|
11
12
|
import { EventStream } from "../lib/event-streams.js";
|
|
12
13
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
13
14
|
import * as operations from "../models/operations/index.js";
|
|
@@ -65,6 +66,23 @@ export class Infrastructure extends ClientSDK {
|
|
|
65
66
|
));
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
/**
|
|
70
|
+
* VirusTotal Content Search
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* Search VirusTotal for files whose content matches a given string.
|
|
74
|
+
*/
|
|
75
|
+
async virusTotalContent(
|
|
76
|
+
request: operations.VirusTotalContentRequest,
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): Promise<operations.VirusTotalContentResponse> {
|
|
79
|
+
return unwrapAsync(infrastructureVirusTotalContent(
|
|
80
|
+
this,
|
|
81
|
+
request,
|
|
82
|
+
options,
|
|
83
|
+
));
|
|
84
|
+
}
|
|
85
|
+
|
|
68
86
|
/**
|
|
69
87
|
* Whois
|
|
70
88
|
*
|
package/src/sdk/intelligence.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { intelligenceSearchPerson } from "../funcs/intelligence-search-person.js
|
|
|
12
12
|
import { intelligenceSearchPhone } from "../funcs/intelligence-search-phone.js";
|
|
13
13
|
import { intelligenceSearchSeon } from "../funcs/intelligence-search-seon.js";
|
|
14
14
|
import { intelligenceSearchWebDatabases } from "../funcs/intelligence-search-web-databases.js";
|
|
15
|
+
import { intelligenceVirusTotalIntelligence } from "../funcs/intelligence-virus-total-intelligence.js";
|
|
15
16
|
import { EventStream } from "../lib/event-streams.js";
|
|
16
17
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
17
18
|
import * as operations from "../models/operations/index.js";
|
|
@@ -134,6 +135,23 @@ export class Intelligence extends ClientSDK {
|
|
|
134
135
|
));
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
/**
|
|
139
|
+
* VirusTotal File Intelligence
|
|
140
|
+
*
|
|
141
|
+
* @remarks
|
|
142
|
+
* Look up VirusTotal reputation and antivirus detection data for a URL, domain, IP address, or file hash.
|
|
143
|
+
*/
|
|
144
|
+
async virusTotalIntelligence(
|
|
145
|
+
request: operations.VirusTotalIntelligenceRequest,
|
|
146
|
+
options?: RequestOptions,
|
|
147
|
+
): Promise<operations.VirusTotalIntelligenceResponse> {
|
|
148
|
+
return unwrapAsync(intelligenceVirusTotalIntelligence(
|
|
149
|
+
this,
|
|
150
|
+
request,
|
|
151
|
+
options,
|
|
152
|
+
));
|
|
153
|
+
}
|
|
154
|
+
|
|
137
155
|
/**
|
|
138
156
|
* Web Databases
|
|
139
157
|
*
|
package/src/sdk/socials.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { socialsSearchGithub } from "../funcs/socials-search-github.js";
|
|
|
7
7
|
import { socialsSearchRoblox } from "../funcs/socials-search-roblox.js";
|
|
8
8
|
import { socialsSearchTiktok } from "../funcs/socials-search-tiktok.js";
|
|
9
9
|
import { socialsSearchUsername } from "../funcs/socials-search-username.js";
|
|
10
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
10
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
12
|
import * as operations from "../models/operations/index.js";
|
|
12
13
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -33,12 +34,12 @@ export class Socials extends ClientSDK {
|
|
|
33
34
|
* GitHub Search
|
|
34
35
|
*
|
|
35
36
|
* @remarks
|
|
36
|
-
* Search GitHub profiles, info, and commit emails
|
|
37
|
+
* Search GitHub profiles, info, and commit emails. Streams progress updates via Server-Sent Events.
|
|
37
38
|
*/
|
|
38
39
|
async searchGithub(
|
|
39
40
|
request: operations.SearchGithubRequest,
|
|
40
41
|
options?: RequestOptions,
|
|
41
|
-
): Promise<operations.
|
|
42
|
+
): Promise<EventStream<operations.GithubSearchEvent>> {
|
|
42
43
|
return unwrapAsync(socialsSearchGithub(
|
|
43
44
|
this,
|
|
44
45
|
request,
|
|
@@ -84,12 +85,12 @@ export class Socials extends ClientSDK {
|
|
|
84
85
|
* Username Search V2
|
|
85
86
|
*
|
|
86
87
|
* @remarks
|
|
87
|
-
* Search various sites for a specific username
|
|
88
|
+
* Search various sites for a specific username. Streams progress updates via Server-Sent Events.
|
|
88
89
|
*/
|
|
89
90
|
async searchUsername(
|
|
90
91
|
request: operations.SearchUsernameRequest,
|
|
91
92
|
options?: RequestOptions,
|
|
92
|
-
): Promise<operations.
|
|
93
|
+
): Promise<EventStream<operations.UsernameSearchEvent>> {
|
|
93
94
|
return unwrapAsync(socialsSearchUsername(
|
|
94
95
|
this,
|
|
95
96
|
request,
|
package/src/sdk/tools.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { toolsBypassDoubleCounter } from "../funcs/tools-bypass-double-counter.js";
|
|
6
6
|
import { toolsDownloadIntelxFile } from "../funcs/tools-download-intelx-file.js";
|
|
7
|
+
import { toolsDownloadVirusTotalFile } from "../funcs/tools-download-virus-total-file.js";
|
|
7
8
|
import { toolsLookupDiscordAlt } from "../funcs/tools-lookup-discord-alt.js";
|
|
8
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
10
|
import * as operations from "../models/operations/index.js";
|
|
@@ -60,4 +61,21 @@ export class Tools extends ClientSDK {
|
|
|
60
61
|
options,
|
|
61
62
|
));
|
|
62
63
|
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Download VirusTotal file
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Download a file from VirusTotal by its id. The file is returned base64-encoded.
|
|
70
|
+
*/
|
|
71
|
+
async downloadVirusTotalFile(
|
|
72
|
+
request: operations.DownloadVirusTotalFileRequest,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): Promise<operations.DownloadVirusTotalFileResponse> {
|
|
75
|
+
return unwrapAsync(toolsDownloadVirusTotalFile(
|
|
76
|
+
this,
|
|
77
|
+
request,
|
|
78
|
+
options,
|
|
79
|
+
));
|
|
80
|
+
}
|
|
63
81
|
}
|