@friendlycaptcha/server-sdk 0.1.2 → 0.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 (82) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/api/types.d.ts +13 -1
  4. package/dist/api/typesRiskIntelligence.d.ts +778 -0
  5. package/dist/api/typesRiskIntelligence.js +25 -0
  6. package/dist/api/typesRiskIntelligence.js.map +1 -0
  7. package/dist/client/client.d.ts +15 -0
  8. package/dist/client/client.js +28 -8
  9. package/dist/client/client.js.map +1 -1
  10. package/dist/client/version.gen.d.ts +1 -1
  11. package/dist/client/version.gen.js +1 -1
  12. package/dist/index.d.ts +829 -0
  13. package/package.json +16 -2
  14. package/.github/workflows/ci.yml +0 -50
  15. package/.github/workflows/publish.yml +0 -18
  16. package/.prettierrc +0 -3
  17. package/docs/index.md +0 -12
  18. package/docs/server-sdk.failed_due_to_client_error_code.md +0 -15
  19. package/docs/server-sdk.failed_to_decode_response_error_code.md +0 -13
  20. package/docs/server-sdk.failed_to_encode_error_code.md +0 -13
  21. package/docs/server-sdk.friendlycaptchaclient._constructor_.md +0 -20
  22. package/docs/server-sdk.friendlycaptchaclient.md +0 -26
  23. package/docs/server-sdk.friendlycaptchaclient.verifycaptcharesponse.md +0 -30
  24. package/docs/server-sdk.friendlycaptchaoptions.apikey.md +0 -13
  25. package/docs/server-sdk.friendlycaptchaoptions.fetch.md +0 -13
  26. package/docs/server-sdk.friendlycaptchaoptions.md +0 -24
  27. package/docs/server-sdk.friendlycaptchaoptions.sitekey.md +0 -11
  28. package/docs/server-sdk.friendlycaptchaoptions.siteverifyendpoint.md +0 -15
  29. package/docs/server-sdk.friendlycaptchaoptions.strict.md +0 -15
  30. package/docs/server-sdk.md +0 -41
  31. package/docs/server-sdk.request_failed_error_code.md +0 -13
  32. package/docs/server-sdk.request_failed_timeout_error_code.md +0 -13
  33. package/docs/server-sdk.siteverifyerrorresponse.error.md +0 -11
  34. package/docs/server-sdk.siteverifyerrorresponse.md +0 -20
  35. package/docs/server-sdk.siteverifyerrorresponse.success.md +0 -11
  36. package/docs/server-sdk.siteverifyerrorresponseerrordata.detail.md +0 -11
  37. package/docs/server-sdk.siteverifyerrorresponseerrordata.error_code.md +0 -11
  38. package/docs/server-sdk.siteverifyerrorresponseerrordata.md +0 -20
  39. package/docs/server-sdk.siteverifyresponse.md +0 -14
  40. package/docs/server-sdk.siteverifyresponsechallengedata.md +0 -20
  41. package/docs/server-sdk.siteverifyresponsechallengedata.origin.md +0 -13
  42. package/docs/server-sdk.siteverifyresponsechallengedata.timestamp.md +0 -13
  43. package/docs/server-sdk.siteverifyresponsedata.challenge.md +0 -11
  44. package/docs/server-sdk.siteverifyresponsedata.md +0 -19
  45. package/docs/server-sdk.siteverifysuccessresponse.data.md +0 -11
  46. package/docs/server-sdk.siteverifysuccessresponse.md +0 -20
  47. package/docs/server-sdk.siteverifysuccessresponse.success.md +0 -11
  48. package/docs/server-sdk.verifyclienterrorcode.md +0 -14
  49. package/docs/server-sdk.verifyresult._constructor_.md +0 -20
  50. package/docs/server-sdk.verifyresult.clienterrortype.md +0 -11
  51. package/docs/server-sdk.verifyresult.geterrorcode.md +0 -15
  52. package/docs/server-sdk.verifyresult.getresponse.md +0 -17
  53. package/docs/server-sdk.verifyresult.getresponseerror.md +0 -17
  54. package/docs/server-sdk.verifyresult.isclienterror.md +0 -19
  55. package/docs/server-sdk.verifyresult.isdecodeerror.md +0 -17
  56. package/docs/server-sdk.verifyresult.isencodeerror.md +0 -17
  57. package/docs/server-sdk.verifyresult.isrequestortimeouterror.md +0 -17
  58. package/docs/server-sdk.verifyresult.isstrict.md +0 -17
  59. package/docs/server-sdk.verifyresult.md +0 -44
  60. package/docs/server-sdk.verifyresult.response.md +0 -13
  61. package/docs/server-sdk.verifyresult.shouldaccept.md +0 -17
  62. package/docs/server-sdk.verifyresult.shouldreject.md +0 -17
  63. package/docs/server-sdk.verifyresult.status.md +0 -13
  64. package/docs/server-sdk.verifyresult.wasabletoverify.md +0 -17
  65. package/example/README.md +0 -29
  66. package/example/package-lock.json +0 -1404
  67. package/example/package.json +0 -24
  68. package/example/src/index.ts +0 -84
  69. package/example/tsconfig.json +0 -13
  70. package/example/views/index.ejs +0 -86
  71. package/src/api/errors.ts +0 -77
  72. package/src/api/index.ts +0 -1
  73. package/src/api/types.ts +0 -66
  74. package/src/client/client.ts +0 -157
  75. package/src/client/errors.ts +0 -42
  76. package/src/client/index.ts +0 -3
  77. package/src/client/result.ts +0 -152
  78. package/src/client/version.gen.ts +0 -3
  79. package/src/index.ts +0 -2
  80. package/test/client/client.test.ts +0 -47
  81. package/test/client/mock.test.ts +0 -44
  82. package/tsconfig.json +0 -20
