@indiciaosint/sdk 1.0.1-patch → 1.0.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 (92) hide show
  1. package/README.md +6 -6
  2. package/esm/funcs/intelligence-geolocate-media.d.ts +1 -1
  3. package/esm/funcs/intelligence-geolocate-media.js +1 -1
  4. package/esm/lib/config.d.ts +2 -2
  5. package/esm/lib/config.js +2 -2
  6. package/esm/models/operations/search-address.d.ts +18 -13
  7. package/esm/models/operations/search-address.d.ts.map +1 -1
  8. package/esm/models/operations/search-address.js +20 -13
  9. package/esm/models/operations/search-address.js.map +1 -1
  10. package/esm/models/operations/search-discord.d.ts +4 -4
  11. package/esm/models/operations/search-discord.d.ts.map +1 -1
  12. package/esm/models/operations/search-discord.js +5 -4
  13. package/esm/models/operations/search-discord.js.map +1 -1
  14. package/esm/models/operations/search-dns.d.ts +52 -20
  15. package/esm/models/operations/search-dns.d.ts.map +1 -1
  16. package/esm/models/operations/search-dns.js +76 -24
  17. package/esm/models/operations/search-dns.js.map +1 -1
  18. package/esm/models/operations/search-email.d.ts +17 -10
  19. package/esm/models/operations/search-email.d.ts.map +1 -1
  20. package/esm/models/operations/search-email.js +18 -10
  21. package/esm/models/operations/search-email.js.map +1 -1
  22. package/esm/models/operations/search-gmail.d.ts +94 -72
  23. package/esm/models/operations/search-gmail.d.ts.map +1 -1
  24. package/esm/models/operations/search-gmail.js +94 -69
  25. package/esm/models/operations/search-gmail.js.map +1 -1
  26. package/esm/models/operations/search-hudson-rock.d.ts +27 -23
  27. package/esm/models/operations/search-hudson-rock.d.ts.map +1 -1
  28. package/esm/models/operations/search-hudson-rock.js +23 -15
  29. package/esm/models/operations/search-hudson-rock.js.map +1 -1
  30. package/esm/models/operations/search-ip-info.d.ts +114 -25
  31. package/esm/models/operations/search-ip-info.d.ts.map +1 -1
  32. package/esm/models/operations/search-ip-info.js +172 -28
  33. package/esm/models/operations/search-ip-info.js.map +1 -1
  34. package/esm/models/operations/search-person.d.ts +18 -13
  35. package/esm/models/operations/search-person.d.ts.map +1 -1
  36. package/esm/models/operations/search-person.js +20 -13
  37. package/esm/models/operations/search-person.js.map +1 -1
  38. package/esm/models/operations/search-phone.d.ts +22 -28
  39. package/esm/models/operations/search-phone.d.ts.map +1 -1
  40. package/esm/models/operations/search-phone.js +25 -39
  41. package/esm/models/operations/search-phone.js.map +1 -1
  42. package/esm/models/operations/search-roblox.d.ts +9 -9
  43. package/esm/models/operations/search-roblox.d.ts.map +1 -1
  44. package/esm/models/operations/search-roblox.js +10 -10
  45. package/esm/models/operations/search-roblox.js.map +1 -1
  46. package/esm/models/operations/search-seon.d.ts +5 -5
  47. package/esm/models/operations/search-seon.d.ts.map +1 -1
  48. package/esm/models/operations/search-seon.js +5 -5
  49. package/esm/models/operations/search-seon.js.map +1 -1
  50. package/esm/models/operations/search-shodan.d.ts +94 -90
  51. package/esm/models/operations/search-shodan.d.ts.map +1 -1
  52. package/esm/models/operations/search-shodan.js +102 -96
  53. package/esm/models/operations/search-shodan.js.map +1 -1
  54. package/esm/models/operations/search-tiktok.d.ts +22 -363
  55. package/esm/models/operations/search-tiktok.d.ts.map +1 -1
  56. package/esm/models/operations/search-tiktok.js +23 -593
  57. package/esm/models/operations/search-tiktok.js.map +1 -1
  58. package/esm/models/operations/search-username.d.ts +9 -9
  59. package/esm/models/operations/search-username.d.ts.map +1 -1
  60. package/esm/models/operations/search-username.js +13 -16
  61. package/esm/models/operations/search-username.js.map +1 -1
  62. package/esm/models/operations/search-web-databases.d.ts +108 -311
  63. package/esm/models/operations/search-web-databases.d.ts.map +1 -1
  64. package/esm/models/operations/search-web-databases.js +115 -432
  65. package/esm/models/operations/search-web-databases.js.map +1 -1
  66. package/esm/models/operations/search-whois.d.ts +24 -59
  67. package/esm/models/operations/search-whois.d.ts.map +1 -1
  68. package/esm/models/operations/search-whois.js +24 -86
  69. package/esm/models/operations/search-whois.js.map +1 -1
  70. package/esm/sdk/intelligence.d.ts +1 -1
  71. package/esm/sdk/intelligence.js +1 -1
  72. package/jsr.json +1 -1
  73. package/package.json +5 -3
  74. package/src/funcs/intelligence-geolocate-media.ts +1 -1
  75. package/src/lib/config.ts +2 -2
  76. package/src/models/operations/search-address.ts +47 -26
  77. package/src/models/operations/search-discord.ts +13 -15
  78. package/src/models/operations/search-dns.ts +213 -36
  79. package/src/models/operations/search-email.ts +44 -20
  80. package/src/models/operations/search-gmail.ts +269 -152
  81. package/src/models/operations/search-hudson-rock.ts +61 -51
  82. package/src/models/operations/search-ip-info.ts +359 -52
  83. package/src/models/operations/search-person.ts +47 -26
  84. package/src/models/operations/search-phone.ts +56 -76
  85. package/src/models/operations/search-roblox.ts +27 -27
  86. package/src/models/operations/search-seon.ts +10 -10
  87. package/src/models/operations/search-shodan.ts +217 -196
  88. package/src/models/operations/search-tiktok.ts +45 -1366
  89. package/src/models/operations/search-username.ts +24 -32
  90. package/src/models/operations/search-web-databases.ts +308 -1000
  91. package/src/models/operations/search-whois.ts +49 -192
  92. package/src/sdk/intelligence.ts +1 -1
