@indiciaosint/sdk 1.2.1 → 1.2.3

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.
Files changed (75) hide show
  1. package/README.md +7 -1
  2. package/esm/funcs/infrastructure-virus-total-content.d.ts +18 -0
  3. package/esm/funcs/infrastructure-virus-total-content.d.ts.map +1 -0
  4. package/esm/funcs/infrastructure-virus-total-content.js +84 -0
  5. package/esm/funcs/infrastructure-virus-total-content.js.map +1 -0
  6. package/esm/funcs/intelligence-virus-total-intelligence.d.ts +18 -0
  7. package/esm/funcs/intelligence-virus-total-intelligence.d.ts.map +1 -0
  8. package/esm/funcs/intelligence-virus-total-intelligence.js +84 -0
  9. package/esm/funcs/intelligence-virus-total-intelligence.js.map +1 -0
  10. package/esm/funcs/tools-download-virus-total-file.d.ts +18 -0
  11. package/esm/funcs/tools-download-virus-total-file.d.ts.map +1 -0
  12. package/esm/funcs/tools-download-virus-total-file.js +84 -0
  13. package/esm/funcs/tools-download-virus-total-file.js.map +1 -0
  14. package/esm/lib/config.d.ts +2 -2
  15. package/esm/lib/config.js +2 -2
  16. package/esm/models/operations/download-virus-total-file.d.ts +34 -0
  17. package/esm/models/operations/download-virus-total-file.d.ts.map +1 -0
  18. package/esm/models/operations/download-virus-total-file.js +33 -0
  19. package/esm/models/operations/download-virus-total-file.js.map +1 -0
  20. package/esm/models/operations/get-activity.d.ts +3 -0
  21. package/esm/models/operations/get-activity.d.ts.map +1 -1
  22. package/esm/models/operations/get-activity.js +3 -0
  23. package/esm/models/operations/get-activity.js.map +1 -1
  24. package/esm/models/operations/get-info.d.ts +3 -0
  25. package/esm/models/operations/get-info.d.ts.map +1 -1
  26. package/esm/models/operations/get-info.js +3 -0
  27. package/esm/models/operations/get-info.js.map +1 -1
  28. package/esm/models/operations/index.d.ts +3 -0
  29. package/esm/models/operations/index.d.ts.map +1 -1
  30. package/esm/models/operations/index.js +3 -0
  31. package/esm/models/operations/index.js.map +1 -1
  32. package/esm/models/operations/list-activities.d.ts +3 -0
  33. package/esm/models/operations/list-activities.d.ts.map +1 -1
  34. package/esm/models/operations/list-activities.js +3 -0
  35. package/esm/models/operations/list-activities.js.map +1 -1
  36. package/esm/models/operations/search-web-databases.d.ts +2 -2
  37. package/esm/models/operations/search-web-databases.js +2 -2
  38. package/esm/models/operations/search-web-databases.js.map +1 -1
  39. package/esm/models/operations/virus-total-content.d.ts +62 -0
  40. package/esm/models/operations/virus-total-content.d.ts.map +1 -0
  41. package/esm/models/operations/virus-total-content.js +89 -0
  42. package/esm/models/operations/virus-total-content.js.map +1 -0
  43. package/esm/models/operations/virus-total-intelligence.d.ts +75 -0
  44. package/esm/models/operations/virus-total-intelligence.d.ts.map +1 -0
  45. package/esm/models/operations/virus-total-intelligence.js +92 -0
  46. package/esm/models/operations/virus-total-intelligence.js.map +1 -0
  47. package/esm/sdk/infrastructure.d.ts +7 -0
  48. package/esm/sdk/infrastructure.d.ts.map +1 -1
  49. package/esm/sdk/infrastructure.js +10 -0
  50. package/esm/sdk/infrastructure.js.map +1 -1
  51. package/esm/sdk/intelligence.d.ts +7 -0
  52. package/esm/sdk/intelligence.d.ts.map +1 -1
  53. package/esm/sdk/intelligence.js +10 -0
  54. package/esm/sdk/intelligence.js.map +1 -1
  55. package/esm/sdk/tools.d.ts +7 -0
  56. package/esm/sdk/tools.d.ts.map +1 -1
  57. package/esm/sdk/tools.js +10 -0
  58. package/esm/sdk/tools.js.map +1 -1
  59. package/jsr.json +1 -1
  60. package/package.json +1 -1
  61. package/src/funcs/infrastructure-virus-total-content.ts +174 -0
  62. package/src/funcs/intelligence-virus-total-intelligence.ts +174 -0
  63. package/src/funcs/tools-download-virus-total-file.ts +174 -0
  64. package/src/lib/config.ts +2 -2
  65. package/src/models/operations/download-virus-total-file.ts +93 -0
  66. package/src/models/operations/get-activity.ts +3 -0
  67. package/src/models/operations/get-info.ts +3 -0
  68. package/src/models/operations/index.ts +3 -0
  69. package/src/models/operations/list-activities.ts +3 -0
  70. package/src/models/operations/search-web-databases.ts +2 -2
  71. package/src/models/operations/virus-total-content.ts +190 -0
  72. package/src/models/operations/virus-total-intelligence.ts +210 -0
  73. package/src/sdk/infrastructure.ts +18 -0
  74. package/src/sdk/intelligence.ts +18 -0
  75. package/src/sdk/tools.ts +18 -0
