From 4684316e153d1782fd0980e08488a8d7d78d695e Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Thu, 7 Sep 2023 19:57:01 +0200 Subject: [PATCH] fix: update OpenAPI Schema with `asn` and `dataCenter` signals --- README.md | 2 + docs/ASN.md | 11 + docs/DataCenter.md | 10 + docs/IpInfoResultV4.md | 2 + docs/IpInfoResultV6.md | 2 + docs/ProductsResponse.md | 2 +- docs/ProductsResponseIdentificationData.md | 2 +- fingerprint_pro_server_api_sdk/__init__.py | 2 + .../models/__init__.py | 2 + fingerprint_pro_server_api_sdk/models/asn.py | 167 ++++++++++++ .../models/data_center.py | 140 ++++++++++ .../models/ip_info_result_v4.py | 58 ++++- .../models/ip_info_result_v6.py | 58 ++++- .../products_response_identification_data.py | 2 + res/fingerprint-server-api.yaml | 243 ++++++++++++++++-- test/mocks/get_event.json | 12 +- test/mocks/webhook.json | 9 + 17 files changed, 687 insertions(+), 37 deletions(-) create mode 100644 docs/ASN.md create mode 100644 docs/DataCenter.md create mode 100644 fingerprint_pro_server_api_sdk/models/asn.py create mode 100644 fingerprint_pro_server_api_sdk/models/data_center.py diff --git a/README.md b/README.md index 34752f73..7e634a26 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,12 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [ASN](docs/ASN.md) - [BotdDetectionResult](docs/BotdDetectionResult.md) - [BotdResult](docs/BotdResult.md) - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) + - [DataCenter](docs/DataCenter.md) - [ErrorEvent403Response](docs/ErrorEvent403Response.md) - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) - [ErrorEvent404Response](docs/ErrorEvent404Response.md) diff --git a/docs/ASN.md b/docs/ASN.md new file mode 100644 index 00000000..82e7887d --- /dev/null +++ b/docs/ASN.md @@ -0,0 +1,11 @@ +# ASN + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**asn** | **str** | | +**network** | **str** | | +**name** | **str** | | [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) + diff --git a/docs/DataCenter.md b/docs/DataCenter.md new file mode 100644 index 00000000..675a1d91 --- /dev/null +++ b/docs/DataCenter.md @@ -0,0 +1,10 @@ +# DataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**result** | **bool** | | +**name** | **str** | | [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) + diff --git a/docs/IpInfoResultV4.md b/docs/IpInfoResultV4.md index 6394a14b..c08f44eb 100644 --- a/docs/IpInfoResultV4.md +++ b/docs/IpInfoResultV4.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] +**asn** | [**ASN**](ASN.md) | | [optional] +**data_center** | [**DataCenter**](DataCenter.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) diff --git a/docs/IpInfoResultV6.md b/docs/IpInfoResultV6.md index 82ebbcf7..76721965 100644 --- a/docs/IpInfoResultV6.md +++ b/docs/IpInfoResultV6.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **str** | | [optional] **geolocation** | [**IPLocation**](IPLocation.md) | | [optional] +**asn** | [**ASN**](ASN.md) | | [optional] +**data_center** | [**DataCenter**](DataCenter.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) diff --git a/docs/ProductsResponse.md b/docs/ProductsResponse.md index e30edeee..c7eb19c6 100644 --- a/docs/ProductsResponse.md +++ b/docs/ProductsResponse.md @@ -1,5 +1,5 @@ # ProductsResponse -Contains all the information from each activated product - Fingerprint Pro or Bot Detection +Contains all information about the request identified by `requestId`, depending on the pricing plan (Pro, Pro Plus, Enterprise) ## Properties diff --git a/docs/ProductsResponseIdentificationData.md b/docs/ProductsResponseIdentificationData.md index ae2a1944..3f37da5a 100644 --- a/docs/ProductsResponseIdentificationData.md +++ b/docs/ProductsResponseIdentificationData.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | **first_seen_at** | [**SeenAt**](SeenAt.md) | | **last_seen_at** | [**SeenAt**](SeenAt.md) | | -**visitor_id** | **str** | | +**visitor_id** | **str** | String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index 4001d4b3..10968191 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -20,10 +20,12 @@ from fingerprint_pro_server_api_sdk.api_client import ApiClient from fingerprint_pro_server_api_sdk.configuration import Configuration # import models into sdk package +from fingerprint_pro_server_api_sdk.models.asn import ASN from fingerprint_pro_server_api_sdk.models.botd_detection_result import BotdDetectionResult from fingerprint_pro_server_api_sdk.models.botd_result import BotdResult from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence +from fingerprint_pro_server_api_sdk.models.data_center import DataCenter from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index a0653749..4a275a66 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -14,10 +14,12 @@ from __future__ import absolute_import # import models into model package +from fingerprint_pro_server_api_sdk.models.asn import ASN from fingerprint_pro_server_api_sdk.models.botd_detection_result import BotdDetectionResult from fingerprint_pro_server_api_sdk.models.botd_result import BotdResult from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence +from fingerprint_pro_server_api_sdk.models.data_center import DataCenter from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response diff --git a/fingerprint_pro_server_api_sdk/models/asn.py b/fingerprint_pro_server_api_sdk/models/asn.py new file mode 100644 index 00000000..2b32f603 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/asn.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + Fingerprint Pro Server API allows you to get information about visitors and about individual 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 pprint +import re # noqa: F401 + +import six + +class ASN(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + 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 = { + 'asn': 'str', + 'network': 'str', + 'name': 'str' + } + + attribute_map = { + 'asn': 'asn', + 'network': 'network', + 'name': 'name' + } + + def __init__(self, asn=None, network=None, name=None): # noqa: E501 + """ASN - a model defined in Swagger""" # noqa: E501 + self._asn = None + self._network = None + self._name = None + self.discriminator = None + self.asn = asn + self.network = network + if name is not None: + self.name = name + + @property + def asn(self): + """Gets the asn of this ASN. # noqa: E501 + + + :return: The asn of this ASN. # noqa: E501 + :rtype: str + """ + return self._asn + + @asn.setter + def asn(self, asn): + """Sets the asn of this ASN. + + + :param asn: The asn of this ASN. # noqa: E501 + :type: str + """ + if asn is None: + raise ValueError("Invalid value for `asn`, must not be `None`") # noqa: E501 + + self._asn = asn + + @property + def network(self): + """Gets the network of this ASN. # noqa: E501 + + + :return: The network of this ASN. # noqa: E501 + :rtype: str + """ + return self._network + + @network.setter + def network(self, network): + """Sets the network of this ASN. + + + :param network: The network of this ASN. # noqa: E501 + :type: str + """ + if network is None: + raise ValueError("Invalid value for `network`, must not be `None`") # noqa: E501 + + self._network = network + + @property + def name(self): + """Gets the name of this ASN. # noqa: E501 + + + :return: The name of this ASN. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ASN. + + + :param name: The name of this ASN. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ASN, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ASN): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ASN): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/data_center.py b/fingerprint_pro_server_api_sdk/models/data_center.py new file mode 100644 index 00000000..804cdb80 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/data_center.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + Fingerprint Pro Server API allows you to get information about visitors and about individual 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 pprint +import re # noqa: F401 + +import six + +class DataCenter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + 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 = { + 'result': 'bool', + 'name': 'str' + } + + attribute_map = { + 'result': 'result', + 'name': 'name' + } + + def __init__(self, result=None, name=None): # noqa: E501 + """DataCenter - a model defined in Swagger""" # noqa: E501 + self._result = None + self._name = None + self.discriminator = None + self.result = result + if name is not None: + self.name = name + + @property + def result(self): + """Gets the result of this DataCenter. # noqa: E501 + + + :return: The result of this DataCenter. # noqa: E501 + :rtype: bool + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this DataCenter. + + + :param result: The result of this DataCenter. # noqa: E501 + :type: bool + """ + if result is None: + raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 + + self._result = result + + @property + def name(self): + """Gets the name of this DataCenter. # noqa: E501 + + + :return: The name of this DataCenter. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DataCenter. + + + :param name: The name of this DataCenter. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenter): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py index 628d81e7..c8827340 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v4.py @@ -29,23 +29,33 @@ class IpInfoResultV4(object): """ swagger_types = { 'address': 'str', - 'geolocation': 'IPLocation' + 'geolocation': 'IPLocation', + 'asn': 'ASN', + 'data_center': 'DataCenter' } attribute_map = { 'address': 'address', - 'geolocation': 'geolocation' + 'geolocation': 'geolocation', + 'asn': 'asn', + 'data_center': 'dataCenter' } - def __init__(self, address=None, geolocation=None): # noqa: E501 + def __init__(self, address=None, geolocation=None, asn=None, data_center=None): # noqa: E501 """IpInfoResultV4 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None + self._asn = None + self._data_center = None self.discriminator = None if address is not None: self.address = address if geolocation is not None: self.geolocation = geolocation + if asn is not None: + self.asn = asn + if data_center is not None: + self.data_center = data_center @property def address(self): @@ -89,6 +99,48 @@ def geolocation(self, geolocation): self._geolocation = geolocation + @property + def asn(self): + """Gets the asn of this IpInfoResultV4. # noqa: E501 + + + :return: The asn of this IpInfoResultV4. # noqa: E501 + :rtype: ASN + """ + return self._asn + + @asn.setter + def asn(self, asn): + """Sets the asn of this IpInfoResultV4. + + + :param asn: The asn of this IpInfoResultV4. # noqa: E501 + :type: ASN + """ + + self._asn = asn + + @property + def data_center(self): + """Gets the data_center of this IpInfoResultV4. # noqa: E501 + + + :return: The data_center of this IpInfoResultV4. # noqa: E501 + :rtype: DataCenter + """ + return self._data_center + + @data_center.setter + def data_center(self, data_center): + """Sets the data_center of this IpInfoResultV4. + + + :param data_center: The data_center of this IpInfoResultV4. # noqa: E501 + :type: DataCenter + """ + + self._data_center = data_center + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py index 90610469..f384a2d5 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py +++ b/fingerprint_pro_server_api_sdk/models/ip_info_result_v6.py @@ -29,23 +29,33 @@ class IpInfoResultV6(object): """ swagger_types = { 'address': 'str', - 'geolocation': 'IPLocation' + 'geolocation': 'IPLocation', + 'asn': 'ASN', + 'data_center': 'DataCenter' } attribute_map = { 'address': 'address', - 'geolocation': 'geolocation' + 'geolocation': 'geolocation', + 'asn': 'asn', + 'data_center': 'dataCenter' } - def __init__(self, address=None, geolocation=None): # noqa: E501 + def __init__(self, address=None, geolocation=None, asn=None, data_center=None): # noqa: E501 """IpInfoResultV6 - a model defined in Swagger""" # noqa: E501 self._address = None self._geolocation = None + self._asn = None + self._data_center = None self.discriminator = None if address is not None: self.address = address if geolocation is not None: self.geolocation = geolocation + if asn is not None: + self.asn = asn + if data_center is not None: + self.data_center = data_center @property def address(self): @@ -89,6 +99,48 @@ def geolocation(self, geolocation): self._geolocation = geolocation + @property + def asn(self): + """Gets the asn of this IpInfoResultV6. # noqa: E501 + + + :return: The asn of this IpInfoResultV6. # noqa: E501 + :rtype: ASN + """ + return self._asn + + @asn.setter + def asn(self, asn): + """Sets the asn of this IpInfoResultV6. + + + :param asn: The asn of this IpInfoResultV6. # noqa: E501 + :type: ASN + """ + + self._asn = asn + + @property + def data_center(self): + """Gets the data_center of this IpInfoResultV6. # noqa: E501 + + + :return: The data_center of this IpInfoResultV6. # noqa: E501 + :rtype: DataCenter + """ + return self._data_center + + @data_center.setter + def data_center(self, data_center): + """Sets the data_center of this IpInfoResultV6. + + + :param data_center: The data_center of this IpInfoResultV6. # noqa: E501 + :type: DataCenter + """ + + self._data_center = data_center + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py b/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py index c6e80934..5044c2c6 100644 --- a/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py +++ b/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py @@ -436,6 +436,7 @@ def last_seen_at(self, last_seen_at): def visitor_id(self): """Gets the visitor_id of this ProductsResponseIdentificationData. # noqa: E501 + String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. # noqa: E501 :return: The visitor_id of this ProductsResponseIdentificationData. # noqa: E501 :rtype: str @@ -446,6 +447,7 @@ def visitor_id(self): def visitor_id(self, visitor_id): """Sets the visitor_id of this ProductsResponseIdentificationData. + String of 20 characters that uniquely identifies the visitor's browser. **Pro Plus:** If a bot is detected (`products.botd.bot.result != \"notDetected\"`), the `visitorId` value contains a placeholder string `BotDetected000000000`. # noqa: E501 :param visitor_id: The visitor_id of this ProductsResponseIdentificationData. # noqa: E501 :type: str diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index a3282bd1..5232357c 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -129,8 +129,7 @@ paths: botd: data: bot: - result: bad - type: selenium + result: notDetected url: https://www.example.com/login ip: 61.127.217.15 time: '2019-05-21T16:40:13Z' @@ -155,6 +154,13 @@ paths: subdivisions: - isoCode: '10' name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath incognito: data: result: false @@ -224,6 +230,106 @@ paths: value: 0 cookiesEnabled: value: true + proPlusBotDetectedResponse: + summary: Bot detected on Pro Plus plan + value: + products: + identification: + data: + visitorId: BotDetected000000000 + requestId: 0KSh65EnVoB85JBmloQK + incognito: true + linkedId: somelinkedId + time: '2019-05-21T16:40:13Z' + timestamp: 1582299576512 + url: https://www.example.com/login + ip: 61.127.217.15 + ipLocation: {} + browserDetails: + browserName: '' + browserMajorVersion: '' + browserFullVersion: '' + os: '' + osVersion: '' + device: '' + userAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) .... + confidence: + score: 0.5 + comment: The real score is unknown + visitorFound: false + firstSeenAt: + global: null + subscription: null + lastSeenAt: + global: null + subscription: null + botd: + data: + bot: + result: bad + type: selenium + url: https://www.example.com/login + ip: 61.127.217.15 + time: '2019-05-21T16:40:13Z' + ipInfo: + data: + v4: + address: 94.142.239.124 + geolocation: + accuracyRadius: 20 + latitude: 50.05 + longitude: 14.4 + postalCode: 150 00 + timezone: Europe/Prague + city: + name: Prague + country: + code: CZ + name: Czechia + continent: + code: EU + name: Europe + subdivisions: + - isoCode: '10' + name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath + incognito: + data: + result: false + rootApps: + data: + result: false + emulator: + data: + result: false + ipBlocklist: + data: + result: false + details: + emailSpam: false + attackSource: false + tor: + data: + result: false + vpn: + data: + result: false + methods: + timezoneMismatch: false + publicVPN: false + proxy: + data: + result: false + tampering: + data: + result: false + anomalyScore: 0 allErrorsResponse: summary: All failed signals value: @@ -248,6 +354,22 @@ paths: error: code: Failed message: internal server error + clonedApp: + error: + code: Failed + message: internal server error + factoryReset: + error: + code: Failed + message: internal server error + jailbroken: + error: + code: Failed + message: internal server error + frida: + error: + code: Failed + message: internal server error emulator: error: code: Failed @@ -268,10 +390,28 @@ paths: error: code: Failed message: internal server error + privacySettings: + error: + code: Failed + message: internal server error + virtualMachine: + error: + code: Failed + message: internal server error tampering: error: code: Failed message: internal server error + rawDeviceAttributes: + data: + audio: + error: + name: Error + message: internal server error + canvas: + error: + name: Error + message: internal server error withBotdError: summary: BotD error value: @@ -3649,6 +3789,13 @@ paths: subdivisions: - isoCode: '10' name: Hlavni mesto Praha + asn: + asn: '7922' + name: COMCAST-7922 + network: 73.136.0.0/13 + dataCenter: + result: true + name: DediPath rootApps: result: false emulator: @@ -4036,7 +4183,6 @@ components: tampering: $ref: '#/components/schemas/TamperingResult' rawDeviceAttributes: - title: WebhookSignalResponseRawDeviceAttributes $ref: '#/components/schemas/RawDeviceAttributesResult' requestId: description: Unique identifier of the user's identification request. @@ -4239,6 +4385,35 @@ components: example: global: '2022-05-05T18:28:54.535Z' subscription: null + ASN: + type: object + additionalProperties: false + properties: + asn: + type: string + example: '7922' + network: + type: string + example: 73.136.0.0/13 + name: + type: string + example: COMCAST-7922 + required: + - asn + - network + title: ASN + DataCenter: + type: object + additionalProperties: false + properties: + result: + type: boolean + name: + type: string + example: DediPath + required: + - result + title: DataCenter IPLocation: type: object additionalProperties: false @@ -4312,8 +4487,8 @@ components: ProductsResponse: type: object description: >- - Contains all the information from each activated product - Fingerprint - Pro or Bot Detection + Contains all information about the request identified by `requestId`, + depending on the pricing plan (Pro, Pro Plus, Enterprise) additionalProperties: false properties: identification: @@ -4383,6 +4558,19 @@ components: $ref: '#/components/schemas/SeenAt' visitorId: type: string + description: > + String of 20 characters that uniquely identifies the + visitor's browser. + + + **Pro Plus:** + + If a bot is detected (`products.botd.bot.result != + "notDetected"`), the `visitorId` value contains a + placeholder string `BotDetected000000000`. + example: + - Ibk1527CUFmcnjLwIs4A + - BotDetected000000000 additionalProperties: false required: - browserDetails @@ -4738,6 +4926,10 @@ components: example: 94.142.239.124 geolocation: $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + dataCenter: + $ref: '#/components/schemas/DataCenter' v6: type: object additionalProperties: false @@ -4748,6 +4940,10 @@ components: example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 geolocation: $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + dataCenter: + $ref: '#/components/schemas/DataCenter' IpBlockListResult: type: object properties: @@ -4825,30 +5021,23 @@ components: Use this data with caution without assuming a specific structure beyond the generic type provided here. additionalProperties: - oneOf: - - type: object - properties: - value: - title: value - required: - - value - - type: object + type: object + properties: + error: properties: - error: - properties: - name: - title: error.name - type: string - message: - title: error.message - type: string - required: - - name - - message - title: error - type: object + name: + title: error.name + type: string + message: + title: error.message + type: string required: - - error + - name + - message + title: error + type: object + value: + title: value ProductError: type: object properties: diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index dc5cebe9..79f2b97d 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -60,8 +60,7 @@ "botd": { "data": { "bot": { - "result": "bad", - "type": "selenium" + "result": "notDetected" }, "url": "https://www.example.com/login", "ip": "61.127.217.15", @@ -95,6 +94,15 @@ "name": "Hlavni mesto Praha" } ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "dataCenter": { + "result": true, + "name": "DediPath" } } } diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index d70ffd67..9b5146c7 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -88,6 +88,15 @@ "name": "Hlavni mesto Praha" } ] + }, + "asn": { + "asn": "7922", + "name": "COMCAST-7922", + "network": "73.136.0.0/13" + }, + "dataCenter": { + "result": true, + "name": "DediPath" } } },