Skip to content

Commit

Permalink
Merge pull request #143 from fingerprintjs/feat/open-api-v2.2.0
Browse files Browse the repository at this point in the history
OpenAPI schema sync
  • Loading branch information
ilfa authored Nov 26, 2024
2 parents aa0e28c + afcf2e9 commit 4306971
Show file tree
Hide file tree
Showing 22 changed files with 496 additions and 301 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 @@
---
'fingerprint-pro-server-api-php-sdk': 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 @@
---
'fingerprint-pro-server-api-php-sdk': 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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ Class | Method | HTTP request | Description
- [ProductVirtualMachine](docs/Model/ProductVirtualMachine.md)
- [Products](docs/Model/Products.md)
- [Proxy](docs/Model/Proxy.md)
- [RelatedVisitor](docs/Model/RelatedVisitor.md)
- [RemoteControl](docs/Model/RemoteControl.md)
- [RootApps](docs/Model/RootApps.md)
- [SuspectScore](docs/Model/SuspectScore.md)
Expand Down
1 change: 1 addition & 0 deletions docs/Model/Identification.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**ip** | **string** | IP address of the requesting browser or bot. |
**ip_location** | [**\Fingerprint\ServerAPI\Model\DeprecatedGeolocation**](DeprecatedGeolocation.md) | | [optional]
**linked_id** | **string** | A customer-provided id that was sent with the request. | [optional]
**suspect** | **bool** | 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). | [optional]
**timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. |
**time** | [**\DateTime**](\DateTime.md) | Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. |
**url** | **string** | Page URL from which the request was sent. |
Expand Down
9 changes: 0 additions & 9 deletions docs/Model/RelatedVisitor.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/Model/VPNMethods.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. |
**auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. |
**os_mismatch** | **bool** | The browser runs on a different operating system than the operating system inferred from the request network signature. |
**relay** | **bool** | 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. |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

36 changes: 25 additions & 11 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ paths:
publicVPN: false
auxiliaryMobile: false
osMismatch: false
relay: false
proxy:
result: false
tampering:
Expand Down Expand Up @@ -848,6 +849,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 @@ -1218,6 +1225,7 @@ components:
- publicVPN
- auxiliaryMobile
- osMismatch
- relay
properties:
timezoneMismatch:
type: boolean
Expand All @@ -1239,6 +1247,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 @@ -2290,14 +2315,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.
28 changes: 28 additions & 0 deletions src/Model/Identification.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Identification implements ModelInterface, \ArrayAccess
'ip' => 'string',
'ip_location' => '\Fingerprint\ServerAPI\Model\DeprecatedGeolocation',
'linked_id' => 'string',
'suspect' => 'bool',
'timestamp' => 'int',
'time' => '\DateTime',
'url' => 'string',
Expand All @@ -82,6 +83,7 @@ class Identification implements ModelInterface, \ArrayAccess
'ip' => null,
'ip_location' => null,
'linked_id' => null,
'suspect' => null,
'timestamp' => 'int64',
'time' => 'date-time',
'url' => null,
Expand All @@ -106,6 +108,7 @@ class Identification implements ModelInterface, \ArrayAccess
'ip' => 'ip',
'ip_location' => 'ipLocation',
'linked_id' => 'linkedId',
'suspect' => 'suspect',
'timestamp' => 'timestamp',
'time' => 'time',
'url' => 'url',
Expand All @@ -129,6 +132,7 @@ class Identification implements ModelInterface, \ArrayAccess
'ip' => 'setIp',
'ip_location' => 'setIpLocation',
'linked_id' => 'setLinkedId',
'suspect' => 'setSuspect',
'timestamp' => 'setTimestamp',
'time' => 'setTime',
'url' => 'setUrl',
Expand All @@ -152,6 +156,7 @@ class Identification implements ModelInterface, \ArrayAccess
'ip' => 'getIp',
'ip_location' => 'getIpLocation',
'linked_id' => 'getLinkedId',
'suspect' => 'getSuspect',
'timestamp' => 'getTimestamp',
'time' => 'getTime',
'url' => 'getUrl',
Expand Down Expand Up @@ -184,6 +189,7 @@ public function __construct(?array $data = null)
$this->container['ip'] = isset($data['ip']) ? $data['ip'] : null;
$this->container['ip_location'] = isset($data['ip_location']) ? $data['ip_location'] : null;
$this->container['linked_id'] = isset($data['linked_id']) ? $data['linked_id'] : null;
$this->container['suspect'] = isset($data['suspect']) ? $data['suspect'] : null;
$this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null;
$this->container['time'] = isset($data['time']) ? $data['time'] : null;
$this->container['url'] = isset($data['url']) ? $data['url'] : null;
Expand Down Expand Up @@ -467,6 +473,28 @@ public function setLinkedId(?string $linked_id): self
return $this;
}

/**
* Gets suspect.
*/
public function getSuspect(): ?bool
{
return $this->container['suspect'];
}

/**
* Sets suspect.
*
* @param ?bool $suspect 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).
*
* @return $this
*/
public function setSuspect(?bool $suspect): self
{
$this->container['suspect'] = $suspect;

return $this;
}

/**
* Gets timestamp.
*/
Expand Down
Loading

0 comments on commit 4306971

Please sign in to comment.