@indiciaosint/sdk 1.1.0 → 1.2.0
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/FUNCTIONS.md +1 -1
- package/README.md +53 -13
- package/esm/funcs/activity-delete-activity.js +3 -3
- package/esm/funcs/activity-delete-activity.js.map +1 -1
- package/esm/funcs/activity-get-activity.js +3 -3
- package/esm/funcs/activity-get-activity.js.map +1 -1
- package/esm/funcs/activity-list-activities.js +3 -3
- package/esm/funcs/activity-list-activities.js.map +1 -1
- package/esm/funcs/infrastructure-scan-ports.d.ts +2 -127
- package/esm/funcs/infrastructure-scan-ports.d.ts.map +1 -1
- package/esm/funcs/infrastructure-scan-ports.js +12 -131
- package/esm/funcs/infrastructure-scan-ports.js.map +1 -1
- package/esm/funcs/infrastructure-search-certificates.js +3 -3
- package/esm/funcs/infrastructure-search-certificates.js.map +1 -1
- package/esm/funcs/infrastructure-search-dns.js +3 -3
- package/esm/funcs/infrastructure-search-dns.js.map +1 -1
- package/esm/funcs/infrastructure-search-ip-info.js +3 -3
- package/esm/funcs/infrastructure-search-ip-info.js.map +1 -1
- package/esm/funcs/infrastructure-search-shodan.js +3 -3
- package/esm/funcs/infrastructure-search-shodan.js.map +1 -1
- package/esm/funcs/infrastructure-search-whois.js +3 -3
- package/esm/funcs/infrastructure-search-whois.js.map +1 -1
- package/esm/funcs/intelligence-geolocate-media.d.ts +2 -13
- package/esm/funcs/intelligence-geolocate-media.d.ts.map +1 -1
- package/esm/funcs/intelligence-geolocate-media.js +12 -17
- package/esm/funcs/intelligence-geolocate-media.js.map +1 -1
- package/esm/funcs/intelligence-search-address.js +3 -3
- package/esm/funcs/intelligence-search-address.js.map +1 -1
- package/esm/funcs/intelligence-search-email.js +3 -3
- package/esm/funcs/intelligence-search-email.js.map +1 -1
- package/esm/funcs/intelligence-search-face.d.ts +2 -1
- package/esm/funcs/intelligence-search-face.d.ts.map +1 -1
- package/esm/funcs/intelligence-search-face.js +12 -5
- package/esm/funcs/intelligence-search-face.js.map +1 -1
- package/esm/funcs/intelligence-search-gmail.js +3 -3
- package/esm/funcs/intelligence-search-gmail.js.map +1 -1
- package/esm/funcs/intelligence-search-hudson-rock.js +3 -3
- package/esm/funcs/intelligence-search-hudson-rock.js.map +1 -1
- package/esm/funcs/intelligence-search-person.js +3 -3
- package/esm/funcs/intelligence-search-person.js.map +1 -1
- package/esm/funcs/intelligence-search-phone.js +3 -3
- package/esm/funcs/intelligence-search-phone.js.map +1 -1
- package/esm/funcs/intelligence-search-seon.js +3 -3
- package/esm/funcs/intelligence-search-seon.js.map +1 -1
- package/esm/funcs/intelligence-search-web-databases.js +3 -3
- package/esm/funcs/intelligence-search-web-databases.js.map +1 -1
- package/esm/funcs/organizations-get-organization-audit-log.js +3 -3
- package/esm/funcs/organizations-get-organization-audit-log.js.map +1 -1
- package/esm/funcs/organizations-get-organization.js +3 -3
- package/esm/funcs/organizations-get-organization.js.map +1 -1
- package/esm/funcs/organizations-list-organization-cases.js +3 -3
- package/esm/funcs/organizations-list-organization-cases.js.map +1 -1
- package/esm/funcs/organizations-list-organization-members.js +3 -3
- package/esm/funcs/organizations-list-organization-members.js.map +1 -1
- package/esm/funcs/organizations-list-organizations.js +3 -3
- package/esm/funcs/organizations-list-organizations.js.map +1 -1
- package/esm/funcs/organizations-send-organization-credits.js +3 -3
- package/esm/funcs/organizations-send-organization-credits.js.map +1 -1
- package/esm/funcs/pricing-get-pricing.js +3 -3
- package/esm/funcs/pricing-get-pricing.js.map +1 -1
- package/esm/funcs/socials-search-discord.js +3 -3
- package/esm/funcs/socials-search-discord.js.map +1 -1
- package/esm/funcs/socials-search-github.js +3 -3
- package/esm/funcs/socials-search-github.js.map +1 -1
- package/esm/funcs/socials-search-roblox.js +3 -3
- package/esm/funcs/socials-search-roblox.js.map +1 -1
- package/esm/funcs/socials-search-tiktok.js +3 -3
- package/esm/funcs/socials-search-tiktok.js.map +1 -1
- package/esm/funcs/socials-search-username.js +3 -3
- package/esm/funcs/socials-search-username.js.map +1 -1
- package/esm/funcs/tools-bypass-double-counter.js +3 -3
- package/esm/funcs/tools-bypass-double-counter.js.map +1 -1
- package/esm/funcs/tools-download-intelx-file.js +3 -3
- package/esm/funcs/tools-download-intelx-file.js.map +1 -1
- package/esm/funcs/tools-lookup-discord-alt.js +3 -3
- package/esm/funcs/tools-lookup-discord-alt.js.map +1 -1
- package/esm/funcs/users-get-info.js +3 -3
- package/esm/funcs/users-get-info.js.map +1 -1
- package/esm/hooks/hooks.d.ts.map +1 -1
- package/esm/hooks/hooks.js +2 -0
- package/esm/hooks/hooks.js.map +1 -1
- package/esm/hooks/registration.d.ts +3 -0
- package/esm/hooks/registration.d.ts.map +1 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/registration.js.map +1 -0
- package/esm/lib/config.d.ts +4 -4
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/env.d.ts +1 -1
- package/esm/lib/env.d.ts.map +1 -1
- package/esm/lib/env.js +1 -1
- package/esm/lib/env.js.map +1 -1
- package/esm/lib/event-streams.d.ts +23 -0
- package/esm/lib/event-streams.d.ts.map +1 -0
- package/esm/lib/event-streams.js +163 -0
- package/esm/lib/event-streams.js.map +1 -0
- package/esm/lib/security.js +1 -1
- package/esm/lib/security.js.map +1 -1
- package/esm/models/operations/geolocate-media.d.ts +91 -0
- package/esm/models/operations/geolocate-media.d.ts.map +1 -1
- package/esm/models/operations/geolocate-media.js +74 -0
- package/esm/models/operations/geolocate-media.js.map +1 -1
- package/esm/models/operations/scan-ports.d.ts +355 -0
- package/esm/models/operations/scan-ports.d.ts.map +1 -1
- package/esm/models/operations/scan-ports.js +473 -0
- package/esm/models/operations/scan-ports.js.map +1 -1
- package/esm/models/operations/search-face.d.ts +95 -0
- package/esm/models/operations/search-face.d.ts.map +1 -1
- package/esm/models/operations/search-face.js +98 -0
- package/esm/models/operations/search-face.js.map +1 -1
- package/esm/models/operations/search-username.d.ts +6 -6
- package/esm/models/operations/search-username.d.ts.map +1 -1
- package/esm/models/operations/search-username.js +13 -7
- package/esm/models/operations/search-username.js.map +1 -1
- package/esm/models/operations/search-web-databases.d.ts +4 -5
- package/esm/models/operations/search-web-databases.d.ts.map +1 -1
- package/esm/models/operations/search-web-databases.js +3 -4
- package/esm/models/operations/search-web-databases.js.map +1 -1
- package/esm/models/security.d.ts +2 -2
- package/esm/models/security.d.ts.map +1 -1
- package/esm/models/security.js +2 -2
- package/esm/models/security.js.map +1 -1
- package/esm/sdk/infrastructure.d.ts +2 -127
- package/esm/sdk/infrastructure.d.ts.map +1 -1
- package/esm/sdk/infrastructure.js +0 -126
- package/esm/sdk/infrastructure.js.map +1 -1
- package/esm/sdk/intelligence.d.ts +3 -14
- package/esm/sdk/intelligence.d.ts.map +1 -1
- package/esm/sdk/intelligence.js +0 -12
- package/esm/sdk/intelligence.js.map +1 -1
- package/esm/types/discriminated-union.d.ts +25 -0
- package/esm/types/discriminated-union.d.ts.map +1 -0
- package/esm/types/discriminated-union.js +61 -0
- package/esm/types/discriminated-union.js.map +1 -0
- package/esm/types/smart-union.d.ts.map +1 -1
- package/esm/types/smart-union.js +2 -1
- package/esm/types/smart-union.js.map +1 -1
- package/examples/usersGetInfo.example.ts +1 -1
- package/jsr.json +2 -1
- package/package.json +1 -1
- package/src/funcs/activity-delete-activity.ts +3 -3
- package/src/funcs/activity-get-activity.ts +3 -3
- package/src/funcs/activity-list-activities.ts +3 -3
- package/src/funcs/infrastructure-scan-ports.ts +21 -134
- package/src/funcs/infrastructure-search-certificates.ts +3 -3
- package/src/funcs/infrastructure-search-dns.ts +3 -3
- package/src/funcs/infrastructure-search-ip-info.ts +3 -3
- package/src/funcs/infrastructure-search-shodan.ts +3 -3
- package/src/funcs/infrastructure-search-whois.ts +3 -3
- package/src/funcs/intelligence-geolocate-media.ts +21 -20
- package/src/funcs/intelligence-search-address.ts +3 -3
- package/src/funcs/intelligence-search-email.ts +3 -3
- package/src/funcs/intelligence-search-face.ts +21 -8
- package/src/funcs/intelligence-search-gmail.ts +3 -3
- package/src/funcs/intelligence-search-hudson-rock.ts +3 -3
- package/src/funcs/intelligence-search-person.ts +3 -3
- package/src/funcs/intelligence-search-phone.ts +3 -3
- package/src/funcs/intelligence-search-seon.ts +3 -3
- package/src/funcs/intelligence-search-web-databases.ts +3 -3
- package/src/funcs/organizations-get-organization-audit-log.ts +3 -3
- package/src/funcs/organizations-get-organization.ts +3 -3
- package/src/funcs/organizations-list-organization-cases.ts +3 -3
- package/src/funcs/organizations-list-organization-members.ts +3 -3
- package/src/funcs/organizations-list-organizations.ts +3 -3
- package/src/funcs/organizations-send-organization-credits.ts +3 -3
- package/src/funcs/pricing-get-pricing.ts +3 -3
- package/src/funcs/socials-search-discord.ts +3 -3
- package/src/funcs/socials-search-github.ts +3 -3
- package/src/funcs/socials-search-roblox.ts +3 -3
- package/src/funcs/socials-search-tiktok.ts +3 -3
- package/src/funcs/socials-search-username.ts +3 -3
- package/src/funcs/tools-bypass-double-counter.ts +3 -3
- package/src/funcs/tools-download-intelx-file.ts +3 -3
- package/src/funcs/tools-lookup-discord-alt.ts +3 -3
- package/src/funcs/users-get-info.ts +3 -3
- package/src/hooks/hooks.ts +3 -0
- package/src/hooks/registration.ts +14 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/env.ts +2 -2
- package/src/lib/event-streams.ts +191 -0
- package/src/lib/security.ts +1 -1
- package/src/models/operations/geolocate-media.ts +231 -0
- package/src/models/operations/scan-ports.ts +1223 -0
- package/src/models/operations/search-face.ts +259 -0
- package/src/models/operations/search-username.ts +23 -15
- package/src/models/operations/search-web-databases.ts +9 -8
- package/src/models/security.ts +4 -4
- package/src/sdk/infrastructure.ts +2 -127
- package/src/sdk/intelligence.ts +3 -14
- package/src/types/discriminated-union.ts +101 -0
- package/src/types/smart-union.ts +2 -1
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
6
7
|
import { blobLikeSchema } from "../../types/blobs.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
7
12
|
|
|
8
13
|
export type SearchFaceMedia = {
|
|
9
14
|
fileName: string;
|
|
@@ -17,6 +22,88 @@ export type SearchFaceRequest = {
|
|
|
17
22
|
media: SearchFaceMedia | Blob;
|
|
18
23
|
};
|
|
19
24
|
|
|
25
|
+
export type DataError = {
|
|
26
|
+
status: "error";
|
|
27
|
+
success: false;
|
|
28
|
+
/**
|
|
29
|
+
* Human-readable error message.
|
|
30
|
+
*/
|
|
31
|
+
error: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A data-only event indicating the search failed.
|
|
36
|
+
*/
|
|
37
|
+
export type SearchFaceErrorEvent = {
|
|
38
|
+
data: DataError;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type SearchFaceResult = {
|
|
42
|
+
id: string;
|
|
43
|
+
hash: string;
|
|
44
|
+
group: number;
|
|
45
|
+
quality: number;
|
|
46
|
+
imageUrl: string;
|
|
47
|
+
/**
|
|
48
|
+
* Unix epoch milliseconds the source was crawled.
|
|
49
|
+
*/
|
|
50
|
+
crawledAt: number;
|
|
51
|
+
sourceUrl: string;
|
|
52
|
+
thumbnailUrl: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Completed facial search result set.
|
|
57
|
+
*/
|
|
58
|
+
export type SearchFaceData = {
|
|
59
|
+
/**
|
|
60
|
+
* Time the search took, in seconds.
|
|
61
|
+
*/
|
|
62
|
+
time: number;
|
|
63
|
+
/**
|
|
64
|
+
* Matched faces found across the internet.
|
|
65
|
+
*/
|
|
66
|
+
results: Array<SearchFaceResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Hash identifying this search.
|
|
69
|
+
*/
|
|
70
|
+
searchHash: string;
|
|
71
|
+
/**
|
|
72
|
+
* Total number of matched faces.
|
|
73
|
+
*/
|
|
74
|
+
numberOfResults: number;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Emitted as the `results` event with the completed matches.
|
|
79
|
+
*/
|
|
80
|
+
export type ResultsEvent = {
|
|
81
|
+
/**
|
|
82
|
+
* Completed facial search result set.
|
|
83
|
+
*/
|
|
84
|
+
data: SearchFaceData;
|
|
85
|
+
event: "results";
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Emitted as the `faces` event once detection completes.
|
|
90
|
+
*/
|
|
91
|
+
export type FacesEvent = {
|
|
92
|
+
/**
|
|
93
|
+
* Number of faces detected in the uploaded image, as a decimal string (5 credits charged per face). "0" means no face was detected.
|
|
94
|
+
*/
|
|
95
|
+
data: string;
|
|
96
|
+
event: "faces";
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* A Server-Sent Event. The `event:` field names the type ("faces" or "results"); errors are delivered as a data-only event.
|
|
101
|
+
*/
|
|
102
|
+
export type FacialSearchEvent =
|
|
103
|
+
| FacesEvent
|
|
104
|
+
| ResultsEvent
|
|
105
|
+
| SearchFaceErrorEvent;
|
|
106
|
+
|
|
20
107
|
/** @internal */
|
|
21
108
|
export type SearchFaceMedia$Outbound = {
|
|
22
109
|
fileName: string;
|
|
@@ -66,3 +153,175 @@ export function searchFaceRequestToJSON(
|
|
|
66
153
|
SearchFaceRequest$outboundSchema.parse(searchFaceRequest),
|
|
67
154
|
);
|
|
68
155
|
}
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const DataError$inboundSchema: z.ZodMiniType<DataError, unknown> = z
|
|
159
|
+
.object({
|
|
160
|
+
status: types.literal("error"),
|
|
161
|
+
success: types.literal(false),
|
|
162
|
+
error: types.string(),
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export function dataErrorFromJSON(
|
|
166
|
+
jsonString: string,
|
|
167
|
+
): SafeParseResult<DataError, SDKValidationError> {
|
|
168
|
+
return safeParse(
|
|
169
|
+
jsonString,
|
|
170
|
+
(x) => DataError$inboundSchema.parse(JSON.parse(x)),
|
|
171
|
+
`Failed to parse 'DataError' from JSON`,
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
export const SearchFaceErrorEvent$inboundSchema: z.ZodMiniType<
|
|
177
|
+
SearchFaceErrorEvent,
|
|
178
|
+
unknown
|
|
179
|
+
> = z.object({
|
|
180
|
+
data: z.pipe(
|
|
181
|
+
z.pipe(
|
|
182
|
+
z.unknown(),
|
|
183
|
+
z.transform((v, ctx) => {
|
|
184
|
+
if (typeof v !== "string") return v;
|
|
185
|
+
try {
|
|
186
|
+
return JSON.parse(v);
|
|
187
|
+
} catch (err) {
|
|
188
|
+
ctx.issues.push({
|
|
189
|
+
input: v,
|
|
190
|
+
code: "custom",
|
|
191
|
+
message: `malformed json: ${err}`,
|
|
192
|
+
});
|
|
193
|
+
return z.NEVER;
|
|
194
|
+
}
|
|
195
|
+
}),
|
|
196
|
+
),
|
|
197
|
+
z.lazy(() => DataError$inboundSchema),
|
|
198
|
+
),
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
export function searchFaceErrorEventFromJSON(
|
|
202
|
+
jsonString: string,
|
|
203
|
+
): SafeParseResult<SearchFaceErrorEvent, SDKValidationError> {
|
|
204
|
+
return safeParse(
|
|
205
|
+
jsonString,
|
|
206
|
+
(x) => SearchFaceErrorEvent$inboundSchema.parse(JSON.parse(x)),
|
|
207
|
+
`Failed to parse 'SearchFaceErrorEvent' from JSON`,
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** @internal */
|
|
212
|
+
export const SearchFaceResult$inboundSchema: z.ZodMiniType<
|
|
213
|
+
SearchFaceResult,
|
|
214
|
+
unknown
|
|
215
|
+
> = z.object({
|
|
216
|
+
id: types.string(),
|
|
217
|
+
hash: types.string(),
|
|
218
|
+
group: types.number(),
|
|
219
|
+
quality: types.number(),
|
|
220
|
+
imageUrl: types.string(),
|
|
221
|
+
crawledAt: types.number(),
|
|
222
|
+
sourceUrl: types.string(),
|
|
223
|
+
thumbnailUrl: types.string(),
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
export function searchFaceResultFromJSON(
|
|
227
|
+
jsonString: string,
|
|
228
|
+
): SafeParseResult<SearchFaceResult, SDKValidationError> {
|
|
229
|
+
return safeParse(
|
|
230
|
+
jsonString,
|
|
231
|
+
(x) => SearchFaceResult$inboundSchema.parse(JSON.parse(x)),
|
|
232
|
+
`Failed to parse 'SearchFaceResult' from JSON`,
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** @internal */
|
|
237
|
+
export const SearchFaceData$inboundSchema: z.ZodMiniType<
|
|
238
|
+
SearchFaceData,
|
|
239
|
+
unknown
|
|
240
|
+
> = z.object({
|
|
241
|
+
time: types.number(),
|
|
242
|
+
results: z.array(z.lazy(() => SearchFaceResult$inboundSchema)),
|
|
243
|
+
searchHash: types.string(),
|
|
244
|
+
numberOfResults: types.number(),
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
export function searchFaceDataFromJSON(
|
|
248
|
+
jsonString: string,
|
|
249
|
+
): SafeParseResult<SearchFaceData, SDKValidationError> {
|
|
250
|
+
return safeParse(
|
|
251
|
+
jsonString,
|
|
252
|
+
(x) => SearchFaceData$inboundSchema.parse(JSON.parse(x)),
|
|
253
|
+
`Failed to parse 'SearchFaceData' from JSON`,
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** @internal */
|
|
258
|
+
export const ResultsEvent$inboundSchema: z.ZodMiniType<ResultsEvent, unknown> =
|
|
259
|
+
z.object({
|
|
260
|
+
data: z.pipe(
|
|
261
|
+
z.pipe(
|
|
262
|
+
z.unknown(),
|
|
263
|
+
z.transform((v, ctx) => {
|
|
264
|
+
if (typeof v !== "string") return v;
|
|
265
|
+
try {
|
|
266
|
+
return JSON.parse(v);
|
|
267
|
+
} catch (err) {
|
|
268
|
+
ctx.issues.push({
|
|
269
|
+
input: v,
|
|
270
|
+
code: "custom",
|
|
271
|
+
message: `malformed json: ${err}`,
|
|
272
|
+
});
|
|
273
|
+
return z.NEVER;
|
|
274
|
+
}
|
|
275
|
+
}),
|
|
276
|
+
),
|
|
277
|
+
z.lazy(() => SearchFaceData$inboundSchema),
|
|
278
|
+
),
|
|
279
|
+
event: types.literal("results"),
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
export function resultsEventFromJSON(
|
|
283
|
+
jsonString: string,
|
|
284
|
+
): SafeParseResult<ResultsEvent, SDKValidationError> {
|
|
285
|
+
return safeParse(
|
|
286
|
+
jsonString,
|
|
287
|
+
(x) => ResultsEvent$inboundSchema.parse(JSON.parse(x)),
|
|
288
|
+
`Failed to parse 'ResultsEvent' from JSON`,
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** @internal */
|
|
293
|
+
export const FacesEvent$inboundSchema: z.ZodMiniType<FacesEvent, unknown> = z
|
|
294
|
+
.object({
|
|
295
|
+
data: types.string(),
|
|
296
|
+
event: types.literal("faces"),
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
export function facesEventFromJSON(
|
|
300
|
+
jsonString: string,
|
|
301
|
+
): SafeParseResult<FacesEvent, SDKValidationError> {
|
|
302
|
+
return safeParse(
|
|
303
|
+
jsonString,
|
|
304
|
+
(x) => FacesEvent$inboundSchema.parse(JSON.parse(x)),
|
|
305
|
+
`Failed to parse 'FacesEvent' from JSON`,
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const FacialSearchEvent$inboundSchema: z.ZodMiniType<
|
|
311
|
+
FacialSearchEvent,
|
|
312
|
+
unknown
|
|
313
|
+
> = smartUnion([
|
|
314
|
+
z.lazy(() => FacesEvent$inboundSchema),
|
|
315
|
+
z.lazy(() => ResultsEvent$inboundSchema),
|
|
316
|
+
z.lazy(() => SearchFaceErrorEvent$inboundSchema),
|
|
317
|
+
]);
|
|
318
|
+
|
|
319
|
+
export function facialSearchEventFromJSON(
|
|
320
|
+
jsonString: string,
|
|
321
|
+
): SafeParseResult<FacialSearchEvent, SDKValidationError> {
|
|
322
|
+
return safeParse(
|
|
323
|
+
jsonString,
|
|
324
|
+
(x) => FacialSearchEvent$inboundSchema.parse(JSON.parse(x)),
|
|
325
|
+
`Failed to parse 'FacialSearchEvent' from JSON`,
|
|
326
|
+
);
|
|
327
|
+
}
|
|
@@ -110,7 +110,7 @@ export type Socials = {
|
|
|
110
110
|
|
|
111
111
|
export type SocialsUnion = Socials | Array<string>;
|
|
112
112
|
|
|
113
|
-
export type
|
|
113
|
+
export type SearchUsernameStatus = {
|
|
114
114
|
isCoach?: boolean | undefined;
|
|
115
115
|
isModerator?: boolean | undefined;
|
|
116
116
|
isStaff?: boolean | undefined;
|
|
@@ -118,7 +118,7 @@ export type Status = {
|
|
|
118
118
|
isTopBlogger?: boolean | undefined;
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
export type
|
|
121
|
+
export type Status = string | SearchUsernameStatus;
|
|
122
122
|
|
|
123
123
|
export type UrlEntity = {};
|
|
124
124
|
|
|
@@ -243,7 +243,7 @@ export type Metadata = {
|
|
|
243
243
|
| Array<number | SocialLink | string | boolean | null>
|
|
244
244
|
| undefined;
|
|
245
245
|
socials?: Socials | Array<string> | undefined;
|
|
246
|
-
status?: string |
|
|
246
|
+
status?: string | SearchUsernameStatus | undefined;
|
|
247
247
|
steamId64?: string | undefined;
|
|
248
248
|
streak?: number | undefined;
|
|
249
249
|
subscriberCount?: number | undefined;
|
|
@@ -895,7 +895,10 @@ export function socialsUnionFromJSON(
|
|
|
895
895
|
}
|
|
896
896
|
|
|
897
897
|
/** @internal */
|
|
898
|
-
export const
|
|
898
|
+
export const SearchUsernameStatus$inboundSchema: z.ZodMiniType<
|
|
899
|
+
SearchUsernameStatus,
|
|
900
|
+
unknown
|
|
901
|
+
> = z.pipe(
|
|
899
902
|
z.object({
|
|
900
903
|
is_coach: types.optional(types.boolean()),
|
|
901
904
|
is_moderator: types.optional(types.boolean()),
|
|
@@ -914,27 +917,29 @@ export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = z.pipe(
|
|
|
914
917
|
}),
|
|
915
918
|
);
|
|
916
919
|
|
|
917
|
-
export function
|
|
920
|
+
export function searchUsernameStatusFromJSON(
|
|
918
921
|
jsonString: string,
|
|
919
|
-
): SafeParseResult<
|
|
922
|
+
): SafeParseResult<SearchUsernameStatus, SDKValidationError> {
|
|
920
923
|
return safeParse(
|
|
921
924
|
jsonString,
|
|
922
|
-
(x) =>
|
|
923
|
-
`Failed to parse '
|
|
925
|
+
(x) => SearchUsernameStatus$inboundSchema.parse(JSON.parse(x)),
|
|
926
|
+
`Failed to parse 'SearchUsernameStatus' from JSON`,
|
|
924
927
|
);
|
|
925
928
|
}
|
|
926
929
|
|
|
927
930
|
/** @internal */
|
|
928
|
-
export const
|
|
929
|
-
|
|
931
|
+
export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = smartUnion([
|
|
932
|
+
types.string(),
|
|
933
|
+
z.lazy(() => SearchUsernameStatus$inboundSchema),
|
|
934
|
+
]);
|
|
930
935
|
|
|
931
|
-
export function
|
|
936
|
+
export function statusFromJSON(
|
|
932
937
|
jsonString: string,
|
|
933
|
-
): SafeParseResult<
|
|
938
|
+
): SafeParseResult<Status, SDKValidationError> {
|
|
934
939
|
return safeParse(
|
|
935
940
|
jsonString,
|
|
936
|
-
(x) =>
|
|
937
|
-
`Failed to parse '
|
|
941
|
+
(x) => Status$inboundSchema.parse(JSON.parse(x)),
|
|
942
|
+
`Failed to parse 'Status' from JSON`,
|
|
938
943
|
);
|
|
939
944
|
}
|
|
940
945
|
|
|
@@ -1182,7 +1187,10 @@ export const Metadata$inboundSchema: z.ZodMiniType<Metadata, unknown> = z.pipe(
|
|
|
1182
1187
|
]),
|
|
1183
1188
|
),
|
|
1184
1189
|
status: types.optional(
|
|
1185
|
-
smartUnion([
|
|
1190
|
+
smartUnion([
|
|
1191
|
+
types.string(),
|
|
1192
|
+
z.lazy(() => SearchUsernameStatus$inboundSchema),
|
|
1193
|
+
]),
|
|
1186
1194
|
),
|
|
1187
1195
|
steam_id_64: types.optional(types.string()),
|
|
1188
1196
|
streak: types.optional(types.number()),
|
|
@@ -15,16 +15,17 @@ import * as types from "../../types/primitives.js";
|
|
|
15
15
|
import { smartUnion } from "../../types/smart-union.js";
|
|
16
16
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
17
17
|
|
|
18
|
-
export const
|
|
18
|
+
export const SearchWebDatabasesService = {
|
|
19
19
|
Cloudsint: "cloudsint",
|
|
20
20
|
IntelligencexIdentityportal: "intelligencex.identityportal",
|
|
21
21
|
Leakcheck: "leakcheck",
|
|
22
22
|
Snusbase: "snusbase",
|
|
23
23
|
} as const;
|
|
24
|
-
export type
|
|
24
|
+
export type SearchWebDatabasesService = ClosedEnum<
|
|
25
|
+
typeof SearchWebDatabasesService
|
|
26
|
+
>;
|
|
25
27
|
|
|
26
28
|
export const CloudsintType = {
|
|
27
|
-
Discordid: "discordid",
|
|
28
29
|
Email: "email",
|
|
29
30
|
Ip: "ip",
|
|
30
31
|
Name: "name",
|
|
@@ -74,7 +75,7 @@ export type SnusbaseType = ClosedEnum<typeof SnusbaseType>;
|
|
|
74
75
|
|
|
75
76
|
export type SearchWebDatabasesRequest = {
|
|
76
77
|
query: string;
|
|
77
|
-
services: Array<
|
|
78
|
+
services: Array<SearchWebDatabasesService>;
|
|
78
79
|
cloudsintType?: CloudsintType | undefined;
|
|
79
80
|
intelxType?: IntelxType | undefined;
|
|
80
81
|
leakCheckType?: LeakCheckType | undefined;
|
|
@@ -318,9 +319,9 @@ export type SearchWebDatabasesResponse = {
|
|
|
318
319
|
};
|
|
319
320
|
|
|
320
321
|
/** @internal */
|
|
321
|
-
export const
|
|
322
|
-
|
|
323
|
-
);
|
|
322
|
+
export const SearchWebDatabasesService$outboundSchema: z.ZodMiniEnum<
|
|
323
|
+
typeof SearchWebDatabasesService
|
|
324
|
+
> = z.enum(SearchWebDatabasesService);
|
|
324
325
|
|
|
325
326
|
/** @internal */
|
|
326
327
|
export const CloudsintType$outboundSchema: z.ZodMiniEnum<typeof CloudsintType> =
|
|
@@ -354,7 +355,7 @@ export const SearchWebDatabasesRequest$outboundSchema: z.ZodMiniType<
|
|
|
354
355
|
SearchWebDatabasesRequest
|
|
355
356
|
> = z.object({
|
|
356
357
|
query: z.string(),
|
|
357
|
-
services: z.array(
|
|
358
|
+
services: z.array(SearchWebDatabasesService$outboundSchema),
|
|
358
359
|
cloudsintType: z.optional(CloudsintType$outboundSchema),
|
|
359
360
|
intelxType: z.optional(IntelxType$outboundSchema),
|
|
360
361
|
leakCheckType: z.optional(LeakCheckType$outboundSchema),
|
package/src/models/security.ts
CHANGED
|
@@ -6,12 +6,12 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
|
|
8
8
|
export type Security = {
|
|
9
|
-
|
|
9
|
+
apiKey?: string | undefined;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
/** @internal */
|
|
13
13
|
export type Security$Outbound = {
|
|
14
|
-
|
|
14
|
+
ApiKey?: string | undefined;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
/** @internal */
|
|
@@ -20,11 +20,11 @@ export const Security$outboundSchema: z.ZodMiniType<
|
|
|
20
20
|
Security
|
|
21
21
|
> = z.pipe(
|
|
22
22
|
z.object({
|
|
23
|
-
|
|
23
|
+
apiKey: z.optional(z.string()),
|
|
24
24
|
}),
|
|
25
25
|
z.transform((v) => {
|
|
26
26
|
return remap$(v, {
|
|
27
|
-
|
|
27
|
+
apiKey: "ApiKey",
|
|
28
28
|
});
|
|
29
29
|
}),
|
|
30
30
|
);
|
|
@@ -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 { EventStream } from "../lib/event-streams.js";
|
|
11
12
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
13
|
import * as operations from "../models/operations/index.js";
|
|
13
14
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -86,137 +87,11 @@ export class Infrastructure extends ClientSDK {
|
|
|
86
87
|
*
|
|
87
88
|
* @remarks
|
|
88
89
|
* Perform a port scan on a given IP address or domain.
|
|
89
|
-
*
|
|
90
|
-
* Response type:
|
|
91
|
-
* ```ts
|
|
92
|
-
* interface NmapScanResult {
|
|
93
|
-
* $: {
|
|
94
|
-
* scanner: string;
|
|
95
|
-
* args: string;
|
|
96
|
-
* start: string;
|
|
97
|
-
* startstr: string;
|
|
98
|
-
* version: string;
|
|
99
|
-
* xmloutputversion: string;
|
|
100
|
-
* };
|
|
101
|
-
* scaninfo: Array<{
|
|
102
|
-
* $: {
|
|
103
|
-
* type: string;
|
|
104
|
-
* protocol: string;
|
|
105
|
-
* numservices: string;
|
|
106
|
-
* services: string;
|
|
107
|
-
* };
|
|
108
|
-
* }>;
|
|
109
|
-
* verbose: Array<{ $: { level: string } }>;
|
|
110
|
-
* debugging: Array<{ $: { level: string } }>;
|
|
111
|
-
* taskprogress?: Array<{
|
|
112
|
-
* $: {
|
|
113
|
-
* task: string;
|
|
114
|
-
* time: string;
|
|
115
|
-
* percent: string;
|
|
116
|
-
* remaining: string;
|
|
117
|
-
* etc: string;
|
|
118
|
-
* };
|
|
119
|
-
* }>;
|
|
120
|
-
* host?: Array<{
|
|
121
|
-
* $: {
|
|
122
|
-
* starttime: string;
|
|
123
|
-
* endtime: string;
|
|
124
|
-
* };
|
|
125
|
-
* status: Array<{
|
|
126
|
-
* $: {
|
|
127
|
-
* state: string;
|
|
128
|
-
* reason: string;
|
|
129
|
-
* reason_ttl: string;
|
|
130
|
-
* };
|
|
131
|
-
* }>;
|
|
132
|
-
* address: Array<{
|
|
133
|
-
* $: {
|
|
134
|
-
* addr: string;
|
|
135
|
-
* addrtype: string;
|
|
136
|
-
* };
|
|
137
|
-
* }>;
|
|
138
|
-
* hostnames?: Array<{
|
|
139
|
-
* hostname: Array<{
|
|
140
|
-
* $: {
|
|
141
|
-
* name: string;
|
|
142
|
-
* type: string;
|
|
143
|
-
* };
|
|
144
|
-
* }>;
|
|
145
|
-
* }>;
|
|
146
|
-
* ports?: Array<{
|
|
147
|
-
* extraports?: Array<{
|
|
148
|
-
* $: {
|
|
149
|
-
* state: string;
|
|
150
|
-
* count: string;
|
|
151
|
-
* };
|
|
152
|
-
* extrareasons: Array<{
|
|
153
|
-
* $: {
|
|
154
|
-
* reason: string;
|
|
155
|
-
* count: string;
|
|
156
|
-
* proto: string;
|
|
157
|
-
* ports: string;
|
|
158
|
-
* };
|
|
159
|
-
* }>;
|
|
160
|
-
* }>;
|
|
161
|
-
* port?: Array<{
|
|
162
|
-
* $: {
|
|
163
|
-
* protocol: string;
|
|
164
|
-
* portid: string;
|
|
165
|
-
* };
|
|
166
|
-
* state: Array<{
|
|
167
|
-
* $: {
|
|
168
|
-
* state: string;
|
|
169
|
-
* reason: string;
|
|
170
|
-
* reason_ttl: string;
|
|
171
|
-
* };
|
|
172
|
-
* }>;
|
|
173
|
-
* service?: Array<{
|
|
174
|
-
* $: {
|
|
175
|
-
* name: string;
|
|
176
|
-
* product?: string;
|
|
177
|
-
* version?: string;
|
|
178
|
-
* extrainfo?: string;
|
|
179
|
-
* ostype?: string;
|
|
180
|
-
* method: string;
|
|
181
|
-
* conf: string;
|
|
182
|
-
* };
|
|
183
|
-
* cpe?: string[];
|
|
184
|
-
* }>;
|
|
185
|
-
* }>;
|
|
186
|
-
* }>;
|
|
187
|
-
* times?: Array<{
|
|
188
|
-
* $: {
|
|
189
|
-
* srtt: string;
|
|
190
|
-
* rttvar: string;
|
|
191
|
-
* to: string;
|
|
192
|
-
* };
|
|
193
|
-
* }>;
|
|
194
|
-
* }>;
|
|
195
|
-
* runstats: Array<{
|
|
196
|
-
* finished: Array<{
|
|
197
|
-
* $: {
|
|
198
|
-
* time: string;
|
|
199
|
-
* timestr: string;
|
|
200
|
-
* summary: string;
|
|
201
|
-
* elapsed: string;
|
|
202
|
-
* exit: string;
|
|
203
|
-
* };
|
|
204
|
-
* }>;
|
|
205
|
-
* hosts: Array<{
|
|
206
|
-
* $: {
|
|
207
|
-
* up: string;
|
|
208
|
-
* down: string;
|
|
209
|
-
* total: string;
|
|
210
|
-
* };
|
|
211
|
-
* }>;
|
|
212
|
-
* }>;
|
|
213
|
-
* }
|
|
214
|
-
* ```
|
|
215
90
|
*/
|
|
216
91
|
async scanPorts(
|
|
217
92
|
request: operations.ScanPortsRequest,
|
|
218
93
|
options?: RequestOptions,
|
|
219
|
-
): Promise<
|
|
94
|
+
): Promise<EventStream<operations.PortscanEvent>> {
|
|
220
95
|
return unwrapAsync(infrastructureScanPorts(
|
|
221
96
|
this,
|
|
222
97
|
request,
|
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 { EventStream } from "../lib/event-streams.js";
|
|
15
16
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
16
17
|
import * as operations from "../models/operations/index.js";
|
|
17
18
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -53,23 +54,11 @@ export class Intelligence extends ClientSDK {
|
|
|
53
54
|
*
|
|
54
55
|
* @remarks
|
|
55
56
|
* Geolocate an image using AI-powered analysis. Streams progress updates via Server-Sent Events.
|
|
56
|
-
*
|
|
57
|
-
* Response type:
|
|
58
|
-
*
|
|
59
|
-
* ```ts
|
|
60
|
-
* interface GeolocationResponse {
|
|
61
|
-
* location: string | null;
|
|
62
|
-
* coordinates: string | null;
|
|
63
|
-
* certainty: string;
|
|
64
|
-
* reasoning: string;
|
|
65
|
-
* mapsUrl?: `https://www.google.com/maps/search/?api=1&query=${string}`;
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
57
|
*/
|
|
69
58
|
async geolocateMedia(
|
|
70
59
|
request: operations.GeolocateMediaRequest,
|
|
71
60
|
options?: RequestOptions,
|
|
72
|
-
): Promise<
|
|
61
|
+
): Promise<EventStream<operations.GeolocationEvent>> {
|
|
73
62
|
return unwrapAsync(intelligenceGeolocateMedia(
|
|
74
63
|
this,
|
|
75
64
|
request,
|
|
@@ -171,7 +160,7 @@ export class Intelligence extends ClientSDK {
|
|
|
171
160
|
async searchFace(
|
|
172
161
|
request: operations.SearchFaceRequest,
|
|
173
162
|
options?: RequestOptions,
|
|
174
|
-
): Promise<
|
|
163
|
+
): Promise<EventStream<operations.FacialSearchEvent>> {
|
|
175
164
|
return unwrapAsync(intelligenceSearchFace(
|
|
176
165
|
this,
|
|
177
166
|
request,
|