@@ -0,0 +1,174 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { IndiciaCore } from "../core.js";
7
+ import { encodeJSON } from "../lib/encodings.js";
8
+ import { matchStatusCode } from "../lib/http.js";
9
+ import * as M from "../lib/matchers.js";
10
+ import { compactMap } from "../lib/primitives.js";
11
+ import { safeParse } from "../lib/schemas.js";
12
+ import { RequestOptions } from "../lib/sdks.js";
13
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
+ import { pathToFunc } from "../lib/url.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/http-client-errors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { IndiciaError } from "../models/errors/indicia-error.js";
24
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
25
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * Download VirusTotal file
32
+ *
33
+ * @remarks
34
+ * Download a file from VirusTotal by its id. The file is returned base64-encoded.
35
+ */
36
+ export function toolsDownloadVirusTotalFile(
37
+ client: IndiciaCore,
38
+ request: operations.DownloadVirusTotalFileRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.DownloadVirusTotalFileResponse,
43
+ | errors.FailedResponseError
44
+ | IndiciaError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: IndiciaCore,
63
+ request: operations.DownloadVirusTotalFileRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ operations.DownloadVirusTotalFileResponse,
69
+ | errors.FailedResponseError
70
+ | IndiciaError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) =>
85
+ z.parse(operations.DownloadVirusTotalFileRequest$outboundSchema, value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = encodeJSON("body", payload, { explode: true });
93
+
94
+ const path = pathToFunc("/v1/tools/virustotal")();
95
+
96
+ const headers = new Headers(compactMap({
97
+ "Content-Type": "application/json",
98
+ Accept: "application/json",
99
+ }));
100
+
101
+ const secConfig = await extractSecurity(client._options.apiKey);
102
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
103
+ const requestSecurity = resolveGlobalSecurity(securityInput);
104
+
105
+ const context = {
106
+ options: client._options,
107
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
108
+ operationID: "downloadVirusTotalFile",
109
+ oAuth2Scopes: null,
110
+
111
+ resolvedSecurity: requestSecurity,
112
+
113
+ securitySource: client._options.apiKey,
114
+ retryConfig: options?.retries
115
+ || client._options.retryConfig
116
+ || { strategy: "none" },
117
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
118
+ };
119
+
120
+ const requestRes = client._createRequest(context, {
121
+ security: requestSecurity,
122
+ method: "POST",
123
+ baseURL: options?.serverURL,
124
+ path: path,
125
+ headers: headers,
126
+ body: body,
127
+ userAgent: client._options.userAgent,
128
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
129
+ }, options);
130
+ if (!requestRes.ok) {
131
+ return [requestRes, { status: "invalid" }];
132
+ }
133
+ const req = requestRes.value;
134
+
135
+ const doResult = await client._do(req, {
136
+ context,
137
+ isErrorStatusCode: (statusCode: number) =>
138
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
139
+ retryConfig: context.retryConfig,
140
+ retryCodes: context.retryCodes,
141
+ });
142
+ if (!doResult.ok) {
143
+ return [doResult, { status: "request-error", request: req }];
144
+ }
145
+ const response = doResult.value;
146
+
147
+ const responseFields = {
148
+ HttpMeta: { Response: response, Request: req },
149
+ };
150
+
151
+ const [result] = await M.match<
152
+ operations.DownloadVirusTotalFileResponse,
153
+ | errors.FailedResponseError
154
+ | IndiciaError
155
+ | ResponseValidationError
156
+ | ConnectionError
157
+ | RequestAbortedError
158
+ | RequestTimeoutError
159
+ | InvalidRequestError
160
+ | UnexpectedClientError
161
+ | SDKValidationError
162
+ >(
163
+ M.json(200, operations.DownloadVirusTotalFileResponse$inboundSchema),
164
+ M.jsonErr(402, errors.FailedResponseError$inboundSchema),
165
+ M.jsonErr(500, errors.FailedResponseError$inboundSchema),
166
+ M.fail("4XX"),
167
+ M.fail("5XX"),
168
+ )(response, req, { extraFields: responseFields });
169
+ if (!result.ok) {
170
+ return [result, { status: "complete", request: req, response }];
171
+ }
172
+
173
+ return [result, { status: "complete", request: req, response }];
174
+ }
package/src/lib/config.ts CHANGED
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
  export const SDK_METADATA = {
59
59
  language: "typescript",
60
60
  openapiDocVersion: "1.0.0",
61
- sdkVersion: "1.2.1",
61
+ sdkVersion: "1.2.3",
62
62
  genVersion: "2.912.1",
63
- userAgent: "speakeasy-sdk/typescript 1.2.1 2.912.1 1.0.0 @indiciaosint/sdk",
63
+ userAgent: "speakeasy-sdk/typescript 1.2.3 2.912.1 1.0.0 @indiciaosint/sdk",
64
64
  } as const;