package/dist/index.d.ts CHANGED
@@ -17,6 +17,390 @@ declare const AUTH_REQUIRED = "auth_required";
17
17
  */
18
18
  declare const BAD_REQUEST = "bad_request";
19
19
 
20
+ /**
21
+ * Automation and bot detection data.
22
+ *
23
+ * Available when the **Bot Detection** module is enabled.
24
+ * `null` when the **Bot Detection** module is not enabled.
25
+ *
26
+ * @summary Information about detected automation
27
+ * @public
28
+ */
29
+ declare interface ClientAutomationData {
30
+ /**
31
+ * Whether the browser was detected as running in headless mode.
32
+ * @summary Headless browser detection
33
+ */
34
+ headless: boolean;
35
+ /**
36
+ * Detected automation tool information.
37
+ * @summary Automation tool detection results
38
+ */
39
+ automation_tool: ClientAutomationToolData;
40
+ /**
41
+ * Detected known bot information.
42
+ * @summary Known bot detection results
43
+ */
44
+ known_bot: ClientAutomationKnownBotData;
45
+ }
46
+
47
+ /**
48
+ * Known bot information. Known bots have public documentation about their identity and purpose, they are not
49
+ * trying to hide that they are bots. These are usually considered "good bots" depending on the use case.
50
+ *
51
+ * @summary Detected known bot details
52
+ * @public
53
+ */
54
+ declare interface ClientAutomationKnownBotData {
55
+ /**
56
+ * Whether a known bot was detected.
57
+ * @summary Known bot detected flag
58
+ */
59
+ detected: boolean;
60
+ /**
61
+ * Bot identifier. Empty if no bot detected.
62
+ *
63
+ * @summary Bot ID
64
+ * @example "googlebot"
65
+ * @example "bingbot"
66
+ * @example "chatgpt"
67
+ */
68
+ id: string;
69
+ /**
70
+ * Human-readable bot name. Empty if no bot detected.
71
+ *
72
+ * @summary Bot name
73
+ * @example "Googlebot"
74
+ * @example "Bingbot"
75
+ * @example "ChatGPT"
76
+ */
77
+ name: string;
78
+ /**
79
+ * Bot type classification. Empty if no bot detected.
80
+ *
81
+ * @summary Type of bot
82
+ */
83
+ type: string;
84
+ /**
85
+ * Link to bot documentation. Empty if no bot detected.
86
+ *
87
+ * @summary URL with bot details
88
+ * @example "https://developers.google.com/search/docs/crawling-indexing/googlebot"
89
+ */
90
+ url: string;
91
+ }
92
+
93
+ /**
94
+ * Automation tool information.
95
+ * @summary Detected automation tool details
96
+ * @public
97
+ */
98
+ declare interface ClientAutomationToolData {
99
+ /**
100
+ * Whether an automation tool was detected.
101
+ * @summary Automation tool detected flag
102
+ */
103
+ detected: boolean;
104
+ /**
105
+ * Automation tool identifier. Empty if no tool detected.
106
+ *
107
+ * @summary Tool ID
108
+ * @example "puppeteer"
109
+ * @example "selenium"
110
+ * @example "playwright"
111
+ * @example "webdriver"
112
+ */
113
+ id: string;
114
+ /**
115
+ * Human-readable tool name. Empty if no tool detected.
116
+ *
117
+ * @summary Tool name
118
+ * @example "Puppeteer"
119
+ * @example "Selenium"
120
+ * @example "Playwright"
121
+ * @example "WebDriver"
122
+ */
123
+ name: string;
124
+ /**
125
+ * Automation tool type. Empty if no tool detected.
126
+ *
127
+ * @summary Type of automation tool
128
+ */
129
+ type: string;
130
+ }
131
+
132
+ /**
133
+ * Detected browser information.
134
+ *
135
+ * Available when the **Browser Identification** module is enabled.
136
+ * `null` when the **Browser Identification** module is not enabled.
137
+ *
138
+ * @summary Detected browser details
139
+ * @public
140
+ */
141
+ declare interface ClientBrowserData {
142
+ /**
143
+ * Unique browser identifier. Empty string if browser could not be identified.
144
+ *
145
+ * @summary Browser ID
146
+ * @example "firefox"
147
+ * @example "chrome"
148
+ * @example "chrome_android"
149
+ * @example "edge"
150
+ * @example "safari"
151
+ * @example "safari_ios"
152
+ * @example "webview_ios"
153
+ */
154
+ id: string;
155
+ /**
156
+ * Human-readable browser name. Empty string if browser could not be identified.
157
+ *
158
+ * @summary Browser name
159
+ * @example "Firefox"
160
+ * @example "Chrome"
161
+ * @example "Edge"
162
+ * @example "Safari"
163
+ * @example "Safari on iOS"
164
+ * @example "WebView on iOS"
165
+ */
166
+ name: string;
167
+ /**
168
+ * Browser version name. Assumed to be the most recent release matching the signature if exact version unknown. Empty if unknown.
169
+ *
170
+ * @summary Version number
171
+ * @example "146.0"
172
+ * @example "16.5"
173
+ */
174
+ version: string;
175
+ /**
176
+ * Release date of the browser version. In "YYYY-MM-DD" format. Empty string if unknown.
177
+ *
178
+ * @summary Browser version release date
179
+ * @example "2026-01-28"
180
+ */
181
+ release_date: string;
182
+ }
183
+
184
+ /**
185
+ * Browser engine (rendering engine) information.
186
+ *
187
+ * Available when the **Browser Identification** module is enabled.
188
+ * `null` when the **Browser Identification** module is not enabled.
189
+ *
190
+ * @summary Detected rendering engine details
191
+ * @public
192
+ */
193
+ declare interface ClientBrowserEngineData {
194
+ /**
195
+ * Unique rendering engine identifier. Empty string if engine could not be identified.
196
+ *
197
+ * @summary Engine ID
198
+ * @example "gecko"
199
+ * @example "blink"
200
+ * @example "webkit"
201
+ */
202
+ id: string;
203
+ /**
204
+ * Human-readable engine name. Empty string if engine could not be identified.
205
+ *
206
+ * @summary Engine name
207
+ * @example "Gecko"
208
+ * @example "Blink"
209
+ * @example "WebKit"
210
+ */
211
+ name: string;
212
+ /**
213
+ * Rendering engine version. Assumed to be the most recent release matching the signature if exact version unknown. Empty if unknown.
214
+ *
215
+ * @summary Version number
216
+ * @example "146.0"
217
+ * @example "16.5"
218
+ */
219
+ version: string;
220
+ }
221
+
222
+ /**
223
+ * Client/device risk intelligence. Contains details about the client device, browser, operating system - in other words, the user agent.
224
+ *
225
+ * @summary Information about the user agent and device
226
+ * @public
227
+ */
228
+ declare interface ClientData {
229
+ /**
230
+ * User-Agent HTTP header value.
231
+ * @summary User-Agent header
232
+ * @example "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0"
233
+ */
234
+ header_user_agent: string;
235
+ /**
236
+ * Time zone information.
237
+ *
238
+ * Available when the **Browser Identification** module is enabled.
239
+ * `null` when the **Browser Identification** module is not enabled.
240
+ *
241
+ * @summary Browser time zone data
242
+ */
243
+ time_zone: ClientTimeZoneData | null;
244
+ /**
245
+ * Browser information.
246
+ *
247
+ * Available when the **Browser Identification** module is enabled.
248
+ * `null` when the **Browser Identification** module is not enabled.
249
+ *
250
+ * @summary Detected browser
251
+ */
252
+ browser: ClientBrowserData | null;
253
+ /**
254
+ * Browser engine information.
255
+ *
256
+ * Available when the **Browser Identification** module is enabled.
257
+ * `null` when the **Browser Identification** module is not enabled.
258
+ *
259
+ * @summary Detected rendering engine
260
+ */
261
+ browser_engine: ClientBrowserEngineData | null;
262
+ /**
263
+ * Device information.
264
+ *
265
+ * Available when the **Browser Identification** module is enabled.
266
+ * `null` when the **Browser Identification** module is not enabled.
267
+ *
268
+ * @summary Detected device
269
+ */
270
+ device: ClientDeviceData | null;
271
+ /**
272
+ * Operating system information.
273
+ *
274
+ * Available when the **Browser Identification** module is enabled.
275
+ * `null` when the **Browser Identification** module is not enabled.
276
+ *
277
+ * @summary Detected operating system
278
+ */
279
+ os: ClientOSData | null;
280
+ /**
281
+ * TLS signatures.
282
+ *
283
+ * Available when the **Bot Detection** module is enabled.
284
+ * `null` when the **Bot Detection** module is not enabled.
285
+ *
286
+ * @summary TLS signatures
287
+ */
288
+ tls_signature: TLSSignatureData | null;
289
+ /**
290
+ * Automation detection data. Contains information about what type of automation was recognized.
291
+ *
292
+ * Available when the **Bot Detection** module is enabled.
293
+ * `null` when the **Bot Detection** module is not enabled.
294
+ *
295
+ * @summary Bot and automation detection
296
+ */
297
+ automation: ClientAutomationData | null;
298
+ }
299
+
300
+ /**
301
+ * Device type and screen information.
302
+ *
303
+ * Available when the **Browser Identification** module is enabled.
304
+ * `null` when the **Browser Identification** module is not enabled.
305
+ *
306
+ * @summary Detected device details
307
+ * @public
308
+ */
309
+ declare interface ClientDeviceData {
310
+ /**
311
+ * Device type.
312
+ * @summary Type of device
313
+ * @example "desktop"
314
+ * @example "mobile"
315
+ * @example "tablet"
316
+ */
317
+ type: string;
318
+ /**
319
+ * Device brand.
320
+ * @summary Manufacturer brand
321
+ * @example "Apple"
322
+ * @example "Samsung"
323
+ * @example "Google"
324
+ */
325
+ brand: string;
326
+ /**
327
+ * Device model.
328
+ * @summary Device model name
329
+ * @example "iPhone 17"
330
+ * @example "Galaxy S21 (SM-G991B)"
331
+ * @example "Pixel 10"
332
+ */
333
+ model: string;
334
+ }
335
+
336
+ /**
337
+ * Operating system information.
338
+ *
339
+ * Available when the Browser Identification module is enabled.
340
+ * `null` when the Browser Identification module is not enabled.
341
+ *
342
+ * @summary Detected OS details
343
+ * @public
344
+ */
345
+ declare interface ClientOSData {
346
+ /**
347
+ * Unique operating system identifier. "unknown" if OS could not be identified.
348
+ *
349
+ * @summary OS ID
350
+ * @example "windows"
351
+ * @example "macos"
352
+ * @example "ios"
353
+ * @example "android"
354
+ * @example "linux"
355
+ */
356
+ id: string;
357
+ /**
358
+ * Human-readable operating system name. Empty string if OS could not be identified.
359
+ *
360
+ * @summary OS name
361
+ * @example "Windows"
362
+ * @example "macOS"
363
+ * @example "iOS"
364
+ * @example "Android"
365
+ * @example "Linux"
366
+ */
367
+ name: string;
368
+ /**
369
+ * Operating system version.
370
+ * @summary Version number
371
+ * @example "10"
372
+ * @example "11.2.3"
373
+ * @example "14.4"
374
+ */
375
+ version: string;
376
+ }
377
+
378
+ /**
379
+ * Time zone information from the browser.
380
+ *
381
+ * Available when the **Browser Identification** module is enabled.
382
+ * `null` when the **Browser Identification** module is not enabled.
383
+ *
384
+ * @summary IANA time zone data
385
+ * @public
386
+ */
387
+ declare interface ClientTimeZoneData {
388
+ /**
389
+ * IANA time zone name reported by the browser.
390
+ * @summary IANA time zone identifier
391
+ * @example "America/New_York" or "Europe/Berlin"
392
+ */
393
+ name: string;
394
+ /**
395
+ * Two-letter ISO 3166-1 alpha-2 country code derived from the time zone.
396
+ * "XU" if timezone is missing or cannot be mapped to a country (e.g., "Etc/UTC").
397
+ *
398
+ * @summary Country derived from time zone
399
+ * @example "US" or "DE"
400
+ */
401
+ country_iso2: string;
402
+ }
403
+
20
404
  /**
21
405
  * An error occured on the client side that could've been prevented. This generally means your configuration is wrong.
22
406
  *
@@ -50,6 +434,11 @@ export declare class FriendlyCaptchaClient {
50
434
  private strict;
51
435
  private fetch;
52
436
  constructor(opts: FriendlyCaptchaOptions);
437
+ /**
438
+ * Get the siteverify endpoint URL being used by this client.
439
+ * @internal - For testing purposes only
440
+ */
441
+ getSiteverifyEndpoint(): string;
53
442
  /**
54
443
  * Verify a captcha response.
55
444
  *
@@ -76,7 +465,17 @@ export declare interface FriendlyCaptchaOptions {
76
465
  */
