@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
@@ -28,6 +28,17 @@ export type SearchHudsonRockRequest = {
28
28
  type: SearchHudsonRockTypeRequest;
29
29
  };
30
30
 
31
+ export const SearchHudsonRockDataType2 = {
32
+ Domain: "domain",
33
+ Email: "email",
34
+ Ip: "ip",
35
+ Password: "password",
36
+ Username: "username",
37
+ } as const;
38
+ export type SearchHudsonRockDataType2 = OpenEnum<
39
+ typeof SearchHudsonRockDataType2
40
+ >;
41
+
31
42
  export type Stealer = {
32
43
  computerName: string;
33
44
  dateCompromised: string;
@@ -41,21 +52,10 @@ export type Stealer = {
41
52
  stealerFamily?: string | undefined;
42
53
  };
43
54
 
44
- export const SearchHudsonRockDataType2 = {
45
- Domain: "domain",
46
- Email: "email",
47
- Ip: "ip",
48
- Password: "password",
49
- Username: "username",
50
- } as const;
51
- export type SearchHudsonRockDataType2 = OpenEnum<
52
- typeof SearchHudsonRockDataType2
53
- >;
54
-
55
55
  export type SearchHudsonRockData2 = {
56
- message: string;
57
- stealers: Array<Stealer>;
58
56
  type: SearchHudsonRockDataType2;
57
+ message?: string | undefined;
58
+ stealers?: Array<Stealer> | undefined;
59
59
  };
60
60
 
61
61
  export type Application = {
@@ -97,17 +97,19 @@ export type SearchHudsonRockDataType1 = OpenEnum<
97
97
  typeof SearchHudsonRockDataType1
98
98
  >;
99
99
 
100
- export type SearchHudsonRockList = {
100
+ export type List = {
101
101
  count: number;
102
102
  name: string;
103
103
  };
104
104
 
105
+ export type Free = number | string;
106
+
105
107
  export type Antiviruses = {
106
- found: number;
107
- free: string;
108
- list: Array<SearchHudsonRockList>;
109
- notFound: string;
110
- total: number;
108
+ list: Array<List>;
109
+ found?: number | undefined;
110
+ free?: number | string | undefined;
111
+ notFound?: string | undefined;
112
+ total?: number | undefined;
111
113
  };
112
114
 
113
115
  export type EmployeePasswordsMedium = {
@@ -211,9 +213,7 @@ export type SearchHudsonRockData1 = {
211
213
  userPasswords?: UserPasswords | undefined;
212
214
  };
213
215
 
214
- export type SearchHudsonRockDataUnion =
215
- | SearchHudsonRockData1
216
- | SearchHudsonRockData2;
216
+ export type Data = SearchHudsonRockData1 | SearchHudsonRockData2;
217
217
 
218
218
  /**
219
219
  * Search successful
@@ -252,6 +252,12 @@ export function searchHudsonRockRequestToJSON(
252
252
  );
253
253
  }
254
254
 
255
+ /** @internal */
256
+ export const SearchHudsonRockDataType2$inboundSchema: z.ZodMiniType<
257
+ SearchHudsonRockDataType2,
258
+ unknown
259
+ > = openEnums.inboundSchema(SearchHudsonRockDataType2);
260
+
255
261
  /** @internal */
256
262
  export const Stealer$inboundSchema: z.ZodMiniType<Stealer, unknown> = z.pipe(
257
263
  z.object({
@@ -291,20 +297,14 @@ export function stealerFromJSON(
291
297
  );
292
298
  }
293
299
 
294
- /** @internal */
295
- export const SearchHudsonRockDataType2$inboundSchema: z.ZodMiniType<
296
- SearchHudsonRockDataType2,
297
- unknown
298
- > = openEnums.inboundSchema(SearchHudsonRockDataType2);
299
-
300
300
  /** @internal */
301
301
  export const SearchHudsonRockData2$inboundSchema: z.ZodMiniType<
302
302
  SearchHudsonRockData2,
303
303
  unknown
304
304
  > = z.object({
305
- message: types.string(),
306
- stealers: z.array(z.lazy(() => Stealer$inboundSchema)),
307
305
  type: SearchHudsonRockDataType2$inboundSchema,
306
+ message: types.optional(types.string()),
307
+ stealers: types.optional(z.array(z.lazy(() => Stealer$inboundSchema))),
308
308
  });
309
309
 
310
310
  export function searchHudsonRockData2FromJSON(
@@ -435,21 +435,34 @@ export const SearchHudsonRockDataType1$inboundSchema: z.ZodMiniType<
435
435
  > = openEnums.inboundSchema(SearchHudsonRockDataType1);
436
436
 
437
437
  /** @internal */
438
- export const SearchHudsonRockList$inboundSchema: z.ZodMiniType<
439
- SearchHudsonRockList,
440
- unknown
441
- > = z.object({
438
+ export const List$inboundSchema: z.ZodMiniType<List, unknown> = z.object({
442
439
  count: types.number(),
443
440
  name: types.string(),
444
441
  });
445
442
 
446
- export function searchHudsonRockListFromJSON(
443
+ export function listFromJSON(
444
+ jsonString: string,
445
+ ): SafeParseResult<List, SDKValidationError> {
446
+ return safeParse(
447
+ jsonString,
448
+ (x) => List$inboundSchema.parse(JSON.parse(x)),
449
+ `Failed to parse 'List' from JSON`,
450
+ );
451
+ }
452
+
453
+ /** @internal */
454
+ export const Free$inboundSchema: z.ZodMiniType<Free, unknown> = smartUnion([
455
+ types.number(),
456
+ types.string(),
457
+ ]);
458
+
459
+ export function freeFromJSON(
447
460
  jsonString: string,
448
- ): SafeParseResult<SearchHudsonRockList, SDKValidationError> {
461
+ ): SafeParseResult<Free, SDKValidationError> {
449
462
  return safeParse(
450
463
  jsonString,
451
- (x) => SearchHudsonRockList$inboundSchema.parse(JSON.parse(x)),
452
- `Failed to parse 'SearchHudsonRockList' from JSON`,
464
+ (x) => Free$inboundSchema.parse(JSON.parse(x)),
465
+ `Failed to parse 'Free' from JSON`,
453
466
  );
454
467
  }
455
468
 
@@ -457,11 +470,11 @@ export function searchHudsonRockListFromJSON(
457
470
  export const Antiviruses$inboundSchema: z.ZodMiniType<Antiviruses, unknown> = z
458
471
  .pipe(
459
472
  z.object({
460
- found: types.number(),
461
- free: types.string(),
462
- list: z.array(z.lazy(() => SearchHudsonRockList$inboundSchema)),
463
- not_found: types.string(),
464
- total: types.number(),
473
+ list: z.array(z.lazy(() => List$inboundSchema)),
474
+ found: types.optional(types.number()),
475
+ free: types.optional(smartUnion([types.number(), types.string()])),
476
+ not_found: types.optional(types.string()),
477
+ total: types.optional(types.number()),
465
478
  }),
466
479
  z.transform((v) => {
467
480
  return remap$(v, {
@@ -803,21 +816,18 @@ export function searchHudsonRockData1FromJSON(
803
816
  }
804
817
 
805
818
  /** @internal */
806
- export const SearchHudsonRockDataUnion$inboundSchema: z.ZodMiniType<
807
- SearchHudsonRockDataUnion,
808
- unknown
809
- > = smartUnion([
819
+ export const Data$inboundSchema: z.ZodMiniType<Data, unknown> = smartUnion([
810
820
  z.lazy(() => SearchHudsonRockData1$inboundSchema),
811
821
  z.lazy(() => SearchHudsonRockData2$inboundSchema),
812
822
  ]);
813
823
 
814
- export function searchHudsonRockDataUnionFromJSON(
824
+ export function dataFromJSON(
815
825
  jsonString: string,
816
- ): SafeParseResult<SearchHudsonRockDataUnion, SDKValidationError> {
826
+ ): SafeParseResult<Data, SDKValidationError> {
817
827
  return safeParse(
818
828
  jsonString,
819
- (x) => SearchHudsonRockDataUnion$inboundSchema.parse(JSON.parse(x)),
820
- `Failed to parse 'SearchHudsonRockDataUnion' from JSON`,
829
+ (x) => Data$inboundSchema.parse(JSON.parse(x)),
830
+ `Failed to parse 'Data' from JSON`,
821
831
  );
822
832
  }
823
833
 
@@ -3,44 +3,115 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
- import * as openEnums from "../../types/enums.js";
8
- import { OpenEnum } from "../../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../../types/fp.js";
10
9
  import * as types from "../../types/primitives.js";
10
+ import { smartUnion } from "../../types/smart-union.js";
11
11
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
12
12
 
13
13
  export type SearchIpInfoRequest = {
14
14
  query: string;
15
15
  };
16
16
 
17
- export const SearchIpInfoStatus = {
18
- Fail: "fail",
19
- Success: "success",
20
- } as const;
21
- export type SearchIpInfoStatus = OpenEnum<typeof SearchIpInfoStatus>;
17
+ export type Company = {
18
+ domain: string | null;
19
+ name: string | null;
20
+ network: string | null;
21
+ type: string | null;
22
+ };
23
+
24
+ export type Currency = {
25
+ code: string | null;
26
+ name: string | null;
27
+ native: string | null;
28
+ plural: string | null;
29
+ symbol: string | null;
30
+ };
31
+
32
+ export type Languages = {
33
+ code: string | null;
34
+ name: string | null;
35
+ native: string | null;
36
+ };
37
+
38
+ export type Scores = {
39
+ proxyScore: number;
40
+ threatScore: number;
41
+ trustScore: number;
42
+ vpnScore: number;
43
+ };
44
+
45
+ export type Blocklist = {
46
+ name: string;
47
+ site: string;
48
+ type: string;
49
+ };
50
+
51
+ export type Threat = {
52
+ isAnonymous: boolean;
53
+ isBogon: boolean;
54
+ isDatacenter: boolean;
55
+ isIcloudRelay: boolean;
56
+ isKnownAbuser: boolean;
57
+ isKnownAttacker: boolean;
58
+ isProxy: boolean;
59
+ isThreat: boolean;
60
+ isTor: boolean;
61
+ isVpn: boolean;
62
+ scores: Scores;
63
+ blocklists?: Array<Blocklist> | undefined;
64
+ };
65
+
66
+ export type CurrentTime = string | any;
67
+
68
+ export type TimeZone = {
69
+ abbr: string | null;
70
+ currentTime: string | any | null;
71
+ isDst: boolean | null;
72
+ name: string | null;
73
+ offset: string | null;
74
+ };
75
+
76
+ export type Asn = {
77
+ asn: string | null;
78
+ domain: string | null;
79
+ name: string | null;
80
+ route: string | null;
81
+ type: string | null;
82
+ };
83
+
84
+ export type Carrier = {
85
+ mcc: string | null;
86
+ mnc: string | null;
87
+ name: string | null;
88
+ };
22
89
 
23
90
  export type SearchIpInfoData = {
24
- continent: string;
25
- country: string;
26
- hosting: boolean;
27
- lat: number;
28
- lon: number;
29
- mobile: boolean;
30
- proxy: boolean;
31
- query: string;
32
- status: SearchIpInfoStatus;
33
- timezone: string;
34
- as?: string | undefined;
35
- asname?: string | undefined;
36
- city?: string | undefined;
37
- district?: string | undefined;
38
- isp?: string | undefined;
91
+ callingCode: string | null;
92
+ city: string | null;
93
+ company: Company;
94
+ continentCode: string | null;
95
+ continentName: string | null;
96
+ countryCode: string | null;
97
+ countryName: string | null;
98
+ currency: Currency;
99
+ emojiFlag: string | null;
100
+ emojiUnicode: string | null;
101
+ ip: string;
102
+ isEu: boolean | null;
103
+ languages: Array<Languages> | null;
104
+ latitude: number | null;
105
+ longitude: number | null;
106
+ postal: string | null;
107
+ region: string | null;
108
+ regionCode: string | null;
109
+ regionType: string | null;
110
+ threat: Threat;
111
+ timeZone: TimeZone;
112
+ asn?: Asn | undefined;
113
+ carrier?: Carrier | undefined;
39
114
  message?: string | undefined;
40
- org?: string | undefined;
41
- regionName?: string | undefined;
42
- reverse?: string | undefined;
43
- zip?: string | undefined;
44
115
  };
45
116
 
46
117
  /**
@@ -74,37 +145,273 @@ export function searchIpInfoRequestToJSON(
74
145
  }
75
146
 
76
147
  /** @internal */
77
- export const SearchIpInfoStatus$inboundSchema: z.ZodMiniType<
78
- SearchIpInfoStatus,
79
- unknown
80
- > = openEnums.inboundSchema(SearchIpInfoStatus);
148
+ export const Company$inboundSchema: z.ZodMiniType<Company, unknown> = z.object({
149
+ domain: types.nullable(types.string()),
150
+ name: types.nullable(types.string()),
151
+ network: types.nullable(types.string()),
152
+ type: types.nullable(types.string()),
153
+ });
154
+
155
+ export function companyFromJSON(
156
+ jsonString: string,
157
+ ): SafeParseResult<Company, SDKValidationError> {
158
+ return safeParse(
159
+ jsonString,
160
+ (x) => Company$inboundSchema.parse(JSON.parse(x)),
161
+ `Failed to parse 'Company' from JSON`,
162
+ );
163
+ }
164
+
165
+ /** @internal */
166
+ export const Currency$inboundSchema: z.ZodMiniType<Currency, unknown> = z
167
+ .object({
168
+ code: types.nullable(types.string()),
169
+ name: types.nullable(types.string()),
170
+ native: types.nullable(types.string()),
171
+ plural: types.nullable(types.string()),
172
+ symbol: types.nullable(types.string()),
173
+ });
174
+
175
+ export function currencyFromJSON(
176
+ jsonString: string,
177
+ ): SafeParseResult<Currency, SDKValidationError> {
178
+ return safeParse(
179
+ jsonString,
180
+ (x) => Currency$inboundSchema.parse(JSON.parse(x)),
181
+ `Failed to parse 'Currency' from JSON`,
182
+ );
183
+ }
184
+
185
+ /** @internal */
186
+ export const Languages$inboundSchema: z.ZodMiniType<Languages, unknown> = z
187
+ .object({
188
+ code: types.nullable(types.string()),
189
+ name: types.nullable(types.string()),
190
+ native: types.nullable(types.string()),
191
+ });
192
+
193
+ export function languagesFromJSON(
194
+ jsonString: string,
195
+ ): SafeParseResult<Languages, SDKValidationError> {
196
+ return safeParse(
197
+ jsonString,
198
+ (x) => Languages$inboundSchema.parse(JSON.parse(x)),
199
+ `Failed to parse 'Languages' from JSON`,
200
+ );
201
+ }
202
+
203
+ /** @internal */
204
+ export const Scores$inboundSchema: z.ZodMiniType<Scores, unknown> = z.pipe(
205
+ z.object({
206
+ proxy_score: types.number(),
207
+ threat_score: types.number(),
208
+ trust_score: types.number(),
209
+ vpn_score: types.number(),
210
+ }),
211
+ z.transform((v) => {
212
+ return remap$(v, {
213
+ "proxy_score": "proxyScore",
214
+ "threat_score": "threatScore",
215
+ "trust_score": "trustScore",
216
+ "vpn_score": "vpnScore",
217
+ });
218
+ }),
219
+ );
220
+
221
+ export function scoresFromJSON(
222
+ jsonString: string,
223
+ ): SafeParseResult<Scores, SDKValidationError> {
224
+ return safeParse(
225
+ jsonString,
226
+ (x) => Scores$inboundSchema.parse(JSON.parse(x)),
227
+ `Failed to parse 'Scores' from JSON`,
228
+ );
229
+ }
230
+
231
+ /** @internal */
232
+ export const Blocklist$inboundSchema: z.ZodMiniType<Blocklist, unknown> = z
233
+ .object({
234
+ name: types.string(),
235
+ site: types.string(),
236
+ type: types.string(),
237
+ });
238
+
239
+ export function blocklistFromJSON(
240
+ jsonString: string,
241
+ ): SafeParseResult<Blocklist, SDKValidationError> {
242
+ return safeParse(
243
+ jsonString,
244
+ (x) => Blocklist$inboundSchema.parse(JSON.parse(x)),
245
+ `Failed to parse 'Blocklist' from JSON`,
246
+ );
247
+ }
248
+
249
+ /** @internal */
250
+ export const Threat$inboundSchema: z.ZodMiniType<Threat, unknown> = z.pipe(
251
+ z.object({
252
+ is_anonymous: types.boolean(),
253
+ is_bogon: types.boolean(),
254
+ is_datacenter: types.boolean(),
255
+ is_icloud_relay: types.boolean(),
256
+ is_known_abuser: types.boolean(),
257
+ is_known_attacker: types.boolean(),
258
+ is_proxy: types.boolean(),
259
+ is_threat: types.boolean(),
260
+ is_tor: types.boolean(),
261
+ is_vpn: types.boolean(),
262
+ scores: z.lazy(() => Scores$inboundSchema),
263
+ blocklists: types.optional(z.array(z.lazy(() => Blocklist$inboundSchema))),
264
+ }),
265
+ z.transform((v) => {
266
+ return remap$(v, {
267
+ "is_anonymous": "isAnonymous",
268
+ "is_bogon": "isBogon",
269
+ "is_datacenter": "isDatacenter",
270
+ "is_icloud_relay": "isIcloudRelay",
271
+ "is_known_abuser": "isKnownAbuser",
272
+ "is_known_attacker": "isKnownAttacker",
273
+ "is_proxy": "isProxy",
274
+ "is_threat": "isThreat",
275
+ "is_tor": "isTor",
276
+ "is_vpn": "isVpn",
277
+ });
278
+ }),
279
+ );
280
+
281
+ export function threatFromJSON(
282
+ jsonString: string,
283
+ ): SafeParseResult<Threat, SDKValidationError> {
284
+ return safeParse(
285
+ jsonString,
286
+ (x) => Threat$inboundSchema.parse(JSON.parse(x)),
287
+ `Failed to parse 'Threat' from JSON`,
288
+ );
289
+ }
290
+
291
+ /** @internal */
292
+ export const CurrentTime$inboundSchema: z.ZodMiniType<CurrentTime, unknown> =
293
+ smartUnion([types.string(), z.any()]);
294
+
295
+ export function currentTimeFromJSON(
296
+ jsonString: string,
297
+ ): SafeParseResult<CurrentTime, SDKValidationError> {
298
+ return safeParse(
299
+ jsonString,
300
+ (x) => CurrentTime$inboundSchema.parse(JSON.parse(x)),
301
+ `Failed to parse 'CurrentTime' from JSON`,
302
+ );
303
+ }
304
+
305
+ /** @internal */
306
+ export const TimeZone$inboundSchema: z.ZodMiniType<TimeZone, unknown> = z.pipe(
307
+ z.object({
308
+ abbr: types.nullable(types.string()),
309
+ current_time: types.nullable(smartUnion([types.string(), z.any()])),
310
+ is_dst: types.nullable(types.boolean()),
311
+ name: types.nullable(types.string()),
312
+ offset: types.nullable(types.string()),
313
+ }),
314
+ z.transform((v) => {
315
+ return remap$(v, {
316
+ "current_time": "currentTime",
317
+ "is_dst": "isDst",
318
+ });
319
+ }),
320
+ );
321
+
322
+ export function timeZoneFromJSON(
323
+ jsonString: string,
324
+ ): SafeParseResult<TimeZone, SDKValidationError> {
325
+ return safeParse(
326
+ jsonString,
327
+ (x) => TimeZone$inboundSchema.parse(JSON.parse(x)),
328
+ `Failed to parse 'TimeZone' from JSON`,
329
+ );
330
+ }
331
+
332
+ /** @internal */
333
+ export const Asn$inboundSchema: z.ZodMiniType<Asn, unknown> = z.object({
334
+ asn: types.nullable(types.string()),
335
+ domain: types.nullable(types.string()),
336
+ name: types.nullable(types.string()),
337
+ route: types.nullable(types.string()),
338
+ type: types.nullable(types.string()),
339
+ });
340
+
341
+ export function asnFromJSON(
342
+ jsonString: string,
343
+ ): SafeParseResult<Asn, SDKValidationError> {
344
+ return safeParse(
345
+ jsonString,
346
+ (x) => Asn$inboundSchema.parse(JSON.parse(x)),
347
+ `Failed to parse 'Asn' from JSON`,
348
+ );
349
+ }
350
+
351
+ /** @internal */
352
+ export const Carrier$inboundSchema: z.ZodMiniType<Carrier, unknown> = z.object({
353
+ mcc: types.nullable(types.string()),
354
+ mnc: types.nullable(types.string()),
355
+ name: types.nullable(types.string()),
356
+ });
357
+
358
+ export function carrierFromJSON(
359
+ jsonString: string,
360
+ ): SafeParseResult<Carrier, SDKValidationError> {
361
+ return safeParse(
362
+ jsonString,
363
+ (x) => Carrier$inboundSchema.parse(JSON.parse(x)),
364
+ `Failed to parse 'Carrier' from JSON`,
365
+ );
366
+ }
81
367
 
82
368
  /** @internal */
83
369
  export const SearchIpInfoData$inboundSchema: z.ZodMiniType<
84
370
  SearchIpInfoData,
85
371
  unknown
86
- > = z.object({
87
- continent: types.string(),
88
- country: types.string(),
89
- hosting: types.boolean(),
90
- lat: types.number(),
91
- lon: types.number(),
92
- mobile: types.boolean(),
93
- proxy: types.boolean(),
94
- query: types.string(),
95
- status: SearchIpInfoStatus$inboundSchema,
96
- timezone: types.string(),
97
- as: types.optional(types.string()),
98
- asname: types.optional(types.string()),
99
- city: types.optional(types.string()),
100
- district: types.optional(types.string()),
101
- isp: types.optional(types.string()),
102
- message: types.optional(types.string()),
103
- org: types.optional(types.string()),
104
- regionName: types.optional(types.string()),
105
- reverse: types.optional(types.string()),
106
- zip: types.optional(types.string()),
107
- });
372
+ > = z.pipe(
373
+ z.object({
374
+ calling_code: types.nullable(types.string()),
375
+ city: types.nullable(types.string()),
376
+ company: z.lazy(() => Company$inboundSchema),
377
+ continent_code: types.nullable(types.string()),
378
+ continent_name: types.nullable(types.string()),
379
+ country_code: types.nullable(types.string()),
380
+ country_name: types.nullable(types.string()),
381
+ currency: z.lazy(() => Currency$inboundSchema),
382
+ emoji_flag: types.nullable(types.string()),
383
+ emoji_unicode: types.nullable(types.string()),
384
+ ip: types.string(),
385
+ is_eu: types.nullable(types.boolean()),
386
+ languages: types.nullable(z.array(z.lazy(() => Languages$inboundSchema))),
387
+ latitude: types.nullable(types.number()),
388
+ longitude: types.nullable(types.number()),
389
+ postal: types.nullable(types.string()),
390
+ region: types.nullable(types.string()),
391
+ region_code: types.nullable(types.string()),
392
+ region_type: types.nullable(types.string()),
393
+ threat: z.lazy(() => Threat$inboundSchema),
394
+ time_zone: z.lazy(() => TimeZone$inboundSchema),
395
+ asn: types.optional(z.lazy(() => Asn$inboundSchema)),
396
+ carrier: types.optional(z.lazy(() => Carrier$inboundSchema)),
397
+ message: types.optional(types.string()),
398
+ }),
399
+ z.transform((v) => {
400
+ return remap$(v, {
401
+ "calling_code": "callingCode",
402
+ "continent_code": "continentCode",
403
+ "continent_name": "continentName",
404
+ "country_code": "countryCode",
405
+ "country_name": "countryName",
406
+ "emoji_flag": "emojiFlag",
407
+ "emoji_unicode": "emojiUnicode",
408
+ "is_eu": "isEu",
409
+ "region_code": "regionCode",
410
+ "region_type": "regionType",
411
+ "time_zone": "timeZone",
412
+ });
413
+ }),
414
+ );
108
415
 
109
416
  export function searchIpInfoDataFromJSON(
110
417
  jsonString: string,