Skip to content
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-python-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 @@ -357,6 +357,7 @@ Class | Method | HTTP request | Description
- [ProductVirtualMachine](docs/ProductVirtualMachine.md)
- [Products](docs/Products.md)
- [Proxy](docs/Proxy.md)
- [ProxyConfidence](docs/ProxyConfidence.md)
- [RawDeviceAttribute](docs/RawDeviceAttribute.md)
- [RawDeviceAttributeError](docs/RawDeviceAttributeError.md)
- [RawDeviceAttributes](docs/RawDeviceAttributes.md)
Expand Down
3 changes: 2 additions & 1 deletion docs/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** | [**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/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/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** | [**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)

1 change: 1 addition & 0 deletions fingerprint_pro_server_api_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
from fingerprint_pro_server_api_sdk.models.product_virtual_machine import ProductVirtualMachine
from fingerprint_pro_server_api_sdk.models.products import Products
from fingerprint_pro_server_api_sdk.models.proxy import Proxy
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence
from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute
from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError
from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes
Expand Down
1 change: 1 addition & 0 deletions fingerprint_pro_server_api_sdk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
from fingerprint_pro_server_api_sdk.models.product_virtual_machine import ProductVirtualMachine
from fingerprint_pro_server_api_sdk.models.products import Products
from fingerprint_pro_server_api_sdk.models.proxy import Proxy
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence
from fingerprint_pro_server_api_sdk.models.raw_device_attribute import RawDeviceAttribute
from fingerprint_pro_server_api_sdk.models.raw_device_attribute_error import RawDeviceAttributeError
from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes
Expand Down
39 changes: 33 additions & 6 deletions fingerprint_pro_server_api_sdk/models/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import re # noqa: F401
from typing import Dict, List, Optional # noqa: F401
from fingerprint_pro_server_api_sdk.base_model import BaseModel
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence


class Proxy(BaseModel):
Expand All @@ -28,28 +29,33 @@ class Proxy(BaseModel):
and the value is json key in definition.
"""
swagger_types = {
'result': 'bool'
'result': 'bool',
'confidence': 'ProxyConfidence'
}

nullable_map = {
'result': False
'result': False,
'confidence': False
}

attribute_map = {
'result': 'result'
'result': 'result',
'confidence': 'confidence'
}

def __init__(self, result=None): # noqa: E501
def __init__(self, result=None, confidence=None): # noqa: E501
"""Proxy - a model defined in Swagger""" # noqa: E501
self._result = None
self._confidence = None
self.discriminator = None
self.result = result
self.confidence = confidence

@property
def result(self) -> bool:
"""Gets the result of this Proxy. # noqa: E501

`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501

:return: The result of this Proxy. # noqa: E501
"""
Expand All @@ -59,7 +65,7 @@ def result(self) -> bool:
def result(self, result: bool):
"""Sets the result of this Proxy.

`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501

:param result: The result of this Proxy. # noqa: E501
"""
Expand All @@ -68,3 +74,24 @@ def result(self, result: bool):

self._result = result

@property
def confidence(self) -> ProxyConfidence:
"""Gets the confidence of this Proxy. # noqa: E501


:return: The confidence of this Proxy. # noqa: E501
"""
return self._confidence

@confidence.setter
def confidence(self, confidence: ProxyConfidence):
"""Sets the confidence of this Proxy.


:param confidence: The confidence of this Proxy. # noqa: E501
"""
if confidence is None:
raise ValueError("Invalid value for `confidence`, must not be `None`") # noqa: E501

self._confidence = confidence

52 changes: 52 additions & 0 deletions fingerprint_pro_server_api_sdk/models/proxy_confidence.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# coding: utf-8

"""
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. # noqa: E501

OpenAPI spec version: 3
Contact: support@fingerprint.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import re # noqa: F401
from typing import Dict, List, Optional # noqa: F401
from fingerprint_pro_server_api_sdk.base_model import BaseModel


class ProxyConfidence(BaseModel):
"""
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\".

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually.
"""

"""
allowed enum values
"""
LOW = "low"
MEDIUM = "medium"
HIGH = "high"
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
}

nullable_map = {
}

attribute_map = {
}

def __init__(self): # noqa: E501
"""ProxyConfidence - a model defined in Swagger""" # noqa: E501
self.discriminator = None

38 changes: 32 additions & 6 deletions fingerprint_pro_server_api_sdk/models/webhook_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import re # noqa: F401
from typing import Dict, List, Optional # noqa: F401
from fingerprint_pro_server_api_sdk.base_model import BaseModel
from fingerprint_pro_server_api_sdk.models.proxy_confidence import ProxyConfidence


class WebhookProxy(BaseModel):
Expand All @@ -28,29 +29,35 @@ class WebhookProxy(BaseModel):
and the value is json key in definition.
"""
swagger_types = {
'result': 'bool'
'result': 'bool',
'confidence': 'ProxyConfidence'
}

nullable_map = {
'result': False
'result': False,
'confidence': False
}

attribute_map = {
'result': 'result'
'result': 'result',
'confidence': 'confidence'
}

def __init__(self, result=None): # noqa: E501
def __init__(self, result=None, confidence=None): # noqa: E501
"""WebhookProxy - a model defined in Swagger""" # noqa: E501
self._result = None
self._confidence = None
self.discriminator = None
if result is not None:
self.result = result
if confidence is not None:
self.confidence = confidence

@property
def result(self) -> Optional[bool]:
"""Gets the result of this WebhookProxy. # noqa: E501

`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501

:return: The result of this WebhookProxy. # noqa: E501
"""
Expand All @@ -60,10 +67,29 @@ def result(self) -> Optional[bool]:
def result(self, result: Optional[bool]):
"""Sets the result of this WebhookProxy.

`true` if the request IP address is used by a public proxy provider, `false` otherwise. # noqa: E501
IP address was used by a public proxy provider or belonged to a known recent residential proxy # noqa: E501

:param result: The result of this WebhookProxy. # noqa: E501
"""

self._result = result

@property
def confidence(self) -> Optional[ProxyConfidence]:
"""Gets the confidence of this WebhookProxy. # noqa: E501


:return: The confidence of this WebhookProxy. # noqa: E501
"""
return self._confidence

@confidence.setter
def confidence(self, confidence: Optional[ProxyConfidence]):
"""Sets the confidence of this WebhookProxy.


:param confidence: The confidence of this WebhookProxy. # noqa: E501
"""

self._confidence = confidence

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
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 @@
}
}
}
}
}
5 changes: 3 additions & 2 deletions test/mocks/get_event_200_with_unknown_field.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@
},
"proxy": {
"data": {
"result": false
"result": false,
"confidence": "high"
}
},
"incognito": {
Expand Down Expand Up @@ -287,4 +288,4 @@
}
}
}
}
}
3 changes: 2 additions & 1 deletion test/mocks/get_event_search_200.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@
},
"proxy": {
"data": {
"result": false
"result": false,
"confidence": "high"
}
},
"incognito": {
Expand Down
Loading
Loading