@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.
Files changed (191) hide show
  1. package/FUNCTIONS.md +1 -1
  2. package/README.md +53 -13
  3. package/esm/funcs/activity-delete-activity.js +3 -3
  4. package/esm/funcs/activity-delete-activity.js.map +1 -1
  5. package/esm/funcs/activity-get-activity.js +3 -3
  6. package/esm/funcs/activity-get-activity.js.map +1 -1
  7. package/esm/funcs/activity-list-activities.js +3 -3
  8. package/esm/funcs/activity-list-activities.js.map +1 -1
  9. package/esm/funcs/infrastructure-scan-ports.d.ts +2 -127
  10. package/esm/funcs/infrastructure-scan-ports.d.ts.map +1 -1
  11. package/esm/funcs/infrastructure-scan-ports.js +12 -131
  12. package/esm/funcs/infrastructure-scan-ports.js.map +1 -1
  13. package/esm/funcs/infrastructure-search-certificates.js +3 -3
  14. package/esm/funcs/infrastructure-search-certificates.js.map +1 -1
  15. package/esm/funcs/infrastructure-search-dns.js +3 -3
  16. package/esm/funcs/infrastructure-search-dns.js.map +1 -1
  17. package/esm/funcs/infrastructure-search-ip-info.js +3 -3
  18. package/esm/funcs/infrastructure-search-ip-info.js.map +1 -1
  19. package/esm/funcs/infrastructure-search-shodan.js +3 -3
  20. package/esm/funcs/infrastructure-search-shodan.js.map +1 -1
  21. package/esm/funcs/infrastructure-search-whois.js +3 -3
  22. package/esm/funcs/infrastructure-search-whois.js.map +1 -1
  23. package/esm/funcs/intelligence-geolocate-media.d.ts +2 -13
  24. package/esm/funcs/intelligence-geolocate-media.d.ts.map +1 -1
  25. package/esm/funcs/intelligence-geolocate-media.js +12 -17
  26. package/esm/funcs/intelligence-geolocate-media.js.map +1 -1
  27. package/esm/funcs/intelligence-search-address.js +3 -3
  28. package/esm/funcs/intelligence-search-address.js.map +1 -1
  29. package/esm/funcs/intelligence-search-email.js +3 -3
  30. package/esm/funcs/intelligence-search-email.js.map +1 -1
  31. package/esm/funcs/intelligence-search-face.d.ts +2 -1
  32. package/esm/funcs/intelligence-search-face.d.ts.map +1 -1
  33. package/esm/funcs/intelligence-search-face.js +12 -5
  34. package/esm/funcs/intelligence-search-face.js.map +1 -1
  35. package/esm/funcs/intelligence-search-gmail.js +3 -3
  36. package/esm/funcs/intelligence-search-gmail.js.map +1 -1
  37. package/esm/funcs/intelligence-search-hudson-rock.js +3 -3
  38. package/esm/funcs/intelligence-search-hudson-rock.js.map +1 -1
  39. package/esm/funcs/intelligence-search-person.js +3 -3
  40. package/esm/funcs/intelligence-search-person.js.map +1 -1
  41. package/esm/funcs/intelligence-search-phone.js +3 -3
  42. package/esm/funcs/intelligence-search-phone.js.map +1 -1
  43. package/esm/funcs/intelligence-search-seon.js +3 -3
  44. package/esm/funcs/intelligence-search-seon.js.map +1 -1
  45. package/esm/funcs/intelligence-search-web-databases.js +3 -3
  46. package/esm/funcs/intelligence-search-web-databases.js.map +1 -1
  47. package/esm/funcs/organizations-get-organization-audit-log.js +3 -3
  48. package/esm/funcs/organizations-get-organization-audit-log.js.map +1 -1
  49. package/esm/funcs/organizations-get-organization.js +3 -3
  50. package/esm/funcs/organizations-get-organization.js.map +1 -1
  51. package/esm/funcs/organizations-list-organization-cases.js +3 -3
  52. package/esm/funcs/organizations-list-organization-cases.js.map +1 -1
  53. package/esm/funcs/organizations-list-organization-members.js +3 -3
  54. package/esm/funcs/organizations-list-organization-members.js.map +1 -1
  55. package/esm/funcs/organizations-list-organizations.js +3 -3
  56. package/esm/funcs/organizations-list-organizations.js.map +1 -1
  57. package/esm/funcs/organizations-send-organization-credits.js +3 -3
  58. package/esm/funcs/organizations-send-organization-credits.js.map +1 -1
  59. package/esm/funcs/pricing-get-pricing.js +3 -3
  60. package/esm/funcs/pricing-get-pricing.js.map +1 -1
  61. package/esm/funcs/socials-search-discord.js +3 -3
  62. package/esm/funcs/socials-search-discord.js.map +1 -1
  63. package/esm/funcs/socials-search-github.js +3 -3
  64. package/esm/funcs/socials-search-github.js.map +1 -1
  65. package/esm/funcs/socials-search-roblox.js +3 -3
  66. package/esm/funcs/socials-search-roblox.js.map +1 -1
  67. package/esm/funcs/socials-search-tiktok.js +3 -3
  68. package/esm/funcs/socials-search-tiktok.js.map +1 -1
  69. package/esm/funcs/socials-search-username.js +3 -3
  70. package/esm/funcs/socials-search-username.js.map +1 -1
  71. package/esm/funcs/tools-bypass-double-counter.js +3 -3
  72. package/esm/funcs/tools-bypass-double-counter.js.map +1 -1
  73. package/esm/funcs/tools-download-intelx-file.js +3 -3
  74. package/esm/funcs/tools-download-intelx-file.js.map +1 -1
  75. package/esm/funcs/tools-lookup-discord-alt.js +3 -3
  76. package/esm/funcs/tools-lookup-discord-alt.js.map +1 -1
  77. package/esm/funcs/users-get-info.js +3 -3
  78. package/esm/funcs/users-get-info.js.map +1 -1
  79. package/esm/hooks/hooks.d.ts.map +1 -1
  80. package/esm/hooks/hooks.js +2 -0
  81. package/esm/hooks/hooks.js.map +1 -1
  82. package/esm/hooks/registration.d.ts +3 -0
  83. package/esm/hooks/registration.d.ts.map +1 -0
  84. package/esm/hooks/registration.js +12 -0
  85. package/esm/hooks/registration.js.map +1 -0
  86. package/esm/lib/config.d.ts +4 -4
  87. package/esm/lib/config.d.ts.map +1 -1
  88. package/esm/lib/config.js +3 -3
  89. package/esm/lib/env.d.ts +1 -1
  90. package/esm/lib/env.d.ts.map +1 -1
  91. package/esm/lib/env.js +1 -1
  92. package/esm/lib/env.js.map +1 -1
  93. package/esm/lib/event-streams.d.ts +23 -0
  94. package/esm/lib/event-streams.d.ts.map +1 -0
  95. package/esm/lib/event-streams.js +163 -0
  96. package/esm/lib/event-streams.js.map +1 -0
  97. package/esm/lib/security.js +1 -1
  98. package/esm/lib/security.js.map +1 -1
  99. package/esm/models/operations/geolocate-media.d.ts +91 -0
  100. package/esm/models/operations/geolocate-media.d.ts.map +1 -1
  101. package/esm/models/operations/geolocate-media.js +74 -0
  102. package/esm/models/operations/geolocate-media.js.map +1 -1
  103. package/esm/models/operations/scan-ports.d.ts +355 -0
  104. package/esm/models/operations/scan-ports.d.ts.map +1 -1
  105. package/esm/models/operations/scan-ports.js +473 -0
  106. package/esm/models/operations/scan-ports.js.map +1 -1
  107. package/esm/models/operations/search-face.d.ts +95 -0
  108. package/esm/models/operations/search-face.d.ts.map +1 -1
  109. package/esm/models/operations/search-face.js +98 -0
  110. package/esm/models/operations/search-face.js.map +1 -1
  111. package/esm/models/operations/search-username.d.ts +6 -6
  112. package/esm/models/operations/search-username.d.ts.map +1 -1
  113. package/esm/models/operations/search-username.js +13 -7
  114. package/esm/models/operations/search-username.js.map +1 -1
  115. package/esm/models/operations/search-web-databases.d.ts +4 -5
  116. package/esm/models/operations/search-web-databases.d.ts.map +1 -1
  117. package/esm/models/operations/search-web-databases.js +3 -4
  118. package/esm/models/operations/search-web-databases.js.map +1 -1
  119. package/esm/models/security.d.ts +2 -2
  120. package/esm/models/security.d.ts.map +1 -1
  121. package/esm/models/security.js +2 -2
  122. package/esm/models/security.js.map +1 -1
  123. package/esm/sdk/infrastructure.d.ts +2 -127
  124. package/esm/sdk/infrastructure.d.ts.map +1 -1
  125. package/esm/sdk/infrastructure.js +0 -126
  126. package/esm/sdk/infrastructure.js.map +1 -1
  127. package/esm/sdk/intelligence.d.ts +3 -14
  128. package/esm/sdk/intelligence.d.ts.map +1 -1
  129. package/esm/sdk/intelligence.js +0 -12
  130. package/esm/sdk/intelligence.js.map +1 -1
  131. package/esm/types/discriminated-union.d.ts +25 -0
  132. package/esm/types/discriminated-union.d.ts.map +1 -0
  133. package/esm/types/discriminated-union.js +61 -0
  134. package/esm/types/discriminated-union.js.map +1 -0
  135. package/esm/types/smart-union.d.ts.map +1 -1
  136. package/esm/types/smart-union.js +2 -1
  137. package/esm/types/smart-union.js.map +1 -1
  138. package/examples/usersGetInfo.example.ts +1 -1
  139. package/jsr.json +2 -1
  140. package/package.json +1 -1
  141. package/src/funcs/activity-delete-activity.ts +3 -3
  142. package/src/funcs/activity-get-activity.ts +3 -3
  143. package/src/funcs/activity-list-activities.ts +3 -3
  144. package/src/funcs/infrastructure-scan-ports.ts +21 -134
  145. package/src/funcs/infrastructure-search-certificates.ts +3 -3
  146. package/src/funcs/infrastructure-search-dns.ts +3 -3
  147. package/src/funcs/infrastructure-search-ip-info.ts +3 -3
  148. package/src/funcs/infrastructure-search-shodan.ts +3 -3
  149. package/src/funcs/infrastructure-search-whois.ts +3 -3
  150. package/src/funcs/intelligence-geolocate-media.ts +21 -20
  151. package/src/funcs/intelligence-search-address.ts +3 -3
  152. package/src/funcs/intelligence-search-email.ts +3 -3
  153. package/src/funcs/intelligence-search-face.ts +21 -8
  154. package/src/funcs/intelligence-search-gmail.ts +3 -3
  155. package/src/funcs/intelligence-search-hudson-rock.ts +3 -3
  156. package/src/funcs/intelligence-search-person.ts +3 -3
  157. package/src/funcs/intelligence-search-phone.ts +3 -3
  158. package/src/funcs/intelligence-search-seon.ts +3 -3
  159. package/src/funcs/intelligence-search-web-databases.ts +3 -3
  160. package/src/funcs/organizations-get-organization-audit-log.ts +3 -3
  161. package/src/funcs/organizations-get-organization.ts +3 -3
  162. package/src/funcs/organizations-list-organization-cases.ts +3 -3
  163. package/src/funcs/organizations-list-organization-members.ts +3 -3
  164. package/src/funcs/organizations-list-organizations.ts +3 -3
  165. package/src/funcs/organizations-send-organization-credits.ts +3 -3
  166. package/src/funcs/pricing-get-pricing.ts +3 -3
  167. package/src/funcs/socials-search-discord.ts +3 -3
  168. package/src/funcs/socials-search-github.ts +3 -3
  169. package/src/funcs/socials-search-roblox.ts +3 -3
  170. package/src/funcs/socials-search-tiktok.ts +3 -3
  171. package/src/funcs/socials-search-username.ts +3 -3
  172. package/src/funcs/tools-bypass-double-counter.ts +3 -3
  173. package/src/funcs/tools-download-intelx-file.ts +3 -3
  174. package/src/funcs/tools-lookup-discord-alt.ts +3 -3
  175. package/src/funcs/users-get-info.ts +3 -3
  176. package/src/hooks/hooks.ts +3 -0
  177. package/src/hooks/registration.ts +14 -0
  178. package/src/lib/config.ts +4 -4
  179. package/src/lib/env.ts +2 -2
  180. package/src/lib/event-streams.ts +191 -0
  181. package/src/lib/security.ts +1 -1
  182. package/src/models/operations/geolocate-media.ts +231 -0
  183. package/src/models/operations/scan-ports.ts +1223 -0
  184. package/src/models/operations/search-face.ts +259 -0
  185. package/src/models/operations/search-username.ts +23 -15
  186. package/src/models/operations/search-web-databases.ts +9 -8
  187. package/src/models/security.ts +4 -4
  188. package/src/sdk/infrastructure.ts +2 -127
  189. package/src/sdk/intelligence.ts +3 -14
  190. package/src/types/discriminated-union.ts +101 -0
  191. 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 Status = {
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 StatusUnion = string | Status;
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 | Status | undefined;
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 Status$inboundSchema: z.ZodMiniType<Status, unknown> = z.pipe(
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 statusFromJSON(
920
+ export function searchUsernameStatusFromJSON(
918
921
  jsonString: string,
919
- ): SafeParseResult<Status, SDKValidationError> {
922
+ ): SafeParseResult<SearchUsernameStatus, SDKValidationError> {
920
923
  return safeParse(
921
924
  jsonString,
922
- (x) => Status$inboundSchema.parse(JSON.parse(x)),
923
- `Failed to parse 'Status' from JSON`,
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 StatusUnion$inboundSchema: z.ZodMiniType<StatusUnion, unknown> =
929
- smartUnion([types.string(), z.lazy(() => Status$inboundSchema)]);
931
+ export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = smartUnion([
932
+ types.string(),
933
+ z.lazy(() => SearchUsernameStatus$inboundSchema),
934
+ ]);
930
935
 
931
- export function statusUnionFromJSON(
936
+ export function statusFromJSON(
932
937
  jsonString: string,
933
- ): SafeParseResult<StatusUnion, SDKValidationError> {
938
+ ): SafeParseResult<Status, SDKValidationError> {
934
939
  return safeParse(
935
940
  jsonString,
936
- (x) => StatusUnion$inboundSchema.parse(JSON.parse(x)),
937
- `Failed to parse 'StatusUnion' from JSON`,
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([types.string(), z.lazy(() => Status$inboundSchema)]),
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 Service = {
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 Service = ClosedEnum<typeof Service>;
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<Service>;
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 Service$outboundSchema: z.ZodMiniEnum<typeof Service> = z.enum(
322
- Service,
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(Service$outboundSchema),
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),
@@ -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
- apiKeyAuth?: string | undefined;
9
+ apiKey?: string | undefined;
10
10
  };
11
11
 
12
12
  /** @internal */
13
13
  export type Security$Outbound = {
14
- ApiKeyAuth?: string | undefined;
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
- apiKeyAuth: z.optional(z.string()),
23
+ apiKey: z.optional(z.string()),
24
24
  }),
25
25
  z.transform((v) => {
26
26
  return remap$(v, {
27
- apiKeyAuth: "ApiKeyAuth",
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<string> {
94
+ ): Promise<EventStream<operations.PortscanEvent>> {
220
95
  return unwrapAsync(infrastructureScanPorts(
221
96
  this,
222
97
  request,
@@ -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<string> {
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<string> {
163
+ ): Promise<EventStream<operations.FacialSearchEvent>> {
175
164
  return unwrapAsync(intelligenceSearchFace(
176
165
  this,
177
166
  request,