Skip to content

OpenAPI schema sync (v2.7.0) #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/modern-moons-pick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fingerprint-pro-server-api-php-sdk': minor
---

Add `confidence` property to the Proxy detection Smart Signal, which now supports both residential and public web proxies.
2 changes: 1 addition & 1 deletion .schema-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.6.0
v2.7.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ Class | Method | HTTP request | Description
- [ProductVirtualMachine](docs/Model/ProductVirtualMachine.md)
- [Products](docs/Model/Products.md)
- [Proxy](docs/Model/Proxy.md)
- [ProxyConfidence](docs/Model/ProxyConfidence.md)
- [RelatedVisitor](docs/Model/RelatedVisitor.md)
- [RelatedVisitorsResponse](docs/Model/RelatedVisitorsResponse.md)
- [RemoteControl](docs/Model/RemoteControl.md)
Expand Down
3 changes: 2 additions & 1 deletion docs/Model/Proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. |
**result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy |
**confidence** | [**\Fingerprint\ServerAPI\Model\ProxyConfidence**](ProxyConfidence.md) | |

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

6 changes: 6 additions & 0 deletions docs/Model/ProxyConfidence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ProxyConfidence
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".


3 changes: 2 additions & 1 deletion docs/Model/WebhookProxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | [optional]
**result** | **bool** | IP address was used by a public proxy provider or belonged to a known recent residential proxy | [optional]
**confidence** | [**\Fingerprint\ServerAPI\Model\ProxyConfidence**](ProxyConfidence.md) | | [optional]

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

24 changes: 20 additions & 4 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ paths:
relay: false
proxy:
result: false
confidence: high
tampering:
result: false
anomalyScore: 0
Expand Down Expand Up @@ -1724,17 +1725,30 @@ components:
$ref: '#/components/schemas/VPN'
error:
$ref: '#/components/schemas/Error'
ProxyConfidence:
type: string
enum:
- low
- medium
- high
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".
Proxy:
type: object
additionalProperties: false
required:
- result
- confidence
properties:
result:
type: boolean
description: >
`true` if the request IP address is used by a public proxy provider,
`false` otherwise.
IP address was used by a public proxy provider or belonged to a
known recent residential proxy
confidence:
$ref: '#/components/schemas/ProxyConfidence'
ProductProxy:
type: object
additionalProperties: false
Expand Down Expand Up @@ -2485,8 +2499,10 @@ components:
result:
type: boolean
description: >
`true` if the request IP address is used by a public proxy provider,
`false` otherwise.
IP address was used by a public proxy provider or belonged to a
known recent residential proxy
confidence:
$ref: '#/components/schemas/ProxyConfidence'
WebhookTampering:
type: object
additionalProperties: false
Expand Down
43 changes: 37 additions & 6 deletions src/Model/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ class Proxy implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static array $swaggerTypes = [
'result' => 'bool'];
'result' => 'bool',
'confidence' => '\Fingerprint\ServerAPI\Model\ProxyConfidence'];

/**
* Array of property to format mappings. Used for (de)serialization.
*
* @var string[]
*/
protected static array $swaggerFormats = [
'result' => null];
'result' => null,
'confidence' => null];

/**
* Array of attributes where the key is the local name,
Expand All @@ -69,23 +71,26 @@ class Proxy implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static array $attributeMap = [
'result' => 'result'];
'result' => 'result',
'confidence' => 'confidence'];

/**
* Array of attributes to setter functions (for deserialization of responses).
*
* @var string[]
*/
protected static array $setters = [
'result' => 'setResult'];
'result' => 'setResult',
'confidence' => 'setConfidence'];

/**
* Array of attributes to getter functions (for serialization of requests).
*
* @var string[]
*/
protected static array $getters = [
'result' => 'getResult'];
'result' => 'getResult',
'confidence' => 'getConfidence'];

/**
* Associative array for storing property values.
Expand All @@ -103,6 +108,7 @@ class Proxy implements ModelInterface, \ArrayAccess
public function __construct(?array $data = null)
{
$this->container['result'] = isset($data['result']) ? $data['result'] : null;
$this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null;
}

/**
Expand Down Expand Up @@ -175,6 +181,9 @@ public function listInvalidProperties(): array
if (null === $this->container['result']) {
$invalidProperties[] = "'result' can't be null";
}
if (null === $this->container['confidence']) {
$invalidProperties[] = "'confidence' can't be null";
}

return $invalidProperties;
}
Expand All @@ -201,7 +210,7 @@ public function getResult(): bool
/**
* Sets result.
*
* @param bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise
* @param bool $result IP address was used by a public proxy provider or belonged to a known recent residential proxy
*
* @return $this
*/
Expand All @@ -212,6 +221,28 @@ public function setResult(bool $result): self
return $this;
}

