@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
@@ -0,0 +1,778 @@
1
+ /**
2
+ * Risk intelligence data. Contains risk scores, network data, and client data. Field availability depends on enabled modules.
3
+ *
4
+ * @summary All risk intelligence information
5
+ * @public
6
+ */
7
+ export interface RiskIntelligenceData {
8
+ /**
9
+ * Risk scores from various signals, these summarize the risk intelligence assessment.
10
+ *
11
+ * Available when the **Risk Scores** module is enabled.
12
+ * `null` when the **Risk Scores** module is not enabled.
13
+ *
14
+ * @summary Calculated risk scores
15
+ */
16
+ risk_scores: RiskScoresData | null;
17
+ /**
18
+ * Network-related risk intelligence.
19
+ * @summary Network and IP information
20
+ */
21
+ network: NetworkData;
22
+ /**
23
+ * Client/device risk intelligence.
24
+ * @summary User agent and device information
25
+ */
26
+ client: ClientData;
27
+ }
28
+ /**
29
+ * Risk score value ranging from 1 to 5.
30
+ * - 0: Unknown or missing
31
+ * - 1: Very low risk
32
+ * - 2: Low risk
33
+ * - 3: Medium risk
34
+ * - 4: High risk
35
+ * - 5: Very high risk
36
+ *
37
+ * @summary Risk score indicating likelihood of malicious activity
38
+ * @public
39
+ */
40
+ export 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;
41
+ /** @summary Unknown or missing risk score
42
+ * @public
43
+ */
44
+ export declare const RISK_SCORE_UNKNOWN: 0;
45
+ /** @summary Very low risk score (1/5)
46
+ * @public
47
+ */
48
+ export declare const RISK_SCORE_VERY_LOW: 1;
49
+ /** @summary Low risk score (2/5)
50
+ * @public
51
+ */
52
+ export declare const RISK_SCORE_LOW: 2;
53
+ /** @summary Medium risk score (3/5)
54
+ * @public
55
+ */
56
+ export declare const RISK_SCORE_MEDIUM: 3;
57
+ /** @summary High risk score (4/5)
58
+ * @public
59
+ */
60
+ export declare const RISK_SCORE_HIGH: 4;
61
+ /** @summary Very high risk score (5/5)
62
+ * @public
63
+ */
64
+ export declare const RISK_SCORE_VERY_HIGH: 5;
65
+ /**
66
+ * Risk scores summarize the entire risk intelligence assessment into scores per category.
67
+ *
68
+ * Available when the **Risk Scores** module is enabled for your account.
69
+ * `null` when the **Risk Scores** module is not enabled for your account.
70
+ *
71
+ * @summary Risk scores for different categories
72
+ * @public
73
+ */
74
+ export interface RiskScoresData {
75
+ /**
76
+ * Overall risk score combining all signals.
77
+ *
78
+ * @summary Overall risk score
79
+ */
80
+ overall: RiskScore;
81
+ /**
82
+ * Network-related risk score. Captures likelihood of automation/malicious activity based on
83
+ * IP address, ASN, reputation, geolocation, past abuse from this network, and other network signals.
84
+ *
85
+ * @summary Risk score based on network signals
86
+ */
87
+ network: RiskScore;
88
+ /**
89
+ * Browser-related risk score. Captures likelihood of automation, malicious activity or browser spoofing based on
90
+ * user agent consistency, automation traces, past abuse, and browser characteristics.
91
+ *
92
+ * @summary Risk score based on browser signals
93
+ */
94
+ browser: RiskScore;
95
+ }
96
+ /**
97
+ * Autonomous System (AS) information.
98
+ *
99
+ * Available when the **IP Intelligence** module is enabled for your account.
100
+ * `null` when the **IP Intelligence** module is not enabled for your account.
101
+ *
102
+ * @summary Information about the AS that owns the IP
103
+ * @public
104
+ */
105
+ export interface NetworkAutonomousSystemData {
106
+ /**
107
+ * Autonomous System Number (ASN) identifier.
108
+ * @summary Autonomous System Number (ASN).
109
+ * @example 3209 for Vodafone GmbH
110
+ */
111
+ number: number;
112
+ /**
113
+ * Name of the autonomous system. This is usually a short name or handle.
114
+ * @summary AS name
115
+ * @example "VODANET"
116
+ */
117
+ name: string;
118
+ /**
119
+ * Organization name that owns the ASN.
120
+ * @summary Company that owns the AS
121
+ * @example "Vodafone GmbH"
122
+ */
123
+ company: string;
124
+ /**
125
+ * Description of the company that owns the ASN.
126
+ * @summary Short description of the company
127
+ * @example "Provides mobile and fixed broadband and telecommunication services to consumers and businesses."
128
+ */
129
+ description: string;
130
+ /**
131
+ * Domain name associated with the ASN.
132
+ * @summary Company domain
133
+ * @example "vodafone.de"
134
+ */
135
+ domain: string;
136
+ /**
137
+ * Two-letter ISO 3166-1 alpha-2 country code where the ASN is registered.
138
+ * @summary ASN registration country
139
+ * @example "DE"
140
+ */
141
+ country: string;
142
+ /**
143
+ * Regional Internet Registry that allocated the ASN.
144
+ * @summary RIR that allocated this ASN
145
+ * @example "RIPE"
146
+ */
147
+ rir: string;
148
+ /**
149
+ * IP route associated with the ASN.
150
+ * @summary IP route in CIDR notation
151
+ * @example "88.64.0.0/12"
152
+ */
153
+ route: string;
154
+ /**
155
+ * Type of the autonomous system.
156
+ * @summary AS type classification
157
+ * @example "isp"
158
+ */
159
+ type: string;
160
+ }
161
+ /**
162
+ * Country information.
163
+ * @summary Detailed country data
164
+ * @public
165
+ */
166
+ export interface NetworkGeolocationCountryData {
167
+ /**
168
+ * Two-letter ISO 3166-1 alpha-2 country code.
169
+ * @summary ISO 3166-1 alpha-2 code
170
+ * @example "DE"
171
+ */
172
+ iso2: string;
173
+ /**
174
+ * Three-letter ISO 3166-1 alpha-3 country code.
175
+ * @summary ISO 3166-1 alpha-3 code
176
+ * @example "DEU"
177
+ */
178
+ iso3: string;
179
+ /**
180
+ * English name of the country.
181
+ * @summary Country name in English
182
+ * @example "Germany"
183
+ */
184
+ name: string;
185
+ /**
186
+ * Native name of the country.
187
+ * @summary Country name in native language
188
+ * @example "Deutschland"
189
+ */
190
+ name_native: string;
191
+ /**
192
+ * Geographic region.
193
+ * @summary Major world region
194
+ * @example "Europe"
195
+ */
196
+ region: string;
197
+ /**
198
+ * Geographic subregion.
199
+ * @summary More specific world region
200
+ * @example "Western Europe"
201
+ */
202
+ subregion: string;
203
+ /**
204
+ * Currency code.
205
+ * @summary ISO 4217 currency code
206
+ * @example "EUR"
207
+ */
208
+ currency: string;
209
+ /**
210
+ * Currency name.
211
+ * @summary Full name of the currency
212
+ * @example "Euro"
213
+ */
214
+ currency_name: string;
215
+ /**
216
+ * International dialing code.
217
+ * @summary Country phone code
218
+ * @example "49"
219
+ */
220
+ phone_code: string;
221
+ /**
222
+ * Capital city.
223
+ * @summary Name of the capital city
224
+ * @example "Berlin"
225
+ */
226
+ capital: string;
227
+ }
228
+ /**
229
+ * Geolocation information for the IP address.
230
+ *
231
+ * Available when the **IP Intelligence** module is enabled.
232
+ * `null` when the **IP Intelligence** module is not enabled.
233
+ *
234
+ * @summary Geographic location of the IP address
235
+ * @public
236
+ */
237
+ export interface NetworkGeolocationData {
238
+ /**
239
+ * Country information.
240
+ * @summary Detailed country data
241
+ */
242
+ country: NetworkGeolocationCountryData;
243
+ /**
244
+ * City name. Empty string if unknown.
245
+ *
246
+ * @summary City of the IP address
247
+ * @example "Eschborn"
248
+ */
249
+ city: string;
250
+ /**
251
+ * State, region, or province. Empty string if unknown.
252
+ *
253
+ * @summary State/region/province of the IP address
254
+ * @example "Hessen"
255
+ */
256
+ state: string;
257
+ }
258
+ /**
259
+ * Abuse contact information for reporting network abuse.
260
+ *
261
+ * Available when the **IP Intelligence** module is enabled.
262
+ * `null` when the **IP Intelligence** module is not enabled.
263
+ *
264
+ * @summary Contact details for reporting abuse
265
+ * @public
266
+ */
267
+ export interface NetworkAbuseContactData {
268
+ /**
269
+ * Postal address of the abuse contact.
270
+ * @summary Abuse contact postal address
271
+ * @example "Vodafone GmbH, Campus Eschborn, Duesseldorfer Strasse 15, D-65760 Eschborn, Germany"
272
+ */
273
+ address: string;
274
+ /**
275
+ * Name of the abuse contact person or team.
276
+ * @summary Abuse contact name
277
+ * @example "Vodafone Germany IP Core Backbone"
278
+ */
279
+ name: string;
280
+ /**
281
+ * Abuse contact email address.
282
+ * @summary Email for abuse reports
283
+ * @example "abuse.de@vodafone.com"
284
+ */
285
+ email: string;
286
+ /**
287
+ * Abuse contact phone number.
288
+ * @summary Phone for abuse reports
289
+ * @example "+49 6196 52352105"
290
+ */
291
+ phone: string;
292
+ }
293
+ /**
294
+ * IP anonymization and privacy information.
295
+ *
296
+ * Available when the **Anonymization Detection** module is enabled.
297
+ * `null` when the **Anonymization Detection** module is not enabled.
298
+ *
299
+ * @summary Detection of VPNs, proxies, and anonymization services
300
+ * @public
301
+ */
302
+ export interface NetworkAnonymizationData {
303
+ /**
304
+ * Likelihood that the IP is from a VPN service.
305
+ * @summary VPN detection score
306
+ */
307
+ vpn_score: RiskScore;
308
+ /**
309
+ * Likelihood that the IP is from a proxy service.
310
+ * @summary Proxy detection score
311
+ */
312
+ proxy_score: RiskScore;
313
+ /**
314
+ * Whether the IP is a Tor exit node.
315
+ * @summary Tor exit node detection
316
+ */
317
+ tor: boolean;
318
+ /**
319
+ * Whether the IP is from iCloud Private Relay.
320
+ * @summary iCloud Private Relay detection
321
+ * @see https://support.apple.com/en-us/102602
322
+ */
323
+ icloud_private_relay: boolean;
324
+ }
325
+ /**
326
+ * Network-related risk intelligence.
327
+ * @summary Information about the network
328
+ * @public
329
+ */
330
+ export interface NetworkData {
331
+ /**
332
+ * IP address used when requesting the challenge.
333
+ * @summary Client IP address
334
+ * @example "88.64.4.22"
335
+ */
336
+ ip: string;
337
+ /**
338
+ * Autonomous System information.
339
+ *
340
+ * Available when the **IP Intelligence** module is enabled.
341
+ * `null` when the **IP Intelligence** module is not enabled.
342
+ *
343
+ * @summary AS data for the IP
344
+ */
345
+ as: NetworkAutonomousSystemData | null;
346
+ /**
347
+ * Geolocation information.
348
+ *
349
+ * Available when the **IP Intelligence** module is enabled.
350
+ * `null` when the **IP Intelligence** module is not enabled.
351
+ *
352
+ * @summary Geographic location of the IP
353
+ */
354
+ geolocation: NetworkGeolocationData | null;
355
+ /**
356
+ * Abuse contact information.
357
+ *
358
+ * Available when the **IP Intelligence** module is enabled.
359
+ * `null` when the **IP Intelligence** module is not enabled.
360
+ *
361
+ * @summary Contact for abuse reports
362
+ */
363
+ abuse_contact: NetworkAbuseContactData | null;
364
+ /**
365
+ * IP masking/anonymization information.
366
+ *
367
+ * Available when the **Anonymization Detection** module is enabled.
368
+ * `null` when the **Anonymization Detection** module is not enabled.
369
+ *
370
+ * @summary VPN, proxy, and Tor detection
371
+ */
372
+ anonymization: NetworkAnonymizationData | null;
373
+ }
374
+ /**
375
+ * Time zone information from the browser.
376
+ *
377
+ * Available when the **Browser Identification** module is enabled.
378
+ * `null` when the **Browser Identification** module is not enabled.
379
+ *
380
+ * @summary IANA time zone data
381
+ * @public
382
+ */
383
+ export interface ClientTimeZoneData {
384
+ /**
385
+ * IANA time zone name reported by the browser.
386
+ * @summary IANA time zone identifier
387
+ * @example "America/New_York" or "Europe/Berlin"
388
+ */
389
+ name: string;
390
+ /**
391
+ * Two-letter ISO 3166-1 alpha-2 country code derived from the time zone.
392
+ * "XU" if timezone is missing or cannot be mapped to a country (e.g., "Etc/UTC").
393
+ *
394
+ * @summary Country derived from time zone
395
+ * @example "US" or "DE"
396
+ */
397
+ country_iso2: string;
398
+ }
399
+ /**
400
+ * Detected browser information.
401
+ *
402
+ * Available when the **Browser Identification** module is enabled.
403
+ * `null` when the **Browser Identification** module is not enabled.
404
+ *
405
+ * @summary Detected browser details
406
+ * @public
407
+ */
408
+ export interface ClientBrowserData {
409
+ /**
410
+ * Unique browser identifier. Empty string if browser could not be identified.
411
+ *
412
+ * @summary Browser ID
413
+ * @example "firefox"
414
+ * @example "chrome"
415
+ * @example "chrome_android"
416
+ * @example "edge"
417
+ * @example "safari"
418
+ * @example "safari_ios"
419
+ * @example "webview_ios"
420
+ */
421
+ id: string;
422
+ /**
423
+ * Human-readable browser name. Empty string if browser could not be identified.
424
+ *
425
+ * @summary Browser name
426
+ * @example "Firefox"
427
+ * @example "Chrome"
428
+ * @example "Edge"
429
+ * @example "Safari"
430
+ * @example "Safari on iOS"
431
+ * @example "WebView on iOS"
432
+ */
433
+ name: string;
434
+ /**
435
+ * Browser version name. Assumed to be the most recent release matching the signature if exact version unknown. Empty if unknown.
436
+ *
437
+ * @summary Version number
438
+ * @example "146.0"
439
+ * @example "16.5"
440
+ */
441
+ version: string;
442
+ /**
443
+ * Release date of the browser version. In "YYYY-MM-DD" format. Empty string if unknown.
444
+ *
445
+ * @summary Browser version release date
446
+ * @example "2026-01-28"
447
+ */
448
+ release_date: string;
449
+ }
450
+ /**
451
+ * Browser engine (rendering engine) information.
452
+ *
453
+ * Available when the **Browser Identification** module is enabled.
454
+ * `null` when the **Browser Identification** module is not enabled.
455
+ *
456
+ * @summary Detected rendering engine details
457
+ * @public
458
+ */
459
+ export interface ClientBrowserEngineData {
460
+ /**
461
+ * Unique rendering engine identifier. Empty string if engine could not be identified.
462
+ *
463
+ * @summary Engine ID
464
+ * @example "gecko"
465
+ * @example "blink"
466
+ * @example "webkit"
467
+ */
468
+ id: string;
469
+ /**
470
+ * Human-readable engine name. Empty string if engine could not be identified.
471
+ *
472
+ * @summary Engine name
473
+ * @example "Gecko"
474
+ * @example "Blink"
475
+ * @example "WebKit"
476
+ */
477
+ name: string;
478
+ /**
479
+ * Rendering engine version. Assumed to be the most recent release matching the signature if exact version unknown. Empty if unknown.
480
+ *
481
+ * @summary Version number
482
+ * @example "146.0"
483
+ * @example "16.5"
484
+ */
485
+ version: string;
486
+ }
487
+ /**
488
+ * Device type and screen information.
489
+ *
490
+ * Available when the **Browser Identification** module is enabled.
491
+ * `null` when the **Browser Identification** module is not enabled.
492
+ *
493
+ * @summary Detected device details
494
+ * @public
495
+ */
496
+ export interface ClientDeviceData {
497
+ /**
498
+ * Device type.
499
+ * @summary Type of device
500
+ * @example "desktop"
501
+ * @example "mobile"
502
+ * @example "tablet"
503
+ */
504
+ type: string;
505
+ /**
506
+ * Device brand.
507
+ * @summary Manufacturer brand
508
+ * @example "Apple"
509
+ * @example "Samsung"
510
+ * @example "Google"
511
+ */
512
+ brand: string;
513
+ /**
514
+ * Device model.
515
+ * @summary Device model name
516
+ * @example "iPhone 17"
517
+ * @example "Galaxy S21 (SM-G991B)"
518
+ * @example "Pixel 10"
519
+ */
520
+ model: string;
521
+ }
522
+ /**
523
+ * Operating system information.
524
+ *
525
+ * Available when the Browser Identification module is enabled.
526
+ * `null` when the Browser Identification module is not enabled.
527
+ *
528
+ * @summary Detected OS details
529
+ * @public
530
+ */
531
+ export interface ClientOSData {
532
+ /**
533
+ * Unique operating system identifier. "unknown" if OS could not be identified.
534
+ *
535
+ * @summary OS ID
536
+ * @example "windows"
537
+ * @example "macos"
538
+ * @example "ios"
539
+ * @example "android"
540
+ * @example "linux"
541
+ */
542
+ id: string;
543
+ /**
544
+ * Human-readable operating system name. Empty string if OS could not be identified.
545
+ *
546
+ * @summary OS name
547
+ * @example "Windows"
548
+ * @example "macOS"
549
+ * @example "iOS"
550
+ * @example "Android"
551
+ * @example "Linux"
552
+ */
553
+ name: string;
554
+ /**
555
+ * Operating system version.
556
+ * @summary Version number
557
+ * @example "10"
558
+ * @example "11.2.3"
559
+ * @example "14.4"
560
+ */
561
+ version: string;
562
+ }
563
+ /**
564
+ * TLS/SSL signatures, sometimes also called TLS fingerprints. These are derived from the TLS handshake
565
+ * between the client and server, specifically the Client Hello message sent by the client.
566
+ *
567
+ * Available when the **Bot Detection** module is enabled.
568
+ * `null` when the **Bot Detection** module is not enabled.
569
+ *
570
+ * @summary TLS client hello signatures
571
+ * @public
572
+ */
573
+ export interface TLSSignatureData {
574
+ /**
575
+ * JA3 hash.
576
+ * @summary JA3 TLS signature
577
+ * @example "d87a30a5782a73a83c1544bb06332780"
578
+ */
579
+ ja3: string;
580
+ /**
581
+ * JA3N hash.
582
+ * @summary JA3N TLS signature
583
+ * @example "28ecc2d2875b345cecbb632b12d8c1e0"
584
+ */
585
+ ja3n: string;
586
+ /**
587
+ * JA4 signature.
588
+ * @summary JA4 TLS signature
589
+ * @example "t13d1516h2_8daaf6152771_02713d6af862"
590
+ */
591
+ ja4: string;
592
+ }
593
+ /**
594
+ * Known bot information. Known bots have public documentation about their identity and purpose, they are not
595
+ * trying to hide that they are bots. These are usually considered "good bots" depending on the use case.
596
+ *
597
+ * @summary Detected known bot details
598
+ * @public
599
+ */
600
+ export interface ClientAutomationKnownBotData {
601
+ /**
602
+ * Whether a known bot was detected.
603
+ * @summary Known bot detected flag
604
+ */
605
+ detected: boolean;
606
+ /**
607
+ * Bot identifier. Empty if no bot detected.
608
+ *
609
+ * @summary Bot ID
610
+ * @example "googlebot"
611
+ * @example "bingbot"
612
+ * @example "chatgpt"
613
+ */
614
+ id: string;
615
+ /**
616
+ * Human-readable bot name. Empty if no bot detected.
617
+ *
618
+ * @summary Bot name
619
+ * @example "Googlebot"
620
+ * @example "Bingbot"
621
+ * @example "ChatGPT"
622
+ */
623
+ name: string;
624
+ /**
625
+ * Bot type classification. Empty if no bot detected.
626
+ *
627
+ * @summary Type of bot
628
+ */
629
+ type: string;
630
+ /**
631
+ * Link to bot documentation. Empty if no bot detected.
632
+ *
633
+ * @summary URL with bot details
634
+ * @example "https://developers.google.com/search/docs/crawling-indexing/googlebot"
635
+ */
636
+ url: string;
637
+ }
638
+ /**
639
+ * Automation tool information.
640
+ * @summary Detected automation tool details
641
+ * @public
642
+ */
643
+ export interface ClientAutomationToolData {
644
+ /**
645
+ * Whether an automation tool was detected.
646
+ * @summary Automation tool detected flag
647
+ */
648
+ detected: boolean;
649
+ /**
650
+ * Automation tool identifier. Empty if no tool detected.
651
+ *
652
+ * @summary Tool ID
653
+ * @example "puppeteer"
654
+ * @example "selenium"
655
+ * @example "playwright"
656
+ * @example "webdriver"
657
+ */
658
+ id: string;
659
+ /**
660
+ * Human-readable tool name. Empty if no tool detected.
661
+ *
662
+ * @summary Tool name
663
+ * @example "Puppeteer"
664
+ * @example "Selenium"
665
+ * @example "Playwright"
666
+ * @example "WebDriver"
667
+ */
668
+ name: string;
669
+ /**
670
+ * Automation tool type. Empty if no tool detected.
671
+ *
672
+ * @summary Type of automation tool
673
+ */
674
+ type: string;
675
+ }
676
+ /**
677
+ * Automation and bot detection data.
678
+ *
679
+ * Available when the **Bot Detection** module is enabled.
680
+ * `null` when the **Bot Detection** module is not enabled.
681
+ *
682
+ * @summary Information about detected automation
683
+ * @public
684
+ */
685
+ export interface ClientAutomationData {
686
+ /**
687
+ * Whether the browser was detected as running in headless mode.
688
+ * @summary Headless browser detection
689
+ */
690
+ headless: boolean;
691
+ /**
692
+ * Detected automation tool information.
693
+ * @summary Automation tool detection results
694
+ */
695
+ automation_tool: ClientAutomationToolData;
696
+ /**
697
+ * Detected known bot information.
698
+ * @summary Known bot detection results
699
+ */
700
+ known_bot: ClientAutomationKnownBotData;
701
+ }
702
+ /**
703
+ * Client/device risk intelligence. Contains details about the client device, browser, operating system - in other words, the user agent.
704
+ *
705
+ * @summary Information about the user agent and device
706
+ * @public
707
+ */
708
+ export interface ClientData {
709
+ /**
710
+ * User-Agent HTTP header value.
711
+ * @summary User-Agent header
712
+ * @example "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0"
713
+ */
714
+ header_user_agent: string;
715
+ /**
716
+ * Time zone information.
717
+ *
718
+ * Available when the **Browser Identification** module is enabled.
719
+ * `null` when the **Browser Identification** module is not enabled.
720
+ *
721
+ * @summary Browser time zone data
722
+ */
723
+ time_zone: ClientTimeZoneData | null;
724
+ /**
725
+ * Browser information.
726
+ *
727
+ * Available when the **Browser Identification** module is enabled.
728
+ * `null` when the **Browser Identification** module is not enabled.
729
+ *
730
+ * @summary Detected browser
731
+ */
732
+ browser: ClientBrowserData | null;
733
+ /**
734
+ * Browser engine information.
735
+ *
736
+ * Available when the **Browser Identification** module is enabled.
737
+ * `null` when the **Browser Identification** module is not enabled.
738
+ *
739
+ * @summary Detected rendering engine
740
+ */
741
+ browser_engine: ClientBrowserEngineData | null;
742
+ /**
743
+ * Device information.
744
+ *
745
+ * Available when the **Browser Identification** module is enabled.
746
+ * `null` when the **Browser Identification** module is not enabled.
747
+ *
748
+ * @summary Detected device
749
+ */
750
+ device: ClientDeviceData | null;
751
+ /**
752
+ * Operating system information.
753
+ *
754
+ * Available when the **Browser Identification** module is enabled.
755
+ * `null` when the **Browser Identification** module is not enabled.
756
+ *
757
+ * @summary Detected operating system
758
+ */
759
+ os: ClientOSData | null;
760
+ /**
761
+ * TLS signatures.
762
+ *
763
+ * Available when the **Bot Detection** module is enabled.
764
+ * `null` when the **Bot Detection** module is not enabled.
765
+ *
766
+ * @summary TLS signatures
767
+ */
768
+ tls_signature: TLSSignatureData | null;
769
+ /**
770
+ * Automation detection data. Contains information about what type of automation was recognized.
771
+ *
772
+ * Available when the **Bot Detection** module is enabled.
773
+ * `null` when the **Bot Detection** module is not enabled.
774
+ *
775
+ * @summary Bot and automation detection
776
+ */
777
+ automation: ClientAutomationData | null;
778
+ }