diff --git a/.changeset/dark-dogs-play.md b/.changeset/dark-dogs-play.md new file mode 100644 index 00000000..c10c05e8 --- /dev/null +++ b/.changeset/dark-dogs-play.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +Mark `replayed` field required in the `identification` product schema. This field will always be present. \ No newline at end of file diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..5b3e67ac --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "fingerprint-pro-server-api-python-sdk": "8.8.0" + }, + "changesets": [] +} diff --git a/.changeset/sharp-facts-boil.md b/.changeset/sharp-facts-boil.md new file mode 100644 index 00000000..b1d6ea9e --- /dev/null +++ b/.changeset/sharp-facts-boil.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +Add `sdk` field with platform metadata to `identification` \ No newline at end of file diff --git a/.changeset/ten-plums-tickle.md b/.changeset/ten-plums-tickle.md new file mode 100644 index 00000000..a84440e6 --- /dev/null +++ b/.changeset/ten-plums-tickle.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': patch +--- + +Deprecate the Remote Control Detection Smart Signal. This signal is no longer available. \ No newline at end of file diff --git a/.schema-version b/.schema-version index 4c83680f..ed51b084 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.8.0 \ No newline at end of file +v2.9.0 \ No newline at end of file diff --git a/README.md b/README.md index 31edcbc3..e54535e9 100644 --- a/README.md +++ b/README.md @@ -365,6 +365,7 @@ Class | Method | HTTP request | Description - [RelatedVisitorsResponse](docs/RelatedVisitorsResponse.md) - [RemoteControl](docs/RemoteControl.md) - [RootApps](docs/RootApps.md) + - [SDK](docs/SDK.md) - [SearchEventsResponse](docs/SearchEventsResponse.md) - [SearchEventsResponseEvents](docs/SearchEventsResponseEvents.md) - [SuspectScore](docs/SuspectScore.md) diff --git a/docs/Identification.md b/docs/Identification.md index 2f2c15c8..c3b36de5 100644 --- a/docs/Identification.md +++ b/docs/Identification.md @@ -20,7 +20,8 @@ Name | Type | Description | Notes **first_seen_at** | [**IdentificationSeenAt**](IdentificationSeenAt.md) | | **last_seen_at** | [**IdentificationSeenAt**](IdentificationSeenAt.md) | | **components** | [**RawDeviceAttributes**](RawDeviceAttributes.md) | | [optional] -**replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] +**replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | +**sdk** | [**SDK**](SDK.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/ProductRemoteControl.md b/docs/ProductRemoteControl.md index b80cce38..e04f0e09 100644 --- a/docs/ProductRemoteControl.md +++ b/docs/ProductRemoteControl.md @@ -1,4 +1,7 @@ # ProductRemoteControl +This product is deprecated. + + ## Properties Name | Type | Description | Notes diff --git a/docs/RemoteControl.md b/docs/RemoteControl.md index 7c060afd..ef4a2504 100644 --- a/docs/RemoteControl.md +++ b/docs/RemoteControl.md @@ -1,4 +1,7 @@ # RemoteControl +This signal is deprecated. + + ## Properties Name | Type | Description | Notes diff --git a/docs/SDK.md b/docs/SDK.md new file mode 100644 index 00000000..e4f5265f --- /dev/null +++ b/docs/SDK.md @@ -0,0 +1,12 @@ +# SDK +Contains information about the SDK used to perform the request. + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**platform** | **str** | Platform of the SDK. | +**version** | **str** | SDK version string. | + +[[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/Webhook.md b/docs/Webhook.md index 1f19cb2c..03444b3a 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -46,6 +46,7 @@ Name | Type | Description | Notes **developer_tools** | [**WebhookDeveloperTools**](WebhookDeveloperTools.md) | | [optional] **mitm_attack** | [**WebhookMitMAttack**](WebhookMitMAttack.md) | | [optional] **replayed** | **bool** | `true` if we determined that this payload was replayed, `false` otherwise. | [optional] +**sdk** | [**SDK**](SDK.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) diff --git a/docs/WebhookRemoteControl.md b/docs/WebhookRemoteControl.md index 02e77ce0..0d247c41 100644 --- a/docs/WebhookRemoteControl.md +++ b/docs/WebhookRemoteControl.md @@ -1,4 +1,7 @@ # WebhookRemoteControl +This signal is deprecated. + + ## Properties Name | Type | Description | Notes diff --git a/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index f94d2363..af66811d 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -93,6 +93,7 @@ from fingerprint_pro_server_api_sdk.models.related_visitors_response import RelatedVisitorsResponse from fingerprint_pro_server_api_sdk.models.remote_control import RemoteControl from fingerprint_pro_server_api_sdk.models.root_apps import RootApps +from fingerprint_pro_server_api_sdk.models.sdk import SDK from fingerprint_pro_server_api_sdk.models.search_events_response import SearchEventsResponse from fingerprint_pro_server_api_sdk.models.search_events_response_events import SearchEventsResponseEvents from fingerprint_pro_server_api_sdk.models.suspect_score import SuspectScore diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 11afb794..9138dc0d 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -85,6 +85,7 @@ from fingerprint_pro_server_api_sdk.models.related_visitors_response import RelatedVisitorsResponse from fingerprint_pro_server_api_sdk.models.remote_control import RemoteControl from fingerprint_pro_server_api_sdk.models.root_apps import RootApps +from fingerprint_pro_server_api_sdk.models.sdk import SDK from fingerprint_pro_server_api_sdk.models.search_events_response import SearchEventsResponse from fingerprint_pro_server_api_sdk.models.search_events_response_events import SearchEventsResponseEvents from fingerprint_pro_server_api_sdk.models.suspect_score import SuspectScore diff --git a/fingerprint_pro_server_api_sdk/models/deprecated_geolocation.py b/fingerprint_pro_server_api_sdk/models/deprecated_geolocation.py index 263e4a09..e69343a4 100644 --- a/fingerprint_pro_server_api_sdk/models/deprecated_geolocation.py +++ b/fingerprint_pro_server_api_sdk/models/deprecated_geolocation.py @@ -17,8 +17,10 @@ from fingerprint_pro_server_api_sdk.models.geolocation_country import GeolocationCountry from fingerprint_pro_server_api_sdk.models.geolocation_continent import GeolocationContinent from fingerprint_pro_server_api_sdk.models.geolocation_subdivisions import GeolocationSubdivisions +from typing_extensions import deprecated +@deprecated("This class is deprecated. Please avoid using it in new code.") class DeprecatedGeolocation(BaseModel): """ This field is **deprecated** and will not return a result for **applications created after January 23rd, 2024**. Please use the [IP Geolocation Smart signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) for geolocation information. diff --git a/fingerprint_pro_server_api_sdk/models/identification.py b/fingerprint_pro_server_api_sdk/models/identification.py index 70a0d2b0..2410c24e 100644 --- a/fingerprint_pro_server_api_sdk/models/identification.py +++ b/fingerprint_pro_server_api_sdk/models/identification.py @@ -21,6 +21,7 @@ from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes +from fingerprint_pro_server_api_sdk.models.sdk import SDK class Identification(BaseModel): @@ -53,7 +54,8 @@ class Identification(BaseModel): 'first_seen_at': 'IdentificationSeenAt', 'last_seen_at': 'IdentificationSeenAt', 'components': 'RawDeviceAttributes', - 'replayed': 'bool' + 'replayed': 'bool', + 'sdk': 'SDK' } nullable_map = { @@ -74,7 +76,8 @@ class Identification(BaseModel): 'first_seen_at': False, 'last_seen_at': False, 'components': False, - 'replayed': False + 'replayed': False, + 'sdk': False } attribute_map = { @@ -95,10 +98,11 @@ class Identification(BaseModel): 'first_seen_at': 'firstSeenAt', 'last_seen_at': 'lastSeenAt', 'components': 'components', - 'replayed': 'replayed' + 'replayed': 'replayed', + 'sdk': 'sdk' } - def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None, replayed=None): # noqa: E501 + def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None, replayed=None, sdk=None): # noqa: E501 """Identification - a model defined in Swagger""" # noqa: E501 self._visitor_id = None self._request_id = None @@ -118,6 +122,7 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog self._last_seen_at = None self._components = None self._replayed = None + self._sdk = None self.discriminator = None self.visitor_id = visitor_id self.request_id = request_id @@ -141,8 +146,9 @@ def __init__(self, visitor_id=None, request_id=None, browser_details=None, incog self.last_seen_at = last_seen_at if components is not None: self.components = components - if replayed is not None: - self.replayed = replayed + self.replayed = replayed + if sdk is not None: + self.sdk = sdk @property def visitor_id(self) -> str: @@ -512,7 +518,7 @@ def components(self, components: Optional[RawDeviceAttributes]): self._components = components @property - def replayed(self) -> Optional[bool]: + def replayed(self) -> bool: """Gets the replayed of this Identification. # noqa: E501 `true` if we determined that this payload was replayed, `false` otherwise. # noqa: E501 @@ -522,13 +528,34 @@ def replayed(self) -> Optional[bool]: return self._replayed @replayed.setter - def replayed(self, replayed: Optional[bool]): + def replayed(self, replayed: bool): """Sets the replayed of this Identification. `true` if we determined that this payload was replayed, `false` otherwise. # noqa: E501 :param replayed: The replayed of this Identification. # noqa: E501 """ + if replayed is None: + raise ValueError("Invalid value for `replayed`, must not be `None`") # noqa: E501 self._replayed = replayed + @property + def sdk(self) -> Optional[SDK]: + """Gets the sdk of this Identification. # noqa: E501 + + + :return: The sdk of this Identification. # noqa: E501 + """ + return self._sdk + + @sdk.setter + def sdk(self, sdk: Optional[SDK]): + """Sets the sdk of this Identification. + + + :param sdk: The sdk of this Identification. # noqa: E501 + """ + + self._sdk = sdk + diff --git a/fingerprint_pro_server_api_sdk/models/product_remote_control.py b/fingerprint_pro_server_api_sdk/models/product_remote_control.py index 536f1f82..b045c094 100644 --- a/fingerprint_pro_server_api_sdk/models/product_remote_control.py +++ b/fingerprint_pro_server_api_sdk/models/product_remote_control.py @@ -15,10 +15,15 @@ from fingerprint_pro_server_api_sdk.base_model import BaseModel from fingerprint_pro_server_api_sdk.models.remote_control import RemoteControl from fingerprint_pro_server_api_sdk.models.error import Error +from typing_extensions import deprecated +@deprecated("This class is deprecated. Please avoid using it in new code.") class ProductRemoteControl(BaseModel): - """NOTE: This class is auto generated by the swagger code generator program. + """ + This product is deprecated. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/remote_control.py b/fingerprint_pro_server_api_sdk/models/remote_control.py index cc5f6e17..a75403de 100644 --- a/fingerprint_pro_server_api_sdk/models/remote_control.py +++ b/fingerprint_pro_server_api_sdk/models/remote_control.py @@ -13,10 +13,15 @@ import re # noqa: F401 from typing import Dict, List, Optional # noqa: F401 from fingerprint_pro_server_api_sdk.base_model import BaseModel +from typing_extensions import deprecated +@deprecated("This class is deprecated. Please avoid using it in new code.") class RemoteControl(BaseModel): - """NOTE: This class is auto generated by the swagger code generator program. + """ + This signal is deprecated. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/fingerprint_pro_server_api_sdk/models/sdk.py b/fingerprint_pro_server_api_sdk/models/sdk.py new file mode 100644 index 00000000..4be2a72f --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/sdk.py @@ -0,0 +1,101 @@ +# 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 SDK(BaseModel): + """ + Contains information about the SDK used to perform the request. + + 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 = { + 'platform': 'str', + 'version': 'str' + } + + nullable_map = { + 'platform': False, + 'version': False + } + + attribute_map = { + 'platform': 'platform', + 'version': 'version' + } + + def __init__(self, platform=None, version=None): # noqa: E501 + """SDK - a model defined in Swagger""" # noqa: E501 + self._platform = None + self._version = None + self.discriminator = None + self.platform = platform + self.version = version + + @property + def platform(self) -> str: + """Gets the platform of this SDK. # noqa: E501 + + Platform of the SDK. # noqa: E501 + + :return: The platform of this SDK. # noqa: E501 + """ + return self._platform + + @platform.setter + def platform(self, platform: str): + """Sets the platform of this SDK. + + Platform of the SDK. # noqa: E501 + + :param platform: The platform of this SDK. # noqa: E501 + """ + if platform is None: + raise ValueError("Invalid value for `platform`, must not be `None`") # noqa: E501 + + self._platform = platform + + @property + def version(self) -> str: + """Gets the version of this SDK. # noqa: E501 + + SDK version string. # noqa: E501 + + :return: The version of this SDK. # noqa: E501 + """ + return self._version + + @version.setter + def version(self, version: str): + """Sets the version of this SDK. + + SDK version string. # noqa: E501 + + :param version: The version of this SDK. # noqa: E501 + """ + if version is None: + raise ValueError("Invalid value for `version`, must not be `None`") # noqa: E501 + + self._version = version + diff --git a/fingerprint_pro_server_api_sdk/models/webhook.py b/fingerprint_pro_server_api_sdk/models/webhook.py index 9c063789..294179b8 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook.py +++ b/fingerprint_pro_server_api_sdk/models/webhook.py @@ -44,6 +44,7 @@ from fingerprint_pro_server_api_sdk.models.webhook_velocity import WebhookVelocity from fingerprint_pro_server_api_sdk.models.webhook_developer_tools import WebhookDeveloperTools from fingerprint_pro_server_api_sdk.models.webhook_mit_m_attack import WebhookMitMAttack +from fingerprint_pro_server_api_sdk.models.sdk import SDK class Webhook(BaseModel): @@ -101,7 +102,8 @@ class Webhook(BaseModel): 'velocity': 'WebhookVelocity', 'developer_tools': 'WebhookDeveloperTools', 'mitm_attack': 'WebhookMitMAttack', - 'replayed': 'bool' + 'replayed': 'bool', + 'sdk': 'SDK' } nullable_map = { @@ -147,7 +149,8 @@ class Webhook(BaseModel): 'velocity': False, 'developer_tools': False, 'mitm_attack': False, - 'replayed': False + 'replayed': False, + 'sdk': False } attribute_map = { @@ -193,10 +196,11 @@ class Webhook(BaseModel): 'velocity': 'velocity', 'developer_tools': 'developerTools', 'mitm_attack': 'mitmAttack', - 'replayed': 'replayed' + 'replayed': 'replayed', + 'sdk': 'sdk' } - def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag=None, time=None, timestamp=None, ip_location=None, linked_id=None, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None, browser_details=None, incognito=None, client_referrer=None, components=None, bot=None, user_agent=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None, replayed=None): # noqa: E501 + def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag=None, time=None, timestamp=None, ip_location=None, linked_id=None, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None, browser_details=None, incognito=None, client_referrer=None, components=None, bot=None, user_agent=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None, replayed=None, sdk=None): # noqa: E501 """Webhook - a model defined in Swagger""" # noqa: E501 self._request_id = None self._url = None @@ -241,6 +245,7 @@ def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag= self._developer_tools = None self._mitm_attack = None self._replayed = None + self._sdk = None self.discriminator = None self.request_id = request_id self.url = url @@ -323,6 +328,7 @@ def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag= self.mitm_attack = mitm_attack if replayed is not None: self.replayed = replayed + self.sdk = sdk @property def request_id(self) -> str: @@ -1173,3 +1179,24 @@ def replayed(self, replayed: Optional[bool]): self._replayed = replayed + @property + def sdk(self) -> SDK: + """Gets the sdk of this Webhook. # noqa: E501 + + + :return: The sdk of this Webhook. # noqa: E501 + """ + return self._sdk + + @sdk.setter + def sdk(self, sdk: SDK): + """Sets the sdk of this Webhook. + + + :param sdk: The sdk of this Webhook. # noqa: E501 + """ + if sdk is None: + raise ValueError("Invalid value for `sdk`, must not be `None`") # noqa: E501 + + self._sdk = sdk + diff --git a/fingerprint_pro_server_api_sdk/models/webhook_remote_control.py b/fingerprint_pro_server_api_sdk/models/webhook_remote_control.py index bc85a600..13e6a75d 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_remote_control.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_remote_control.py @@ -13,10 +13,15 @@ import re # noqa: F401 from typing import Dict, List, Optional # noqa: F401 from fingerprint_pro_server_api_sdk.base_model import BaseModel +from typing_extensions import deprecated +@deprecated("This class is deprecated. Please avoid using it in new code.") class WebhookRemoteControl(BaseModel): - """NOTE: This class is auto generated by the swagger code generator program. + """ + This signal is deprecated. + + NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ diff --git a/requirements.txt b/requirements.txt index 4d951c6f..29dd6a3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ setuptools >= 65.5.1 urllib3>=1.23 python-dotenv cryptography +typing_extensions >= 4.5 \ No newline at end of file diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 98185af7..a18ca18c 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -1058,6 +1058,20 @@ components: the generic type provided here. additionalProperties: $ref: '#/components/schemas/RawDeviceAttribute' + SDK: + type: object + description: Contains information about the SDK used to perform the request. + additionalProperties: false + required: + - platform + - version + properties: + platform: + type: string + description: Platform of the SDK. + version: + type: string + description: SDK version string. Identification: type: object additionalProperties: false @@ -1074,6 +1088,7 @@ components: - visitorFound - firstSeenAt - lastSeenAt + - replayed properties: visitorId: type: string @@ -1136,6 +1151,8 @@ components: description: > `true` if we determined that this payload was replayed, `false` otherwise. + sdk: + $ref: '#/components/schemas/SDK' ErrorCode: type: string enum: @@ -1862,6 +1879,9 @@ components: $ref: '#/components/schemas/Error' RemoteControl: type: object + deprecated: true + description: | + This signal is deprecated. additionalProperties: false required: - result @@ -1873,6 +1893,9 @@ components: (e.g. TeamViewer), `false` otherwise. ProductRemoteControl: type: object + deprecated: true + description: | + This product is deprecated. additionalProperties: false properties: data: @@ -2497,6 +2520,9 @@ components: https://dev.fingerprint.com/docs/suspect-score WebhookRemoteControl: type: object + deprecated: true + description: | + This signal is deprecated. additionalProperties: false properties: result: @@ -2587,6 +2613,7 @@ components: - ip - time - timestamp + - sdk properties: requestId: type: string @@ -2696,3 +2723,5 @@ components: description: > `true` if we determined that this payload was replayed, `false` otherwise. + sdk: + $ref: '#/components/schemas/SDK' diff --git a/setup.py b/setup.py index 1fb72511..9695292b 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,8 @@ "certifi>=2023.7.22", "python-dateutil>=2.5.3", "urllib3>=1.23", - "cryptography" + "cryptography", + "typing_extensions>=4.5" ] diff --git a/template/model.mustache b/template/model.mustache index ce0672e7..6ad97ffd 100644 --- a/template/model.mustache +++ b/template/model.mustache @@ -15,8 +15,14 @@ from {{packageName}}.models.__to__snake__case({{complexType}}) import {{complexT from datetime import datetime {{/isDateTime}} {{/vars}} +{{#schema.deprecated}} +from typing_extensions import deprecated +{{/schema.deprecated}} +{{#schema.deprecated}} +@deprecated("This class is deprecated. Please avoid using it in new code.") +{{/schema.deprecated}} class {{classname}}({{#parent}}{{parent}}{{/parent}}{{^parent}}BaseModel{{/parent}}): """{{#description}} {{{.}}} diff --git a/template/setup.mustache b/template/setup.mustache index 74130502..7c74e420 100644 --- a/template/setup.mustache +++ b/template/setup.mustache @@ -22,7 +22,8 @@ REQUIRES = [ "certifi>=2023.7.22", "python-dateutil>=2.5.3", "urllib3>=1.23", - "cryptography" + "cryptography", + "typing_extensions>=4.5" ] {{#asyncio}} diff --git a/test/mocks/get_event_200.json b/test/mocks/get_event_200.json index 31298286..a4cd83d3 100644 --- a/test/mocks/get_event_200.json +++ b/test/mocks/get_event_200.json @@ -56,6 +56,10 @@ "global": null, "subscription": null }, + "sdk": { + "platform": "js", + "version": "3.11.10" + }, "replayed": false } }, @@ -278,11 +282,6 @@ "result": false } }, - "remoteControl": { - "data": { - "result": false - } - }, "velocity": { "data": { "distinctIp": { diff --git a/test/mocks/get_event_200_all_errors.json b/test/mocks/get_event_200_all_errors.json index e4876e19..6e53e7cd 100644 --- a/test/mocks/get_event_200_all_errors.json +++ b/test/mocks/get_event_200_all_errors.json @@ -136,12 +136,6 @@ "message": "internal server error" } }, - "remoteControl": { - "error": { - "code": "Failed", - "message": "internal server error" - } - }, "velocity": { "error": { "code": "Failed", diff --git a/test/mocks/get_event_200_botd_failed_error.json b/test/mocks/get_event_200_botd_failed_error.json index f142f7b3..0afa5b79 100644 --- a/test/mocks/get_event_200_botd_failed_error.json +++ b/test/mocks/get_event_200_botd_failed_error.json @@ -55,7 +55,8 @@ "lastSeenAt": { "global": "2022-03-16T11:28:34.023Z", "subscription": null - } + }, + "replayed": false } }, "botd": { diff --git a/test/mocks/get_event_200_extra_fields.json b/test/mocks/get_event_200_extra_fields.json index c15eb568..5a56a1c7 100644 --- a/test/mocks/get_event_200_extra_fields.json +++ b/test/mocks/get_event_200_extra_fields.json @@ -56,7 +56,8 @@ "lastSeenAt": { "global": "2022-03-16T11:28:34.023Z", "subscription": null - } + }, + "replayed": false } }, "botd": { diff --git a/test/mocks/get_event_200_with_broken_format.json b/test/mocks/get_event_200_with_broken_format.json index 29962f1c..dd726c43 100644 --- a/test/mocks/get_event_200_with_broken_format.json +++ b/test/mocks/get_event_200_with_broken_format.json @@ -57,7 +57,8 @@ "lastSeenAt": { "global": null, "subscription": null - } + }, + "replayed": false } }, "botd": { @@ -286,4 +287,4 @@ } } } -} \ No newline at end of file +} diff --git a/test/mocks/get_event_200_with_unknown_field.json b/test/mocks/get_event_200_with_unknown_field.json index 7f72ea37..4853073f 100644 --- a/test/mocks/get_event_200_with_unknown_field.json +++ b/test/mocks/get_event_200_with_unknown_field.json @@ -59,7 +59,8 @@ "lastSeenAt": { "global": null, "subscription": null - } + }, + "replayed": false } }, "botd": { @@ -288,4 +289,4 @@ } } } -} \ No newline at end of file +} diff --git a/test/mocks/get_event_search_200.json b/test/mocks/get_event_search_200.json index ceae5a3d..0f3ca053 100644 --- a/test/mocks/get_event_search_200.json +++ b/test/mocks/get_event_search_200.json @@ -57,7 +57,8 @@ "lastSeenAt": { "global": null, "subscription": null - } + }, + "replayed": false } }, "botd": { @@ -279,11 +280,6 @@ "result": false } }, - "remoteControl": { - "data": { - "result": false - } - }, "velocity": { "data": { "distinctIp": { diff --git a/test/mocks/webhook.json b/test/mocks/webhook.json index 2b24d7a6..3eeffb35 100644 --- a/test/mocks/webhook.json +++ b/test/mocks/webhook.json @@ -193,9 +193,6 @@ "suspectScore": { "result": 0 }, - "remoteControl": { - "result": false - }, "velocity": { "distinctIp": { "intervals": { @@ -247,5 +244,9 @@ "mitmAttack": { "result": false }, + "sdk": { + "platform": "js", + "version": "3.11.10" + }, "replayed": false } diff --git a/test/test_sealed.py b/test/test_sealed.py index 93921177..277b386a 100644 --- a/test/test_sealed.py +++ b/test/test_sealed.py @@ -71,7 +71,8 @@ def test_unseal_aes256gcm(self): "lastSeenAt": { "global": "2023-12-19T11:39:51.52Z", "subscription": "2023-12-19T11:39:51.52Z" - } + }, + "replayed": false } }, "botd": { @@ -94,7 +95,7 @@ def test_unseal_aes256gcm(self): expected_result = ApiClientDeserializer.deserialize(json.loads(sealed_result), 'EventsGetResponse') sealed_data = base64.b64decode( - 'noXc7SXO+mqeAGrvBMgObi/S0fXTpP3zupk8qFqsO/1zdtWCD169iLA3VkkZh9ICHpZ0oWRzqG0M9/TnCeKFohgBLqDp6O0zEfXOv6i5q++aucItznQdLwrKLP+O0blfb4dWVI8/aSbd4ELAZuJJxj9bCoVZ1vk+ShbUXCRZTD30OIEAr3eiG9aw00y1UZIqMgX6CkFlU9L9OnKLsNsyomPIaRHTmgVTI5kNhrnVNyNsnzt9rY7fUD52DQxJILVPrUJ1Q+qW7VyNslzGYBPG0DyYlKbRAomKJDQIkdj/Uwa6bhSTq4XYNVvbk5AJ/dGwvsVdOnkMT2Ipd67KwbKfw5bqQj/cw6bj8Cp2FD4Dy4Ud4daBpPRsCyxBM2jOjVz1B/lAyrOp8BweXOXYugwdPyEn38MBZ5oL4D38jIwR/QiVnMHpERh93jtgwh9Abza6i4/zZaDAbPhtZLXSM5ztdctv8bAb63CppLU541Kf4OaLO3QLvfLRXK2n8bwEwzVAqQ22dyzt6/vPiRbZ5akh8JB6QFXG0QJF9DejsIspKF3JvOKjG2edmC9o+GfL3hwDBiihYXCGY9lElZICAdt+7rZm5UxMx7STrVKy81xcvfaIp1BwGh/HyMsJnkE8IczzRFpLlHGYuNDxdLoBjiifrmHvOCUDcV8UvhSV+UAZtAVejdNGo5G/bz0NF21HUO4pVRPu6RqZIs/aX4hlm6iO/0Ru00ct8pfadUIgRcephTuFC2fHyZxNBC6NApRtLSNLfzYTTo/uSjgcu6rLWiNo5G7yfrM45RXjalFEFzk75Z/fu9lCJJa5uLFgDNKlU+IaFjArfXJCll3apbZp4/LNKiU35ZlB7ZmjDTrji1wLep8iRVVEGht/DW00MTok7Zn7Fv+MlxgWmbZB3BuezwTmXb/fNw==') + 'noXc7etL3WJZn6BSZLV4tcjBr0uFr4+qvDrSdcZ9M1bb1MB+/le7UKY+6FJNFQHBm64X1/GVE3xkjBuW4mveH3jEK8cOSWBhl71tgYegxm+MkRHRAYM7vDPOS4sw1rb6xqdVZ/sovFP6yIqNRhrKWdO/B99vtext6l/NWlmXfTCoX3LHXYK94yr0O4eptZBwBK70fMB0YBR6iw1/zJOs9W6LZ50d2ml4wl/Ah1qJKmQueraKJaIIAQEUNbOm8ReoRsDrAWsVbIv2IscKEGNwZEjd5V1nZFkHLzOUQGKLjFQqGxFFmxV/PuDZve/lHyjmn9q3+UFJzJKXVOLyPTjhwQdjouvdJn5k9FEpH0hua+/KgSrcIKnKXtk7zPXAFEo9FeQJA3XJH8+dHcDgadl6/FIrAxtqrMRbngp7wKpltIySaCMi9P0qYoWnVvQC3gyc5xoW00UxcdPfXnQR9F21QfZ3EzULIbJQ5sUjwcg31h/IszlBXueHnGEiszhdXAIOHU865FLJsvLAqZD1A+R9/gurAG3kck1A/t8Vf8znmd8WeMezj0KObenNhHeDpjAFcAZS6evr8gDb/IZ6Ge3CUzBvfXUZNNlhEujS6yo/eK/plFACtbbIMiosQq1zRIMlLmAvlb42jNAwPtjb2JQhO+AP+EUUEe8nTDjyytZIHThzuipfVIRpxEbV9MdYt0Ri5EqI4LA2YiAMmphdaio4grw51oD63GgSeKXEUi1YoLUGmXCNbn5Q1vcQiGd5O+TJ3WzacMcBcPDFd9ZxVxe8qmn3gXWXlod4NmS5nhksiiYY0UUWqMMqEEZou5LhwV8FrQdebBNDQ9GKoGkaadJoJzkKZWYlO0ju5EYTlQCUTvHenefVmrHUccteVuwz6Fsp3d5p3SBGumpbdECjUMnO2OWkOzf4S0TArorl8KnB3TidzsM94eTr0M+/uz910HmnOqIYms80IBV3yFS0CEvcvuyjnEpW/vfOIbs0qFycNx34Hltqa0PdSSzcrFfMJjR5h9g/hORaO4MNXu9ORw==') result = unseal_event_response(sealed_data, [ DecryptionKey(self.invalid_key, DecryptionAlgorithm['Aes256Gcm']),