@@ -7,22 +7,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import * as types from "../../types/primitives.js";
10
+ import { smartUnion } from "../../types/smart-union.js";
10
11
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
11
12
 
12
13
  export type SearchShodanRequest = {
13
14
  query: string;
14
15
  };
15
16
 
16
- export type SearchShodanLocation = {
17
- city: string;
18
- countryCode: string;
19
- countryName: string;
20
- dmaCode: number;
21
- latitude: number;
22
- longitude: number;
23
- regionCode: string;
24
- };
25
-
26
17
  export type Components = {
27
18
  categories?: Array<string> | undefined;
28
19
  confidence?: number | undefined;
@@ -30,53 +21,63 @@ export type Components = {
30
21
  };
31
22
 
32
23
  export type Favicon = {
33
- data: string;
34
- location: string;
24
+ data?: string | undefined;
25
+ location?: string | undefined;
35
26
  };
36
27
 
37
28
  export type Redirect = {
38
- data: string;
39
- host: string;
40
- location: string;
29
+ data?: string | undefined;
30
+ host?: string | undefined;
31
+ location?: string | undefined;
41
32
  };
42
33
 
43
34
  export type Http = {
44
- components: { [k: string]: Components };
45
- favicon: Favicon;
46
- host: string;
47
- html: string;
48
- location: string;
49
- redirects: Array<Redirect>;
50
- robots: string;
51
- server: string;
52
- title: string;
35
+ components?: { [k: string]: Components } | undefined;
36
+ favicon?: Favicon | undefined;
37
+ host?: string | null | undefined;
38
+ html?: string | null | undefined;
39
+ location?: string | undefined;
40
+ redirects?: Array<Redirect> | undefined;
41
+ robots?: string | null | undefined;
42
+ server?: string | null | undefined;
43
+ title?: string | null | undefined;
44
+ };
45
+
46
+ export type SearchShodanLocation = {
47
+ city?: string | undefined;
48
+ countryCode?: string | undefined;
49
+ countryName?: string | undefined;
50
+ dmaCode?: number | undefined;
51
+ latitude?: number | undefined;
52
+ longitude?: number | undefined;
53
+ regionCode?: string | undefined;
53
54
  };
54
55
 
55
56
  export type Kex = {
56
- compressionAlgorithms: Array<string>;
57
- encryptionAlgorithms: Array<string>;
58
- kexAlgorithms: Array<string>;
59
- keyFollows: boolean;
60
- languages: Array<string>;
61
- macAlgorithms: Array<string>;
62
- serverHostKeyAlgorithms: Array<string>;
63
- unused: number;
57
+ compressionAlgorithms?: Array<string> | undefined;
58
+ encryptionAlgorithms?: Array<string> | undefined;
59
+ kexAlgorithms?: Array<string> | undefined;
60
+ keyFollows?: boolean | undefined;
61
+ languages?: Array<string> | undefined;
62
+ macAlgorithms?: Array<string> | undefined;
63
+ serverHostKeyAlgorithms?: Array<string> | undefined;
64
+ unused?: number | undefined;
64
65
  };
65
66
 
66
67
  export type Ssh = {
67
- cipher: string;
68
- fingerprint: string;
69
- hassh: string;
70
- kex: Kex;
71
- key: string;
72
- mac: string;
73
- type: string;
68
+ cipher?: string | undefined;
69
+ fingerprint?: string | undefined;
70
+ hassh?: string | undefined;
71
+ kex?: Kex | undefined;
72
+ key?: string | undefined;
73
+ mac?: string | undefined;
74
+ type?: string | undefined;
74
75
  };
75
76
 
76
77
  export type Extension = {
77
- data: string;
78
- name: string;
79
78
  critical?: boolean | undefined;
79
+ data?: string | undefined;
80
+ name?: string | undefined;
80
81
  };
81
82
 
82
83
  export type Issuer = {
@@ -86,8 +87,8 @@ export type Issuer = {
86
87
  };
87
88
 
88
89
  export type Pubkey = {
89
- bits: number;
90
- type: string;
90
+ bits?: number | undefined;
91
+ type?: string | undefined;
91
92
  };
92
93
 
93
94
  export type Subject = {
@@ -95,67 +96,69 @@ export type Subject = {
95
96
  };
96
97
 
97
98
  export type Cert = {
98
- expired: boolean;
99
- expires: string;
100
- extensions: Array<Extension>;
101
- fingerprint: { [k: string]: string };
102
- issued: string;
103
- issuer: Issuer;
104
- pubkey: Pubkey;
105
- serial: number;
106
- sigAlg: string;
107
- subject: Subject;
108
- version: number;
99
+ expired?: boolean | undefined;
100
+ expires?: string | undefined;
101
+ extensions?: Array<Extension> | undefined;
102
+ fingerprint?: { [k: string]: string } | undefined;
103
+ issued?: string | undefined;
104
+ issuer?: Issuer | undefined;
105
+ pubkey?: Pubkey | undefined;
106
+ serial?: number | undefined;
107
+ sigAlg?: string | undefined;
108
+ subject?: Subject | undefined;
109
+ version?: number | undefined;
109
110
  };
110
111
 
111
112
  export type Cipher = {
112
- bits: number;
113
- name: string;
114
- version: string;
113
+ bits?: number | undefined;
114
+ name?: string | undefined;
115
+ version?: string | undefined;
115
116
  };
116
117
 
117
118
  export type Tlstext = {
118
- id: number;
119
- name: string;
119
+ id?: number | undefined;
120
+ name?: string | undefined;
120
121
  };
121
122
 
122
123
  export type Trust = {
123
- revoked: boolean;
124
+ revoked?: boolean | undefined;
124
125
  };
125
126
 
127
+ export type Versions = string | Array<string>;
128
+
126
129
  export type Ssl = {
127
- acceptableCas: Array<string>;
128
- alpn: Array<string>;
129
- cert: Cert;
130
- chain: Array<string>;
131
- chainSha256: Array<string>;
132
- cipher: Cipher;
133
- handshakeStates: Array<string>;
134
- ja3s: string;
135
- jarm: string;
136
- tlstext: Array<Tlstext>;
137
- trust: Trust;
138
- versions: string;
130
+ acceptableCas?: Array<string> | undefined;
131
+ alpn?: Array<string> | undefined;
132
+ cert?: Cert | undefined;
133
+ chain?: Array<string> | undefined;
134
+ chainSha256?: Array<string> | undefined;
135
+ cipher?: Cipher | undefined;
136
+ handshakeStates?: Array<string> | undefined;
137
+ ja3s?: string | undefined;
138
+ jarm?: string | undefined;
139
+ tlstext?: Array<Tlstext> | undefined;
140
+ trust?: Trust | undefined;
141
+ versions?: string | Array<string> | undefined;
139
142
  };
140
143
 
141
144
  export type Match = {
142
- asn: string;
143
- cpe: Array<string>;
144
- data: string;
145
- domains: Array<string>;
146
- hostnames: Array<string>;
147
- ipStr: string;
148
- isp: string;
149
- location: SearchShodanLocation;
150
- org: string;
151
- os: string;
152
- port: number;
153
- product: string;
154
- timestamp: string;
155
- transport: string;
145
+ asn?: string | undefined;
146
+ cpe?: Array<string> | undefined;
147
+ data?: string | undefined;
148
+ domains?: Array<string> | undefined;
149
+ hostnames?: Array<string> | undefined;
156
150
  http?: Http | undefined;
151
+ ipStr?: string | undefined;
152
+ isp?: string | undefined;
153
+ location?: SearchShodanLocation | undefined;
154
+ org?: string | undefined;
155
+ os?: string | null | undefined;
156
+ port?: number | undefined;
157
+ product?: string | undefined;
157
158
  ssh?: Ssh | undefined;
158
159
  ssl?: Ssl | undefined;
160
+ timestamp?: string | undefined;
161
+ transport?: string | undefined;
159
162
  };
160
163
 
161
164
  export type SearchShodanData = {
@@ -193,40 +196,6 @@ export function searchShodanRequestToJSON(
193
196
  );
194
197
  }
195
198
 
196
- /** @internal */
197
- export const SearchShodanLocation$inboundSchema: z.ZodMiniType<
198
- SearchShodanLocation,
199
- unknown
200
- > = z.pipe(
201
- z.object({
202
- city: types.string(),
203
- country_code: types.string(),
204
- country_name: types.string(),
205
- dma_code: types.number(),
206
- latitude: types.number(),
207
- longitude: types.number(),
208
- region_code: types.string(),
209
- }),
210
- z.transform((v) => {
211
- return remap$(v, {
212
- "country_code": "countryCode",
213
- "country_name": "countryName",
214
- "dma_code": "dmaCode",
215
- "region_code": "regionCode",
216
- });
217
- }),
218
- );
219
-
220
- export function searchShodanLocationFromJSON(
221
- jsonString: string,
222
- ): SafeParseResult<SearchShodanLocation, SDKValidationError> {
223
- return safeParse(
224
- jsonString,
225
- (x) => SearchShodanLocation$inboundSchema.parse(JSON.parse(x)),
226
- `Failed to parse 'SearchShodanLocation' from JSON`,
227
- );
228
- }
229
-
230
199
  /** @internal */
231
200
  export const Components$inboundSchema: z.ZodMiniType<Components, unknown> = z
232
201
  .object({
@@ -247,8 +216,8 @@ export function componentsFromJSON(
247
216
 
248
217
  /** @internal */
249
218
  export const Favicon$inboundSchema: z.ZodMiniType<Favicon, unknown> = z.object({
250
- data: types.string(),
251
- location: types.string(),
219
+ data: types.optional(types.string()),
220
+ location: types.optional(types.string()),
252
221
  });
253
222
 
254
223
  export function faviconFromJSON(
@@ -264,9 +233,9 @@ export function faviconFromJSON(
264
233
  /** @internal */
265
234
  export const Redirect$inboundSchema: z.ZodMiniType<Redirect, unknown> = z
266
235
  .object({
267
- data: types.string(),
268
- host: types.string(),
269
- location: types.string(),
236
+ data: types.optional(types.string()),
237
+ host: types.optional(types.string()),
238
+ location: types.optional(types.string()),
270
239
  });
271
240
 
272
241
  export function redirectFromJSON(
@@ -281,15 +250,17 @@ export function redirectFromJSON(
281
250
 
282
251
  /** @internal */
283
252
  export const Http$inboundSchema: z.ZodMiniType<Http, unknown> = z.object({
284
- components: z.record(z.string(), z.lazy(() => Components$inboundSchema)),
285
- favicon: z.lazy(() => Favicon$inboundSchema),
286
- host: types.string(),
287
- html: types.string(),
288
- location: types.string(),
289
- redirects: z.array(z.lazy(() => Redirect$inboundSchema)),
290
- robots: types.string(),
291
- server: types.string(),
292
- title: types.string(),
253
+ components: types.optional(
254
+ z.record(z.string(), z.lazy(() => Components$inboundSchema)),
255
+ ),
256
+ favicon: types.optional(z.lazy(() => Favicon$inboundSchema)),
257
+ host: z.optional(z.nullable(types.string())),
258
+ html: z.optional(z.nullable(types.string())),
259
+ location: types.optional(types.string()),
260
+ redirects: types.optional(z.array(z.lazy(() => Redirect$inboundSchema))),
261
+ robots: z.optional(z.nullable(types.string())),
262
+ server: z.optional(z.nullable(types.string())),
263
+ title: z.optional(z.nullable(types.string())),
293
264
  });
294
265
 
295
266
  export function httpFromJSON(
@@ -302,17 +273,51 @@ export function httpFromJSON(
302
273
  );
303
274
  }
304
275
 
276
+ /** @internal */
277
+ export const SearchShodanLocation$inboundSchema: z.ZodMiniType<
278
+ SearchShodanLocation,
279
+ unknown
280
+ > = z.pipe(
281
+ z.object({
282
+ city: types.optional(types.string()),
283
+ country_code: types.optional(types.string()),
284
+ country_name: types.optional(types.string()),
285
+ dma_code: types.optional(types.number()),
286
+ latitude: types.optional(types.number()),
287
+ longitude: types.optional(types.number()),
288
+ region_code: types.optional(types.string()),
289
+ }),
290
+ z.transform((v) => {
291
+ return remap$(v, {
292
+ "country_code": "countryCode",
293
+ "country_name": "countryName",
294
+ "dma_code": "dmaCode",
295
+ "region_code": "regionCode",
296
+ });
297
+ }),
298
+ );
299
+
300
+ export function searchShodanLocationFromJSON(
301
+ jsonString: string,
302
+ ): SafeParseResult<SearchShodanLocation, SDKValidationError> {
303
+ return safeParse(
304
+ jsonString,
305
+ (x) => SearchShodanLocation$inboundSchema.parse(JSON.parse(x)),
306
+ `Failed to parse 'SearchShodanLocation' from JSON`,
307
+ );
308
+ }
309
+
305
310
  /** @internal */
306
311
  export const Kex$inboundSchema: z.ZodMiniType<Kex, unknown> = z.pipe(
307
312
  z.object({
308
- compression_algorithms: z.array(types.string()),
309
- encryption_algorithms: z.array(types.string()),
310
- kex_algorithms: z.array(types.string()),
311
- key_follows: types.boolean(),
312
- languages: z.array(types.string()),
313
- mac_algorithms: z.array(types.string()),
314
- server_host_key_algorithms: z.array(types.string()),
315
- unused: types.number(),
313
+ compression_algorithms: types.optional(z.array(types.string())),
314
+ encryption_algorithms: types.optional(z.array(types.string())),
315
+ kex_algorithms: types.optional(z.array(types.string())),
316
+ key_follows: types.optional(types.boolean()),
317
+ languages: types.optional(z.array(types.string())),
318
+ mac_algorithms: types.optional(z.array(types.string())),
319
+ server_host_key_algorithms: types.optional(z.array(types.string())),
320
+ unused: types.optional(types.number()),
316
321
  }),
317
322
  z.transform((v) => {
318
323
  return remap$(v, {
@@ -338,13 +343,13 @@ export function kexFromJSON(
338
343
 
339
344
  /** @internal */
340
345
  export const Ssh$inboundSchema: z.ZodMiniType<Ssh, unknown> = z.object({
341
- cipher: types.string(),
342
- fingerprint: types.string(),
343
- hassh: types.string(),
344
- kex: z.lazy(() => Kex$inboundSchema),
345
- key: types.string(),
346
- mac: types.string(),
347
- type: types.string(),
346
+ cipher: types.optional(types.string()),
347
+ fingerprint: types.optional(types.string()),
348
+ hassh: types.optional(types.string()),
349
+ kex: types.optional(z.lazy(() => Kex$inboundSchema)),
350
+ key: types.optional(types.string()),
351
+ mac: types.optional(types.string()),
352
+ type: types.optional(types.string()),
348
353
  });
349
354
 
350
355
  export function sshFromJSON(
@@ -360,9 +365,9 @@ export function sshFromJSON(
360
365
  /** @internal */
361
366
  export const Extension$inboundSchema: z.ZodMiniType<Extension, unknown> = z
362
367
  .object({
363
- data: types.string(),
364
- name: types.string(),
365
368
  critical: types.optional(types.boolean()),
369
+ data: types.optional(types.string()),
370
+ name: types.optional(types.string()),
366
371
  });
367
372
 
368
373
  export function extensionFromJSON(
@@ -403,8 +408,8 @@ export function issuerFromJSON(
403
408
 
404
409
  /** @internal */
405
410
  export const Pubkey$inboundSchema: z.ZodMiniType<Pubkey, unknown> = z.object({
406
- bits: types.number(),
407
- type: types.string(),
411
+ bits: types.optional(types.number()),
412
+ type: types.optional(types.string()),
408
413
  });
409
414
 
410
415
  export function pubkeyFromJSON(
@@ -442,17 +447,17 @@ export function subjectFromJSON(
442
447
  /** @internal */
443
448
  export const Cert$inboundSchema: z.ZodMiniType<Cert, unknown> = z.pipe(
444
449
  z.object({
445
- expired: types.boolean(),
446
- expires: types.string(),
447
- extensions: z.array(z.lazy(() => Extension$inboundSchema)),
448
- fingerprint: z.record(z.string(), types.string()),
449
- issued: types.string(),
450
- issuer: z.lazy(() => Issuer$inboundSchema),
451
- pubkey: z.lazy(() => Pubkey$inboundSchema),
452
- serial: types.number(),
453
- sig_alg: types.string(),
454
- subject: z.lazy(() => Subject$inboundSchema),
455
- version: types.number(),
450
+ expired: types.optional(types.boolean()),
451
+ expires: types.optional(types.string()),
452
+ extensions: types.optional(z.array(z.lazy(() => Extension$inboundSchema))),
453
+ fingerprint: types.optional(z.record(z.string(), types.string())),
454
+ issued: types.optional(types.string()),
455
+ issuer: types.optional(z.lazy(() => Issuer$inboundSchema)),
456
+ pubkey: types.optional(z.lazy(() => Pubkey$inboundSchema)),
457
+ serial: types.optional(types.number()),
458
+ sig_alg: types.optional(types.string()),
459
+ subject: types.optional(z.lazy(() => Subject$inboundSchema)),
460
+ version: types.optional(types.number()),
456
461
  }),
457
462
  z.transform((v) => {
458
463
  return remap$(v, {
@@ -473,9 +478,9 @@ export function certFromJSON(
473
478
 
474
479
  /** @internal */
475
480
  export const Cipher$inboundSchema: z.ZodMiniType<Cipher, unknown> = z.object({
476
- bits: types.number(),
477
- name: types.string(),
478
- version: types.string(),
481
+ bits: types.optional(types.number()),
482
+ name: types.optional(types.string()),
483
+ version: types.optional(types.string()),
479
484
  });
480
485
 
481
486
  export function cipherFromJSON(
@@ -490,8 +495,8 @@ export function cipherFromJSON(
490
495
 
491
496
  /** @internal */
492
497
  export const Tlstext$inboundSchema: z.ZodMiniType<Tlstext, unknown> = z.object({
493
- id: types.number(),
494
- name: types.string(),
498
+ id: types.optional(types.number()),
499
+ name: types.optional(types.string()),
495
500
  });
496
501
 
497
502
  export function tlstextFromJSON(
@@ -506,7 +511,7 @@ export function tlstextFromJSON(
506
511
 
507
512
  /** @internal */
508
513
  export const Trust$inboundSchema: z.ZodMiniType<Trust, unknown> = z.object({
509
- revoked: types.boolean(),
514
+ revoked: types.optional(types.boolean()),
510
515
  });
511
516
 
512
517
  export function trustFromJSON(
@@ -519,21 +524,37 @@ export function trustFromJSON(
519
524
  );
520
525
  }
521
526
 
527
+ /** @internal */
528
+ export const Versions$inboundSchema: z.ZodMiniType<Versions, unknown> =
529
+ smartUnion([types.string(), z.array(types.string())]);
530
+
531
+ export function versionsFromJSON(
532
+ jsonString: string,
533
+ ): SafeParseResult<Versions, SDKValidationError> {
534
+ return safeParse(
535
+ jsonString,
536
+ (x) => Versions$inboundSchema.parse(JSON.parse(x)),
537
+ `Failed to parse 'Versions' from JSON`,
538
+ );
539
+ }
540
+
522
541
  /** @internal */
523
542
  export const Ssl$inboundSchema: z.ZodMiniType<Ssl, unknown> = z.pipe(
524
543
  z.object({
525
- acceptable_cas: z.array(types.string()),
526
- alpn: z.array(types.string()),
527
- cert: z.lazy(() => Cert$inboundSchema),
528
- chain: z.array(types.string()),
529
- chain_sha256: z.array(types.string()),
530
- cipher: z.lazy(() => Cipher$inboundSchema),
531
- handshake_states: z.array(types.string()),
532
- ja3s: types.string(),
533
- jarm: types.string(),
534
- tlstext: z.array(z.lazy(() => Tlstext$inboundSchema)),
535
- trust: z.lazy(() => Trust$inboundSchema),
536
- versions: types.string(),
544
+ acceptable_cas: types.optional(z.array(types.string())),
545
+ alpn: types.optional(z.array(types.string())),
546
+ cert: types.optional(z.lazy(() => Cert$inboundSchema)),
547
+ chain: types.optional(z.array(types.string())),
548
+ chain_sha256: types.optional(z.array(types.string())),
549
+ cipher: types.optional(z.lazy(() => Cipher$inboundSchema)),
550
+ handshake_states: types.optional(z.array(types.string())),
551
+ ja3s: types.optional(types.string()),
552
+ jarm: types.optional(types.string()),
553
+ tlstext: types.optional(z.array(z.lazy(() => Tlstext$inboundSchema))),
554
+ trust: types.optional(z.lazy(() => Trust$inboundSchema)),
555
+ versions: types.optional(
556
+ smartUnion([types.string(), z.array(types.string())]),
557
+ ),
537
558
  }),
538
559
  z.transform((v) => {
539
560
  return remap$(v, {
@@ -557,23 +578,23 @@ export function sslFromJSON(
557
578
  /** @internal */
558
579
  export const Match$inboundSchema: z.ZodMiniType<Match, unknown> = z.pipe(
559
580
  z.object({
560
- asn: types.string(),
561
- cpe: z.array(types.string()),
562
- data: types.string(),
563
- domains: z.array(types.string()),
564
- hostnames: z.array(types.string()),
565
- ip_str: types.string(),
566
- isp: types.string(),
567
- location: z.lazy(() => SearchShodanLocation$inboundSchema),
568
- org: types.string(),
569
- os: types.string(),
570
- port: types.number(),
571
- product: types.string(),
572
- timestamp: types.string(),
573
- transport: types.string(),
581
+ asn: types.optional(types.string()),
582
+ cpe: types.optional(z.array(types.string())),
583
+ data: types.optional(types.string()),
584
+ domains: types.optional(z.array(types.string())),
585
+ hostnames: types.optional(z.array(types.string())),
574
586
  http: types.optional(z.lazy(() => Http$inboundSchema)),
587
+ ip_str: types.optional(types.string()),
588
+ isp: types.optional(types.string()),
589
+ location: types.optional(z.lazy(() => SearchShodanLocation$inboundSchema)),
590
+ org: types.optional(types.string()),
591
+ os: z.optional(z.nullable(types.string())),
592
+ port: types.optional(types.number()),
593
+ product: types.optional(types.string()),
575
594
  ssh: types.optional(z.lazy(() => Ssh$inboundSchema)),
576
595
  ssl: types.optional(z.lazy(() => Ssl$inboundSchema)),
596
+ timestamp: types.optional(types.string()),
597
+ transport: types.optional(types.string()),
577
598
  }),
578
599
  z.transform((v) => {
579
600
  return remap$(v, {