@@ -0,0 +1,93 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
10
+
11
+ export type DownloadVirusTotalFileRequest = {
12
+ id: string;
13
+ };
14
+
15
+ export type DownloadVirusTotalFileData = {
16
+ content: string;
17
+ encoding: string;
18
+ id: string;
19
+ size: number;
20
+ };
21
+
22
+ /**
23
+ * Successful response
24
+ */
25
+ export type DownloadVirusTotalFileResponse = {
26
+ success: boolean;
27
+ data?: DownloadVirusTotalFileData | undefined;
28
+ error?: string | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export type DownloadVirusTotalFileRequest$Outbound = {
33
+ id: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const DownloadVirusTotalFileRequest$outboundSchema: z.ZodMiniType<
38
+ DownloadVirusTotalFileRequest$Outbound,
39
+ DownloadVirusTotalFileRequest
40
+ > = z.object({
41
+ id: z.string(),
42
+ });
43
+
44
+ export function downloadVirusTotalFileRequestToJSON(
45
+ downloadVirusTotalFileRequest: DownloadVirusTotalFileRequest,
46
+ ): string {
47
+ return JSON.stringify(
48
+ DownloadVirusTotalFileRequest$outboundSchema.parse(
49
+ downloadVirusTotalFileRequest,
50
+ ),
51
+ );
52
+ }
53
+
54
+ /** @internal */
55
+ export const DownloadVirusTotalFileData$inboundSchema: z.ZodMiniType<
56
+ DownloadVirusTotalFileData,
57
+ unknown
58
+ > = z.object({
59
+ content: types.string(),
60
+ encoding: types.string(),
61
+ id: types.string(),
62
+ size: types.number(),
63
+ });
64
+
65
+ export function downloadVirusTotalFileDataFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<DownloadVirusTotalFileData, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => DownloadVirusTotalFileData$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'DownloadVirusTotalFileData' from JSON`,
72
+ );
73
+ }
74
+
75
+ /** @internal */
76
+ export const DownloadVirusTotalFileResponse$inboundSchema: z.ZodMiniType<
77
+ DownloadVirusTotalFileResponse,
78
+ unknown
79
+ > = z.object({
80
+ success: types.boolean(),
81
+ data: types.optional(z.lazy(() => DownloadVirusTotalFileData$inboundSchema)),
82
+ error: types.optional(types.string()),
83
+ });
84
+
85
+ export function downloadVirusTotalFileResponseFromJSON(
86
+ jsonString: string,
87
+ ): SafeParseResult<DownloadVirusTotalFileResponse, SDKValidationError> {
88
+ return safeParse(
89
+ jsonString,
90
+ (x) => DownloadVirusTotalFileResponse$inboundSchema.parse(JSON.parse(x)),
91
+ `Failed to parse 'DownloadVirusTotalFileResponse' from JSON`,
92
+ );
93
+ }
@@ -68,6 +68,9 @@ export const GetActivityType = {
68
68
  Username: "username",
69
69
  Usernames: "usernames",
70
70
  Vehicle: "vehicle",
71
+ VirustotalContent: "virustotal.content",
72
+ VirustotalDownload: "virustotal.download",
73
+ VirustotalIntelligence: "virustotal.intelligence",
71
74
  WebDbs: "web-dbs",
72
75
  Whois: "whois",
73
76
  } as const;
@@ -79,6 +79,9 @@ export const RestrictedFeatures = {
79
79
  Uk: "uk",
80
80
  Username: "username",
81
81
  Vehicle: "vehicle",
82
+ VirustotalContent: "virustotal.content",
83
+ VirustotalDownload: "virustotal.download",
84
+ VirustotalIntelligence: "virustotal.intelligence",
82
85
  WebDbs: "web-dbs",
83
86
  Whois: "whois",
84
87
  } as const;
@@ -5,6 +5,7 @@
5
5
  export * from "./bypass-double-counter.js";
6
6
  export * from "./delete-activity.js";
7
7
  export * from "./download-intelx-file.js";
8
+ export * from "./download-virus-total-file.js";
8
9
  export * from "./geolocate-media.js";
9
10
  export * from "./get-activity.js";
10
11
  export * from "./get-info.js";
@@ -37,3 +38,5 @@ export * from "./search-username.js";
37
38
  export * from "./search-web-databases.js";
38
39
  export * from "./search-whois.js";
39
40
  export * from "./send-organization-credits.js";
41
+ export * from "./virus-total-content.js";
42
+ export * from "./virus-total-intelligence.js";
@@ -66,6 +66,9 @@ export const ListActivitiesType = {
66
66
  Username: "username",
67
67
  Usernames: "usernames",
68
68
  Vehicle: "vehicle",
69
+ VirustotalContent: "virustotal.content",
70
+ VirustotalDownload: "virustotal.download",
71
+ VirustotalIntelligence: "virustotal.intelligence",
69
72
  WebDbs: "web-dbs",
70
73
  Whois: "whois",
71
74
  } as const;
@@ -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
+ }