Skip to content

Commit

Permalink
feat: update OpenAPI schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Nov 25, 2024
1 parent 83ce0dd commit 05a9257
Show file tree
Hide file tree
Showing 16 changed files with 564 additions and 128 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-seas-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fingerprintjs/fingerprintjs-pro-server-api': minor
---

Add `relay` detection method to the VPN Detection Smart Signal
5 changes: 5 additions & 0 deletions .changeset/orange-poets-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fingerprintjs/fingerprintjs-pro-server-api': minor
---

**events**: Add a `suspect` field to the `identification` product schema
2 changes: 1 addition & 1 deletion .schema-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.1.0
v2.2.0
207 changes: 116 additions & 91 deletions resources/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,76 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/related-visitors:
get:
tags:
- Fingerprint
operationId: getRelatedVisitors
summary: Get Related Visitors
description: >
Related visitors API lets you link web visits and in-app browser visits
that originated from the same mobile device.
It searches the past 6 months of identification events to find the
visitor IDs that belong to the same mobile device as the given visitor
ID.
⚠️ Please note that this API is not enabled by default and is billable
separately. ⚠️
If you would like to use Related visitors API, please contact our
[support team](https://fingerprint.com/support).
To learn more, see [Related visitors API
reference](https://dev.fingerprint.com/reference/related-visitors-api).
parameters:
- name: visitor_id
in: query
required: true
schema:
type: string
description: >-
The [visitor
ID](https://dev.fingerprint.com/reference/get-function#visitorid)
for which you want to find the other visitor IDs that originated
from the same mobile device.
responses:
'200':
description: OK.
content:
application/json:
schema:
$ref: '#/components/schemas/RelatedVisitorsResponse'
'400':
description: >-
Bad request. The visitor ID parameter is missing or in the wrong
format.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden. Access to this API is denied.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: >-
Not found. The visitor ID cannot be found in this application's
data.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests. The request is throttled.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/webhook:
trace:
tags:
Expand Down Expand Up @@ -527,6 +597,7 @@ paths:
publicVPN: false
auxiliaryMobile: false
osMismatch: false
relay: false
proxy:
result: false
tampering:
Expand Down Expand Up @@ -609,76 +680,6 @@ paths:
responses:
default:
description: The server doesn't validate the answer.
/related-visitors:
get:
tags:
- Fingerprint
operationId: getRelatedVisitors
summary: Get Related Visitors
description: >
Related visitors API lets you link web visits and in-app browser visits
that originated from the same mobile device.
It searches the past 6 months of identification events to find the
visitor IDs that belong to the same mobile device as the given visitor
ID.
⚠️ Please note that this API is not enabled by default and is billable
separately. ⚠️
If you would like to use Related visitors API, please contact our
[support team](https://fingerprint.com/support).
To learn more, see [Related visitors API
reference](https://dev.fingerprint.com/reference/related-visitors-api).
parameters:
- name: visitor_id
in: query
required: true
schema:
type: string
description: >-
The [visitor
ID](https://dev.fingerprint.com/reference/get-function#visitorid)
for which you want to find the other visitor IDs that originated
from the same mobile device.
responses:
'200':
description: OK.
content:
application/json:
schema:
$ref: '#/components/schemas/RelatedVisitorsResponse'
'400':
description: >-
Bad request. The visitor ID parameter is missing or in the wrong
format.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden. Access to this API is denied.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: >-
Not found. The visitor ID cannot be found in this application's
data.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests. The request is throttled.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
securitySchemes:
ApiKeyHeader:
Expand Down Expand Up @@ -918,6 +919,12 @@ components:
linkedId:
type: string
description: A customer-provided id that was sent with the request.
suspect:
description: >-
Field is `true` if you have previously set the `suspect` flag for
this event using the [Server API Update event
endpoint](https://dev.fingerprint.com/reference/updateevent).
type: boolean
timestamp:
description: Timestamp of the event with millisecond precision in Unix time.
type: integer
Expand Down Expand Up @@ -1288,6 +1295,7 @@ components:
- publicVPN
- auxiliaryMobile
- osMismatch
- relay
properties:
timezoneMismatch:
type: boolean
Expand All @@ -1309,6 +1317,23 @@ components:
description: >-
The browser runs on a different operating system than the operating
system inferred from the request network signature.
relay:
type: boolean
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/).
* Like VPNs, relay services anonymize the visitor's true IP address.
* Unlike traditional VPNs, relay services don't let visitors spoof
their location by choosing an exit node in a different country.
This field allows you to differentiate VPN users and relay service
users in your fraud prevention logic.
VPN:
type: object
additionalProperties: false
Expand Down Expand Up @@ -1947,6 +1972,27 @@ components:
properties:
error:
type: string
RelatedVisitor:
type: object
additionalProperties: false
required:
- visitorId
properties:
visitorId:
type: string
description: >-
Visitor ID of a browser that originates from the same mobile device
as the input visitor ID.
RelatedVisitorsResponse:
type: object
additionalProperties: false
required:
- relatedVisitors
properties:
relatedVisitors:
type: array
items:
$ref: '#/components/schemas/RelatedVisitor'
WebhookRootApps:
type: object
additionalProperties: false
Expand Down Expand Up @@ -2360,24 +2406,3 @@ components:
$ref: '#/components/schemas/WebhookVelocity'
developerTools:
$ref: '#/components/schemas/WebhookDeveloperTools'
RelatedVisitor:
type: object
additionalProperties: false
required:
- visitorId
properties:
visitorId:
type: string
description: >-
Visitor ID of a browser that originates from the same mobile device
as the input visitor ID.
RelatedVisitorsResponse:
type: object
additionalProperties: false
required:
- relatedVisitors
properties:
relatedVisitors:
type: array
items:
$ref: '#/components/schemas/RelatedVisitor'
78 changes: 44 additions & 34 deletions src/generatedApiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,33 @@ export interface paths {
patch?: never
trace?: never
}
'/related-visitors': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* Get Related Visitors
* @description Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device.
* It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID.
*
* ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️
*
* If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support).
* To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api).
*
*/
get: operations['getRelatedVisitors']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/webhook': {
parameters: {
query?: never
Expand Down Expand Up @@ -124,33 +151,6 @@ export interface paths {
}
}
}
'/related-visitors': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* Get Related Visitors
* @description Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device.
* It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID.
*
* ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️
*
* If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support).
* To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api).
*
*/
get: operations['getRelatedVisitors']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
}
export type webhooks = Record<string, never>
export interface components {
Expand Down Expand Up @@ -248,6 +248,8 @@ export interface components {
ipLocation?: components['schemas']['DeprecatedGeolocation']
/** @description A customer-provided id that was sent with the request. */
linkedId?: string
/** @description Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). */
suspect?: boolean
/**
* Format: int64
* @description Timestamp of the event with millisecond precision in Unix time.
Expand Down Expand Up @@ -488,6 +490,14 @@ export interface components {
auxiliaryMobile: boolean
/** @description The browser runs on a different operating system than the operating system inferred from the request network signature. */
osMismatch: boolean
/** @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/).
*
* * Like VPNs, relay services anonymize the visitor's true IP address.
* * Unlike traditional VPNs, relay services don't let visitors spoof their location by choosing an exit node in a different country.
*
* This field allows you to differentiate VPN users and relay service users in your fraud prevention logic.
* */
relay: boolean
}
VPN: {
/** @description VPN or other anonymizing service has been used when sending the request. */
Expand Down Expand Up @@ -825,6 +835,13 @@ export interface components {
ErrorPlainResponse: {
error: string
}
RelatedVisitor: {
/** @description Visitor ID of a browser that originates from the same mobile device as the input visitor ID. */
visitorId: string
}
RelatedVisitorsResponse: {
relatedVisitors: components['schemas']['RelatedVisitor'][]
}
WebhookRootApps: {
/** @description Android specific root management apps detection. There are 2 values:
* * `true` - Root Management Apps detected (e.g. Magisk).
Expand Down Expand Up @@ -1078,13 +1095,6 @@ export interface components {
velocity?: components['schemas']['WebhookVelocity']
developerTools?: components['schemas']['WebhookDeveloperTools']
}
RelatedVisitor: {
/** @description Visitor ID of a browser that originates from the same mobile device as the input visitor ID. */
visitorId: string
}
RelatedVisitorsResponse: {
relatedVisitors: components['schemas']['RelatedVisitor'][]
}
}
responses: never
parameters: never
Expand Down
Loading

0 comments on commit 05a9257

Please sign in to comment.