@fingerprint/node-sdk 7.0.0-test.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.
@@ -0,0 +1,1872 @@
1
+ /**
2
+ * Fingerprint Server Node.js SDK v7.0.0-test.0 - Copyright (c) FingerprintJS, Inc, 2026 (https://fingerprint.com)
3
+ * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
4
+ */
5
+
6
+ import { Buffer as Buffer$1 } from 'buffer';
7
+
8
+ interface paths {
9
+ '/events/{event_id}': {
10
+ parameters: {
11
+ query?: never;
12
+ header?: never;
13
+ path?: never;
14
+ cookie?: never;
15
+ };
16
+ /**
17
+ * Get an event by event ID
18
+ * @description Get a detailed analysis of an individual identification event, including Smart Signals.
19
+ *
20
+ * Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`.
21
+ *
22
+ */
23
+ get: operations['getEvent'];
24
+ put?: never;
25
+ post?: never;
26
+ delete?: never;
27
+ options?: never;
28
+ head?: never;
29
+ /**
30
+ * Update an event
31
+ * @description Change information in existing events specified by `event_id` or *flag suspicious events*.
32
+ *
33
+ * When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters.
34
+ * This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact.
35
+ *
36
+ * **Warning** It's not possible to update events older than one month.
37
+ *
38
+ * **Warning** Trying to update an event immediately after creation may temporarily result in an
39
+ * error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request.
40
+ *
41
+ */
42
+ patch: operations['updateEvent'];
43
+ trace?: never;
44
+ };
45
+ '/events': {
46
+ parameters: {
47
+ query?: never;
48
+ header?: never;
49
+ path?: never;
50
+ cookie?: never;
51
+ };
52
+ /**
53
+ * Search events
54
+ * @description ## Search
55
+ *
56
+ * The `/v4/events` endpoint provides a convenient way to search for past events based on specific parameters. Typical use cases and queries include:
57
+ *
58
+ * - Searching for events associated with a single `visitor_id` within a time range to get historical behavior of a visitor.
59
+ * - Searching for events associated with a single `linked_id` within a time range to get all events associated with your internal account identifier.
60
+ * - Excluding all bot traffic from the query (`good` and `bad` bots)
61
+ *
62
+ * If you don't provide `start` or `end` parameters, the default search range is the **last 7 days**.
63
+ *
64
+ * ### Filtering events with the `suspect` flag
65
+ *
66
+ * The `/v4/events` endpoint unlocks a powerful method for fraud protection analytics. The `suspect` flag is exposed in all events where it was previously set by the update API.
67
+ *
68
+ * You can also apply the `suspect` query parameter as a filter to find all potentially fraudulent activity that you previously marked as `suspect`. This helps identify patterns of fraudulent behavior.
69
+ *
70
+ * ### Environment scoping
71
+ *
72
+ * If you use a secret key that is scoped to an environment, you will only get events associated with the same environment. With a workspace-scoped environment, you will get events from all environments.
73
+ *
74
+ * Smart Signals not activated for your workspace or are not included in the response.
75
+ *
76
+ */
77
+ get: operations['searchEvents'];
78
+ put?: never;
79
+ post?: never;
80
+ delete?: never;
81
+ options?: never;
82
+ head?: never;
83
+ patch?: never;
84
+ trace?: never;
85
+ };
86
+ '/visitors/{visitor_id}': {
87
+ parameters: {
88
+ query?: never;
89
+ header?: never;
90
+ path?: never;
91
+ cookie?: never;
92
+ };
93
+ get?: never;
94
+ put?: never;
95
+ post?: never;
96
+ /**
97
+ * Delete data by visitor ID
98
+ * @description Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations.
99
+ *
100
+ * ### Which data is deleted?
101
+ * - Browser (or device) properties
102
+ * - Identification requests made from this browser (or device)
103
+ *
104
+ * #### Browser (or device) properties
105
+ * - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it.
106
+ * - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Workspace](https://docs.fingerprint.com/docs/glossary#fingerprint-workspace).
107
+ *
108
+ * #### Identification requests made from this browser (or device)
109
+ * - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://docs.fingerprint.com/docs/regions#data-retention).
110
+ * - Upon request to delete, the identification requests that were made by this browser
111
+ * - Within the past 10 days are deleted within 24 hrs.
112
+ * - Outside of 10 days are allowed to purge as per your data retention period.
113
+ *
114
+ * ### Corollary
115
+ * After requesting to delete a visitor ID,
116
+ * - If the same browser (or device) requests to identify, it will receive a different visitor ID.
117
+ * - If you request [`/v4/events` API](https://docs.fingerprint.com/reference/server-api-v4-get-event) with an `event_id` that was made outside of the 10 days, you will still receive a valid response.
118
+ *
119
+ * ### Interested?
120
+ * Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403.
121
+ *
122
+ */
123
+ delete: operations['deleteVisitorData'];
124
+ options?: never;
125
+ head?: never;
126
+ patch?: never;
127
+ trace?: never;
128
+ };
129
+ }
130
+ interface components {
131
+ schemas: {
132
+ /** @description Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp For example: `1758130560902.8tRtrH`
133
+ * */
134
+ EventId: string;
135
+ /**
136
+ * Format: int64
137
+ * @description Timestamp of the event with millisecond precision in Unix time.
138
+ */
139
+ Timestamp: number;
140
+ /** @description A customer-provided id that was sent with the request. */
141
+ LinkedId: string;
142
+ /** @description Environment Id of the event. For example: `ae_47abaca3db2c7c43`
143
+ * */
144
+ EnvironmentId: string;
145
+ /** @description Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). */
146
+ Suspect: boolean;
147
+ Integration: {
148
+ /** @description The name of the specific integration, e.g. "fingerprint-pro-react". */
149
+ name?: string;
150
+ /** @description The version of the specific integration, e.g. "3.11.10". */
151
+ version?: string;
152
+ subintegration?: {
153
+ /** @description The name of the specific subintegration, e.g. "preact". */
154
+ name?: string;
155
+ /** @description The version of the specific subintegration, e.g. "10.21.0". */
156
+ version?: string;
157
+ };
158
+ };
159
+ /** @description Contains information about the SDK used to perform the request. */
160
+ SDK: {
161
+ /**
162
+ * @description Platform of the SDK used for the identification request.
163
+ * @enum {string}
164
+ */
165
+ platform: 'js' | 'android' | 'ios' | 'unknown';
166
+ /** @description Version string of the SDK used for the identification request. For example: `"3.12.1"`
167
+ * */
168
+ version: string;
169
+ integrations?: components['schemas']['Integration'][];
170
+ };
171
+ /** @description `true` if we determined that this payload was replayed, `false` otherwise.
172
+ * */
173
+ Replayed: boolean;
174
+ IdentificationConfidence: {
175
+ /**
176
+ * Format: double
177
+ * @description The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification.
178
+ */
179
+ score: number;
180
+ /** @description The version name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. */
181
+ version?: string;
182
+ comment?: string;
183
+ };
184
+ Identification: {
185
+ /** @description String of 20 characters that uniquely identifies the visitor's browser or mobile device. */
186
+ visitor_id: string;
187
+ confidence?: components['schemas']['IdentificationConfidence'];
188
+ /** @description Attribute represents if a visitor had been identified before. */
189
+ visitor_found: boolean;
190
+ /**
191
+ * Format: int64
192
+ * @description Unix epoch time milliseconds timestamp indicating the time at which this visitor ID was first seen. example: `1758069706642` - Corresponding to Wed Sep 17 2025 00:41:46 GMT+0000
193
+ *
194
+ */
195
+ first_seen_at?: number;
196
+ /**
197
+ * Format: int64
198
+ * @description Unix epoch time milliseconds timestamp indicating the time at which this visitor ID was last seen. example: `1758069706642` - Corresponding to Wed Sep 17 2025 00:41:46 GMT+0000
199
+ *
200
+ */
201
+ last_seen_at?: number;
202
+ };
203
+ /** @description A supplementary browser identifier that prioritizes coverage over precision. The High Recall ID algorithm matches more generously, i.e., this identifier will remain the same even when there are subtle differences between two requests. This algorithm does not create as many new visitor IDs as the standard algorithms do, but there could be an increase in false-positive identification. */
204
+ SupplementaryIDHighRecall: {
205
+ /** @description String of 20 characters that uniquely identifies the visitor's browser or mobile device. */
206
+ visitor_id: string;
207
+ /** @description Attribute represents if a visitor had been identified before. */
208
+ visitor_found: boolean;
209
+ confidence?: components['schemas']['IdentificationConfidence'];
210
+ /**
211
+ * Format: int64
212
+ * @description Unix epoch time milliseconds timestamp indicating the time at which this ID was first seen. example: `1758069706642` - Corresponding to Wed Sep 17 2025 00:41:46 GMT+0000
213
+ *
214
+ */
215
+ first_seen_at?: number;
216
+ /**
217
+ * Format: int64
218
+ * @description Unix epoch time milliseconds timestamp indicating the time at which this ID was last seen. example: `1758069706642` - Corresponding to Wed Sep 17 2025 00:41:46 GMT+0000
219
+ *
220
+ */
221
+ last_seen_at?: number;
222
+ };
223
+ /** @description A customer-provided value or an object that was sent with the identification request or updated later. */
224
+ Tags: {
225
+ [key: string]: unknown;
226
+ };
227
+ /** @description Page URL from which the request was sent. For example `https://example.com/`
228
+ * */
229
+ Url: string;
230
+ /** @description Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. For example: `com.foo.app`
231
+ * */
232
+ BundleId: string;
233
+ /** @description Package name of the Android application integrated with the Fingerprint SDK for the event. For example: `com.foo.app`
234
+ * */
235
+ PackageName: string;
236
+ /** @description IP address of the requesting browser or bot. */
237
+ IpAddress: string;
238
+ /** @description User Agent of the client, for example: `Mozilla/5.0 (Windows NT 6.1; Win64; x64) ....`
239
+ * */
240
+ UserAgent: string;
241
+ /** @description Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark) For example: `https://example.com/blog/my-article`
242
+ * */
243
+ ClientReferrer: string;
244
+ BrowserDetails: {
245
+ browser_name: string;
246
+ browser_major_version: string;
247
+ browser_full_version: string;
248
+ os: string;
249
+ os_version: string;
250
+ device: string;
251
+ };
252
+ /** @description Proximity ID represents a fixed geographical zone in a discrete global grid within which the device is observed.
253
+ * */
254
+ Proximity: {
255
+ /** @description A stable privacy-preserving identifier for a given proximity zone.
256
+ * */
257
+ id: string;
258
+ /**
259
+ * Format: int32
260
+ * @description The radius of the proximity zone’s precision level, in meters.
261
+ *
262
+ * @enum {integer}
263
+ */
264
+ precision_radius: 10 | 25 | 65 | 175 | 450 | 1200 | 3300 | 8500 | 22500;
265
+ /**
266
+ * Format: float
267
+ * @description A value between `0` and `1` representing the likelihood that the true device location lies within the mapped proximity zone.
268
+ * * Scores closer to `1` indicate high confidence that the location is inside the mapped proximity zone.
269
+ * * Scores closer to `0` indicate lower confidence, suggesting the true location may fall in an adjacent zone.
270
+ *
271
+ */
272
+ confidence: number;
273
+ };
274
+ /**
275
+ * @description Bot detection result:
276
+ * * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on
277
+ * * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on
278
+ * * `not_detected` - the visitor is not a bot
279
+ *
280
+ * @enum {string}
281
+ */
282
+ BotResult: 'bad' | 'good' | 'not_detected';
283
+ /** @description Additional classification of the bot type if detected.
284
+ * */
285
+ BotType: string;
286
+ /** @description Extended bot information. */
287
+ BotInfo: {
288
+ /** @description The type and purpose of the bot. */
289
+ category: string;
290
+ /** @description The organization or company operating the bot. */
291
+ provider: string;
292
+ /** @description The URL of the bot provider's website. */
293
+ provider_url?: string;
294
+ /** @description The specific name or identifier of the bot. */
295
+ name: string;
296
+ /**
297
+ * @description The verification status of the bot's identity:
298
+ * * `verified` - well-known bot with publicly verifiable identity, directed by the bot provider.
299
+ * * `signed` - bot that signs its platform via Web Bot Auth, directed by the bot provider’s customers.
300
+ * * `spoofed` - bot that claims a public identity but fails verification.
301
+ * * `unknown` - bot that does not publish a verifiable identity.
302
+ *
303
+ * @enum {string}
304
+ */
305
+ identity: 'verified' | 'signed' | 'spoofed' | 'unknown';
306
+ /**
307
+ * @description Confidence level of the bot identification.
308
+ * @enum {string}
309
+ */
310
+ confidence: 'low' | 'medium' | 'high';
311
+ };
312
+ /** @description Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android.
313
+ * */
314
+ ClonedApp: boolean;
315
+ /** @description `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise.
316
+ * */
317
+ DeveloperTools: boolean;
318
+ /** @description Android specific emulator detection. There are 2 values:
319
+ * * `true` - Emulated environment detected (e.g. launch inside of AVD).
320
+ * * `false` - No signs of emulated environment detected or the client is not Android.
321
+ * */
322
+ Emulator: boolean;
323
+ /**
324
+ * Format: int64
325
+ * @description The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal.
326
+ *
327
+ */
328
+ FactoryReset: number;
329
+ /** @description [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values:
330
+ * * `true` - Frida detected
331
+ * * `false` - No signs of Frida or the client is not a mobile device.
332
+ * */
333
+ Frida: boolean;
334
+ IPBlockList: {
335
+ /** @description IP address was part of a known email spam attack (SMTP). */
336
+ email_spam?: boolean;
337
+ /** @description IP address was part of a known network attack (SSH/HTTPS). */
338
+ attack_source?: boolean;
339
+ /** @description IP address was part of known TOR network activity. */
340
+ tor_node?: boolean;
341
+ };
342
+ Geolocation: {
343
+ /** @description The IP address is likely to be within this radius (in km) of the specified location. */
344
+ accuracy_radius?: number;
345
+ /** Format: double */
346
+ latitude?: number;
347
+ /** Format: double */
348
+ longitude?: number;
349
+ postal_code?: string;
350
+ /** Format: timezone */
351
+ timezone?: string;
352
+ city_name?: string;
353
+ country_code?: string;
354
+ country_name?: string;
355
+ continent_code?: string;
356
+ continent_name?: string;
357
+ subdivisions?: {
358
+ iso_code: string;
359
+ name: string;
360
+ }[];
361
+ };
362
+ IPInfoV4: {
363
+ /** Format: ipv4 */
364
+ address: string;
365
+ geolocation?: components['schemas']['Geolocation'];
366
+ asn?: string;
367
+ asn_name?: string;
368
+ asn_network?: string;
369
+ asn_type?: string;
370
+ datacenter_result?: boolean;
371
+ datacenter_name?: string;
372
+ };
373
+ IPInfoV6: {
374
+ /** Format: ipv6 */
375
+ address: string;
376
+ geolocation?: components['schemas']['Geolocation'];
377
+ asn?: string;
378
+ asn_name?: string;
379
+ asn_network?: string;
380
+ asn_type?: string;
381
+ datacenter_result?: boolean;
382
+ datacenter_name?: string;
383
+ };
384
+ /** @description Details about the request IP address. Has separate fields for v4 and v6 IP address versions. */
385
+ IPInfo: {
386
+ v4?: components['schemas']['IPInfoV4'];
387
+ v6?: components['schemas']['IPInfoV6'];
388
+ };
389
+ /** @description IP address was used by a public proxy provider or belonged to a known recent residential proxy
390
+ * */
391
+ Proxy: boolean;
392
+ /**
393
+ * @description Confidence level of the proxy detection. If a proxy is not detected, confidence is "high". If it's detected, can be "low", "medium", or "high".
394
+ *
395
+ * @enum {string}
396
+ */
397
+ ProxyConfidence: 'low' | 'medium' | 'high';
398
+ /** @description Proxy detection details (present if `proxy` is `true`) */
399
+ ProxyDetails: {
400
+ /**
401
+ * @description Residential proxies use real user IP addresses to appear as legitimate traffic,
402
+ * while data center proxies are public proxies hosted in data centers
403
+ *
404
+ * @enum {string}
405
+ */
406
+ proxy_type: 'residential' | 'data_center';
407
+ /**
408
+ * Format: int64
409
+ * @description Unix millisecond timestamp with hourly resolution of when this IP was last seen as a proxy
410
+ *
411
+ */
412
+ last_seen_at?: number;
413
+ /** @description String representing the last proxy service provider detected when this
414
+ * IP was synced. An IP can be shared by multiple service providers.
415
+ * */
416
+ provider?: string;
417
+ };
418
+ /** @description `true` if we detected incognito mode used in the browser, `false` otherwise.
419
+ * */
420
+ Incognito: boolean;
421
+ /** @description iOS specific jailbreak detection. There are 2 values:
422
+ * * `true` - Jailbreak detected.
423
+ * * `false` - No signs of jailbreak or the client is not iOS.
424
+ * */
425
+ Jailbroken: boolean;
426
+ /** @description Flag indicating whether the request came from a mobile device with location spoofing enabled. */
427
+ LocationSpoofing: boolean;
428
+ /** @description * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified.
429
+ * * `false` - Otherwise or when the request originated from a browser.
430
+ * See [MitM Attack Detection](https://docs.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal.
431
+ * */
432
+ MitMAttack: boolean;
433
+ /** @description `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`.
434
+ * */
435
+ PrivacySettings: boolean;
436
+ /** @description Android specific root management apps detection. There are 2 values:
437
+ * * `true` - Root Management Apps detected (e.g. Magisk).
438
+ * * `false` - No Root Management Apps detected or the client isn't Android.
439
+ * */
440
+ RootApps: boolean;
441
+ /** @description The ID of the evaluated ruleset. */
442
+ RulesetId: string;
443
+ /** @description The ID of the rule that matched the identification event. */
444
+ RuleId: string;
445
+ /** @description The expression of the rule that matched the identification event. */
446
+ RuleExpression: string;
447
+ /**
448
+ * @description Describes the action to take with the request.
449
+ * @enum {string}
450
+ */
451
+ RuleActionType: 'allow' | 'block';
452
+ RuleActionHeaderField: {
453
+ /** @description The header field name. */
454
+ name: string;
455
+ /** @description The value of the header field. */
456
+ value: string;
457
+ };
458
+ /** @description The set of header modifications to apply, in the following order: remove, set, append. */
459
+ RequestHeaderModifications: {
460
+ /** @description The list of headers to remove. */
461
+ remove?: string[];
462
+ /** @description The list of headers to set, overwriting any existing headers with the same name. */
463
+ set?: components['schemas']['RuleActionHeaderField'][];
464
+ /** @description The list of headers to append. */
465
+ append?: components['schemas']['RuleActionHeaderField'][];
466
+ };
467
+ /** @description Informs the client that the request should be forwarded to the origin with optional request header modifications. */
468
+ EventRuleActionAllow: {
469
+ /** @description The ID of the evaluated ruleset. */
470
+ ruleset_id: components['schemas']['RulesetId'];
471
+ /** @description The ID of the rule that matched the identification event. */
472
+ rule_id?: components['schemas']['RuleId'];
473
+ /** @description The expression of the rule that matched the identification event. */
474
+ rule_expression?: components['schemas']['RuleExpression'];
475
+ /**
476
+ * @description discriminator enum property added by openapi-typescript
477
+ * @enum {string}
478
+ */
479
+ type: 'allow';
480
+ /** @description The set of header modifications to apply, in the following order: remove, set, append. */
481
+ request_header_modifications?: components['schemas']['RequestHeaderModifications'];
482
+ };
483
+ /** @description A valid HTTP status code. */
484
+ StatusCode: number;
485
+ /** @description The response body to send to the client. */
486
+ RuleActionBody: string;
487
+ /** @description Informs the client the request should be blocked using the response described by this rule action. */
488
+ EventRuleActionBlock: {
489
+ /** @description The ID of the evaluated ruleset. */
490
+ ruleset_id: components['schemas']['RulesetId'];
491
+ /** @description The ID of the rule that matched the identification event. */
492
+ rule_id?: components['schemas']['RuleId'];
493
+ /** @description The expression of the rule that matched the identification event. */
494
+ rule_expression?: components['schemas']['RuleExpression'];
495
+ /**
496
+ * @description discriminator enum property added by openapi-typescript
497
+ * @enum {string}
498
+ */
499
+ type: 'block';
500
+ /** @description A valid HTTP status code. */
501
+ status_code?: components['schemas']['StatusCode'];
502
+ /** @description A list of headers to send. */
503
+ headers?: components['schemas']['RuleActionHeaderField'][];
504
+ /** @description The response body to send to the client. */
505
+ body?: components['schemas']['RuleActionBody'];
506
+ };
507
+ /** @description Describes the action the client should take, according to the rule in the ruleset that matched the event. When getting an event by event ID, the rule_action will only be included when the ruleset_id query parameter is specified. */
508
+ EventRuleAction: components['schemas']['EventRuleActionAllow'] | components['schemas']['EventRuleActionBlock'];
509
+ /** @description Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://docs.fingerprint.com/docs/suspect-score
510
+ * */
511
+ SuspectScore: number;
512
+ /** @description Flag indicating browser tampering was detected. This happens when either:
513
+ * * There are inconsistencies in the browser configuration that cross internal tampering thresholds (see `tampering_details.anomaly_score`).
514
+ * * The browser signature resembles an "anti-detect" browser specifically designed to evade fingerprinting (see `tampering_details.anti_detect_browser`).
515
+ * */
516
+ Tampering: boolean;
517
+ TamperingDetails: {
518
+ /**
519
+ * Format: double
520
+ * @description Confidence score (`0.0 - 1.0`) for tampering detection:
521
+ * * Values above `0.5` indicate tampering.
522
+ * * Values below `0.5` indicate genuine browsers.
523
+ *
524
+ */
525
+ anomaly_score?: number;
526
+ /** @description True if the identified browser resembles an "anti-detect" browser, such as Incognition, which attempts to evade identification by manipulating its fingerprint.
527
+ * */
528
+ anti_detect_browser?: boolean;
529
+ };
530
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
531
+ * */
532
+ VelocityData: {
533
+ /** @description Count for the last 5 minutes of velocity data, from the time of the event.
534
+ * */
535
+ '5_minutes': number;
536
+ /** @description Count for the last 1 hour of velocity data, from the time of the event.
537
+ * */
538
+ '1_hour': number;
539
+ /** @description The `24_hours` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`, `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted if the number of `events` for the visitor Id in the last 24 hours (`events.['24_hours']`) is higher than 20.000.
540
+ * */
541
+ '24_hours'?: number;
542
+ };
543
+ /** @description Sums key data points for a specific `visitor_id`, `ip_address` and `linked_id` at three distinct time
544
+ * intervals: 5 minutes, 1 hour, and 24 hours as follows:
545
+ *
546
+ * - Number of distinct IP addresses associated to the visitor Id.
547
+ * - Number of distinct linked Ids associated with the visitor Id.
548
+ * - Number of distinct countries associated with the visitor Id.
549
+ * - Number of identification events associated with the visitor Id.
550
+ * - Number of identification events associated with the detected IP address.
551
+ * - Number of distinct IP addresses associated with the provided linked Id.
552
+ * - Number of distinct visitor Ids associated with the provided linked Id.
553
+ *
554
+ * The `24h` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`,
555
+ * `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted
556
+ * if the number of `events` for the visitor Id in the last 24
557
+ * hours (`events.['24h']`) is higher than 20.000.
558
+ *
559
+ * All will not necessarily be returned in a response, some may be omitted if the
560
+ * associated event does not have the required data, such as a linked_id.
561
+ * */
562
+ Velocity: {
563
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
564
+ * */
565
+ distinct_ip?: components['schemas']['VelocityData'];
566
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
567
+ * */
568
+ distinct_linked_id?: components['schemas']['VelocityData'];
569
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
570
+ * */
571
+ distinct_country?: components['schemas']['VelocityData'];
572
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
573
+ * */
574
+ events?: components['schemas']['VelocityData'];
575
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
576
+ * */
577
+ ip_events?: components['schemas']['VelocityData'];
578
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
579
+ * */
580
+ distinct_ip_by_linked_id?: components['schemas']['VelocityData'];
581
+ /** @description Is absent if the velocity data could not be generated for the visitor Id.
582
+ * */
583
+ distinct_visitor_id_by_linked_id?: components['schemas']['VelocityData'];
584
+ };
585
+ /** @description `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise.
586
+ * */
587
+ VirtualMachine: boolean;
588
+ /** @description VPN or other anonymizing service has been used when sending the request.
589
+ * */
590
+ Vpn: boolean;
591
+ /**
592
+ * @description A confidence rating for the VPN detection result — "low", "medium", or "high". Depends on the combination of results returned from all VPN detection methods.
593
+ * @enum {string}
594
+ */
595
+ VpnConfidence: 'low' | 'medium' | 'high';
596
+ /** @description Local timezone which is used in timezone_mismatch method.
597
+ * */
598
+ VpnOriginTimezone: string;
599
+ /** @description Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown).
600
+ * */
601
+ VpnOriginCountry: string;
602
+ VpnMethods: {
603
+ /** @description The browser timezone doesn't match the timezone inferred from the request IP address. */
604
+ timezone_mismatch?: boolean;
605
+ /** @description Request IP address is owned and used by a public VPN service provider. */
606
+ public_vpn?: boolean;
607
+ /** @description This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. */
608
+ auxiliary_mobile?: boolean;
609
+ /** @description The browser runs on a different operating system than the operating system inferred from the request network signature. */
610
+ os_mismatch?: boolean;
611
+ /** @description Request IP address belongs to a relay service provider, indicating the use of relay services like [Apple Private relay](https://support.apple.com/en-us/102602) or [Cloudflare Warp](https://developers.cloudflare.com/warp-client/).
612
+ *
613
+ * * Like VPNs, relay services anonymize the visitor's true IP address.
614
+ * * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country.
615
+ *
616
+ * This field allows you to differentiate VPN users and relay service users in your fraud prevention logic.
617
+ * */
618
+ relay?: boolean;
619
+ };
620
+ /** @description Flag indicating if the request came from a high-activity visitor. */
621
+ HighActivity: boolean;
622
+ /** @description Baseline measurement of canonical fonts rendered on the device. Numeric width metrics, in CSS pixels, for the canonical fonts collected by the agent.
623
+ * */
624
+ FontPreferences: {
625
+ /** Format: double */
626
+ default?: number;
627
+ /** Format: double */
628
+ serif?: number;
629
+ /** Format: double */
630
+ sans?: number;
631
+ /** Format: double */
632
+ mono?: number;
633
+ /** Format: double */
634
+ apple?: number;
635
+ /** Format: double */
636
+ min?: number;
637
+ /** Format: double */
638
+ system?: number;
639
+ };
640
+ /** @description Bounding box metrics describing how the emoji glyph renders. */
641
+ Emoji: {
642
+ /** @description Font family reported by the browser when drawing the emoji. */
643
+ font?: string;
644
+ /** Format: double */
645
+ width?: number;
646
+ /** Format: double */
647
+ height?: number;
648
+ /** Format: double */
649
+ top?: number;
650
+ /** Format: double */
651
+ bottom?: number;
652
+ /** Format: double */
653
+ left?: number;
654
+ /** Format: double */
655
+ right?: number;
656
+ /** Format: double */
657
+ x?: number;
658
+ /** Format: double */
659
+ y?: number;
660
+ };
661
+ /**
662
+ * @description List of fonts detected on the device.
663
+ * @example [
664
+ * "Arial Unicode MS",
665
+ * "Gill Sans",
666
+ * "Helvetica Neue",
667
+ * "Menlo"
668
+ * ]
669
+ */
670
+ Fonts: string[];
671
+ /**
672
+ * Format: int32
673
+ * @description Rounded amount of RAM (in gigabytes) reported by the browser.
674
+ * @example 8
675
+ */
676
+ DeviceMemory: number;
677
+ /** @description Timezone identifier detected on the client. */
678
+ Timezone: string;
679
+ /** @description Canvas fingerprint containing winding flag plus geometry/text hashes. */
680
+ Canvas: {
681
+ winding?: boolean;
682
+ /** @description Hash of geometry rendering output or `unsupported` markers. */
683
+ geometry?: string;
684
+ /** @description Hash of text rendering output or `unsupported` markers. */
685
+ text?: string;
686
+ };
687
+ /** @description Navigator languages reported by the agent including fallbacks. Each inner array represents ordered language preferences reported by different APIs.
688
+ * */
689
+ Languages: string[][];
690
+ /** @description Hashes of WebGL context attributes and extension support. */
691
+ WebGlExtensions: {
692
+ context_attributes?: string;
693
+ parameters?: string;
694
+ shader_precisions?: string;
695
+ extensions?: string;
696
+ extension_parameters?: string;
697
+ unsupported_extensions?: string[];
698
+ };
699
+ /** @description Render and vendor strings reported by the WebGL context. */
700
+ WebGlBasics: {
701
+ version?: string;
702
+ vendor?: string;
703
+ vendor_unmasked?: string;
704
+ renderer?: string;
705
+ renderer_unmasked?: string;
706
+ shading_language_version?: string;
707
+ };
708
+ /** @description Current screen resolution. */
709
+ ScreenResolution: number[];
710
+ /** @description Browser-reported touch capabilities. */
711
+ TouchSupport: {
712
+ touch_event?: boolean;
713
+ touch_start?: boolean;
714
+ /** Format: int64 */
715
+ max_touch_points?: number;
716
+ };
717
+ /** @description Navigator `oscpu` string. */
718
+ Oscpu: string;
719
+ /**
720
+ * Format: int32
721
+ * @description Integer representing the CPU architecture exposed by the browser.
722
+ */
723
+ Architecture: number;
724
+ /** @description Whether the cookies are enabled in the browser. */
725
+ CookiesEnabled: boolean;
726
+ /**
727
+ * Format: int32
728
+ * @description Number of logical CPU cores reported by the browser.
729
+ */
730
+ HardwareConcurrency: number;
731
+ /** @description Locale derived from the Intl.DateTimeFormat API. Negative values indicate known error states. The negative statuses can be: - "-1": A permanent status for browsers that don't support Intl API. - "-2": A permanent status for browsers that don't supportDateTimeFormat constructor. - "-3": A permanent status for browsers in which DateTimeFormat locale is undefined or null.
732
+ * */
733
+ DateTimeLocale: string;
734
+ /** @description Navigator vendor string. */
735
+ Vendor: string;
736
+ /**
737
+ * Format: int32
738
+ * @description Screen color depth in bits.
739
+ */
740
+ ColorDepth: number;
741
+ /** @description Navigator platform string. */
742
+ Platform: string;
743
+ /** @description Whether sessionStorage is available. */
744
+ SessionStorage: boolean;
745
+ /** @description Whether localStorage is available. */
746
+ LocalStorage: boolean;
747
+ /**
748
+ * Format: double
749
+ * @description AudioContext fingerprint or negative status when unavailable. The negative statuses can be: - -1: A permanent status for those browsers which are known to always suspend audio context - -2: A permanent status for browsers that don't support the signal - -3: A temporary status that means that an unexpected timeout has happened
750
+ *
751
+ */
752
+ Audio: number;
753
+ /** @description Browser plugins reported by `navigator.plugins`. */
754
+ Plugins: {
755
+ name: string;
756
+ description?: string;
757
+ mimeTypes?: {
758
+ type?: string;
759
+ suffixes?: string;
760
+ description?: string;
761
+ }[];
762
+ }[];
763
+ /** @description Whether IndexedDB is available. */
764
+ IndexedDb: boolean;
765
+ /** @description Hash of Math APIs used for entropy collection. */
766
+ Math: string;
767
+ /** @description A curated subset of raw browser/device attributes that the API surface exposes. Each property contains a value or object with the data for the collected signal.
768
+ * */
769
+ RawDeviceAttributes: {
770
+ /** @description Baseline measurement of canonical fonts rendered on the device. Numeric width metrics, in CSS pixels, for the canonical fonts collected by the agent.
771
+ * */
772
+ font_preferences?: components['schemas']['FontPreferences'];
773
+ /** @description Bounding box metrics describing how the emoji glyph renders. */
774
+ emoji?: components['schemas']['Emoji'];
775
+ /** @description List of fonts detected on the device. */
776
+ fonts?: components['schemas']['Fonts'];
777
+ /** @description Rounded amount of RAM (in gigabytes) reported by the browser. */
778
+ device_memory?: components['schemas']['DeviceMemory'];
779
+ /** @description Timezone identifier detected on the client. */
780
+ timezone?: components['schemas']['Timezone'];
781
+ /** @description Canvas fingerprint containing winding flag plus geometry/text hashes. */
782
+ canvas?: components['schemas']['Canvas'];
783
+ /** @description Navigator languages reported by the agent including fallbacks. Each inner array represents ordered language preferences reported by different APIs.
784
+ * */
785
+ languages?: components['schemas']['Languages'];
786
+ /** @description Hashes of WebGL context attributes and extension support. */
787
+ webgl_extensions?: components['schemas']['WebGlExtensions'];
788
+ /** @description Render and vendor strings reported by the WebGL context. */
789
+ webgl_basics?: components['schemas']['WebGlBasics'];
790
+ /** @description Current screen resolution. */
791
+ screen_resolution?: components['schemas']['ScreenResolution'];
792
+ /** @description Browser-reported touch capabilities. */
793
+ touch_support?: components['schemas']['TouchSupport'];
794
+ /** @description Navigator `oscpu` string. */
795
+ oscpu?: components['schemas']['Oscpu'];
796
+ /** @description Integer representing the CPU architecture exposed by the browser. */
797
+ architecture?: components['schemas']['Architecture'];
798
+ /** @description Whether the cookies are enabled in the browser. */
799
+ cookies_enabled?: components['schemas']['CookiesEnabled'];
800
+ /** @description Number of logical CPU cores reported by the browser. */
801
+ hardware_concurrency?: components['schemas']['HardwareConcurrency'];
802
+ /** @description Locale derived from the Intl.DateTimeFormat API. Negative values indicate known error states. The negative statuses can be: - "-1": A permanent status for browsers that don't support Intl API. - "-2": A permanent status for browsers that don't supportDateTimeFormat constructor. - "-3": A permanent status for browsers in which DateTimeFormat locale is undefined or null.
803
+ * */
804
+ date_time_locale?: components['schemas']['DateTimeLocale'];
805
+ /** @description Navigator vendor string. */
806
+ vendor?: components['schemas']['Vendor'];
807
+ /** @description Screen color depth in bits. */
808
+ color_depth?: components['schemas']['ColorDepth'];
809
+ /** @description Navigator platform string. */
810
+ platform?: components['schemas']['Platform'];
811
+ /** @description Whether sessionStorage is available. */
812
+ session_storage?: components['schemas']['SessionStorage'];
813
+ /** @description Whether localStorage is available. */
814
+ local_storage?: components['schemas']['LocalStorage'];
815
+ /** @description AudioContext fingerprint or negative status when unavailable. The negative statuses can be: - -1: A permanent status for those browsers which are known to always suspend audio context - -2: A permanent status for browsers that don't support the signal - -3: A temporary status that means that an unexpected timeout has happened
816
+ * */
817
+ audio?: components['schemas']['Audio'];
818
+ /** @description Browser plugins reported by `navigator.plugins`. */
819
+ plugins?: components['schemas']['Plugins'];
820
+ /** @description Whether IndexedDB is available. */
821
+ indexed_db?: components['schemas']['IndexedDb'];
822
+ /** @description Hash of Math APIs used for entropy collection. */
823
+ math?: components['schemas']['Math'];
824
+ };
825
+ /** @description Contains results from Fingerprint Identification and all active Smart Signals. */
826
+ Event: {
827
+ /** @description Unique identifier of the user's request. The first portion of the event_id is a unix epoch milliseconds timestamp For example: `1758130560902.8tRtrH`
828
+ * */
829
+ event_id: components['schemas']['EventId'];
830
+ /** @description Timestamp of the event with millisecond precision in Unix time. */
831
+ timestamp: components['schemas']['Timestamp'];
832
+ /** @description A customer-provided id that was sent with the request. */
833
+ linked_id?: components['schemas']['LinkedId'];
834
+ /** @description Environment Id of the event. For example: `ae_47abaca3db2c7c43`
835
+ * */
836
+ environment_id?: components['schemas']['EnvironmentId'];
837
+ /** @description Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://docs.fingerprint.com/reference/server-api-v4-update-event). */
838
+ suspect?: components['schemas']['Suspect'];
839
+ /** @description Contains information about the SDK used to perform the request. */
840
+ sdk?: components['schemas']['SDK'];
841
+ /** @description `true` if we determined that this payload was replayed, `false` otherwise.
842
+ * */
843
+ replayed?: components['schemas']['Replayed'];
844
+ identification?: components['schemas']['Identification'];
845
+ /** @description A supplementary browser identifier that prioritizes coverage over precision. The High Recall ID algorithm matches more generously, i.e., this identifier will remain the same even when there are subtle differences between two requests. This algorithm does not create as many new visitor IDs as the standard algorithms do, but there could be an increase in false-positive identification. */
846
+ supplementary_id_high_recall?: components['schemas']['SupplementaryIDHighRecall'];
847
+ /** @description A customer-provided value or an object that was sent with the identification request or updated later. */
848
+ tags?: components['schemas']['Tags'];
849
+ /** @description Page URL from which the request was sent. For example `https://example.com/`
850
+ * */
851
+ url?: components['schemas']['Url'];
852
+ /** @description Bundle Id of the iOS application integrated with the Fingerprint SDK for the event. For example: `com.foo.app`
853
+ * */
854
+ bundle_id?: components['schemas']['BundleId'];
855
+ /** @description Package name of the Android application integrated with the Fingerprint SDK for the event. For example: `com.foo.app`
856
+ * */
857
+ package_name?: components['schemas']['PackageName'];
858
+ /** @description IP address of the requesting browser or bot. */
859
+ ip_address?: components['schemas']['IpAddress'];
860
+ /** @description User Agent of the client, for example: `Mozilla/5.0 (Windows NT 6.1; Win64; x64) ....`
861
+ * */
862
+ user_agent?: components['schemas']['UserAgent'];
863
+ /** @description Client Referrer field corresponds to the `document.referrer` field gathered during an identification request. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, by using a bookmark) For example: `https://example.com/blog/my-article`
864
+ * */
865
+ client_referrer?: components['schemas']['ClientReferrer'];
866
+ browser_details?: components['schemas']['BrowserDetails'];
867
+ /** @description Proximity ID represents a fixed geographical zone in a discrete global grid within which the device is observed.
868
+ * */
869
+ proximity?: components['schemas']['Proximity'];
870
+ /** @description Bot detection result:
871
+ * * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on
872
+ * * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on
873
+ * * `not_detected` - the visitor is not a bot
874
+ * */
875
+ bot?: components['schemas']['BotResult'];
876
+ /** @description Additional classification of the bot type if detected.
877
+ * */
878
+ bot_type?: components['schemas']['BotType'];
879
+ /** @description Extended bot information. */
880
+ bot_info?: components['schemas']['BotInfo'];
881
+ /** @description Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android.
882
+ * */
883
+ cloned_app?: components['schemas']['ClonedApp'];
884
+ /** @description `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise.
885
+ * */
886
+ developer_tools?: components['schemas']['DeveloperTools'];
887
+ /** @description Android specific emulator detection. There are 2 values:
888
+ * * `true` - Emulated environment detected (e.g. launch inside of AVD).
889
+ * * `false` - No signs of emulated environment detected or the client is not Android.
890
+ * */
891
+ emulator?: components['schemas']['Emulator'];
892
+ /** @description The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC) as a value of 0. See [Factory Reset Detection](https://docs.fingerprint.com/docs/smart-signals-reference#factory-reset-detection) to learn more about this Smart Signal.
893
+ * */
894
+ factory_reset_timestamp?: components['schemas']['FactoryReset'];
895
+ /** @description [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values:
896
+ * * `true` - Frida detected
897
+ * * `false` - No signs of Frida or the client is not a mobile device.
898
+ * */
899
+ frida?: components['schemas']['Frida'];
900
+ ip_blocklist?: components['schemas']['IPBlockList'];
901
+ /** @description Details about the request IP address. Has separate fields for v4 and v6 IP address versions. */
902
+ ip_info?: components['schemas']['IPInfo'];
903
+ /** @description IP address was used by a public proxy provider or belonged to a known recent residential proxy
904
+ * */
905
+ proxy?: components['schemas']['Proxy'];
906
+ /** @description Confidence level of the proxy detection. If a proxy is not detected, confidence is "high". If it's detected, can be "low", "medium", or "high".
907
+ * */
908
+ proxy_confidence?: components['schemas']['ProxyConfidence'];
909
+ /** @description Proxy detection details (present if `proxy` is `true`) */
910
+ proxy_details?: components['schemas']['ProxyDetails'];
911
+ /** @description `true` if we detected incognito mode used in the browser, `false` otherwise.
912
+ * */
913
+ incognito?: components['schemas']['Incognito'];
914
+ /** @description iOS specific jailbreak detection. There are 2 values:
915
+ * * `true` - Jailbreak detected.
916
+ * * `false` - No signs of jailbreak or the client is not iOS.
917
+ * */
918
+ jailbroken?: components['schemas']['Jailbroken'];
919
+ /** @description Flag indicating whether the request came from a mobile device with location spoofing enabled. */
920
+ location_spoofing?: components['schemas']['LocationSpoofing'];
921
+ /** @description * `true` - When requests made from your users' mobile devices to Fingerprint servers have been intercepted and potentially modified.
922
+ * * `false` - Otherwise or when the request originated from a browser.
923
+ * See [MitM Attack Detection](https://docs.fingerprint.com/docs/smart-signals-reference#mitm-attack-detection) to learn more about this Smart Signal.
924
+ * */
925
+ mitm_attack?: components['schemas']['MitMAttack'];
926
+ /** @description `true` if the request is from a privacy aware browser (e.g. Tor) or from a browser in which fingerprinting is blocked. Otherwise `false`.
927
+ * */
928
+ privacy_settings?: components['schemas']['PrivacySettings'];
929
+ /** @description Android specific root management apps detection. There are 2 values:
930
+ * * `true` - Root Management Apps detected (e.g. Magisk).
931
+ * * `false` - No Root Management Apps detected or the client isn't Android.
932
+ * */
933
+ root_apps?: components['schemas']['RootApps'];
934
+ /** @description Describes the action the client should take, according to the rule in the ruleset that matched the event. When getting an event by event ID, the rule_action will only be included when the ruleset_id query parameter is specified. */
935
+ rule_action?: components['schemas']['EventRuleAction'];
936
+ /** @description Suspect Score is an easy way to integrate Smart Signals into your fraud protection work flow. It is a weighted representation of all Smart Signals present in the payload that helps identify suspicious activity. The value range is [0; S] where S is sum of all Smart Signals weights. See more details here: https://docs.fingerprint.com/docs/suspect-score
937
+ * */
938
+ suspect_score?: components['schemas']['SuspectScore'];
939
+ /** @description Flag indicating browser tampering was detected. This happens when either:
940
+ * * There are inconsistencies in the browser configuration that cross internal tampering thresholds (see `tampering_details.anomaly_score`).
941
+ * * The browser signature resembles an "anti-detect" browser specifically designed to evade fingerprinting (see `tampering_details.anti_detect_browser`).
942
+ * */
943
+ tampering?: components['schemas']['Tampering'];
944
+ tampering_details?: components['schemas']['TamperingDetails'];
945
+ /** @description Sums key data points for a specific `visitor_id`, `ip_address` and `linked_id` at three distinct time
946
+ * intervals: 5 minutes, 1 hour, and 24 hours as follows:
947
+ *
948
+ * - Number of distinct IP addresses associated to the visitor Id.
949
+ * - Number of distinct linked Ids associated with the visitor Id.
950
+ * - Number of distinct countries associated with the visitor Id.
951
+ * - Number of identification events associated with the visitor Id.
952
+ * - Number of identification events associated with the detected IP address.
953
+ * - Number of distinct IP addresses associated with the provided linked Id.
954
+ * - Number of distinct visitor Ids associated with the provided linked Id.
955
+ *
956
+ * The `24h` interval of `distinct_ip`, `distinct_linked_id`, `distinct_country`,
957
+ * `distinct_ip_by_linked_id` and `distinct_visitor_id_by_linked_id` will be omitted
958
+ * if the number of `events` for the visitor Id in the last 24
959
+ * hours (`events.['24h']`) is higher than 20.000.
960
+ *
961
+ * All will not necessarily be returned in a response, some may be omitted if the
962
+ * associated event does not have the required data, such as a linked_id.
963
+ * */
964
+ velocity?: components['schemas']['Velocity'];
965
+ /** @description `true` if the request came from a browser running inside a virtual machine (e.g. VMWare), `false` otherwise.
966
+ * */
967
+ virtual_machine?: components['schemas']['VirtualMachine'];
968
+ /** @description VPN or other anonymizing service has been used when sending the request.
969
+ * */
970
+ vpn?: components['schemas']['Vpn'];
971
+ /** @description A confidence rating for the VPN detection result — "low", "medium", or "high". Depends on the combination of results returned from all VPN detection methods. */
972
+ vpn_confidence?: components['schemas']['VpnConfidence'];
973
+ /** @description Local timezone which is used in timezone_mismatch method.
974
+ * */
975
+ vpn_origin_timezone?: components['schemas']['VpnOriginTimezone'];
976
+ /** @description Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown).
977
+ * */
978
+ vpn_origin_country?: components['schemas']['VpnOriginCountry'];
979
+ vpn_methods?: components['schemas']['VpnMethods'];
980
+ /** @description Flag indicating if the request came from a high-activity visitor. */
981
+ high_activity_device?: components['schemas']['HighActivity'];
982
+ /** @description A curated subset of raw browser/device attributes that the API surface exposes. Each property contains a value or object with the data for the collected signal.
983
+ * */
984
+ raw_device_attributes?: components['schemas']['RawDeviceAttributes'];
985
+ };
986
+ /**
987
+ * @description Error code:
988
+ * * `request_cannot_be_parsed` - The query parameters or JSON payload contains some errors
989
+ * that prevented us from parsing it (wrong type/surpassed limits).
990
+ * * `secret_api_key_required` - secret API key in header is missing or empty.
991
+ * * `secret_api_key_not_found` - No Fingerprint workspace found for specified secret API key.
992
+ * * `public_api_key_required` - public API key in header is missing or empty.
993
+ * * `public_api_key_not_found` - No Fingerprint workspace found for specified public API key.
994
+ * * `subscription_not_active` - Fingerprint workspace is not active.
995
+ * * `wrong_region` - Server and workspace region differ.
996
+ * * `feature_not_enabled` - This feature (for example, Delete API) is not enabled for your workspace.
997
+ * * `request_not_found` - The specified event ID was not found. It never existed, expired, or it has been deleted.
998
+ * * `visitor_not_found` - The specified visitor ID was not found. It never existed or it may have already been deleted.
999
+ * * `too_many_requests` - The limit on secret API key requests per second has been exceeded.
1000
+ * * `state_not_ready` - The event specified with event ID is
1001
+ * not ready for updates yet. Try again.
1002
+ * This error happens in rare cases when update API is called immediately
1003
+ * after receiving the event ID on the client. In case you need to send
1004
+ * information right away, we recommend using the JS agent API instead.
1005
+ * * `failed` - Internal server error.
1006
+ * * `event_not_found` - The specified event ID was not found. It never existed, expired, or it has been deleted.
1007
+ * * `missing_module` - The request is invalid because it is missing a required module.
1008
+ * * `payload_too_large` - The request payload is too large and cannot be processed.
1009
+ * * `service_unavailable` - The service was unable to process the request.
1010
+ * * `ruleset_not_found` - The specified ruleset was not found. It never existed or it has been deleted.
1011
+ *
1012
+ * @enum {string}
1013
+ */
1014
+ ErrorCode: 'request_cannot_be_parsed' | 'secret_api_key_required' | 'secret_api_key_not_found' | 'public_api_key_required' | 'public_api_key_not_found' | 'subscription_not_active' | 'wrong_region' | 'feature_not_enabled' | 'request_not_found' | 'visitor_not_found' | 'too_many_requests' | 'state_not_ready' | 'failed' | 'event_not_found' | 'missing_module' | 'payload_too_large' | 'service_unavailable' | 'ruleset_not_found';
1015
+ Error: {
1016
+ /** @description Error code:
1017
+ * * `request_cannot_be_parsed` - The query parameters or JSON payload contains some errors
1018
+ * that prevented us from parsing it (wrong type/surpassed limits).
1019
+ * * `secret_api_key_required` - secret API key in header is missing or empty.
1020
+ * * `secret_api_key_not_found` - No Fingerprint workspace found for specified secret API key.
1021
+ * * `public_api_key_required` - public API key in header is missing or empty.
1022
+ * * `public_api_key_not_found` - No Fingerprint workspace found for specified public API key.
1023
+ * * `subscription_not_active` - Fingerprint workspace is not active.
1024
+ * * `wrong_region` - Server and workspace region differ.
1025
+ * * `feature_not_enabled` - This feature (for example, Delete API) is not enabled for your workspace.
1026
+ * * `request_not_found` - The specified event ID was not found. It never existed, expired, or it has been deleted.
1027
+ * * `visitor_not_found` - The specified visitor ID was not found. It never existed or it may have already been deleted.
1028
+ * * `too_many_requests` - The limit on secret API key requests per second has been exceeded.
1029
+ * * `state_not_ready` - The event specified with event ID is
1030
+ * not ready for updates yet. Try again.
1031
+ * This error happens in rare cases when update API is called immediately
1032
+ * after receiving the event ID on the client. In case you need to send
1033
+ * information right away, we recommend using the JS agent API instead.
1034
+ * * `failed` - Internal server error.
1035
+ * * `event_not_found` - The specified event ID was not found. It never existed, expired, or it has been deleted.
1036
+ * * `missing_module` - The request is invalid because it is missing a required module.
1037
+ * * `payload_too_large` - The request payload is too large and cannot be processed.
1038
+ * * `service_unavailable` - The service was unable to process the request.
1039
+ * * `ruleset_not_found` - The specified ruleset was not found. It never existed or it has been deleted.
1040
+ * */
1041
+ code: components['schemas']['ErrorCode'];
1042
+ message: string;
1043
+ };
1044
+ ErrorResponse: {
1045
+ error: components['schemas']['Error'];
1046
+ };
1047
+ EventUpdate: {
1048
+ /** @description Linked Id value to assign to the existing event */
1049
+ linked_id?: string;
1050
+ /** @description A customer-provided value or an object that was sent with the identification request or updated later. */
1051
+ tags?: {
1052
+ [key: string]: unknown;
1053
+ };
1054
+ /** @description Suspect flag indicating observed suspicious or fraudulent event */
1055
+ suspect?: boolean;
1056
+ };
1057
+ /** @description Contains a list of all identification events matching the specified search criteria. */
1058
+ EventSearch: {
1059
+ events: components['schemas']['Event'][];
1060
+ /** @description Use this value in the `pagination_key` parameter to request the next page of search results. */
1061
+ pagination_key?: string;
1062
+ /**
1063
+ * Format: int64
1064
+ * @description This value represents the total number of events matching the search query, up to the limit provided in the `total_hits` query parameter. Only present if the `total_hits` query parameter was provided.
1065
+ */
1066
+ total_hits?: number;
1067
+ };
1068
+ /**
1069
+ * @description Filter events by the Bot Detection result, specifically:
1070
+ * `all` - events where any kind of bot was detected.
1071
+ * `good` - events where a good bot was detected.
1072
+ * `bad` - events where a bad bot was detected.
1073
+ * `none` - events where no bot was detected.
1074
+ * > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response.
1075
+ *
1076
+ * @enum {string}
1077
+ */
1078
+ SearchEventsBot: 'all' | 'good' | 'bad' | 'none';
1079
+ /**
1080
+ * @description Filter events by VPN Detection result confidence level.
1081
+ * `high` - events with high VPN Detection confidence.
1082
+ * `medium` - events with medium VPN Detection confidence.
1083
+ * `low` - events with low VPN Detection confidence.
1084
+ * > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response.
1085
+ *
1086
+ * @enum {string}
1087
+ */
1088
+ SearchEventsVpnConfidence: 'high' | 'medium' | 'low';
1089
+ /**
1090
+ * @description Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) .
1091
+ * `js` - Javascript agent (Web).
1092
+ * `ios` - Apple iOS based devices.
1093
+ * `android` - Android based devices.
1094
+ *
1095
+ * @enum {string}
1096
+ */
1097
+ SearchEventsSdkPlatform: 'js' | 'android' | 'ios';
1098
+ };
1099
+ responses: never;
1100
+ parameters: never;
1101
+ requestBodies: never;
1102
+ headers: never;
1103
+ pathItems: never;
1104
+ }
1105
+ interface operations {
1106
+ getEvent: {
1107
+ parameters: {
1108
+ query?: {
1109
+ /** @description The ID of the ruleset to evaluate against the event, producing the action to take for this event.
1110
+ * The resulting action is returned in the `rule_action` attribute of the response.
1111
+ * */
1112
+ ruleset_id?: string;
1113
+ };
1114
+ header?: never;
1115
+ path: {
1116
+ /** @description The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). */
1117
+ event_id: string;
1118
+ };
1119
+ cookie?: never;
1120
+ };
1121
+ requestBody?: never;
1122
+ responses: {
1123
+ /** @description OK. */
1124
+ 200: {
1125
+ headers: {
1126
+ [name: string]: unknown;
1127
+ };
1128
+ content: {
1129
+ 'application/json': components['schemas']['Event'];
1130
+ };
1131
+ };
1132
+ /** @description Bad request. The event Id provided is not valid. */
1133
+ 400: {
1134
+ headers: {
1135
+ [name: string]: unknown;
1136
+ };
1137
+ content: {
1138
+ 'application/json': components['schemas']['ErrorResponse'];
1139
+ };
1140
+ };
1141
+ /** @description Forbidden. Access to this API is denied. */
1142
+ 403: {
1143
+ headers: {
1144
+ [name: string]: unknown;
1145
+ };
1146
+ content: {
1147
+ 'application/json': components['schemas']['ErrorResponse'];
1148
+ };
1149
+ };
1150
+ /** @description Not found. The event Id cannot be found in this workspace's data. */
1151
+ 404: {
1152
+ headers: {
1153
+ [name: string]: unknown;
1154
+ };
1155
+ content: {
1156
+ 'application/json': components['schemas']['ErrorResponse'];
1157
+ };
1158
+ };
1159
+ /** @description Too Many Requests. The request is throttled. */
1160
+ 429: {
1161
+ headers: {
1162
+ [name: string]: unknown;
1163
+ };
1164
+ content: {
1165
+ 'application/json': components['schemas']['ErrorResponse'];
1166
+ };
1167
+ };
1168
+ /** @description Workspace error. */
1169
+ 500: {
1170
+ headers: {
1171
+ [name: string]: unknown;
1172
+ };
1173
+ content: {
1174
+ 'application/json': components['schemas']['ErrorResponse'];
1175
+ };
1176
+ };
1177
+ };
1178
+ };
1179
+ updateEvent: {
1180
+ parameters: {
1181
+ query?: never;
1182
+ header?: never;
1183
+ path: {
1184
+ /** @description The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). */
1185
+ event_id: string;
1186
+ };
1187
+ cookie?: never;
1188
+ };
1189
+ requestBody: {
1190
+ content: {
1191
+ 'application/json': components['schemas']['EventUpdate'];
1192
+ };
1193
+ };
1194
+ responses: {
1195
+ /** @description OK. */
1196
+ 200: {
1197
+ headers: {
1198
+ [name: string]: unknown;
1199
+ };
1200
+ content?: never;
1201
+ };
1202
+ /** @description Bad request. The request payload is not valid. */
1203
+ 400: {
1204
+ headers: {
1205
+ [name: string]: unknown;
1206
+ };
1207
+ content: {
1208
+ 'application/json': components['schemas']['ErrorResponse'];
1209
+ };
1210
+ };
1211
+ /** @description Forbidden. Access to this API is denied. */
1212
+ 403: {
1213
+ headers: {
1214
+ [name: string]: unknown;
1215
+ };
1216
+ content: {
1217
+ 'application/json': components['schemas']['ErrorResponse'];
1218
+ };
1219
+ };
1220
+ /** @description Not found. The event Id cannot be found in this workspace's data. */
1221
+ 404: {
1222
+ headers: {
1223
+ [name: string]: unknown;
1224
+ };
1225
+ content: {
1226
+ 'application/json': components['schemas']['ErrorResponse'];
1227
+ };
1228
+ };
1229
+ /** @description Conflict. The event is not mutable yet. */
1230
+ 409: {
1231
+ headers: {
1232
+ [name: string]: unknown;
1233
+ };
1234
+ content: {
1235
+ 'application/json': components['schemas']['ErrorResponse'];
1236
+ };
1237
+ };
1238
+ };
1239
+ };
1240
+ searchEvents: {
1241
+ parameters: {
1242
+ query?: {
1243
+ /** @description Limit the number of events returned.
1244
+ * */
1245
+ limit?: number;
1246
+ /** @description Use `pagination_key` to get the next page of results.
1247
+ *
1248
+ * When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results:
1249
+ *
1250
+ * 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100`
1251
+ * 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085`
1252
+ * */
1253
+ pagination_key?: string;
1254
+ /** @description Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals.
1255
+ * Filter for events matching this `visitor_id`.
1256
+ * */
1257
+ visitor_id?: string;
1258
+ /** @description Filter events by the Bot Detection result, specifically:
1259
+ * `all` - events where any kind of bot was detected.
1260
+ * `good` - events where a good bot was detected.
1261
+ * `bad` - events where a bad bot was detected.
1262
+ * `none` - events where no bot was detected.
1263
+ * > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response.
1264
+ * */
1265
+ bot?: components['schemas']['SearchEventsBot'];
1266
+ /** @description Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed.
1267
+ * Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32
1268
+ * */
1269
+ ip_address?: string;
1270
+ /** @description Filter events by the ASN associated with the event's IP address.
1271
+ * This corresponds to the `ip_info.(v4|v6).asn` property in the response.
1272
+ * */
1273
+ asn?: string;
1274
+ /** @description Filter events by your custom identifier.
1275
+ *
1276
+ * You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-get-function#linkedid) to associate identification requests with your own identifier, for example, session Id, purchase Id, or transaction Id. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier.
1277
+ * */
1278
+ linked_id?: string;
1279
+ /** @description Filter events by the URL (`url` property) associated with the event.
1280
+ * */
1281
+ url?: string;
1282
+ /** @description Filter events by the Bundle ID (iOS) associated with the event.
1283
+ * */
1284
+ bundle_id?: string;
1285
+ /** @description Filter events by the Package Name (Android) associated with the event.
1286
+ * */
1287
+ package_name?: string;
1288
+ /** @description Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com)
1289
+ * */
1290
+ origin?: string;
1291
+ /** @description Filter events with a timestamp greater than the start time, in Unix time (milliseconds).
1292
+ * */
1293
+ start?: number;
1294
+ /** @description Filter events with a timestamp smaller than the end time, in Unix time (milliseconds).
1295
+ * */
1296
+ end?: number;
1297
+ /** @description Sort events in reverse timestamp order.
1298
+ * */
1299
+ reverse?: boolean;
1300
+ /** @description Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event).
1301
+ * > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response.
1302
+ * */
1303
+ suspect?: boolean;
1304
+ /** @description Filter events by VPN Detection result.
1305
+ * > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response.
1306
+ * */
1307
+ vpn?: boolean;
1308
+ /** @description Filter events by Virtual Machine Detection result.
1309
+ * > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response.
1310
+ * */
1311
+ virtual_machine?: boolean;
1312
+ /** @description Filter events by Browser Tampering Detection result.
1313
+ * > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response.
1314
+ * */
1315
+ tampering?: boolean;
1316
+ /** @description Filter events by Anti-detect Browser Detection result.
1317
+ * > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response.
1318
+ * */
1319
+ anti_detect_browser?: boolean;
1320
+ /** @description Filter events by Browser Incognito Detection result.
1321
+ * > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response.
1322
+ * */
1323
+ incognito?: boolean;
1324
+ /** @description Filter events by Privacy Settings Detection result.
1325
+ * > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response.
1326
+ * */
1327
+ privacy_settings?: boolean;
1328
+ /** @description Filter events by Jailbroken Device Detection result.
1329
+ * > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response.
1330
+ * */
1331
+ jailbroken?: boolean;
1332
+ /** @description Filter events by Frida Detection result.
1333
+ * > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response.
1334
+ * */
1335
+ frida?: boolean;
1336
+ /** @description Filter events by Factory Reset Detection result.
1337
+ * > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response.
1338
+ * */
1339
+ factory_reset?: boolean;
1340
+ /** @description Filter events by Cloned App Detection result.
1341
+ * > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response.
1342
+ * */
1343
+ cloned_app?: boolean;
1344
+ /** @description Filter events by Android Emulator Detection result.
1345
+ * > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response.
1346
+ * */
1347
+ emulator?: boolean;
1348
+ /** @description Filter events by Rooted Device Detection result.
1349
+ * > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response.
1350
+ * */
1351
+ root_apps?: boolean;
1352
+ /** @description Filter events by VPN Detection result confidence level.
1353
+ * `high` - events with high VPN Detection confidence.
1354
+ * `medium` - events with medium VPN Detection confidence.
1355
+ * `low` - events with low VPN Detection confidence.
1356
+ * > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response.
1357
+ * */
1358
+ vpn_confidence?: components['schemas']['SearchEventsVpnConfidence'];
1359
+ /** @description Filter events with Suspect Score result above a provided minimum threshold.
1360
+ * > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response.
1361
+ * */
1362
+ min_suspect_score?: number;
1363
+ /** @description Filter events by Developer Tools detection result.
1364
+ * > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response.
1365
+ * */
1366
+ developer_tools?: boolean;
1367
+ /** @description Filter events by Location Spoofing detection result.
1368
+ * > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response.
1369
+ * */
1370
+ location_spoofing?: boolean;
1371
+ /** @description Filter events by MITM (Man-in-the-Middle) Attack detection result.
1372
+ * > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response.
1373
+ * */
1374
+ mitm_attack?: boolean;
1375
+ /** @description Filter events by Proxy detection result.
1376
+ * > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response.
1377
+ * */
1378
+ proxy?: boolean;
1379
+ /** @description Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14`
1380
+ * */
1381
+ sdk_version?: string;
1382
+ /** @description Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) .
1383
+ * `js` - Javascript agent (Web).
1384
+ * `ios` - Apple iOS based devices.
1385
+ * `android` - Android based devices.
1386
+ * */
1387
+ sdk_platform?: components['schemas']['SearchEventsSdkPlatform'];
1388
+ /** @description Filter for events by providing one or more environment IDs (`environment_id` property).
1389
+ * */
1390
+ environment?: string[];
1391
+ /** @description Filter events by the most precise Proximity ID provided by default.
1392
+ * > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response.
1393
+ * */
1394
+ proximity_id?: string;
1395
+ /** @description When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit.
1396
+ * */
1397
+ total_hits?: number;
1398
+ /** @description Filter events by Tor Node detection result.
1399
+ * > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response.
1400
+ * */
1401
+ tor_node?: boolean;
1402
+ };
1403
+ header?: never;
1404
+ path?: never;
1405
+ cookie?: never;
1406
+ };
1407
+ requestBody?: never;
1408
+ responses: {
1409
+ /** @description Events matching the filter(s). */
1410
+ 200: {
1411
+ headers: {
1412
+ [name: string]: unknown;
1413
+ };
1414
+ content: {
1415
+ 'application/json': components['schemas']['EventSearch'];
1416
+ };
1417
+ };
1418
+ /** @description Bad request. One or more supplied search parameters are invalid, or a required parameter is missing. */
1419
+ 400: {
1420
+ headers: {
1421
+ [name: string]: unknown;
1422
+ };
1423
+ content: {
1424
+ 'application/json': components['schemas']['ErrorResponse'];
1425
+ };
1426
+ };
1427
+ /** @description Forbidden. Access to this API is denied. */
1428
+ 403: {
1429
+ headers: {
1430
+ [name: string]: unknown;
1431
+ };
1432
+ content: {
1433
+ 'application/json': components['schemas']['ErrorResponse'];
1434
+ };
1435
+ };
1436
+ /** @description Workspace error. */
1437
+ 500: {
1438
+ headers: {
1439
+ [name: string]: unknown;
1440
+ };
1441
+ content: {
1442
+ 'application/json': components['schemas']['ErrorResponse'];
1443
+ };
1444
+ };
1445
+ };
1446
+ };
1447
+ deleteVisitorData: {
1448
+ parameters: {
1449
+ query?: never;
1450
+ header?: never;
1451
+ path: {
1452
+ /** @description The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. */
1453
+ visitor_id: string;
1454
+ };
1455
+ cookie?: never;
1456
+ };
1457
+ requestBody?: never;
1458
+ responses: {
1459
+ /** @description OK. The visitor ID is scheduled for deletion. */
1460
+ 200: {
1461
+ headers: {
1462
+ [name: string]: unknown;
1463
+ };
1464
+ content?: never;
1465
+ };
1466
+ /** @description Bad request. The visitor ID parameter is missing or in the wrong format. */
1467
+ 400: {
1468
+ headers: {
1469
+ [name: string]: unknown;
1470
+ };
1471
+ content: {
1472
+ 'application/json': components['schemas']['ErrorResponse'];
1473
+ };
1474
+ };
1475
+ /** @description Forbidden. Access to this API is denied. */
1476
+ 403: {
1477
+ headers: {
1478
+ [name: string]: unknown;
1479
+ };
1480
+ content: {
1481
+ 'application/json': components['schemas']['ErrorResponse'];
1482
+ };
1483
+ };
1484
+ /** @description Not found. The visitor ID cannot be found in this workspace's data. */
1485
+ 404: {
1486
+ headers: {
1487
+ [name: string]: unknown;
1488
+ };
1489
+ content: {
1490
+ 'application/json': components['schemas']['ErrorResponse'];
1491
+ };
1492
+ };
1493
+ /** @description Too Many Requests. The request is throttled. */
1494
+ 429: {
1495
+ headers: {
1496
+ [name: string]: unknown;
1497
+ };
1498
+ content: {
1499
+ 'application/json': components['schemas']['ErrorResponse'];
1500
+ };
1501
+ };
1502
+ };
1503
+ };
1504
+ }
1505
+
1506
+ declare enum Region {
1507
+ EU = "EU",
1508
+ AP = "AP",
1509
+ Global = "Global"
1510
+ }
1511
+ /**
1512
+ * Options for FingerprintJS server API client
1513
+ */
1514
+ interface Options {
1515
+ /**
1516
+ * Secret API key
1517
+ */
1518
+ apiKey: string;
1519
+ /**
1520
+ * Region of the FingerprintJS service server
1521
+ */
1522
+ region?: Region | `${Region}`;
1523
+ /**
1524
+ * Optional fetch implementation
1525
+ * */
1526
+ fetch?: typeof fetch;
1527
+ /**
1528
+ * Optional default headers
1529
+ */
1530
+ defaultHeaders?: Record<string, string>;
1531
+ }
1532
+ type ErrorResponse = components['schemas']['ErrorResponse'];
1533
+ /**
1534
+ * More info: https://dev.fingerprintjs.com/docs/server-api#query-parameters
1535
+ */
1536
+ type SearchEventsFilter = paths['/events']['get']['parameters']['query'];
1537
+ type SearchEventsResponse = components['schemas']['EventSearch'];
1538
+ /**
1539
+ * More info: https://dev.fingerprint.com/reference/server-api-v4-get-event
1540
+ */
1541
+ type Event = components['schemas']['Event'];
1542
+ type GetEventOptions = paths['/events/{event_id}']['get']['parameters']['query'];
1543
+ type EventUpdate = components['schemas']['EventUpdate'];
1544
+ type EventRuleAction = components['schemas']['EventRuleAction'];
1545
+ type ExtractPathParamStrings<Path> = Path extends {
1546
+ parameters: {
1547
+ path: infer P;
1548
+ };
1549
+ } ? P extends Record<string, any> ? [P[keyof P]] : [] : [];
1550
+ type ExtractQueryParams<Path> = Path extends {
1551
+ parameters: {
1552
+ query?: infer Q;
1553
+ };
1554
+ } ? undefined extends Q ? Q | undefined : Q : never;
1555
+ type ExtractRequestBody<Path> = Path extends {
1556
+ requestBody: {
1557
+ content: {
1558
+ 'application/json': infer B;
1559
+ };
1560
+ };
1561
+ } ? B : never;
1562
+ type ExtractResponse<Path> = Path extends {
1563
+ responses: {
1564
+ 200: {
1565
+ content: {
1566
+ 'application/json': infer R;
1567
+ };
1568
+ };
1569
+ };
1570
+ } ? R : void;
1571
+ type ApiMethodArgs<Path extends keyof operations> = [
1572
+ ...(ExtractRequestBody<operations[Path]> extends never ? [] : [body: ExtractRequestBody<operations[Path]>]),
1573
+ ...ExtractPathParamStrings<operations[Path]>,
1574
+ ...(ExtractQueryParams<operations[Path]> extends never ? [] : [params: ExtractQueryParams<operations[Path]>])
1575
+ ];
1576
+ type ApiMethod<Path extends keyof operations> = (...args: ApiMethodArgs<Path>) => Promise<ExtractResponse<operations[Path]>>;
1577
+ type FingerprintApi = {
1578
+ [Operation in keyof operations]: ApiMethod<Operation>;
1579
+ };
1580
+
1581
+ declare class FingerprintServerApiClient implements FingerprintApi {
1582
+ readonly region: Region;
1583
+ readonly apiKey: string;
1584
+ protected readonly fetch: typeof fetch;
1585
+ private readonly defaultHeaders;
1586
+ /**
1587
+ * FingerprintJS server API client used to fetch data from FingerprintJS
1588
+ * @constructor
1589
+ * @param {Options} options - Options for FingerprintJS server API client
1590
+ */
1591
+ constructor(options: Readonly<Options>);
1592
+ /**
1593
+ * Retrieves a specific identification event with the information from each activated product — Identification and all active [Smart signals](https://dev.fingerprint.com/docs/smart-signals-overview).
1594
+ *
1595
+ * @param eventId - identifier of the event
1596
+ * @param {object|undefined} options - Optional `getEvent` operation options
1597
+ * @param {string|undefined} options.ruleset_id - Optional ruleset ID to evaluate against the event
1598
+ *
1599
+ * @returns {Promise<Event>} - promise with event response. For more information, see the [Server API documentation](https://dev.fingerprint.com/reference/getevent).
1600
+ *
1601
+ * @example
1602
+ * ```javascript Handling an event
1603
+ * client
1604
+ * .getEvent('<eventId>')
1605
+ * .then((event) => console.log(event))
1606
+ * .catch((error) => {
1607
+ * if (error instanceof RequestError) {
1608
+ * console.log(error.statusCode, error.message)
1609
+ * // Access raw response in error
1610
+ * console.log(error.response)
1611
+ * }
1612
+ * })
1613
+ * ```
1614
+ *
1615
+ * @example Handling an event with rule_action
1616
+ * ```javascript
1617
+ * client
1618
+ * .getEvent('<eventId>', { ruleset_id: '<rulesetId>' })
1619
+ * .then((event) => {
1620
+ * const ruleAction = event.rule_action
1621
+ * if (ruleAction?.type === 'block') {
1622
+ * console.log('Blocked by rule:', ruleAction.rule_id, ruleAction.status_code)
1623
+ * }
1624
+ * })
1625
+ * .catch((error) => {
1626
+ * if (error instanceof RequestError) {
1627
+ * console.log(error.statusCode, error.message)
1628
+ * }
1629
+ * })
1630
+ * ```
1631
+ * */
1632
+ getEvent(eventId: string, options?: GetEventOptions): Promise<Event>;
1633
+ /**
1634
+ * Update an event with a given event ID
1635
+ * @description Change information in existing events specified by `eventId` or *flag suspicious events*.
1636
+ *
1637
+ * When an event is created, it is assigned `linkedId` and `tag` submitted through the JS agent parameters. This information might not be available on the client so the Server API allows for updating the attributes after the fact.
1638
+ *
1639
+ * **Warning** It's not possible to update events older than one month.
1640
+ *
1641
+ * @param body - Data to update the event with.
1642
+ * @param eventId The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id).
1643
+ *
1644
+ * @return {Promise<void>}
1645
+ *
1646
+ * @example
1647
+ * ```javascript
1648
+ * const body = {
1649
+ * linked_id: 'linked_id',
1650
+ * suspect: false,
1651
+ * }
1652
+ *
1653
+ * client
1654
+ * .updateEvent(body, '<eventId>')
1655
+ * .then(() => {
1656
+ * // Event was successfully updated
1657
+ * })
1658
+ * .catch((error) => {
1659
+ * if (error instanceof RequestError) {
1660
+ * console.log(error.statusCode, error.message)
1661
+ * // Access raw response in error
1662
+ * console.log(error.response)
1663
+ *
1664
+ * if(error.statusCode === 409) {
1665
+ * // Event is not mutable yet, wait a couple of seconds and retry the update.
1666
+ * }
1667
+ * }
1668
+ * })
1669
+ * ```
1670
+ */
1671
+ updateEvent(body: EventUpdate, eventId: string): Promise<void>;
1672
+ /**
1673
+ * Delete data by visitor ID
1674
+ * Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. All delete requests are queued:
1675
+ * Recent data (10 days or newer) belonging to the specified visitor will be deleted within 24 hours. * Data from older (11 days or more) identification events will be deleted after 90 days.
1676
+ * If you are interested in using this API, please [contact our support team](https://fingerprint.com/support/) to activate it for you. Otherwise, you will receive a 403.
1677
+ *
1678
+ * @param visitorId The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete.*
1679
+ *
1680
+ * @return {Promise<void>} Promise that resolves when the deletion request is successfully queued
1681
+ *
1682
+ * @example
1683
+ * ```javascript
1684
+ * client
1685
+ * .deleteVisitorData('<visitorId>')
1686
+ * .then(() => {
1687
+ * // Data deletion request was successfully queued
1688
+ * })
1689
+ * .catch((error) => {
1690
+ * if (error instanceof RequestError) {
1691
+ * console.log(error.statusCode, error.message)
1692
+ * // Access raw response in error
1693
+ * console.log(error.response)
1694
+ * }
1695
+ * })
1696
+ * ```
1697
+ */
1698
+ deleteVisitorData(visitorId: string): Promise<void>;
1699
+ /**
1700
+ * Search for identification events, including Smart Signals, using
1701
+ * multiple filtering criteria. If you don't provide `start` or `end`
1702
+ * parameters, the default search range is the last 7 days.
1703
+ *
1704
+ * Please note that events include mobile signals (e.g. `rootApps`) even if
1705
+ * the request originated from a non-mobile platform. We recommend you
1706
+ * **ignore** mobile signals for such requests.
1707
+ *
1708
+ * @param {SearchEventsFilter} filter - Events filter
1709
+ * @param {number} filter.limit - Limit the number of events returned. Must be greater than 0.
1710
+ * @param {string|undefined} filter.pagination_key - Use `pagination_key` to get the next page of results.
1711
+ * @param {string|undefined} filter.visitor_id - Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Identification. Filter for events matching this `visitor_id`.
1712
+ * @param {string|undefined} filter.bot - Filter events by the bot detection result, specifically:
1713
+ * - events where any kind of bot was detected.
1714
+ * - events where a good bot was detected.
1715
+ * - events where a bad bot was detected.
1716
+ * - events where no bot was detected.
1717
+ *
1718
+ * Allowed values: `all`, `good`, `bad`, `none`.
1719
+ * @param {string|undefined} filter.ip_address - Filter events by IP address range. The range can be as specific as a
1720
+ * single IP (/32 for IPv4 or /128 for IPv6).
1721
+ * All ip_address filters must use CIDR notation, for example,
1722
+ * 10.0.0.0/24, 192.168.0.1/32
1723
+ * @param {string|undefined} filter.linked_id - Filter events by your custom identifier.
1724
+ * You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to
1725
+ * associate identification requests with your own identifier, for
1726
+ * example, session ID, purchase ID, or transaction ID. You can then
1727
+ * use this `linked_id` parameter to retrieve all events associated
1728
+ * with your custom identifier.
1729
+ * @param {string|undefined} filter.url - Filter events by the URL (`url` property) associated with the event.
1730
+ * @param {string|undefined} filter.origin - Filter events by the origin field of the event. Origin could be the website domain or mobile app bundle ID (eg: com.foo.bar)
1731
+ * @param {number|undefined} filter.start - Filter events with a timestamp greater than the start time, in Unix time (milliseconds).
1732
+ * @param {number|undefined} filter.end - Filter events with a timestamp smaller than the end time, in Unix time (milliseconds).
1733
+ * @param {boolean|undefined} filter.reverse - Sort events in reverse timestamp order.
1734
+ * @param {boolean|undefined} filter.suspect - Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent).
1735
+ * @param {boolean|undefined} filter.vpn - Filter events by VPN Detection result.
1736
+ * @param {boolean|undefined} filter.virtual_machine - Filter events by Virtual Machine Detection result.
1737
+ * @param {boolean|undefined} filter.tampering - Filter events by Browser Tampering Detection result.
1738
+ * @param {boolean|undefined} filter.anti_detect_browser - Filter events by Anti-detect Browser Detection result.
1739
+ * @param {boolean|undefined} filter.incognito - Filter events by Browser Incognito Detection result.
1740
+ * @param {boolean|undefined} filter.privacy_settings - Filter events by Privacy Settings Detection result.
1741
+ * @param {boolean|undefined} filter.jailbroken - Filter events by Jailbroken Device Detection result.
1742
+ * @param {boolean|undefined} filter.frida - Filter events by Frida Detection result.
1743
+ * @param {boolean|undefined} filter.factory_reset - Filter events by Factory Reset Detection result.
1744
+ * @param {boolean|undefined} filter.cloned_app - Filter events by Cloned App Detection result.
1745
+ * @param {boolean|undefined} filter.emulator - Filter events by Android Emulator Detection result.
1746
+ * @param {boolean|undefined} filter.root_apps - Filter events by Rooted Device Detection result.
1747
+ * @param {'high'|'medium'|'low'|undefined} filter.vpn_confidence - Filter events by VPN Detection result confidence level.
1748
+ * @param {number|undefined} filter.min_suspect_score - Filter events with Suspect Score result above a provided minimum threshold.
1749
+ * @param {boolean|undefined} filter.developer_tools - Filter events by Developer Tools detection result.
1750
+ * @param {boolean|undefined} filter.location_spoofing - Filter events by Location Spoofing detection result.
1751
+ * @param {boolean|undefined} filter.mitm_attack - Filter events by MITM (Man-in-the-Middle) Attack detection result.
1752
+ * @param {boolean|undefined} filter.proxy - Filter events by Proxy detection result.
1753
+ * @param {string|undefined} filter.sdk_version - Filter events by a specific SDK version associated with the identification event (`sdk.version` property).
1754
+ * @param {string|undefined} filter.sdk_platform - Filter events by the SDK Platform associated with the identification event (`sdk.platform` property).
1755
+ * @param {string[]|undefined} filter.environment - Filter for events by providing one or more environment IDs (`environment_id` property).
1756
+ * */
1757
+ searchEvents(filter: SearchEventsFilter): Promise<SearchEventsResponse>;
1758
+ private callApi;
1759
+ }
1760
+
1761
+ declare enum DecryptionAlgorithm {
1762
+ Aes256Gcm = "aes-256-gcm"
1763
+ }
1764
+ interface DecryptionKey {
1765
+ key: Buffer$1;
1766
+ algorithm: DecryptionAlgorithm | `${DecryptionAlgorithm}`;
1767
+ }
1768
+ /**
1769
+ * @private
1770
+ * */
1771
+ declare function parseEventsResponse(unsealed: string): Event;
1772
+ /**
1773
+ * Decrypts the sealed response with the provided keys.
1774
+ * The SDK will try to decrypt the result with each key until it succeeds.
1775
+ * To learn more about sealed results visit: https://dev.fingerprint.com/docs/sealed-client-results
1776
+ * @throws UnsealAggregateError
1777
+ * @throws Error
1778
+ */
1779
+ declare function unsealEventsResponse(sealedData: Buffer$1, decryptionKeys: DecryptionKey[]): Promise<Event>;
1780
+ /**
1781
+ * @private
1782
+ * */
1783
+ declare function unseal(sealedData: Buffer$1, decryptionKeys: DecryptionKey[]): Promise<string>;
1784
+
1785
+ declare class UnsealError extends Error {
1786
+ readonly key: DecryptionKey;
1787
+ readonly error?: Error | undefined;
1788
+ constructor(key: DecryptionKey, error?: Error | undefined);
1789
+ }
1790
+ declare class UnsealAggregateError extends Error {
1791
+ readonly errors: UnsealError[];
1792
+ constructor(errors: UnsealError[]);
1793
+ addError(error: UnsealError): void;
1794
+ toString(): string;
1795
+ }
1796
+
1797
+ interface IsValidWebhookSignatureParams {
1798
+ /**
1799
+ * The value of the "fpjs-event-signature" header.
1800
+ * */
1801
+ header: string;
1802
+ /**
1803
+ * The raw data of the incoming request
1804
+ * */
1805
+ data: Buffer;
1806
+ /**
1807
+ * The secret key used to sign the request.
1808
+ * */
1809
+ secret: string;
1810
+ }
1811
+ /**
1812
+ * Verifies the HMAC signature extracted from the "fpjs-event-signature" header of the incoming request. This is a part of the webhook signing process, which is available only for enterprise customers.
1813
+ * If you wish to enable it, please contact our support: https://fingerprint.com/support
1814
+ *
1815
+ * @param {IsValidWebhookSignatureParams} params
1816
+ * @param {string} params.header - The value of the "fpjs-event-signature" header.
1817
+ * @param {Buffer} params.data - The raw data of the incoming request.
1818
+ * @param {string} params.secret - The secret key used to sign the request.
1819
+ *
1820
+ * @return {boolean} true if the signature is valid, false otherwise.
1821
+ *
1822
+ * @example
1823
+ * ```javascript
1824
+ * // Webhook endpoint handler
1825
+ * export async function POST(request: Request) {
1826
+ * try {
1827
+ * const secret = process.env.WEBHOOK_SIGNATURE_SECRET;
1828
+ * const header = request.headers.get("fpjs-event-signature");
1829
+ * const data = Buffer.from(await request.arrayBuffer());
1830
+ *
1831
+ * if (!isValidWebhookSignature({ header, data, secret })) {
1832
+ * return Response.json(
1833
+ * { message: "Webhook signature is invalid." },
1834
+ * { status: 403 },
1835
+ * );
1836
+ * }
1837
+ *
1838
+ * return Response.json({ message: "Webhook received." });
1839
+ * } catch (error) {
1840
+ * return Response.json({ error }, { status: 500 });
1841
+ * }
1842
+ * }
1843
+ * ```
1844
+ */
1845
+ declare function isValidWebhookSignature(params: IsValidWebhookSignatureParams): boolean;
1846
+
1847
+ declare class SdkError extends Error {
1848
+ readonly response?: Response | undefined;
1849
+ constructor(message: string, response?: Response | undefined, cause?: Error);
1850
+ }
1851
+ declare class RequestError<Code extends number = number, Body = unknown> extends SdkError {
1852
+ readonly statusCode: Code;
1853
+ readonly errorCode: string;
1854
+ readonly responseBody: Body;
1855
+ readonly response: Response;
1856
+ constructor(message: string, body: Body, statusCode: Code, errorCode: string, response: Response);
1857
+ static unknown(response: Response): RequestError<number, undefined>;
1858
+ static fromErrorResponse(body: ErrorResponse, response: Response): RequestError<number, {
1859
+ error: {
1860
+ code: "request_cannot_be_parsed" | "secret_api_key_required" | "secret_api_key_not_found" | "public_api_key_required" | "public_api_key_not_found" | "subscription_not_active" | "wrong_region" | "feature_not_enabled" | "request_not_found" | "visitor_not_found" | "too_many_requests" | "state_not_ready" | "failed" | "event_not_found" | "missing_module" | "payload_too_large" | "service_unavailable" | "ruleset_not_found";
1861
+ message: string;
1862
+ };
1863
+ }>;
1864
+ }
1865
+ /**
1866
+ * Error that indicate that the request was throttled.
1867
+ * */
1868
+ declare class TooManyRequestsError extends RequestError<429, ErrorResponse> {
1869
+ constructor(body: ErrorResponse, response: Response);
1870
+ }
1871
+
1872
+ export { DecryptionAlgorithm, type DecryptionKey, type ErrorResponse, type Event, type EventRuleAction, type EventUpdate, FingerprintServerApiClient, type GetEventOptions, type IsValidWebhookSignatureParams, type Options, Region, RequestError, SdkError, type SearchEventsFilter, type SearchEventsResponse, TooManyRequestsError, UnsealAggregateError, UnsealError, isValidWebhookSignature, parseEventsResponse, unseal, unsealEventsResponse };