From 5422741d3250c63884eeb5b6f8365e2e4210c47a Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin <ilya.taratukhin@fingerprint.com> Date: Tue, 19 Sep 2023 14:01:37 +0200 Subject: [PATCH] fix: update OpenAPI Schema with `auxiliaryMobile` method for VPN signal --- docs/VpnResult.md | 2 +- docs/VpnResultMethods.md | 1 + .../models/vpn_result.py | 4 +-- .../models/vpn_result_methods.py | 34 +++++++++++++++++-- res/fingerprint-server-api.yaml | 10 +++++- test/mocks/get_event.json | 3 +- test/mocks/webhook.json | 3 +- 7 files changed, 48 insertions(+), 9 deletions(-) diff --git a/docs/VpnResult.md b/docs/VpnResult.md index 93fa212a..1084545d 100644 --- a/docs/VpnResult.md +++ b/docs/VpnResult.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | **bool** | VPN or other anonymising service has been used when sending the request. | [optional] +**result** | **bool** | VPN or other anonymizing service has been used when sending the request. | [optional] **methods** | [**VpnResultMethods**](VpnResultMethods.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/VpnResultMethods.md b/docs/VpnResultMethods.md index 29cf55cb..bba8c3d9 100644 --- a/docs/VpnResultMethods.md +++ b/docs/VpnResultMethods.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **timezone_mismatch** | **bool** | User's browser timezone doesn't match the timezone from which the request was originally made. | [optional] **public_vpn** | **bool** | Request IP address is owned and used by a public VPN service provider. | [optional] +**auxiliary_mobile** | **bool** | This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. | [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/fingerprint_pro_server_api_sdk/models/vpn_result.py b/fingerprint_pro_server_api_sdk/models/vpn_result.py index 73e24dc8..37c3a842 100644 --- a/fingerprint_pro_server_api_sdk/models/vpn_result.py +++ b/fingerprint_pro_server_api_sdk/models/vpn_result.py @@ -51,7 +51,7 @@ def __init__(self, result=None, methods=None): # noqa: E501 def result(self): """Gets the result of this VpnResult. # noqa: E501 - VPN or other anonymising service has been used when sending the request. # noqa: E501 + VPN or other anonymizing service has been used when sending the request. # noqa: E501 :return: The result of this VpnResult. # noqa: E501 :rtype: bool @@ -62,7 +62,7 @@ def result(self): def result(self, result): """Sets the result of this VpnResult. - VPN or other anonymising service has been used when sending the request. # noqa: E501 + VPN or other anonymizing service has been used when sending the request. # noqa: E501 :param result: The result of this VpnResult. # noqa: E501 :type: bool diff --git a/fingerprint_pro_server_api_sdk/models/vpn_result_methods.py b/fingerprint_pro_server_api_sdk/models/vpn_result_methods.py index 87ae7eef..b79fdab9 100644 --- a/fingerprint_pro_server_api_sdk/models/vpn_result_methods.py +++ b/fingerprint_pro_server_api_sdk/models/vpn_result_methods.py @@ -29,23 +29,28 @@ class VpnResultMethods(object): """ swagger_types = { 'timezone_mismatch': 'bool', - 'public_vpn': 'bool' + 'public_vpn': 'bool', + 'auxiliary_mobile': 'bool' } attribute_map = { 'timezone_mismatch': 'timezoneMismatch', - 'public_vpn': 'publicVPN' + 'public_vpn': 'publicVPN', + 'auxiliary_mobile': 'auxiliaryMobile' } - def __init__(self, timezone_mismatch=None, public_vpn=None): # noqa: E501 + def __init__(self, timezone_mismatch=None, public_vpn=None, auxiliary_mobile=None): # noqa: E501 """VpnResultMethods - a model defined in Swagger""" # noqa: E501 self._timezone_mismatch = None self._public_vpn = None + self._auxiliary_mobile = None self.discriminator = None if timezone_mismatch is not None: self.timezone_mismatch = timezone_mismatch if public_vpn is not None: self.public_vpn = public_vpn + if auxiliary_mobile is not None: + self.auxiliary_mobile = auxiliary_mobile @property def timezone_mismatch(self): @@ -93,6 +98,29 @@ def public_vpn(self, public_vpn): self._public_vpn = public_vpn + @property + def auxiliary_mobile(self): + """Gets the auxiliary_mobile of this VpnResultMethods. # noqa: E501 + + This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. # noqa: E501 + + :return: The auxiliary_mobile of this VpnResultMethods. # noqa: E501 + :rtype: bool + """ + return self._auxiliary_mobile + + @auxiliary_mobile.setter + def auxiliary_mobile(self, auxiliary_mobile): + """Sets the auxiliary_mobile of this VpnResultMethods. + + This method applies to mobile devices only. Indicates the result of additional methods used to detect a VPN in mobile devices. # noqa: E501 + + :param auxiliary_mobile: The auxiliary_mobile of this VpnResultMethods. # noqa: E501 + :type: bool + """ + + self._auxiliary_mobile = auxiliary_mobile + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 5232357c..bdd5fc4c 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -185,6 +185,7 @@ paths: methods: timezoneMismatch: false publicVPN: false + auxiliaryMobile: false proxy: data: result: false @@ -3812,6 +3813,7 @@ paths: methods: timezoneMismatch: false publicVPN: false + auxiliaryMobile: false proxy: result: false tampering: @@ -4970,7 +4972,7 @@ components: result: type: boolean description: >- - VPN or other anonymising service has been used when sending the + VPN or other anonymizing service has been used when sending the request. example: false methods: @@ -4988,6 +4990,12 @@ components: Request IP address is owned and used by a public VPN service provider. example: false + auxiliaryMobile: + type: boolean + description: >- + This method applies to mobile devices only. Indicates the result + of additional methods used to detect a VPN in mobile devices. + example: false TamperingResult: type: object properties: diff --git a/test/mocks/get_event.json b/test/mocks/get_event.json index 79f2b97d..90abb41c 100644 --- a/test/mocks/get_event.json +++ b/test/mocks/get_event.json @@ -141,7 +141,8 @@ "result": false, "methods": { "timezoneMismatch": false, - "publicVPN": false + "publicVPN": false, + "auxiliaryMobile": false } } }, diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 9b5146c7..9ad85c5f 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -120,7 +120,8 @@ "result": false, "methods": { "timezoneMismatch": false, - "publicVPN": false + "publicVPN": false, + "auxiliaryMobile": false } }, "proxy": {