/**
* Gets confidence.
*/
public function getConfidence(): ProxyConfidence
{
return $this->container['confidence'];
}

/**
* Sets confidence.
*
* @param ProxyConfidence $confidence confidence
*
* @return $this
*/
public function setConfidence(ProxyConfidence $confidence): self
{
$this->container['confidence'] = $confidence;

return $this;
}

/**
* Returns true if offset exists. False otherwise.
*
Expand Down
46 changes: 46 additions & 0 deletions src/Model/ProxyConfidence.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* ProxyConfidence.
*
* @category Class
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
*/

/**
* Fingerprint Server API.
*
* Fingerprint Server API allows you to search, update, and delete identification events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.
*
* OpenAPI spec version: 3
* Contact: support@fingerprint.com
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.34
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

namespace Fingerprint\ServerAPI\Model;

/**
* ProxyConfidence Class Doc Comment.
*
* @category Class
*
* @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\".
*
* @author Swagger Codegen team
*
* @see https://github.com/swagger-api/swagger-codegen
*/
enum ProxyConfidence: string
{
case LOW = 'low';
case MEDIUM = 'medium';
case HIGH = 'high';
}
40 changes: 34 additions & 6 deletions src/Model/WebhookProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ class WebhookProxy implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static array $swaggerTypes = [
'result' => 'bool'];
'result' => 'bool',
'confidence' => '\Fingerprint\ServerAPI\Model\ProxyConfidence'];

/**
* Array of property to format mappings. Used for (de)serialization.
*
* @var string[]
*/
protected static array $swaggerFormats = [
'result' => null];
'result' => null,
'confidence' => null];

/**
* Array of attributes where the key is the local name,
Expand All @@ -69,23 +71,26 @@ class WebhookProxy implements ModelInterface, \ArrayAccess
* @var string[]
*/
protected static array $attributeMap = [
'result' => 'result'];
'result' => 'result',
'confidence' => 'confidence'];

/**
* Array of attributes to setter functions (for deserialization of responses).
*
* @var string[]
*/
protected static array $setters = [
'result' => 'setResult'];
'result' => 'setResult',
'confidence' => 'setConfidence'];

/**
* Array of attributes to getter functions (for serialization of requests).
*
* @var string[]
*/
protected static array $getters = [
'result' => 'getResult'];
'result' => 'getResult',
'confidence' => 'getConfidence'];

/**
* Associative array for storing property values.
Expand All @@ -103,6 +108,7 @@ class WebhookProxy implements ModelInterface, \ArrayAccess
public function __construct(?array $data = null)
{
$this->container['result'] = isset($data['result']) ? $data['result'] : null;
$this->container['confidence'] = isset($data['confidence']) ? $data['confidence'] : null;
}

/**
Expand Down Expand Up @@ -195,7 +201,7 @@ public function getResult(): ?bool
/**
* Sets result.
*
* @param ?bool $result `true` if the request IP address is used by a public proxy provider, `false` otherwise
* @param ?bool $result IP address was used by a public proxy provider or belonged to a known recent residential proxy
*
* @return $this
*/
Expand All @@ -206,6 +212,28 @@ public function setResult(?bool $result): self
return $this;
}

/**
* Gets confidence.
*/
public function getConfidence(): ?ProxyConfidence
{
return $this->container['confidence'];
}

/**
* Sets confidence.
*
* @param ?\Fingerprint\ServerAPI\Model\ProxyConfidence $confidence confidence
*
* @return $this
*/
public function setConfidence(?ProxyConfidence $confidence): self
{
$this->container['confidence'] = $confidence;

return $this;
}

/**
* Returns true if offset exists. False otherwise.
*
Expand Down
5 changes: 3 additions & 2 deletions test/mocks/get_event_200.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
},
"proxy": {
"data": {
"result": false
"result": false,
"confidence": "high"
}
},
"incognito": {
Expand Down Expand Up @@ -339,4 +340,4 @@
}
}
}
}
}
5 changes: 3 additions & 2 deletions test/mocks/get_event_200_with_broken_format.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
},
"proxy": {
"data": {
"result": false
"result": false,
"confidence": "high"
}
},
"incognito": {
Expand Down Expand Up @@ -285,4 +286,4 @@
}
}
}
}
}
Loading
Loading