77
466
  apiKey: string;
78
467
  /**
468
+ * The API endpoint domain to use. Can be "eu", "global", or a custom domain (e.g., "https://api.example.com").
469
+ * Do not include a path - it will be automatically appended.
470
+ *
471
+ * Defaults to `"global"`.
472
+ */
473
+ apiEndpoint?: string;
474
+ /**
475
+ * @deprecated Use `apiEndpoint` instead. This option will be removed in a future version.
476
+ *
79
477
  * The endpoint to use for the API. Can be "eu", "global", or a custom URL.
478
+ * If a full URL with a path is provided, the path will be stripped.
80
479
  *
81
480
  * Defaults to `"global"`.
82
481
  */
@@ -100,6 +499,290 @@ export declare interface FriendlyCaptchaOptions {
100
499
  */
101
500
  declare const INTERNAL_SERVER_ERROR = "internal_server_error";
102
501
 
502
+ /**
503
+ * Abuse contact information for reporting network abuse.
504
+ *
505
+ * Available when the **IP Intelligence** module is enabled.
506
+ * `null` when the **IP Intelligence** module is not enabled.
507
+ *
508
+ * @summary Contact details for reporting abuse
509
+ * @public
510
+ */
511
+ declare interface NetworkAbuseContactData {
512
+ /**
513
+ * Postal address of the abuse contact.
514
+ * @summary Abuse contact postal address
515
+ * @example "Vodafone GmbH, Campus Eschborn, Duesseldorfer Strasse 15, D-65760 Eschborn, Germany"
516
+ */
517
+ address: string;
518
+ /**
519
+ * Name of the abuse contact person or team.
520
+ * @summary Abuse contact name
521
+ * @example "Vodafone Germany IP Core Backbone"
522
+ */
523
+ name: string;
524
+ /**
525
+ * Abuse contact email address.
526
+ * @summary Email for abuse reports
527
+ * @example "abuse.de@vodafone.com"
528
+ */
529
+ email: string;
530
+ /**
531
+ * Abuse contact phone number.
532
+ * @summary Phone for abuse reports
533
+ * @example "+49 6196 52352105"
534
+ */
535
+ phone: string;
536
+ }
537
+
538
+ /**
539
+ * IP anonymization and privacy information.
540
+ *
541
+ * Available when the **Anonymization Detection** module is enabled.
542
+ * `null` when the **Anonymization Detection** module is not enabled.
543
+ *
544
+ * @summary Detection of VPNs, proxies, and anonymization services
545
+ * @public
546
+ */
547
+ declare interface NetworkAnonymizationData {
548
+ /**
549
+ * Likelihood that the IP is from a VPN service.
550
+ * @summary VPN detection score
551
+ */
552
+ vpn_score: RiskScore;
553
+ /**
554
+ * Likelihood that the IP is from a proxy service.
555
+ * @summary Proxy detection score
556
+ */
557
+ proxy_score: RiskScore;
558
+ /**
559
+ * Whether the IP is a Tor exit node.
560
+ * @summary Tor exit node detection
561
+ */
562
+ tor: boolean;
563
+ /**
564
+ * Whether the IP is from iCloud Private Relay.
565
+ * @summary iCloud Private Relay detection
566
+ * @see https://support.apple.com/en-us/102602
567
+ */
568
+ icloud_private_relay: boolean;
569
+ }
570
+
571
+ /**
572
+ * Autonomous System (AS) information.
573
+ *
574
+ * Available when the **IP Intelligence** module is enabled for your account.
575
+ * `null` when the **IP Intelligence** module is not enabled for your account.
576
+ *
577
+ * @summary Information about the AS that owns the IP
578
+ * @public
579
+ */
580
+ declare interface NetworkAutonomousSystemData {
581
+ /**
582
+ * Autonomous System Number (ASN) identifier.
583
+ * @summary Autonomous System Number (ASN).
584
+ * @example 3209 for Vodafone GmbH
585
+ */
586
+ number: number;
587
+ /**
588
+ * Name of the autonomous system. This is usually a short name or handle.
589
+ * @summary AS name
590
+ * @example "VODANET"
591
+ */
592
+ name: string;
593
+ /**
594
+ * Organization name that owns the ASN.
595
+ * @summary Company that owns the AS
596
+ * @example "Vodafone GmbH"
597
+ */
598
+ company: string;
599
+ /**
600
+ * Description of the company that owns the ASN.
601
+ * @summary Short description of the company
602
+ * @example "Provides mobile and fixed broadband and telecommunication services to consumers and businesses."
603
+ */
604
+ description: string;
605
+ /**
606
+ * Domain name associated with the ASN.
607
+ * @summary Company domain
608
+ * @example "vodafone.de"
609
+ */
610
+ domain: string;
611
+ /**
612
+ * Two-letter ISO 3166-1 alpha-2 country code where the ASN is registered.
613
+ * @summary ASN registration country
614
+ * @example "DE"
615
+ */
616
+ country: string;
617
+ /**
618
+ * Regional Internet Registry that allocated the ASN.
619
+ * @summary RIR that allocated this ASN
620
+ * @example "RIPE"
621
+ */
622
+ rir: string;
623
+ /**
624
+ * IP route associated with the ASN.
625
+ * @summary IP route in CIDR notation
626
+ * @example "88.64.0.0/12"
627
+ */
628
+ route: string;
629
+ /**
630
+ * Type of the autonomous system.
631
+ * @summary AS type classification
632
+ * @example "isp"
633
+ */
634
+ type: string;
635
+ }
636
+
637
+ /**
638
+ * Network-related risk intelligence.
639
+ * @summary Information about the network
640
+ * @public
641
+ */
642
+ declare interface NetworkData {
643
+ /**
644
+ * IP address used when requesting the challenge.
645
+ * @summary Client IP address
646
+ * @example "88.64.4.22"
647
+ */
648
+ ip: string;
649
+ /**
650
+ * Autonomous System information.
651
+ *
652
+ * Available when the **IP Intelligence** module is enabled.
653
+ * `null` when the **IP Intelligence** module is not enabled.
654
+ *
655
+ * @summary AS data for the IP
656
+ */
657
+ as: NetworkAutonomousSystemData | null;
658
+ /**
659
+ * Geolocation information.
660
+ *
661
+ * Available when the **IP Intelligence** module is enabled.
662
+ * `null` when the **IP Intelligence** module is not enabled.
663
+ *
664
+ * @summary Geographic location of the IP
665
+ */
666
+ geolocation: NetworkGeolocationData | null;
667
+ /**
668
+ * Abuse contact information.
669
+ *
670
+ * Available when the **IP Intelligence** module is enabled.
671
+ * `null` when the **IP Intelligence** module is not enabled.
672
+ *
673
+ * @summary Contact for abuse reports
674
+ */
675
+ abuse_contact: NetworkAbuseContactData | null;
676
+ /**
677
+ * IP masking/anonymization information.
678
+ *
679
+ * Available when the **Anonymization Detection** module is enabled.
680
+ * `null` when the **Anonymization Detection** module is not enabled.
681
+ *
682
+ * @summary VPN, proxy, and Tor detection
683
+ */
684
+ anonymization: NetworkAnonymizationData | null;
685
+ }
686
+
687
+ /**
688
+ * Country information.
689
+ * @summary Detailed country data
690
+ * @public
691
+ */
692
+ declare interface NetworkGeolocationCountryData {
693
+ /**
694
+ * Two-letter ISO 3166-1 alpha-2 country code.
695
+ * @summary ISO 3166-1 alpha-2 code
696
+ * @example "DE"
697
+ */
698
+ iso2: string;
699
+ /**
700
+ * Three-letter ISO 3166-1 alpha-3 country code.
701
+ * @summary ISO 3166-1 alpha-3 code
702
+ * @example "DEU"
703
+ */
704
+ iso3: string;
705
+ /**
706
+ * English name of the country.
707
+ * @summary Country name in English
708
+ * @example "Germany"
709
+ */
710
+ name: string;
711
+ /**
712
+ * Native name of the country.
713
+ * @summary Country name in native language
714
+ * @example "Deutschland"
715
+ */
716
+ name_native: string;
717
+ /**
718
+ * Geographic region.
719
+ * @summary Major world region
720
+ * @example "Europe"
721
+ */
722
+ region: string;
723
+ /**
724
+ * Geographic subregion.
725
+ * @summary More specific world region
726
+ * @example "Western Europe"
727
+ */
728
+ subregion: string;
729
+ /**
730
+ * Currency code.
731
+ * @summary ISO 4217 currency code
732
+ * @example "EUR"
733
+ */
734
+ currency: string;
735
+ /**
736
+ * Currency name.
737
+ * @summary Full name of the currency
738
+ * @example "Euro"
739
+ */
740
+ currency_name: string;
741
+ /**
742
+ * International dialing code.
743
+ * @summary Country phone code
744
+ * @example "49"
745
+ */
746
+ phone_code: string;
747
+ /**
748
+ * Capital city.
749
+ * @summary Name of the capital city
750
+ * @example "Berlin"
751
+ */
752
+ capital: string;
753
+ }
754
+
755
+ /**
756
+ * Geolocation information for the IP address.
757
+ *
758
+ * Available when the **IP Intelligence** module is enabled.
759
+ * `null` when the **IP Intelligence** module is not enabled.
760
+ *
761
+ * @summary Geographic location of the IP address
762
+ * @public
763
+ */
764
+ declare interface NetworkGeolocationData {
765
+ /**
766
+ * Country information.
767
+ * @summary Detailed country data
768
+ */
769
+ country: NetworkGeolocationCountryData;
770
+ /**
771
+ * City name. Empty string if unknown.
772
+ *
773
+ * @summary City of the IP address
774
+ * @example "Eschborn"
775
+ */
776
+ city: string;
777
+ /**
778
+ * State, region, or province. Empty string if unknown.
779
+ *
780
+ * @summary State/region/province of the IP address
781
+ * @example "Hessen"
782
+ */
783
+ state: string;
784
+ }
785
+
103
786
  /**
104
787
  *
105
788
  * The request couldn't be made, perhaps there is a network outage, DNS issue, or the API is unreachable.
@@ -144,6 +827,110 @@ declare const RESPONSE_MISSING = "response_missing";
144
827
  */
145
828
  declare const RESPONSE_TIMEOUT = "response_timeout";
146
829
 
830
+ /** @summary High risk score (4/5)
831
+ * @public
832
+ */
833
+ declare const RISK_SCORE_HIGH: 4;
834
+
835
+ /** @summary Low risk score (2/5)
836
+ * @public
837
+ */
838
+ declare const RISK_SCORE_LOW: 2;
839
+
840
+ /** @summary Medium risk score (3/5)
841
+ * @public
842
+ */
843
+ declare const RISK_SCORE_MEDIUM: 3;
844
+
845
+ /** @summary Unknown or missing risk score
846
+ * @public
847
+ */
848
+ declare const RISK_SCORE_UNKNOWN: 0;
849
+
850
+ /** @summary Very high risk score (5/5)
851
+ * @public
852
+ */
853
+ declare const RISK_SCORE_VERY_HIGH: 5;
854
+
855
+ /** @summary Very low risk score (1/5)
856
+ * @public
857
+ */
858
+ declare const RISK_SCORE_VERY_LOW: 1;
859
+
860
+ /**
861
+ * Risk intelligence data. Contains risk scores, network data, and client data. Field availability depends on enabled modules.
862
+ *
863
+ * @summary All risk intelligence information
864
+ * @public
865
+ */
866
+ declare interface RiskIntelligenceData {
867
+ /**
868
+ * Risk scores from various signals, these summarize the risk intelligence assessment.
869
+ *
870
+ * Available when the **Risk Scores** module is enabled.
871
+ * `null` when the **Risk Scores** module is not enabled.
872
+ *
873
+ * @summary Calculated risk scores
874
+ */
875
+ risk_scores: RiskScoresData | null;
876
+ /**
877
+ * Network-related risk intelligence.
878
+ * @summary Network and IP information
879
+ */
880
+ network: NetworkData;
881
+ /**
882
+ * Client/device risk intelligence.
883
+ * @summary User agent and device information
884
+ */
885
+ client: ClientData;
886
+ }
887
+
888
+ /**
889
+ * Risk score value ranging from 1 to 5.
890
+ * - 0: Unknown or missing
891
+ * - 1: Very low risk
892
+ * - 2: Low risk
893
+ * - 3: Medium risk
894
+ * - 4: High risk
895
+ * - 5: Very high risk
896
+ *
897
+ * @summary Risk score indicating likelihood of malicious activity
898
+ * @public
899
+ */
900
+ declare type RiskScore = typeof RISK_SCORE_UNKNOWN | typeof RISK_SCORE_VERY_LOW | typeof RISK_SCORE_LOW | typeof RISK_SCORE_MEDIUM | typeof RISK_SCORE_HIGH | typeof RISK_SCORE_VERY_HIGH;
901
+
902
+ /**
903
+ * Risk scores summarize the entire risk intelligence assessment into scores per category.
904
+ *
905
+ * Available when the **Risk Scores** module is enabled for your account.
906
+ * `null` when the **Risk Scores** module is not enabled for your account.
907
+ *
908
+ * @summary Risk scores for different categories
909
+ * @public
910
+ */
911
+ declare interface RiskScoresData {
912
+ /**
913
+ * Overall risk score combining all signals.
914
+ *
915
+ * @summary Overall risk score
916
+ */
917
+ overall: RiskScore;
918
+ /**
919
+ * Network-related risk score. Captures likelihood of automation/malicious activity based on
920
+ * IP address, ASN, reputation, geolocation, past abuse from this network, and other network signals.
921
+ *
922
+ * @summary Risk score based on network signals
923
+ */
924
+ network: RiskScore;
925
+ /**
926
+ * Browser-related risk score. Captures likelihood of automation, malicious activity or browser spoofing based on
927
+ * user agent consistency, automation traces, past abuse, and browser characteristics.
928
+ *
929
+ * @summary Risk score based on browser signals
930
+ */
931
+ browser: RiskScore;
932
+ }
933
+
147
934
  /**
148
935
  * The sitekey in your request is invalid.
149
936
  *
@@ -207,7 +994,18 @@ export declare interface SiteverifyResponseChallengeData {
207
994
  * @public
208
995
  */
209
996
  export declare interface SiteverifyResponseData {
997
+ /**
998
+ * EventID is unique for this siteverify request.
999
+ */
1000
+ event_id: string;
1001
+ /**
1002
+ * Challenge data contains information about the captcha challenge that was completed, such as the timestamp and origin.
1003
+ */
210
1004
  challenge: SiteverifyResponseChallengeData;
1005
+ /**
1006
+ * Risk intelligence data contains information about the client that completed the captcha challenge, such as the browser, operating system, and any detected automation tools or bots. This is only included if the Risk Intelligence module is enabled for your account.
1007
+ */
1008
+ risk_intelligence: RiskIntelligenceData | null;
211
1009
  }
212
1010
 
213
1011
  /**
@@ -218,6 +1016,37 @@ export declare interface SiteverifySuccessResponse {
218
1016
  data: SiteverifyResponseData;
219
1017
  }
220
1018
 
1019
+ /**
1020
+ * TLS/SSL signatures, sometimes also called TLS fingerprints. These are derived from the TLS handshake
1021
+ * between the client and server, specifically the Client Hello message sent by the client.
1022
+ *
1023
+ * Available when the **Bot Detection** module is enabled.
1024
+ * `null` when the **Bot Detection** module is not enabled.
1025
+ *
1026
+ * @summary TLS client hello signatures
1027
+ * @public
1028
+ */
1029
+ declare interface TLSSignatureData {
1030
+ /**
1031
+ * JA3 hash.
1032
+ * @summary JA3 TLS signature
1033
+ * @example "d87a30a5782a73a83c1544bb06332780"
1034
+ */
1035
+ ja3: string;
1036
+ /**
1037
+ * JA3N hash.
1038
+ * @summary JA3N TLS signature
1039
+ * @example "28ecc2d2875b345cecbb632b12d8c1e0"
1040
+ */
1041
+ ja3n: string;
1042
+ /**
1043
+ * JA4 signature.
1044
+ * @summary JA4 TLS signature
1045
+ * @example "t13d1516h2_8daaf6152771_02713d6af862"
1046
+ */
1047
+ ja4: string;
1048
+ }
1049
+
221
1050
  /**
222
1051
  * @public
223
1052
  */